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.
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.
| Area | What it does | Where | Status |
|---|---|---|---|
| Italy with 4 divisions | Serie A 18, B 20, C1 18, C2 18; 4 up and 4 down between adjacent levels; fixes the 1997 end-of-season freeze | patch.py | tested |
| C1/C2 teams | 36 real 1996-97 clubs with squads, coaches and calibrated strength | c1c2.py, c1c2_rosters.py | tested |
| South American cups | Libertadores (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 rules | sacups.py | tested |
| Double participation | South American clubs: Supercopa in slot 1 (the national cup slot, free in South America) + continental cup in slot 3 | sacups.py | tested |
| Persistence | South American cup lists and Intercontinental finalists saved with the career | sacups.py, salists.py | tested |
| Intercontinental | Single-match final in December between the Champions Cup winner and the Libertadores winner; finalists updated at season end; slot 2 or slot 4 | sacups.py | slot 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.py | tested (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 file | cafcups.py, trailer.py | tested (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 lots | historic.py, lib97.py | tested |
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:
patch_teams: rebuilds TEAM.020 (original Serie A and B + 36 C1/C2 clubs) and returns the index remap table.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 ofsacups.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.
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.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.movs, rep). ES is not guaranteed to equal DS where we enter. All copies in added code are byte loops through DS.D0 = obj2+0x3146D …). x86 registers are not preserved across game calls.assert. This makes porting to the other executables (English, French, German) possible and guards against silent errors.p.remove); otherwise the loader rewrites those bytes and the new call jumps to garbage (section 20).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:
| Object | Content | Link base | Notes |
|---|---|---|---|
| obj1 | code | 0x10000 | original 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. |
| obj2 | data | 0xC0000 | all 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
LEPatchclass:put/getby 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_pagefunction. 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******andCOPPA SUDAMERICANA*****, plus the asterisk padding of the secondCOPPA EUFAand ofERRORE 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) andQUALIFY_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
.CARand 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.jsonby comparing ENGLISH.EXE and ITALIAN.EXE in masked windows (fixup bytes excluded). - asmbytes.py
- Extracts the
dbbytes of a data label fromref/swos.asm, handy to find the same tables in the other language executables. - mkdocs.py
- Builds
docs/index.html(English) anddocs/it.html(Italian) for GitHub Pages from the sources indocs/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
| Offset | Name | Meaning |
|---|---|---|
| 0x16F8 | STR_BASE | base of league and cup name offsets |
| 0x707E | dseg_C707E | list of international contests (45 entries) → moved to obj1 |
| 0x7EE8 | italyTable | original Italy league structure (42 B) → replaced by one in obj1 |
| 0x8B1C | competitionsTable | 256 pointers per nation/continent |
| 0x8FD8 | southAmericaTable | South America table → moved to obj1 |
| 0x958C | careerFileBuffer | start of the career save (offset 0 of the .CAR) |
| 0x16CD6 | selTeamNumber | player's team (low byte = file, high = index) |
| 0x16CDC | dseg_D6CDC | player's division |
| 0x17E68 | someLeaguesTable | 2000 bytes, one per global team number (promotions/relegations); offset 0xE8DC in the .CAR |
| 0x18CAA | dseg_D8CAA | contest pointers of the 5 slots (+4 per slot, section 11) |
| 0x18CBE | dseg_D8CBE | player's European cup kind (trophy, reputation, prize) |
| 0x18CC0 | dseg_D8CC0 | play-off positions table (slot 4) |
| 0x18D0A / 0x1985C / 0x1A0E2 / 0x19C9F | slot 1 / 2 / 3 / 4 buffers | 0x443 bytes each |
| 0x1F4F6 | competitionFileBuffer | slot 0 buffer (the league) |
| 0x1F533 | dseg_DF533 | league substitution rules (3 words: 5, 2, 8) |
| 0x2092F | dseg_E092F | which 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 … A4 | pseudo-registers: D0 0x3146D, D1 0x31471, D2 0x31475, D7 0x31489, A0 0x3148D, A1 0x31491, A2 0x31495, A3 0x31499, A4 0x3149D |
| 0x4EEA9 | DIY_competitionStart | "working" contest: routines copy a slot here, process it and copy it back |
| 0x593F2 | leaguesTableCopy | copy of someLeaguesTable used at season end (checksum!) |
| 0xC070F | dseg_18070F | Champions Cup winner (holder); the mod also uses it for the Libertadores |
| 36 | Release 3.2: tourney packs (CLASSIC TOURNEYS from data: groups, knockout, third place, replays and coin toss, real brackets); World Cup 1934 | passed (automated harness) |
Object 1: code (game routines used by the mod)
| Offset | Routine | Role |
|---|---|---|
| 0x7B2D3 | cseg_8B2D3 | loads a contest into a slot (D0 = slot, A0 = contest, D1, D2) |
| 0x7D661 | cseg_8D661 | is the player's club in this cup's list? |
| 0x7DAC3 | cseg_8DAC3 | slot 4: the division's play-offs, with placeholder teams |
| 0x7ECAE | cseg_8ECAE | league end: real teams into the play-offs |
| 0x82D55 | cseg_92D55 | Champions Cup end: winner → dseg_18070F |
| 0x2930B | GetCurrentSeasonPointer | season record (competition names at +1Ah, +1Eh…) |
| VA 0x914F1 | 80-team assert | the 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.
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 byte | Content |
|---|---|
| +0 | nationality (18 Italy, 13 Germany, 68 Argentina, 109 Gabon…) |
| +2 | shirt number |
| +3 | name (23 B, zero-terminated: 22 characters max) |
| +26 | bits 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…+31 | 7 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 |
| +32 | price (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)
- 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.
- 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.
- 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.
- 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.
- 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).
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.
| Id | Competition | Format | Months |
|---|---|---|---|
| 0x6C | COPA LIBERTADORES | 2.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) |
| 0x6D | SUPERCOPA | 16 teams, two legs, single-match final (Cup Winners' Cup clone) | same |
| 0x6E | COPA CONMEBOL | same | same |
| 0x6F | COPPA INTERCONTINENTALE | type 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.
- South America table moved from obj2+0x8FD8 to obj1+0xA10E4: World Cup qualifiers, Copa América, Libertadores, Supercopa, CONMEBOL, Intercontinental.
- Europe table also moved to obj1: 252, Champions Cup, Cup Winners' Cup, UEFA, Intercontinental, −1, 43 nations. Five green buttons fit.
- International list (
dseg_C707E, obj2+0x707E) moved to obj1+0xA1154 with the 4 added cups: for these contests the DIY field 0x3B is 0 (simulation,CalculateViewResult).
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.
| Slot | Pointer | Buffer | Original use | Use in the mod |
|---|---|---|---|---|
| 0 | 0x18CAA | 0x1F4F6 | league | unchanged |
| 1 | 0x18CAE | 0x18D0A | national cup | Supercopa for South American clubs (no national cup in South America) |
| 2 | 0x18CB2 | 0x1985C | league cup, or friendlies and tours | Intercontinental when the slot is free (Italy, all South American countries) |
| 3 | 0x18CB6 | 0x1A0E2 | European cup | also Libertadores / Supercopa / CONMEBOL |
| 4 | 0x18CBA | 0x19C9F | division play-offs | Intercontinental 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)
- Writes the pointer into
D8CAA[slot]and+2Bh = slot, then checks the type: slots 1 and 2 accept only type-1 (knockout) cups, slot 4 only type 1, slot 0 no type 1. A wrong type leads toint 3. - Slot ≠ 4: takes the teams from the contest's list (D2 = 0) or from the selected teams (D2 ≠ 0), builds the draw and schedules the dates (
cseg_8B71C+cseg_8B8B8). - Slot 4: fills the list with
careerTeamrepeated (placeholders) and does not schedule. At the league's endcseg_8ECAEreads fromD8CC0which standings positions go to the play-offs, replaces the placeholders (cseg_32E15), schedules, copies the league's substitution rules and setsD6B62 = 1("you cannot be sacked during the play-offs").
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:
- calls the real
cseg_8DAC3; if slot 4 is taken (play-offs) it stops; - clears buffer 4's id (so an old buffer is not restored on load);
- copies the slot 2 buffer (league cup) into buffer 4;
- calls
cseg_8B2D3with slot 2: the Intercontinental is built in full, with the finalists and the dates; - swaps the two 0x443-byte buffers: Intercontinental in slot 4, league cup back intact in slot 2;
+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.
load_slot1: reads the saved block (section 15) into the lists; if slot 1 is empty and buffer 1 has id 0x6D → Supercopa; if slot 2 is empty and buffer 2 has id 0x6F → Intercontinental; if slot 4 is empty and buffer 4 has id 0x6F → Intercontinental.load_slot3: extends theE092Fmapping: 3 → Libertadores, 4 → Supercopa, 5 → CONMEBOL.
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:
[A4] = Libertadoresandcall cseg_92D55 + 10(skips the first instruction, which would select the Champions Cup): closes the Libertadores (played by the player or simulated withcseg_3ADAE) and writes the winner intodseg_18070F→LIBWIN.- 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. - 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. - Holder rules (real 1997, 2.0):
LIBWINbecomes 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,SPAREtakes that place. If it is not in the Supercopa, it takes the last place. - The real
call cseg_92D55: closes the Champions Cup. Both branches end incseg_92F1C, which always writes the winner todseg_18070F. INTLIST[0] = [dseg_18070F],INTLIST[1] = LIBWIN(each skipped if 0FFFFh), thenlists_outandret.
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
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.
| Offset | S2 format (current) | SA format (session 12) |
|---|---|---|
| +0 | marker 'S2' (word 0x3253) | marker 'SA' (0x4153) |
| +2 | Libertadores: 16 × (file, index) | same |
| +34 | Supercopa | same |
| +66 | CONMEBOL | same |
| +98 | Intercontinental: 2 × (file, index) | balance byte |
| +102 | balance 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:
- Libertadores counts as the Champions Cup;
- Supercopa in slot 3 counts as the Cup Winners' Cup;
- CONMEBOL counts as the UEFA Cup;
- Supercopa in slot 1 counts as the national cup.
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) | Bytes | Original | Becomes |
|---|---|---|---|
| 0x7D4B3 | 11 | mov [E092F],-1; jmp done (no European cup) | jmp init_sa |
| 0x7D4BE | 12 | mov ax,[D7]; mov [E092F],ax (European cup found) | jmp euro_found |
| 0x7D4CA | rel32 | call cseg_8DAC3 | call int4_step |
| 0x2396D | 10 | cmp [E092F],-1; jz out (ProcessCareerFile) | jmp load_slot1 |
| 0x239A9 | 12 | cmp [E092F],2; jz map; jmp out | jmp load_slot3 |
| 0x7ECAE | 13 | cmp dword [D8CBA],0; jz out (cseg_8ECAE) | jmp playoffs |
| 0x81470 | rel32 | call 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.
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:
- The build passes every
assert(unique signatures, expected targets). - Re-read with
le.py: the fixup tables parse without errors. ndisasmof the generated code and of every hook site: every jump goes to the right label.- Every absolute operand has a fixup to the correct object and offset (the script annotates each disassembly line with its fixups).
- Comparison with the previous build: bytes change only where intended; the only fixups changed outside the added page must be the expected ones.
- 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):
| Table | Where | Entry | What the mod does |
|---|---|---|---|
countriesTable | obj2+0x6742, 256 dwords | pointer to [continent byte, name, adjective] | new record in the added obj2 page, new pointer + fixup |
competitionsTable | obj2+0x8B1C, 256 dwords | pointer to [league pointers, -2, cup pointers, -1] | new country table and league struct in the obj1 cave |
teamsCountryNumbers | obj2+0xB2A38, 256 words | global number base (global = base + team ordinal, < 2000) | free range checked against every team file |
| continent tables | competitionsTable[80..85] | [contest pointers, -1] + country bytes + FF | rebuilt in the cave with the new countries (and the CAF cups) |
| season-end list | obj2+0x943A, FF-terminated | countries whose leagues are processed at the end of a career season | copied 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
- obj2 grows until the old BSS/stack tail is covered by zero pages, then one free page: names and country records live at obj2+0xC6000 (the stack top, ESP = old vsize, stays below). EN/IT add 2 pages, FR/DE 3.
- obj1 has a second added page, 0xA2000: country tables, league and cup structs, CAF cups, save trailer.
- Global numbers really free in the original data: 424–474, 1730–1849 and 1924–1999. The new countries use 424–469, 1730–1785 and 1924–1959; 1847–1849 hold the career mark 'S3'. Still free: 470–474, 1786–1846, 1960–1999. Country numbers: every "national team" test in the code is 80 ≤ n ≤ 85, so 86–99 are club countries like the gaps below 80.
- Contest ids: leagues 0x70–0x75, club cups 0x76–0x7B (CAF ×3, CONCACAF, Asian ×2), national cups and later leagues 0xB2–0xC0 (after the last original cup, 0xB1). Ids are identifiers and random seeds only: no range checks in the code.
The new countries
- Costa Rica (TEAM.047, original data): it had 12 clubs but no name and no league. Now a 12-team PRIMERA DIVISION in North America.
- Egypt, Morocco, Tunisia, Nigeria, Cameroon (TEAM.052, 053, 054, 056, 058): real clubs and final order of 1996-97 (1997 for Nigeria and Cameroon), from RSSSF and Wikipedia; national cup of 16 (Tunisia 8).
- South Korea, China, Saudi Arabia (61, 63, 86; 1997, 1997, 1996-97) and Guatemala, Honduras (87, 88; 1996-97): same method, templates from the J-League clubs, Algeria and El Salvador, national cups of 8.
- Invented players. No reliable 1996-97 squads exist for these leagues, so player and coach names are invented from common names of each country, on positions, faces and skills of the original African clubs (Algeria, Ghana), shifted towards a strength that falls with the final position. Real squads from those years are very welcome (GitHub Issues).
Continental club cups and the save trailer
- Contests (
cafcups.CUPS): CAF Champions League (copy of the Champions Cup: 4 groups of 4 + knockout), CAF Cup Winners Cup, CAF Cup, CONCACAF Champions Cup, Asian Club Championship and Asian Cup Winners Cup (16-team knockouts). Buttons of their continent and members of the international contests list. - Career: the slot-3 chain of
sacups.pyis generated from the list: D7 = 6 … 11; trophy and prize as the European cup of the same rank (a table of ranks). - Season end: the qualification table now has 30 countries: e.g. CAF Champions League ranks 1–2, Cup Winners Cup ranks 3–4 (the game keeps no national cup winners), CAF Cup ranks 5–6, CONCACAF ranks 1–4.
- Trailer:
SaveCareerFilewrites 'C6' + every saved list (South American with a 21-club Libertadores, Intercontinental pair, the six cups: 304 bytes; 'C5' of 1.3: 302 bytes, 'C4' of 1.2: 294 bytes) after the team records when they fit ing_selectedTeams(68400 bytes, followed by the pseudo registers);LoadCareerFilereads it back. Older saves: the 1.0/1.1 'S2'/'SA' block insomeLeaguesTableis read and cleared, older trailers ('C1'…'C5') are read; their 16- or 20-club Libertadores list is completed with the first default clubs not among them (lib_merge; the season end rebuilds it anyway); a new career is recognised by the missing 'S3' mark.
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).
- The button. Every team/competition menu is
SelectTeamsFinalMenustarted fromcompetitionsTable[254](the world table).hist_presetreplaces only thecall SelectTeamsFinalMenuofSelectTeamsForPresetCompetition(obj1+0x3C6DF): for the duration of the callcompetitionsTable[254]points at an extended world table ([worldCup, -1]+ continents + 89), then it is restored. Country 89 (CLASSICS: it TORNEI STORICI, en CLASSIC TOURNEYS, fr TOURNOIS ANCIENS, de TURNIERKLASSIKER) has acountriesTablerecord andcompetitionsTable[89] = [-2, WC82, M34, FA, -1](cups only).hist_namesreplacescall SetCountryNamesinSelectTeamsReinitand gives the button colour 11 (blue to purple) and a 5-pixel gap. - Teams. TEAM.089 (World Cup 1982), TEAM.090 (Mitropa 1934), TEAM.091 (FA Cup 1871-72): team file number = country number,
countriesTable[90]/[91]= the CLASSICS record. All three share the global numbers 1786–1817 (they never meet each other or real teams in one contest, andSetLeagueNumbersruns only in a career). The SWOS 2020 DLCs'CUSTOMS.EDThas the same 684-byte records as the TEAM files. - Contests (World Cup header clones): 0xC1 World Cup 1982, stages
05 18 06 04 | 0C 04 03 | 04 00 04 | 02 FF 02 | 02 00 02 | 01, rounds00 00 14 14 14, 2 points for a win; 0xC2 Mitropa 1934,04 10 00 10 | 08 00 08 | 04 00 04 | 02 00 02 | 01, rounds80(two legs, no extra time, no penalties: an aggregate tie is replayed as a play-off), away goals off; 0xC3 FA Cup 1871-72,04 0F 00 0F | 08 00 08 | 04 00 04 | 02 00 02 | 01, rounds00(single match, a draw is replayed). - Odd group sizes.
cseg_24DFAtrapped (test D0,1; jz; int 3; jmp $) on an odd number of teams per group, but the groups are DIY leagues, which take 2–24 teams.odd_groupsturns thejzintojmp(obj1+0x153F4): the 1982 second round has 4 groups of 3. - Fixed draws.
hist_drawreplaces bothcall cseg_27F08(the random shuffle ofA2+59hcalled bycseg_26A78andcseg_26DFCwhen the round's [15Fh] = 0; obj1+0x16B55, +0x16ED9).DRAWSrows: contest id, teams in the round, permutationnew[k] = old[perm[k]]; a permutation starting withFFmeans "only the bye, then the game's own random draw". Group qualifiers arrive 1st of each group A…, then 2nd A…, then the best (cseg_8A2CE). World Cup 1982: second round0 2 11 | 1 3 10 | 6 8 5 | 7 9 4(1A 1C 2F, 1B 1D 2E, 2A 2C 1F, 2B 2D 1E), semi-finals0 2 1 3(A–C, B–D). Mitropa: the real ties in order, semi-finals and final with the real home club first. - Bye in a knockout cup (FA Cup: Hampstead Heathens). Same mechanism as the Libertadores (section 9):
lib_byeplays round 1 with 14 of 15 clubs;cseg_8A7BFcopies only 14 entries andcseg_2ACAEputs the 7 winners first, soA2+59h[14]survives andlib_premoves it into place 7 of round 2, before the open draw. - Drawing lots. No penalties in 1872 or 1934: a drawn replay or play-off was decided by lot.
coin_drawreplacesor byte [D7],80h; and byte [D7],0FDhincseg_2AE97(draw → replay, obj1+0x1B52F) for played and simulated matches alike: in our contests, whenDIY_competitionStart[32Fh](replay counter) is not 0, a random winner (Rand2), result stored as "penalties" 1-0 / 0-1 with the decided flags.coin_textreplaces themov ax,[skip]before the resultsPrintFormattedincseg_289AC(obj1+0x18D56) and prints "%a WIN ON THE TOSS OF A COIN". - Lesson (golden rule). When a hook overwrites an instruction that holds an absolute address, its fixup must be removed first (
p.remove): otherwise the DOS/4GW loader rewrites those bytes and the newcalljumps to garbage. Every crash of the first coin-toss builds was this. - Squads. World Cup 1982: the 24 nations of the SWOS 2020 DLC by Insane, taken by name. Mitropa 1934: real line-ups on the 1934 national teams of Insane's World Cup 1934 DLC (slots, numbers, faces; 1934 internationals keep his record, the others are levelled to the club's strength; Meazza, Sindelar, Sárosi, Bican, Schiavio, Plánička, Reguzzoni, Nejedlý, Monti, Orsi at the top). FA Cup 1871-72: the "British Football Pioneers" DLC by Francescomanetti82 and Gorzo as templates. Players copied from a DLC keep the role of their slot.
- Reconstructed names (no source; typical names of the country). Mitropa 1934 (22): Ferencváros 1 (Ferenc Horváth), Floridsdorfer AC 4 (Anton Huber, Leopold Hofer, Franz Moser, Anton Gruber), Ambrosiana 1 (Pietro Greco), Bologna 1 (Giovanni Colombo, reserve goalkeeper), Bocskai 5 (Sándor Varga, Ferenc Tóth, Ferenc Molnár, Imre Varga, József Németh), Austria Wien 2 (Karl Hofer, Anton Hofer), Újpest 2 (István Farkas, József Tóth), Teplitzer FK 1 (Miroslav Pokorný), Admira Wien 3 (Franz Pichler, Karl Moser, Franz Berger), Hungária 2 (Imre Molnár, József Balogh). Unknown coaches left blank (Floridsdorfer AC, Austria Wien, Teplitzer FK, Admira Wien); some players have only a surname, as in the sources; Kladno and Teplitz kits are provisional. FA Cup 1871-72 (59): Civil Service, Hitchin, Royal Engineers and Wanderers 1 each, Hampstead Heathens 2 (reserves), Maidenhead 5, Great Marlow 5, Upton Park 4, Harrow Chequers 6, Reigate Priory 15 (only R. W. Clutton is real), Donington School all 16. The playing positions of the 1871 players are reconstructed (line-ups were printed without them); Hitchin, Maidenhead and Reigate Priory kits are provisional; "HAMPSTEAD HEATH." because of the 16-character limit.
- Not reproducible. FA Cup walkovers, withdrawals and the committee's "both clubs go through" decisions (Hitchin–Crystal Palace, Queen's Park–Donington, Wanderers–Crystal Palace), Queen's Park withdrawing before the semi-final replay.
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.
- Apertura / Clausura. The Primera keeps one 38-round league struct;
arg_round(in front of the per-match counterscseg_8922B) switches it at the start of the first Clausura match:[5Fh]= 1 cycle left,[5Bh]=[1CBh]= 0 and every row with W+D+L = played = n−1 (the calendar builder also callscseg_8922B, with all results at 0: the W+D+L test keeps the switch from firing while a career is created). The Apertura table is copied to the trailer (AP_TAB), the table is reset, the league text becomes TORNEO CLAUSURA, and the season record gets a fixed per-club text "CLAUSURA (AP: club)" (stored as an offset from the chairman string, so it survives save and load). Every season starts as APERTURA (arg_prebuild,arg_loadafter loading). - Aggregate table and promedio.
arg_aggruns before the South American qualifiers (sa_qualifyreads the slot-0 table): it rewrites the slot-0 table as Apertura + Clausura (3 points a win, goal difference), thenarg_relegatepicks the two worst promedios (points at 2 a win / matches, last three seasons; history in the trailer item PROM, 32 clubs × 10 bytes, defaults = the real 1994-95 and 1995-96 seasons) and moves them to the bottom, socseg_93FD8relegates them.arg_prom_updateadds the season to the history. - Australia. TEAM.044 = 54 records (52 league clubs + the two NSL Cup select XIs); divisions 14/12/14/12. Australia needs 52 global numbers: Bolivia (TEAM.045) moves to 1248–1261 and New Zealand to 1960–1999 (global =
teamsCountryNumbers[file] + ordinal, recomputed at every load;BASE_MOVES). NSL Cup: type-1 struct with a fixed list (16 clubs, rounds 94 54 54 14), fixed draws viahist_draw. - NSSL shoot-out point.
nz_setupreplacesmov penaltiesState,0in the career match setupcseg_89381(1 when both clubs are NSSL or MLS clubs): a draw goes to penalties at 90'.nz_drawin the draw branch ofcseg_88A12gives +1 point to the shoot-out winner (simulated matches: a random winner); for the MLS the engine's +1 each is taken back first (3/1/0).nz_mark(end ofcseg_2A71E) turns the game-list entry into "WIN x-y ON PENS". The new NZ struct has 4 divisions (NSSL, NORTHERN, CENTRAL, SOUTHERN), 4 points a win. - Play-offs (NSL Finals, NSSL Playoffs). The native division play-off: div entry "0 promoted, 4 to the play-off" = places 1–4, play-off block
[contest][list][4 index words][4×4 zero deltas](nobody moves), contest = a type-1 cup cloned from country 25's (ids C4/C5, NSL rounds 94 14, NSSL 14 14), built in slot 4 bycseg_8B2D3and filled at the end of the league bycseg_8ECAE. Bug found: the slot-4 buffer's rounds count[59h]arrives as 1 for 4 clubs (cseg_268C6computes 2; the writer of the 1 was not found), so the career calendar (type-1 branch ofcseg_8BF89) dated only the semi-finals and the final was never played.cal_roundshooks that read (EN obj1+0x7C0F8, IT +0x7BF4C) and sets 2 rounds for C4/C5. - Season record.
rec_guard: the record looks the club up in every contest of the season (lookup EN obj1+0x2B899, IT +0x2B6ED); a club not in its cup's fixed list (Perth Glory, not in the NSL Cup 1996-97) hit an assert (int 3; jmp $). Now the lookup returns −1 and the cup line is dropped.rec_playoff(call EN obj1+0x29795, IT +0x295E9): a club that played our play-off gets the play-off result as its league line (1 = WINNERS, FINALIST, SEMI-FINAL), using the game's own cup lookup on the slot-4 buffer (contest pointer = slot-0 pointer + 16). - MLS 1997. TEAM.073 records in place (Transfermarkt squads, 16 most-used players, a SWOS record reused when the player exists); league struct 4 games per pair.
- Debugging note. In DOSBox-X obj1 is loaded at linear 0x262000: a breakpoint is
BP 160:(0x262000 + obj1 offset).
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.
- Clubs. TEAM.092 = the 14 Oberliga clubs (final table order), TEAM.093 = the 18 lower FDGB-Pokal clubs, TEAM.094/095/096 = the foreign clubs of the 1988-89 European Cup, Cup Winners' Cup and UEFA Cup. A single-league country must have exactly as many clubs as its league (a country's club count is
teamsCountryNumbers[n+1] − [n]): that is why the cup-only clubs live in a separate file. Global numbers: DDR 1786–1817; the European cups use 1850.. like Italy, which is never in a DDR season. - Countries and contests. Country 92 "DDR 1988-89" with table [Oberliga, −2, Pokal, cup, −1]. Oberliga: 1 division of 14, home and away, 2 points a win, 2 relegated (id C6). Pokal: the Australian cup's layout (32 clubs, 5 single-match rounds with extra time and penalties, id C7), fixed bracket via
historic.DRAWS. European cups: the game's Cup Winners' Cup layout (ids C8/C9/CA), fixed lists and one fixed draw per round: the real bracket. Holders PSV skip round 1 of the European Cup like the FA Cup bye club (lib_bye/lib_pre). - European cup in slot 2.
InitNewSeasonloads slot 2 from the country table's third entry;euro_slot2replaces themov [A0], eaxbefore it (IT obj1+0x7B04F): it looks among the selected clubs for the first DDR club not controlled by the computer (teamControls≠ 1) and gives it its cup (BFC → European Cup, Jena → Cup Winners' Cup, Dresden and Leipzig → UEFA Cup); if there is none, slot 2 stays empty. - CLASSIC SEASONS. The Season selector runs on a world table [World Cup, −1] + continents + 97 (pseudo-continent, name per language, purple like CLASSIC TOURNEYS via
hist_names); table 97 is [−1] + 92 + FF. The game reads a country list only for numbers 80–85: thejaaftercmp word [D7], 85inSelectTeamsFinalMenugoes throughcont_check, which also accepts 97. Future classic seasons are added to list 97. - Squads. Oberliga: the 16 players with most minutes (weltfussball.de), ratings from the SWOS 2020 database "1990_91 - Team Updates" by Peppecapello when the player is there. Cups: 1988-89 squads from weltfussball.de (league minutes, else cup minutes); template = the same club's record in the 1996-97 game when it exists; players already in the game keep their record. ß becomes SS in names.
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
- Career start.
InitCareerclearssomeLeaguesTable(all 2000 bytes), setscareerFileBuffer= 0 and callsLoadSomeEuroCupthree times:data\eurocup.tmd,eurocwc.tmd,uefacup.tmdare appended totmdFileBuffer(80 × 684 bytes, part of the save;careerFileBuffercounts the records). A TMD record is just a team-file record:SetTeamGlobalNumbersrecomputes word +2 =teamsCountryNumbers[byte 0] + byte 1. Then thecareerConteststable [source, destination, size] copies the static cup structs into the save:euroCupCopy(79 bytes, 0x1ACB4),cupWinnersCupCopy(92, 0x1AD03),uefaCupCopy(92, 0x1AD5F). - Team list of a cup struct at byte [7] + 7, one (country file, ordinal) byte pair per club: 16 pairs in the Champions Cup copy, 32 in the other two. The next season's cups ARE these in-save copies.
- Season end (
cseg_91428).cseg_936C0points the three list cursors at the team lists inside the copies, zeroes the counters and expands the static place tables (0x947C / 0x94CB / 0x951A) into working country lists. A place table is[dd countries, dw n, dw take]…+dd −1:cseg_93E36shuffles the n country bytes and takestakeof them (e.g. Champions Cup: 4 of 4, 5 of 6, 5 of 11, 2 of 22). Then every country ofseasonEndList(0x943A, the player's first) getscseg_9153F(league) andcseg_93974(qualifiers, European continent only):cseg_93D67writes the club pair into the cup's list andcseg_94193copies its record totmdFileBuffer[careerFileBuffer++]. - Checks.
careerFileBuffermust be 80 after the loop and again at the end, the three counters 16 / 32 / 32: otherwiseint 3; jmp $(the 1997 freeze, chapter 7). - Holders (
cseg_92BBF→cseg_92C4D): the cup winner replaces a random list entry, whose record is swapped intmdFileBuffer. The routine comparesentry >> 8withholder >> 8: on the PC that is the club's ordinal (byte 1), not its country — a leftover of the big-endian 68000 original. It ends only if some entry has another ordinal and is not the player's. So the holder takes a qualifier's place (in the test world a national champion lost its Champions Cup place): real formats where the holder has a place of its own need a hook here. - Checksum. At season end
cseg_9487ArequiressomeLeaguesTableto sum to 0 modulo 256 (chapter 15). Global number 1999 belongs to a TEAM.062 club; 1818–1846 belong to none.
The world switch (M2)
- World byte =
someLeaguesTable[1845] (0x17E68 + 1845), balance byte [1846] = −world; 0 = the 1996-97 world. Both bytes go toleaguesTableCopytoo:InitializeNewSeasoncopies that table back oversomeLeaguesTable(cseg_8CC4E), which wiped a byte written only once (found in the first playtest: season 2 had 1996-97 qualifiers). Written by the hook on the firstLoadSomeEuroCupcall from the chosen club's country (saved atInitCareerentry, 0x7C796). - World European cups are knockout cups that fit the in-save copies: Champions Cup ≤ 16 clubs, Cup Winners' and UEFA Cup ≤ 32, total ≤ 80, a power of 2 each. Their structs take the Cup Winners' Cup layout with the original cup's id, dates and names. Nothing in the save has to move.
- Hooks (ENGLISH.EXE, obj1):
InitCareerentry 0x7C796; the threeLoadSomeEuroCupcalls from 0x7C97F (a world loads one file,data\worldNN.tmd= its first-season European clubs); after thecareerContestscopy 0x7CA22 (the world's three structs);seasonEndListreference 0x814A7; the five checks from 0x814F1; the place tables from 0x8375B (also the read of the UEFA table's first group). - Pack fields:
world,europe_places{cc, cwc, uefa}, optionalfirst_europe(default: league order),world_cups(rounds) in one pack of the world. World clubs may reuse the global numbers of 1996-97 European clubs: a world career never loads those files. - Season year (M3).
seasonPlayingis a byte (96 = 1996, +1 per season, 100 → 0);PrintNameAndSeasonadds 100 below 1996 andCareerOverFinishbelow 1995. A world sets its first year (world_cups.start_year) after thecareerContestscopy, and the two comparisons use that year instead. - Euro 128 (2026-10-10). A big world (more than 80 European clubs, or a cup above 16 / 32 / 32) plays up to Champions Cup 32, Cup Winners' Cup 32, UEFA Cup 64 (128 clubs; a type-1 cup holds 64 at most). The 128 records, the three cups and the three working place lists move to a zero-filled tail of obj2 (its virtual size grows by 0x16000; 18
mov [Ax], offset Xsites pick the moved buffer through small stubs;dseg_C707E, the list of contests whose clubs come from the tmd buffer, is copied with the three new cups). The .CAR keeps its layout: in a big world the 80-record area holds a W1 block (the cups + per club its file/ordinal and the 99 bytes the game changes), and loading rebuilds the 128 records from the TEAM files. In every world the season end skips the 1996-97 qualifier simulations (South America, Africa, Asia, CONCACAF, Argentina: their clubs share global numbers with world clubs) and ends the Champions Cup as a knockout (cseg_45B51/cseg_3ACAB, like the Cup Winners' Cup) instead of the 1996-97 group cup. Career packs get their own obj1/obj2 pages; a league contest id may be shared by the countries of one world. Playtested over three seasons with a 31-country test world. - World view and foreign players (M3). In a world
ViewWorldMenu(itscall ChooseCompetitionMenu) andBuyOtherForeignPlayer(itscall ChooseTeamsDialog) run withcompetitionsTable[254]= [world cup, −1, 99] and[99]= the world's continent: its three cups point at the in-save copies (current lists, real state for the player's cup) and its countries. - No national-team jobs (M3). The tail of
cseg_8D7B4stores −1 inlastNationalityCallin a world (−1 = no offer incseg_5B705). - Holders with a place of their own (M3).
cseg_93BCEclears a holder that qualified through its league, andcseg_92C4Dreplaces a random qualifier: with an extra holder place that left a cup one club short (freeze). In a world the threecall cseg_93BCE(cseg_939C9champion, the CWC and UEFA loops) skip every holder and every club already in a list (the place goes to the next club of the table), andcall cseg_92BBFappends the three holders and their saved records (cseg_94193). Places = cup size − 1; the checks before the holders use the total − 3. The world code lives on a sixth obj1 page (0xA6000), added only when a build has a world.
Era shirt numbers (3.3.4)
- Numbers by place. Before fixed squad numbers (1993-95) a shirt number told the place in the line-up. A pack with
"numbers": "place"(all the mod's historic packs, Europe 1984-85 included) is renumbered bymkseason._place_numbers: the 11 starters keep a 1..11 they already hold when it is unique (Baresi 6 at Milan) and the others get the free ones; the bench (places 12..16) does the same with 12..16; everyone else gets the free numbers above 16 in line-up order. - Menus above 11.
tools/menunum.py: the bench text of the squad menus prints 0..99 (it stopped at 19), and the tactics pitch gets sprites for 12..99 (1620..1707), so edited teams and modern squads with numbers above 11 show them right in the menus too.
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.
- Why patchit.com fails on the mod. It writes 36 chunks at fixed file offsets of the original exe, 21 of them inside the fixup record table. The mod rebuilds that table and appends pages, so the file offsets move, while object offsets do not (the mod never moves original code).
- The install, in object terms.
main_+0x18:sub esp,0→ nops,call SWOS→call DumpTimerVariables. DumpTimerVariables (obj1+0xA929, unused debug code) becomes a stub that saves the registers and the D0/D1/A0/A1 pseudo-registers, callsLoadFile("LOADER.BIN", pitchDatBuffer), calls the loader with eax = obj2 base and ebx = obj1 base, then restores everything and jumps toSWOS. The string at obj2+0x54F4 ("SAVE DISK F…") becomesLOADER.BIN. SetDefaultOptions+0x10 andspinBigSlose one byte each (1 → 0). Fixups: 14 records of the debug routine removed, 7 added (stack top, obj2 base, obj1 base, four pseudo-registers). - tools/swospp.py re-applies exactly that through
lepatchon the modded exe. Applied to the original exe, the result is identical to patchit's: same object bytes, same 73388 fixups.patchit()reproduces patchit byte for byte, so the patcher can recognise a vanilla game with SWOS++ already installed. - Run time. loader.bin loads swospp.bin, relocates it and patches 54 sites in memory by English address (main menu entry, GameLoop, DrawSprites, the file dialogs, ShowMenu, MenuProc, CheckControls, the substitutes screen, …). None of them, and none of the 495 SWOS addresses swospp.bin references, touches a byte the mod changes; the nearest is 1142 bytes away from a mod hook.
- Patcher. Two more outputs,
ENGLISH.EXE + SWOS++and its GOG twin, built bymkpatcher.build_swospp(). They come from the original exe, from any earlier modded English exe, from the current one, or from an original exe with SWOS++ already installed. loader.bin and swospp.bin are not shipped: users get them from Zlatko's release page. - Tested with SWOS++ 1.9.2.2 in DOSBox-X: main menu entry, the mod's menus, matches (shirt numbers, substitutions, bookings, replays and highlights), career with the mod's cups plus save/load, and the DIY editor. Not tested: network play, classic careers.
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).
- How the game chooses.
SetInGameTeamsPrimaryColorsscores four pairings withGetTeamKitsSimilarityFactor: home-home, home-away, away-home, away-away (home = the first team). The first scoring below 11 is used. The score (similarity factor) adds 5 or 2 points for every pair of clashing colours (shirt colours 5, a shirt colour against the other's shorts 2, shorts against shorts 5); some shirt-type combinations score 66–99 straight away. A striped shirt that scores below 11 is checked again as its blended colour (tabledseg_130942, e.g. red+black → maroon). If all four score 11 or more, the second team gets a plain kit in one of its own colours or, failing that, in the first colour ofteamKitTieBreakColorsthat works; last resort red against blue. - Clashing colours are two 10-word tables,
conflictingBasicTeamColorsTableandconflictingShortsTeamColorsTable(row = colour, bit n = clashes with colour n; colours 0 grey, 1 white, 2 black, 3 orange, 4 red, 5 blue, 6 maroon, 7 light blue, 8 green, 9 yellow). - The mod's rules. (1) Black no longer clashes with blue or green, blue no longer with light blue: in the in-game palette (
pal.256) they are far apart (black 0,0,0; blue 0,0,252; green 0,220,0; light blue 152,152,252). (2) Same-coloured shorts on both teams weigh 3 instead of 5. (3) Bug fix: after the blending pass the loop start tests D0/D4, which then hold "converted" flags, not shirt types, so the other striped kit lost its stripes (Inter became all black against Milan); it now testsshirtType1/shirtType2. 23 bytes per exe (12 in the tables, 2 operands plus their fixups, 1 immediate), found by content in all four languages. - Effect. On every same-country pairing of the original TEAM files, home-home goes from 69.5% to 79.6% (kitsim variant C). Playtested in DOSBox-X: Juventus-Milan, Milan-Inter, Inter-Juventus and Milan-Vicenza in home kits, all easy to tell apart.
- KITS button and SELECT KITS editor (this match only). In the pre-match screen, top left (screen x 30–88, y 1–11, between the check/X sprite of entry 0 and the team name): MAGLIE / KITS / TENUES / TRIKOT followed by AUTO or SET. The packed
playMatchMenu(obj2, ends withdw -999) is copied into the obj1 cave with one more entry, 68, appended (the game's indices do not change; its fixups are replicated), andShowPlayMatchMenu'scall ShowMenugoes through a stub that first refreshes the copy from the original: SWOS++ patches the original in memory at start-up (its onReturn and an entry pointer,swospp.bin+0x10EEE/+0x10F67), and a copy made only at build time would lose those patches; entry 13 (first player) gets up → 68. Fire opens SELECT KITS, built around the game's own kit editor: entries 4–19 ofeditTeamsMenu(first and second kit: big shirt, shorts and socks changed with fire + direction, the four shirt types), copied byte for byte at the same indices because their routines (EditTeamsChange*,EditTeamsSelect*ShirtType,*KitColorConversion,Mark*KitShirt) redraw by index and work oneditTeamsTeam, a buffer used only by the Edit Teams menu. Around them: 0 title, 1 team name (fire = the other team), 2 the kit worn (fire = first/second), 3 the other team's choice, 20 cancel, 21 OK, 22 reset (the team file's kits). Two slots in obj2 (name, both kits, kit worn, team pointer) keep the edits while the same two teams are on screen; they are cleared after the match and by cancel, so the next KITS starts again from the team files. - At kick-off a jump at the start of
SetInGameTeamsPrimaryColors: if OK armed the choice, each team's slot is found by name (A2 top, A3 bottom), the kit it wears goes totopTeamInGame/bottomTeamInGamethroughConvertTeamKitColors, the automatic choice is skipped and the choice disarmed (one match only; the button shows AUTO again). Nothing is written to the team files or the save. A first attempt that recycled the off-screen "COACH:" entry 4 as the button failed: at run time that entry is the coach name of the GIOCA line. - Tests with the automated DOSBox-X harness (
tools/swostest.py, key scripts; memory dumps to read the unpacked menus): button drawn and reachable, editor opens with both teams' kits, team switch and first/second kit toggle, OK, Milan in its first kit against Inter in its second at kick-off; colour change with fire + right (harness combined keys: Milan's stripes red → maroon, seen in the match); ESC in the match (harness-match) and a memory dump: choice disarmed, slots cleared, button back to AUTO. With SWOS++ 1.9.2.2 (English exe +tools/swospp.py, harness-timerfeeder): KITS SET button, editor, colour change, OK, kits applied at kick-off and reset after the match all work; the copy matches the original menu in memory. Still to test: two human players.
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).
- Names per language.
button_namesin each country'spack.jsonandworld_cups.namein the root pack give the name in the exe's language (INGHILTERRA / ENGLAND / ANGLETERRE, EUROPA 1984-85 / EUROPE 1984-85). - The extra menu level.
SelectTeamsFinalMenushows a country's leagues at depth 2 only (numSelectedTeams);w_lvlalso accepts depth 3 when the previous entry (top ofcountryStack) is a world. - No same-country ties in the first two rounds. Cup Winners' Cup and UEFA Cup (all three cups in a world): round 1 is drawn (
w_draw1aftercseg_28139), round 2 comes from the round-1 winners:w_r2aftercseg_2ACAE(simulated cups) andw_r2paftercseg_29659(the player's cup, which reorders the winners with the table at DIY+30Dh). A same-country tie swaps its away club with another tie's. - Holders. Normal careers: a Champions' Cup holder that did not qualify takes the place of a club of another country (
cseg_92C4Dcompared the ordinal instead of the country). Worlds: the holders play in addition; a league champion holding the CWC or the UEFA Cup plays the Champions' Cup and its holder place goes to the next club of its table (w_pick_cc,WH_SAVE). - Intercontinental. Fixed the bug (since 2.5) that put a Champions' Cup winner playing the Intercontinental into the Cup Winners' Cup:
sacups.euro_foundstores the cup type beforecseg_8B2D3clobbers D7. - National teams. In 3.0 the national-team offers were disabled in a world (the game's national teams are the 1996 ones); 3.1 brings the era national teams: chapter 27.
- Management record (3.3.6).
FillManagementRecordInfoadds 1996 / 97 to the season number; in a worldw_mrecadds the world's first year instead (1984/85, 1985/86 ...). Scenariow84_record. - Leagues in two zones: Argentina, Panama, MLS (4.1.2). The chairman's opinion at the season end, the warnings and the sack, the review for your contract renewal, and the management record use your club's place in its own zone (conference), scaled to the size of the league, not the place in the two zones stacked as one table. A club leading the second zone (the MLS Western Conference) counts as first. In Argentina and Panama each Apertura or Clausura title won counts at the season end like a cup won.
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).
- Team files. 143 teams in the order of the game's
TEAM.080-085(same ordinals: East Germany in Croatia's slot, the USSR in Russia's, West Germany in Germany's; 12 post-1990 slots unused), written asTEAM.180-185whose records say 80-85, so global numbers and every (file, ordinal) reference stay the game's. In a world careerLoadTeamFilereadsTEAM.18xinstead ofTEAM.08x:w_tfileon the file name,w_tcacheon the "already loaded" test. - nationalTeams. The game's 142 records (file, ordinal, nationality, home country, rating; 41 in the job pool, 63 with a nationality) are replaced per world (
nat_tablefromnations.csv): no post-1990 nations, home country = the world league of that nation (Wales → England), no job for non-European teams. Four stubs choose the table and its three counts at the 10 places that read them. - Jobs and call-ups.
w_natno longer disables the national job in a world that has national teams; call-ups ABROAD go throughw_buy(the world's countries). - New nationalities. GDR 153, URS 154, FRG 155 (
NEW_NATS, three letters per exe language):shortCountryNamesand the career menu's nationality list (+ YUG 37) move to the career cave, longer;ChangeNationalitywraps at the new size. - Competitions.
pack.jsonnational: cycles of 4 seasons with hosts, qualifying groups [places, teams] and the other continents' qualifiers. The WCQ/ECQ draws (call cseg_33A1Aincseg_6604A/cseg_65CA2) becomew_wcqdraw/w_ecqdraw(holder and hosts left out, the player's group set); the season end (cseg_95298/cseg_94E85) becomesw_wcfill/w_ecfill(places per group through the game's own group procedures, then the direct qualifiers until the finals are full). World Cup 1986 = the presetworldCupformat (24 teams, 6 groups, best thirds), Euro 88 = 2 groups of 4, semi-finals, final; 2 points per win. Hosts per cycle:w_hostwc/w_hostec; holder Italy written at the career start and in the first cycle's fill (careers saved by 3.0). - Automated tests. The harness (
tools/swostest.py, guidenotes/harness.md) runs DOSBox-X in turbo with ~1 MB memory reads per pause: about ten times faster.world8485_natforces the national job with the game's debug switch and checks the cycle above; the career season before it is played once per build at a Maltese club and cached.
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.
- Layout. The contest is a copy of the game's
worldCupheader (as the World Cup 1982, Mitropa 1934 and FA Cup 1871-72 of 2.0): id, points per win at +0Ch, the stages from +0Eh (count, then teams / groups / teams per group per stage: knockout groups 0, third place FFh, then 1) and from +22h one legs byte per stage (single14h,single_et54h,two_legs94h,single_replay00h,two_legs_replay80h), two name offsets, then (file, ordinal) per team. Team file 146 (country entry = the CLASSICS record, base 1786 shared by every classic tourney). - Brackets.
hist_draw(the fixed-draw table that replaces the random drawcseg_27F08) takes a flag in bit 7 of a round's team count: sort the qualifiers by their place in the contest before the permutation. The game leaves a knockout round's winners in an order of its own (replay winners first ...), so a fixed bracket needs that sort; the permutations of a pack'sties.csvare computed relative to the sorted order. The entries of 2.0 and of the season packs have no flag (unchanged). - Replays. Tourneys with
*_replaystages joincoin_ours(coin toss on a drawn replay, "... VINCE AL SORTEGGIO"). - Squads. New method
records: whole teams from a SWOS team file or a SWOS 2020CUSTOMS.EDT(World Cup 1934: Insane's DLC). - Tests.
classic_wc34(the real bracket after replays, coin tosses, third place, final),classic_groups(the template: 2 groups, crossed semi-finals),classic_tourneys(World Cup 1982, Mitropa, FA Cup to the final). - Menus. The pre-match KITS button lines up with the player rows and the team name (x 25..88, y 0..10).
esci_fix(called byhist_namesin every team selection list): when a column covers ESCI (preset EUROPA: 14/15/14 countries), ESCI takes the free slot under the rightmost column, with up = that column's last entry; its place and links are restored if the game does not lay the menu out again. The code ofhistoric.py, the fix and the tourney contests are on a page of their own (0xaa000, or 0xa6000 without a world).
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
- Items.
engine.pyregisters the state each engine keeps with the career:engine.save_item(name, size)plusITEM_AT[name]duringpatch_exe.trailer.pywrites all items as one chained block 'EN' after the main trailer of the .CAR. The 4.0 items are 'GP' (play-offs), 'CT' and 'CE' (continental cups), 'RI' (off-file pools), 'SR' / 'SB' (Brazilian states) and 'BT_EXT' (big tables). - First-season brackets. lib97's
dt_find(the fixed-draw table walk ofnc_bye/nc_adv) skips statespec's first-club filter records[2, file, ordinal]as historic'shist_drawdoes (historic.cf_on): before rc9 the walk ran off at the first Brazilian-state record, and 37 World 2026-27 cups drew their real first-season brackets at random. - World 0. The original 1996-97 world has no pack: its code registers its tables through
engine.gplay / pgroups / splitbeforepatch_exe, which sizes its pages from them. - Load hooks. A new post-load hook in the career load chain broke the next season end (trap at the season-3 start, 2026-10-22). Until 4.0.1, any change to the load / save path needs the
career_20seasonsscenario (C20_SEASONS=2), see CONVENTIONS rule 19.
Continental cups (conti)
- Data, not code.
conti.c+conti.pyrun the 11 non-UEFA club cups and the FIFA Intercontinental Cup. Each confederation has a format (internal/conti/<conf>.format.json: rounds, draws, routes between cups, names in 4 languages) and an access file (<conf>.access.json: places by league rank, cup winner, holders, the ranking, the season-1 entrants). They are merged by cup key, andpython3 tools/conti.py --testruns the C natively (ctypes) on a synthetic world. - Season end. A world's season end walks every country of the world.
ct_tabreplacescall cseg_927A2(the top 9 of a division) and first passes the whole final order, up to 16 clubs, toct_table.ct_ctryreplacescall cseg_93974, which returns at once for a country outside Europe: it passes the country's table, top records and cup winner to the C, then goes on to the game's routine. From these inputsconti.cmakes the next editions' entrants with the access lists, draws (pots by ranking, association rules), simulates every round the career club does not play (strength = the 16 players' prices, asuefaq; from 4.0.6 about 2.6 goals a match, 5.2 before: a bit in the saved edition,ED_G2, so an older save's edition ends on the model it began with, harnessworld_ctgoals), and keeps the holders and every club's path. - The career club in slot 3. The rounds the club plays are segments, each one a contest of the game built in slot 3 (free for a non-UEFA club) by
ct_buildthroughcseg_8B2D3. A segment is a type-1 knockout, a type-2 group stage (the team list in the drawn order) or a league stage on lp36's engine.ct_daily(chained on uefaq'suq_daily, before each match) gives the C the result of a finished tie and builds the next segment. A move between cups (Libertadores Q3 loser to the Sudamericana) is just the next segment. - Ids and state. The cups use the reserved contest ids
conti.IDS(C6–CA, D0, D1, DA, DD–DF, EC–EF; the build asserts that no pack uses them). The state is the engine item 'CT' (struct ct_state, 4 + 16 × 12 bytes) and 'CE' (the edition,struct ct_ed, 2260 bytes): a load resumes the path from the saved edition. - Guest clubs.
guests.py: the real clubs of associations that are not in the world (CAF, AFC, OFC and CONCACAF entrants) are team files of their own, TEAM.191 (CAF), 192 (AFC), 193 (OFC) and 194 (CONCACAF), with no country or league entry and no table. A guest's team word isfile | ordinal << 8, its record's countryNumber is its file, andcountriesTable[file]gives the one country label shown for the file. - The COPPE CONTINENTALI view (4.0.6).
ctview.c+ctview.py, in obj3: entry 9 of VIEW COMPETITIONS (VC5_MENU) opens a menu of the confederations (the career club's own first), thenfmtpagepages of that confederation's cups. It keeps no copy of the editions:conti.c's run is deterministic from 'CT' (ct_resume), so the view replays it and readsCT_OUT(entrants, results, winners). A round shows once the career's week reaches its draw (monthR[9]→ week 8 × (month − 1), +96 for January–July), its results 8 weeks later; a knockout tie writes the club through in brackets, a group its final order, never scores. Season 1 has no edition in 'CT' yet: it shows the main rounds' draws only and one line for the earlier rounds. The texts (4 languages) arectview.TEXTS; every line fits 298 px (a long tie wraps) and uses only the menu font's characters. Harness:world_contiview(CT_SEG / CT_ED byte-identical before and after the view, every page, 4 languages),world_contiview_tie(the career club through two rounds: CONTI_FORCE / CONTI_KOWIN test switches),world_contiview_old(a 4.0.5 save). - The rounds in the game's own screens (4.0.6, option C).
ctgame.c+ctgame.py, in obj3 afterctview. A confederation with drawn rounds now opens a rounds menu (two columns of 8 buttons: cup short name + round, ≤ 144 px; RIEPILOGO = the version-A page; ESCI). A round button builds that round as a contest of the game in a scratch buffer, never in a career slot: a knockout round is a type-1 cup of its clubs, a group stage a type-2 contest (cg_build: the first half ofcseg_8B2D3, the game's own team list and init). Then it fills in what is played by the career's week (cg_view): two-leg ties with the aggregate, extra time (D.T.S.), away goals and penalties, group tables and fixtures by match day, played by the game's own routines with the goals of a replay ofconti.c(cg_replay: the recordstruct ct_grec, 4 KB at the scratch's end; the season-end run is untouched). It opens the result with VISUAL. COMPETIZ.'s own viewer (cseg_37B74). The career club's group stage in progress shows the real slot 3. VIEW WORLD: every continent shows its cups as green buttons above its nations (EUROPA the UEFA cups, MONDO the FIFA cup), each one opening that cup's rounds menu; the lists are swapped in only around VIEW WORLD's picker (cw_on/cw_off). Guards (cg_open/cg_close/cg_guard): the team cache count, the game's work area, D0..A6, both random generators and the ranges a build was seen to write are kept and put back; a checksum of everything a save writes must match at the close, else no view again in that run. A save or a new day closes a view left open first. Fallbacks to the version-A page (cg_viewreturns 0,CG_ERR): a club in no team file of the world (E_GUEST:CG_FCNT, each file's last club + a bitmap of the files the world loads, asserted at the build; such a club would makeGetTeamPointersearch forever), a played round with no goals kept (E_NOREC), a full team cache (E_CACHE), a round that is no contest type (E_KIND: the AFC Champions League Elite league stage), a checksum mismatch (E_GUARD), the career club's own group games no longer in slot 3 (E_OWN). Season 1, with no edition yet, shows the page at once. Harness: Tier Btest_ctgame.py(builds, guards, views,test_cg_fallback), DOSBoxworld_cgame_self,world_cgame_guard(two seasons' .CAR byte-identical with and without views),world_cgame_view,world_cgame_fallback,world_cgame_swospp. - Goalkeeper injuries (4.0.6).
gkinj.py, at the end of the obj3 chain. After a match it rolls 1 in 25 for each team's keeper (its own xorshift32, seeded at the first roll from the game's two RNG states, so a replay of the same game rolls the same and the game'sRandsequence does not move). A hit writes the injury level 40h (out of the next match) or 60h (the next two), 50/50, into the cardsInjuries bits E0h of his record; the game's own countdown (cseg_2CED3, after each match) takes him back to 20h / 0, both of which are fit. A match played for real: all fourcall UpdatePlayerInjuriesare chained (training games skipped); the keeper is in-game PlayerInfo slot 0 at the final whistle (a substitution swaps the whole PlayerInfo), skipped when it is.substitutedor.isInjured; his record comes fromGetPlayer. A simulated result: aftercseg_903B1(chained after cpucards'cb_903), the keeper is line-up slot 0. There is no roll for a keeper who already has a level, 20h included. Computer teams are rolled in any competition (g_gameType>= 1; not friendlies) with cpucards'CC_ION. cpucards counts the CPU's injuries down on the PLAY MATCH menu's calendar days (cb_day, seasons and careers: harnesscpu_inj_season); a DIY or preset competition has no calendar day, so there the per-match countdowns (guards 6 / 7) also run for computer teams wheng_gameTypeis 1 / 2 (harnesscpu_inj_preset,cpu_inj_diy: some CPU level goes down). Off under SWOS++. Option: OPTIONS entries 24/25, 12 px above ROSSI ALLA CPU (chained aftercc_init/cc_ret); the wordGI_Wis saved as the engine item 'GI' (2 bytes; an older save loads 0 = ON), andgk_load/gk_newkeep the session's value. Test switchGKINJ_FORCE= 1 / 1m / 2m: every roll hits (test builds only). Harness:gk_injcovers the row and its toggles in 4 languages, a forced career (the keeper's level at each squad screen: out exactly 1 / 2 matches; the CPU keeper's level), the row OFF, INFORTUNI ALLA CPU OFF and an old save.
UEFA: league phase and qualifying
lp36.pyruns the 36-club league phase as a type-2 stage of 2 groups of 18.lp_pairtakes each match from the drawn calendar (one home and one away opponent per pot, no club of its own country), andlp_sortwrites one ranking of 36 over both groups (UEFA 2025-26 art. 18 criteria). The play-off ties and the fixed round-of-16 bracket come fromlp_gend/lp_draw.uefaq.cplays the qualifying rounds at the season end from each country's top 9 and cup winner, with the ranking ofuefacoefand the European Performance Spots, then fills the three league phases (36 / 36 / 36). Liechtenstein (no national league) has its own access-list row by association (uefaq.cuponly_file: its cup winner in the Conference League's first qualifying round wherever it ranks); a 44th association with a league gets the regular row of ranks 43 / 45.
Play-offs and the knockout rules (gplay, dplay)
- dplay (
dplay.c): Italy's play-offs and play-outs. Serie B play-off (contest FD: 6 clubs, the 3rd and 4th wait, semi-finals and final over two legs), Serie B play-out (FE: 17th v 16th), and the play-offs of each Serie C group. - gplay (
gplay.c): every other knockout play-off of a world, declared in the pack's leagueko_playoffs.- Kinds:
promotion,europe,placement,playout,title,continentalandstage_title(Argentina's Trofeo). - Entrants:
[div, place], the best club without Europe, the league cup winner, a split stage's place or seed. - Rounds: legs, best-of-three series, pairing, host, level, points gap, groups.
gplay.pydocstring. - Kinds:
- Hooks. At the season end (
cseg_91D4D, per league struct),gp_cap/dp_capreplacecall cseg_9221Fand copy each division's final table.gp_end/dp_endreplacecall cseg_9228D: they run the play-offs and write the signed division moves intoleaguesTableCopy. A play-off the career club is in is played:gp_lend/dp_lendreplace the twocall cseg_8ECAEof the league's last match day and build the contest in slot 4 (cseg_8B2D3, D0 = 4) as the game builds its native play-offs. - One set of tie-break modes (CONVENTIONS rule 10), chosen per round with
level:- two legs (aggregate);
pens/et_pens(extra time and penalties);et_better/better(extra time, then the better-placed club goes through: the mod's play-offs);away_pens/away_better, simulated aset_pens/better.
gp_draw/dp_drawsit atcseg_2AE97's "draw → replay" mark: a level tie of ours goes to the better-placed club.cal_noreplay(lib97.py) removes a slot's calendar entries of type 3 (replay days), so a knockout without replays shows no replay dates. - Two tournaments a season (Costa Rica, Honduras, Panama; data
TM_CA_EXACT): division 0 has a split spec of fixturestages(the Apertura on its real fixtures, the Clausura withresetpoints). At each stage's last day its table goes intoGP_SS0 / 1 (shared with Argentina: only the career league writes it), and astage_titleknockout is built with entrants{"stage_place": 4 | 5, "place", "div"}: the tournament's real final phase (Costa Rica's Gran Final withskip_if_same, Honduras'best_worstsemi-finals, Panama's conference seeds). Scenariosworld_ca_crc / _hon / _panforce each final phase. - Test switches (test builds only):
GPLAY_FORCE=kputs the career club on place k at the league end (also in a stage's kept table);GPLAY_RLFORCEsets its play-off result for the season record lines.
Coppa Italia Serie D (slot 2)
cupd.pyruns the knockout of every Serie D club (162 in reality, 156 in the world's file) at its real dates, on gplay's engine. Season 1 uses the data session's bracket JSON (rounds, dates, legs, host, matches with real winners). Later seasons are drawn bycd_makefromsomeLeaguesTable; the ties nobody plays use strengths from the best 11 players' prices (cd_str).- Before the 1/32, the career club's ties are 1-tie contests in slot 4, built at the calendar advance before the round's week. Every other tie is decided at that advance: in season 1 by its real result when known, otherwise by gplay's tie rules.
- From the 1/32, the Coppa D is a game knockout of 64 clubs in slot 2 (contest CDS1).
gp_cup12sits on InitNewSeason'scall cseg_8B2D3for slots 1 and 2: a Serie D club keeps slot 1's COPPA ITALIA, which is simulated for its winner and hidden from that club's calendar (CONVENTIONS rule 11), and its slot 2 becomes the Coppa D. After a load,gp_afterrestores slot 2's contest pointer, which ProcessCareerFile leaves at 0.
Splits, long tables, zone colours and the legend
- Split (
split.py): the pack spec for a division is"split": {"games", "groups", "rounds", "points", "home"}(pointsfull/half_up/half_down; homebalance/reverse3/seeded). Four hooks run it:sp_initoncseg_2653Badds one cycle so the stage does not end at the split;sp_paironcseg_89758takes the matches after the split from our calendar. Its first call freezes the groups, halves the points (the points before rounding are the first tie-break) and rewrites the career calendar;sp_countoncseg_8922Bkeeps the day counters;sp_sortoncseg_883DDdoes a stable partition into the groups, soDIY+6Dhis always the final table in place order.
gp_hlabel_ctable fromzones.header_labels): ZONA A / B … in the exe's language, the conference names for the leagues ofCONF_PACKS(the MLS and Panama's LPF, East first). The state lives in the unused DIY rows 48–63, saved with the slot. - Long tables (
longtable.py): the table screen lays out only up to 24 rows, and a 30-club table (Argentina, MLS) was drawn past the screen buffer. One-group tables longer thanROWS= 22 now show 22 rows fromcurrentDiyLineand scroll with the arrows (lt_d3,lt_d5,lt_end,lt_down,lt_arrows).lt_plan(gplay'sgp_hplan_c) counts a split league's group header rows and spacers in the same window. - National cups and the career club (rc12, CONVENTIONS 11): in a World 2026-27 career the slot-1 / slot-2 cups the career club is not in are left out of VISUAL. COMPETIZ. and of the fixtures list (gplay
gp_notin: the club among the contest's clubs, DIY +31h / +12Dh; used bygp_vc1,gp_vc2,gp_cal1); the cups are still played for their winners. - Titles that fit VISUAL. COMPETIZ. (rc12):
complist.fit_titlesalso fits '<country> <long>' in the button's 158 px (VC_PX, small font), keeping the distinguishing words (a repeated nationality word dropped, generic words abbreviated,VC_ABBR), the fitted titles asserted unique per language; the competitions list is generated from the fitted names. - Zone colours (
zones.py):- Palette: light blue 0Dh (CL / direct promotion), green 0Eh (EL / promotion or European play-off), dark blue 08h (Conference League), orange 0Ch (play-out / relegation play-off), gray 02h (relegation).
- Hook:
mov ax, [dseg_11F41C]in the row loop atcseg_49B65(lp36'slp_coluses the same site). Computer clubs' names take the row colour; the career club's name box keeps its own colour with no frame, and a 1-px black ring is drawn round it only when its colour equals the zone colour (zn_ring, in gplay's pages throughzones.ring_patch). - The table is found by the career's world and the title shown, cached per table.
- Zones come from the packs: European places, promoted / relegated,
ko_playoffsentrants, dplay's Italian places. A European play-off's places are green P.OFF with their own legend entry (rc12, CONVENTIONS 7), not the colour of the cup it leads to. The Brazilian states' first stages come fromstate_zones: the next stage's places green (P.OFF), a knockout's byes light blue, a one-group state's relegated gray; a state of several groups relegates on its overall table, so that is not painted. Zones are computed per group (the place in its own group) in split, zoned and cup-group tables.
- Before the first match (4.0 rc7): while no club of the table (
DIY+31hclubs, row +4 = played) has played,zn_colpaints nothing and shows no legend: the clubs are still in their initial order. A league whose first stage starts on day 0 with groups by membership (the MLS conferences, Argentina's zones, Panama) gets its groups and its order partitioned at the league init (split.pysp_pregroup;sp_sortpartitions before the freeze too), so its header rows show from day 0. Scenariozones_preseason. - The legend boxes are plain boxes of the zone colour, the Conference League's dark blue included (
LEG_COLOURis empty since rc9: rc7's 13h gave that box an inner frame). - The legend (CONVENTIONS rules 5–6):
DIY_leagueTournamentMenuis copied whole withLEG= 6 legend boxes (six since rc12: the Netherlands use CL EL CONF P.OFF P.OUT RETR) after its last entry, andzn_legshows them in the row above the table header, top left, its y computed from the title bar. On a cup's group screen (entry byteLEGX= 92, bit 1; bit 0 = places counted per group,LEGX+1= the group size), the boxes go in the title row (yCUPY= 3) and the title bar starts at xCUPT= 70. The legend lists only the colours painted:_mergejoins runs of places into the 8 ranges, and a place shadowed by another zone is dropped.
The WINNERS page (winners.py)
- VINCITORI / WINNERS / VAINQUEURS / SIEGER is the 8th entry of the competition view's statistics menu in career-world builds, drawn on fmtpage's page (title, lines, PREV / NEXT / EXIT): for each title of the viewed league beyond its table, its name and this season's winner, or DA GIOCARE / IN CORSO.
- The titles are the FMTxx[world].DAT file's WIN entries (
fmtgame.win_lines), one line each: the title, 01h and its source:Lthe league's own table once its season is played,Pdplay's play-offs (DP_ST, else its saved copy DP_SAVE),Ca cup-shaped contest's winner (a Brazilian state) or a group contest's winner in slot 3 (the Serie D Poule Scudetto, PLAYOFF - SCUDETTO SERIE D),Sa stage table (GP_SS: Argentina's annual table),D/Kgplay's stage titles and play-offs. - Everything is read from state the career already saves (the DIY, GP_ST): no new save item and no after-load call (CONVENTIONS 19). A club is named only when it is a row of the viewed league. Titles decided at the season end (a play-off the career club is not in) come from the engine item 'WN' (164 bytes, written by
gp_seasonat the season end, zeroed for a save without it; no load hook, CONVENTIONS 19): after the season end the page lists the previous season's winners. Last season's page is the division the career club PLAYED IN:gp_seasonalso writes WN's'M'entry (the club's division and team word, no layout change;gp_wn_canswers it as team | division << 16), each league's WIN text starts with a key line01h 'H'+ team file + division (not shown), andwn_lastdivtakes the WIN text of that key (else the viewed contest's): a club promoted from Serie D girone A sees SERIE D GIRONE A and the Poule's winner. Each line reads DA GIOCARE / TO BE PLAYED before the title's competition starts, IN CORSO / IN PROGRESS once it has started without a winner. 4.0.2: a play-off of the career's own league that the career club is not in reads DA GIOCARE until the season end decides it (4.0.1 left the line out); a national title play-off seeded bytitle_seed(Uruguay, Peru: source'Q'+ rule + play-off) names its champion as soon as one club has won both tournaments (the career league's stage-table bank: the Apertura and Clausura leaders are the same club, so there is no play-off). The code sits in gplay's pages.
Quick season end (quietend.py)
- At CONTINUA CARRIERA the season end (
cseg_91428) callscseg_9153Ffor the career club's country, then for every country of the season-end list.cseg_9153Fsimulates the country's leagues (cseg_915ED→cseg_3ABB2) and cups (cseg_916C2→cseg_3ACAB), and each simulation ends by showing the competition through ShowMenu (ShowDiyLeaguesTournamentMenu/cseg_45B51) for one menu frame: a full DrawMenu + FlipInMenu each. The original game shows about 110 (every European league and cup); the World 2026-27 about 260, minutes on a real 486. qe_callreplaces the loop'scall cseg_9153F(not the career country's call before the loop): in a World 2026-27 career it runs withdseg_10E846= 1, the game's own switch (cseg_8ECAEuses it), which makescseg_3AE87/cseg_3B18Freturn before the show. Every other test of the flag is or'ed withdseg_10E848, whichcseg_91428holds for the whole season end, so the simulation is unchanged;dseg_DF4F4is not set either way.- Progress line (rc12, Davide's MiSTer: the silent loop looked frozen ~30-40 s):
qe_show, before each country, prints SIMULAZIONE ALTRE NAZIONI... / SIMULATING OTHER COUNTRIES... / SIMULATION DES AUTRES PAYS... / SIMULATION ANDERER LAENDER... n/N (N = the list's countries but the career club's) with the game'sDrawMenuText(small font) into the virtual screen's rows 190-199, then copies only that strip (3.2 KB) to the video memory; the pseudo registers are saved around it. The code moved to the extra pages. The .CAR after the season end is byte-identical with and without the line (QE_NOPROG=1builds the control exe). - Checked (4.0 rc10): the season-end state (league moves, European lists, team records) identical with and without; only the next season's random draws differ (the skipped menus no longer advance the generator). ShowMenu census: 5 shows (the UEFA cups, the career league and cup) instead of ~260. 1996-97 and 1984-85 season ends byte-identical.
QUIETEND_OFF=1builds the control exe.
Off-file pools (ripool)
- Italy's Eccellenza (Italy's 256 league slots fill its team file) and Brazil's state second divisions (file 161) cannot add clubs to the world. Instead, slots swap identities with off-file pools
DATA\RS<world><file>.DAT(mkseason.rs_files), and no club leaves or enters the world. ri_loadreplaces LoadTeamFile'scall SetLoadedTeamsGlobalNumbers: it keeps the file as read, reads its pool once per DOS session, andri_applygives every remapped slot its identity's record.- At the season end,
ri_season/ri_after(throughpgroups.pg_fix) update the maps and the career cache, then clear LoadTeamFile's own cache. - The state is the engine item 'RI'. Rule 13: any code that loads a club's file goes through this shared loader.
The one-click folder patcher
- Chrome's File System Access blocks Program Files and its children ("the folder contains system files"), GOG Galaxy's default included: the page shows a 4-language hint before the folder button and again when the picker is refused (an AbortError, indistinguishable from a cancel) or the folder has no game: copy the game folder elsewhere, patch the copy, copy its contents back (administrator permission), or use the manual mode, whose steps mention the same permission.
tools/patcher_template.html→mkpatcher.py(raw-deflate packed outputs) →release/swos-9697-mod-patcher.html. In Chrome or Edge, the folder mode (showDirectoryPicker) reads the chosen game folder (CD install, GOG with the game in a subfolder, eXoDOS / DOSBox) or copies the game from a CD folder first.- The page recognises each file's version by md5 and writes only the files that differ. It keeps the replaced ones in
MOD_BACKUP\<version>and writes the SWOS++ variant only where SWOS++ is installed (SWOSPP.BIN/LOADER.BIN). A re-run writes nothing. The UI is in 4 languages; the manual download stays for other browsers. - Release check:
node tools/patcher_dirtest.mjs PAGE.html c/RELxx SCRATCH [3.3.6,...]runs the page's own code in Node with mocked directory handles, per UI language: CD, GOG, from the CD, SWOS++, re-run, wrong folder, and updates over earlier releases. Every written file must equal the release build, andMOD_BACKUPmust hold the replaced files.
Conventions and tests
notes/CONVENTIONS.md: the settled rules (font characters only, 4 languages, discursive FORMAT pages, one legend top left, legend = zones painted, real formats exactly, one set of tie-break modes, forced test cases, release checks) and the known engine pitfalls. Reuse the shared code named there.- The harness (
tools/swostest.py, section 18,notes/harness.md) ends a run with outcome'break'when anint 3stops in the DOSBox-X debugger: a trap of the game or adumpstep of the scenario. Memory is read there. Breakpoints (Session.bp,SWOSTEST_BP) needCORE=normal. A failing run's directory is kept for decoding. - A game that runs on without asking for a key (a busy loop, an endless draw, a slow season end) only shows as 'timeout':
Session.sample(keys, secs)(branch harness-break,notes/harness.md'Breaking a busy game') sends the keys with a breakpoint on the timer interrupt (BPINT 8), returns an EIP histogram by obj1 offset and ends with a fullMEMDUMP.BINat the last tick for the post-mortem. - Result-dependent cases are forced with test switches (
GPLAY_FORCE,GPLAY_RLFORCE,CONTI_GPLACE…), never re-run hoping; the switches never go into release builds. 4.0 release checks: the full suite on the release candidate,career_20seasons, and the patcher's outputs byte-equal to the build.
4.0.1 additions
- Several staged divisions in one league (Mexico: Liga MX + Liga de Expansión):
stage_titleplay-offs carry the division in the spec byte (stage | division << 2);GP_ST.decholds the career club's division only, the other divisions' stage titles are simulated at the season end;ss_banksgives each staged division disjointGP_SStables. The entrantstage_title4 = the second stage's champion, withskip_if_same(no match when one club won both: the Campeón de Campeones). - Peru, Colombia, Uruguay (package 6): per-league
GP_SSbanks,title_seedentrants (Uruguay's semi-final / final with the AUF coincidence rules; Peru's Liga 1 play-offs), explicit places in the split (places/places_snake, split flag 20h: the Intermedio's snake series). Paraguay, Guatemala and El Salvador need more than 40 match days (MAXDAYS): done in 4.0.2. - Nationalities (
tmmaps): codes 156..213 for the 58 nations, appended toNATSHORT(the table that 3.1 retargeted the threeshortCountryNamesreferences to). No other table is indexed by the nationality byte;GetNationalTeamNumberreturns -1 for a code without a national team. 152 CUS is the custom teams' code, not Cuba (CUB has its own). - Install incomplete (
instcheck.py): beforeSelectTeamsFinalMenulists a world of CLASSIC CAREERS, every file of that world (team files,WORLDnn.TMD,POOLnn.DAT,XTWn.nnn,RSnnnn.DAT) is opened and closed with DOS 3Dh; a missing one shows the game's error box in the small font and ends the pick as a missingCUSTOMS.EDTdoes. - Foreign purchase (
w_buy,w_lvl): the market opens on the world's continents (several) or on its countries (one continent: Europe 1984-85), with no CARR. STORICHE entry first. - Titles:
rnamesrn_tfit/rn_tendfit '<contest> <round> <leg>' to the 304-px bar by small-font widths (PXMAX 302; it was 40 characters),rn_trimdrops a leading or double space, and a build assert checks every contest's worst case in the four exes. Calendar labels:complist.cal_labelasserts every two-line cup label within 70 px (uefaq's qualifying ties get the short names PRELIM. EL ...). The WINNERS page uses the pack's long name when it fits 298 px. - Patcher: on a GOG folder with DOSBox and
dosbox_SWOS.confthe page writes one launcher per language conf present ("SWOS Mod - Italiano.bat" ...:cd DOSBOX; DOSBox.exe -conf ..\dosbox_SWOS.conf -conf ..\<lang conf>), not counted as mod files and not backed up; a re-run writes back a missing one. Every written file is read back (size + md5): "Done: N / N files written and verified" or the red INSTALL INCOMPLETE.
4.0.2 additions
- Full graphics always (
fullgfx.py): thejaaftercmp g_videoSpeedIndex, 85becomesjmpin all eight exes, so SETUP.DAT's video speed (GOG's factory file has 10, a slow MiSTer core reads low too) no longer selects the half / EGA mode./H(half),/Fand the low-memory rule are unchanged. In half mode the match sprites are four bitplanes (InitGameRestoreTeams/UnchainSprites):shirtnumbuilds the 17..99 numbers chunky and makes them planar in place (own 64-byte work area), andblond.unch_patchrunsUnchainSpritesover the dark-skin blond sets (NEW1 / NEW2), which lie past the first emptyspritesIndexentry thatUnchainSpritesTilZerostops at (the Malen "block of pixels"). - Zeroed tail (
tailzero.py): obj2's non-file tail (the mod's run-time buffers) is not zeroed by the Watcom start-up or DOS/4GW; only DOSBox-X hands it over as zeros. A stub before__CMainzeroes it in all eight exes. The shirt-number flag read garbage on GOG / MiSTer, so the 17..99 numbers were never drawn over the controlled player. - Controls page (
controls.py): OPTIONS entry 19 becomes COMANDI at y 169, with its own obj1 page and two obj2 pages; hidden under SWOS++. The page edits a copy ofsetupDatBuffer; SAVE re-reads SETUP.DAT and replaces only device, calibration (both sticks), loops and keys. Key capture takeslastKeyafter the selecting key's release; duplicates are refused. Calibration readsReadGamePort(centre + fire, corners + fire, at least 8 counts each way; divisors = distances, loops = largest value + 1/8, as INSTALL.EXE). German is written AE / OE / UE: the small font draws the umlaut bytes without dots. Texts:notes/controls-402.md. - Shirt numbers:
shirtedit.py(team screen: LEFT after 8 menu frames on a row with no left neighbour lights the number box; UP / DOWN free numbers, digits by scan code, swap with the holder; the first edit makes the numbers unique and sets bit 7 of the team record's byte 23, "pinned");benchnum's hooks are in every build with worlds and honour the pin.subsnum.py: in the in-match bench list the number is right-aligned (centre + 9 - width / 2, ending at x + 22) and the name starts at x + 24.menunum: two-digit numbers on the tactics pitch without the 1-pixel gap. - Joypad keyboard mode (patcher, third box
joykey, off by default, with the GOG box): SETUP.DAT keyboard only (fromSETUP.DAT.bak, else GOG's factory file embedded),dosbox_SWOS.confas before, andmapper-SVN.keys.map= GOG's default mapper + stick axes and hat 0 to the arrow keys, buttons 0-5 to Ctrl; also incloud_saves. Switching mode swaps mapper and SETUP.DAT both ways; unticking undoes it. - DOS device names (
devname.py):AddExtensionis rewritten in place; the full name is opened and asked by IOCTL 4400h whether it is a device (an extension does not help: CON.CAR is CON); a device gives the game's error box (INVALID FILENAME ...) and back to the dialog. - Extended squads and out-of-squad buying (
xtra.py,xbrowse.py,mkworld_tm.py TM_EXTRA=14): up to 14 extra players (16 + 14 = 30, the game's filler cap). The national market gets entries from index 16 (theGetPlayerhook and the list / row /AddCareerTeamPlayersites); a bought player goes into the sold list (engine itemXS, trailer blockENafterC7; old saves: empty) and there is noRemovePlayer. Club browse gets a second page for the extras (xbrowse.py: menu copy + button), and the squad view (STAT, VIS. SQUADRE) a PAG. SUCC. button in place of the hidden entry 6 (GetPlayerAtIndexhook, display only: line-ups, bench and match squads untouched). A 4.0.2 save with such a player does not load in older versions. - Competitions:
uefaq— a UECL holder with a domestic CL_LS place is 'league' too (UQ_OUT.hkeep[2]: stays in the CL list;w_holdersskips a row whosew_hkeepis set; the record count before the holders allows for it,w_chk_tot0q).contilevel 'away_et_pens' (round byte 94h; dataconcacaf.format.jsonccc "extra_time": true; the CAF cups keep 'away_pens'); in the 2026-27 worldw_away1/w_away3askct_awayafter 90 minutes only. Option C ported to the tip for Paraguay, Guatemala and El Salvador (MAXDAYS104,GP_PAGES17, the head-to-head block outside the DIY;BUILD_AFTERkeeps the 'then' names of two leagues with the same spec bytes). WINNERS: a 'K' / 'T' line of the career's own league with no contest of the career club shows DA GIOCARE; the new source 'Q' (rulepi) names the champion of atitle_seedplay-off once one club leads both tournaments. Mexico: stage titles (mex_exact.py). FORMAT:fmtprose.NOPROMOfor 'placement' play-offs of a division with promotion places. - Menus:
teamstab.pymovesteamsTable(100 bytes in the game) to a 256-byte zeroed block in obj2's tail (four references, all four exes): Italy 2026-27 has 256 records, and Serie D clubs 100+ readteamsIndexafter the table (stray button colours).careerworld.w_viewtakesw_buy's path (VISUALIZZA MONDO opens on the world's continents or countries). - Tests:
conti.py --test afc caf concacaf conmebol fifa ofcruns all six confederations; new scenariosfull_graphics,tail_zero,shirt_edit,subs_numbers,controls_menu,controls_calib,save_devname,xtra_*,world_ccc_away,world_mex_titles,world_winners_title,world_viewcont,team_choice_colours,world_uefa_double.
4.0.5 additions
- National Super Cups (
supercup.py,supercups2627.json): per country the names (4 languages), date,from_season(1 = winter ones, 2 = summer ones and Brazil), one leg, level (pens/et_pens), neutral host, the entrant rules (champion, cup winner, cup finalist, league 2nd) with the double fallback (if_double: cup finalist, 2nd or 3rd) andfirst_entrantsfor the first season.sc_cupreplaces both calls ofcseg_928CCat the season end and stores each cup's winner and finalist inSC_ST(saved with the career as engine item 'SC'; an older save loads it empty). The supercups run ingplay's slot 4 at their real weeks; final fours build the final after the semi-finals. FORMAT:fmtprose.supercup(). Mexico's Campeón de Campeones became a supercup entry (title0vtitle1, 25 July, season 2+). - Real fixtures in the first season (
lpreal.py,lgreal.py):LPREAL.DATholds the real league-phase pairings of the three UEFA cups (lr_drawreplaceslp_mkdrawin the first season of a world);LGREAL.DATholds the real calendars of the 31 complete leagues (regular season only for split leagues; a post-split home rule gets a host table made from the real days,lg_mx). Seasons 2+ and any list that does not fit keep the generated calendar. Dates follow the game's weekly spacing. - Long benches (
benchx.py,bench2627.json): the in-match teams hold up to 26 players (the buffers' free tail);bx_maxtakes the competition's bench (at most 15),bx_nextbuilds the places; computer clubs add their extra players; careers only. In the squad, pre-match and tactics menus rows 12..17 are a window on the bench that scrolls (bx_mdir); DOWN on row 17 at the window's end goes back to the top of the bench (row 12), UP on row 12 at the top keeps the game's move to row 11. Highlights with a bench over 5 need 4.0.5. - Long dugouts (
dugout.py, 4.0.6): the in-match dugouts are pitch-map tiles (PITCH1-5.DAT, 42 x 55 offsets into the 16 x 16 patterns ofPITCHn.BLK, 296 at most); both are 6 tile rows longer (the top one upwards, the bottom one downwards: 18 seats), every tile taken from the original dugouts in the same grass-stripe phase, a missing phase made from an existing tile with its grass swapped (PITCH5, diagonal stripes: 3 new patterns). The 16-colour (EGA) mode readsSWCPICH1-5.P16instead (the same map, the tile id in each dword's high word): the same rows there, no new patterns (itsPITCH5already draws one middle tile in every phase). In the exe (benchxblock 2) every bench place is seated on both benches (the window of 5 is gone), the top bench's y moves from 389 to 293 and in the subs menu the camera stands on the own dugout's middle (benchY + 67: the whole dugout in one screen); while a substitute goes on it goes back to the halfway line as before. The training pitch (PITCH6) is unchanged. The patcher ships the five maps andPITCH5.BLKas differences from the originals. - Bald players (
bald.c,blond.py): four looks (receding / shaved, light / dark skin) reshape the raw player sprite before the colour conversion; the shaved light look uses a new palette tone (pal_init); in half / EGA mode light shaved heads keep the skin colour; off under SWOS++. - Zone colours (
zones.py): B teams and reserves that cannot be promoted or reach the play-offs are skipped and the colour moves to the next club. - Names (
namespr.py): in-match names up to 14 characters (ExtractSurname400Bh to 400Eh, 32 name sprites of 112 x 6 pixels of our own); '_' stays the joiner and is drawn as a space. - Other: SELECT KITS switch JUST THIS MATCH / ALWAYS; STAT entries for earlier stages; title play-offs decided as the league ends; New Zealand's National League championship phase and Grand Final; North Macedonia in 4 rounds; the "SWOS 16/17" package recognised by the patcher; SWOS++: the green CAREER 2026-27 button stays and SWOS++'s entry takes the place of SAVE while nothing is loaded.
4.1 additions (the old 4.0.6 and 4.0.7 merged)
- Third object (obj3): the structural cure for the room rules (CONVENTIONS 20 and 22): code pages in a third object after obj2, so obj2 stays at 213 pages and obj1 under 237. The 4.0.6 chain in
patch.py:benchx,kittrain,squadnum,mk_keep,oppl,cpucards,whitehair,finance,kbd2(each tool adds its pages after the previous one's end). - Two players on one keyboard (
kbd2.py): a fourth CONTROLS device; the second key set is read fromCONTROL2.DAT(9 bytes: 'K2', version 1, on/off, 5 scancodes; defaults W S A D and left SHIFT, never CTRL). Hooks:SetKeyboardControlFlags, the P2 status routine, the six resets and a loader chained on the joypad fix. Off under SWOS++ or with a device other than the keyboard-and-joypad one. "Keyboard first" (fix A): a direction held on the keyboard wins over a joypad that is not centred, in the menus and for the team no one else controls on the keyboard. - CPU cards and injuries (
cpucards.py): two OPTIONS rows (engine item 'CC': one bit each, ON by default, saved with the career). The original never booked or sent off a computer-controlled player and skipped it in the post-match paths; the hooks open the booking, sending-off, suspension-countdown and injury paths to the computer's teams, with one countdown a day for cached computer clubs; the computer's line-up swaps unavailable starters before the match is played and restores them after. Test switchesCARDS_FORCE,INJ_FORCEare never in release builds. Goalkeeper injuries (406-gkinj): 1 in 25 after every match for the goalkeeper on the pitch at the final whistle, 1-2 matches out; the computer's goalkeepers in every competition except friendlies when CPU INJURIES is ON; DIY and preset competitions now count the computer's injuries and suspensions down after each match. - B-team call-ups (
bteam.py): data for 20 clubs in 7 countries (second team / under-23 side), per-country over-age limits and transfer windows; a button on the squad screen; "next match only" (up to 4 players, no fee or wage) and "for the season" (up to 3 per window); called-up players show a yellow shirt number (no B) and are valued LOAN; the bank never changes. Australia and New Zealand use the Australian pure under-23 rule (New Zealand's is an approximation). - Finances: the original charges wages plus running costs of about 3.2 times the wages at every match and pays in nothing that grows with the club. 4.0.6 adds, with every match charge, a base by division (3.0 / 1.2 / 0.5 / 0.2 M a season; parallel groups count as one level) plus 1.1 times the season wage bill, shown as SPONSORSHIP; expenses unchanged; nothing is stored in the save. The single-match gate saturates at its 16-bit maximum instead of wrapping. Financial fair play (option on the club statement, ON for new careers, OFF for older saves): at the start of each season, wages above 40% of last season's income (without the TV part that grows with the wage bill) close the market until they are back under it and cost a fine of half the excess.
- Continental cups (
406-cgame,406-contiview): the COPPE CONTINENTALI page and the VIEW WORLD cup buttons open each drawn round in the game's own cup screen; a text page remains for the AFC Champions League Elite league stage and for rounds that cannot be shown safely; viewing restores the career exactly as it was (the 4.0.5 bug that greyed out TRANSFERS is fixed). Continental scores now average about 2.6 goals a match; the UEFA Super Cup, the Recopa Sudamericana, the CAF Super Cup and the FIFA Intercontinental Cup follow their real dates and formats. - Bench and menus: two-row dugouts in the match (the patcher now installs all five
PITCH1-5.BLK), the clock moves aside while the bench is open, the camera stops at the halfway line; scrolling of long lists as in the original game (the cursor order on the pre-match screen restored); the opponent's squad from the bench menu (read-only, off under SWOS++); training matches keep the original one-row bench; names in the lists start 2 pixels further right. - EDIT CUSTOM TEAMS: looks and numbers (
edteam.py, 4.0.6, Marco; obj3 at the chain's end). The editor (editTeamsMenu) editseditTeamsTeam(684 bytes; OK copies it into its CUSTOMS.EDT slot). Looks: FIRE on a face button (entries 23..38) cycles ten looks: faces 0..3 (white, ginger, black, dark blond), then receding light / dark, shaved light / dark, white hair light / dark (byte 25 bits 0 / 0+1 / 2 with face 0 or 2, blond's flags 3 / 2, 5 / 4, 7 / 6; bits 3..7 kept).et_nextreplaces EditTeamsChangePlayerFace'sadd word [D0], 1; the preview icon is blond's (icon_d1a/biconread byte 25). Numbers:et_rowchains se_ctl'scall se_row(after squadnum'ssq_row): a face button is a row (its before-draw EditTeamsPlayersBeforeDraw, LEFT = none), so shirtedit's number box works there unchanged: LEFT lights it, UP / DOWN free numbers, digits by scan code, a clash swaps, FIRE / ENTER / LEFT / RIGHT done, ESC undoes; the first edit makes the numbers unique and sets the pin (byte 23 bit 7, saved with the team).et_hlreplacesmov [esi + 26h], ax / mov ax, [D7]in EditTeamsPlayersBeforeDraw: entry 55 (one number entry drawn for every row) gets the lit background on the edited row only. Limits: under SWOS++ (blond'sSPPMMIgate) FIRE cycles the four faces and leaves byte 25 alone (SWOS++ draws no looks, in the menus or the match); a 22-letter name keeps the four faces (byte 25 is its terminator; typing a 22-letter name clears the look); the original game ignores byte 25 (a look is a plain face) and keeps the numbers as typed. CUSTOMS.EDT's format is unchanged. Harness:edit_custom_teams(looks, number box, the saved file, a friendly with SQUADRE MODIFICATE: numbers, face icons (one picture per look), a bench swap, the match's look flags; SWOSPP_BUILD: SWOS++). - Looks: white hair (Ravanelli), and bald / shaved / balding / white heads on the line-ups screen.
- Stoppage time: added minutes with "+N" at 45:00 and 90:00 (maximum per era; played at the pace of a 10-minute match; off under SWOS++).
- Stadium names: full official names (up to 48 letters) in World 2026-27, with 26 nicknames; no name is made up.
- Other: CPU replacements switch in BUY PLAYER (INVENTED / FROM SQUAD); transfer lists keep their page; shirt numbers editable on the squad screen; fixes for the UP/DOWN arrows after VIEW OPPO, the extra-squad purchases, the New Zealand rest-day round and a play-off entrant that refuses its place. Names: more characters in typed names (- . / ' ? + ( ) : , and _ shown as a space, typed with the keyboard's own layout; save-file names also take - ' ( ) and _; SHIFT types the symbol on the key, LEFT / RIGHT move the text cursor; SWOS++ keeps its own typing). Version label bottom-left in grey. World 2026-27: SRB / CZE / MKD / COD / SWZ codes and SERBIA / NORTH MACEDONIA / CZECHIA / ESWATINI national teams (squads 1996-97 until 4.4); seven Polish kits. [Technical details of each item: ask the owners; this list follows the release notes.]
- World selector (
mainbtn.py,swe.py/swe.cin obj4, MC and Marco): a world is one of the three data sets the mod can play: 2026-27, 1996-97 (the original game) and Europe 1984-85. A new main-menu button replaces the green CAREER 2026-27 button and switches the current world (kept inSETUP.DAT, byte +105). The world applies to CAREER (its team choice lists that world's clubs), FRIENDLY, DIY COMPETITION (the game's custom competitions: you pick teams and format), PRESET COMPETITION and SEASON. Where a world has nothing to offer, a message says so (NATIONAL TEAMS NOT YET AVAILABLE FOR THIS WORLD, NO PRESET COMPETITIONS / NO SEASONS FOR THIS WORLD AT THE MOMENT; the four languages are inAV_LINESofswe.py) and a purple STORICO box leads to the historic tournaments and seasons. EXIT next to ABORT on the nationals message (4.1esci) goes back to the menu of team kinds keeping the teams already picked. - One world per competition (
swe.c, mixing "A"): in FRIENDLY and the three DIY editors (tournament, cup, league) a club of a career world (2026-27 or 1984-85) can play against clubs of the 1996-97 game. The first mod-world club picked setsSEL_CW(swe_sel_ns, called when the count of picked teams grows); from then onlocked(n)(SEL_CW && n && n != SEL_CW) hides the other mod world, and the title bar reads ONE WORLD PER COMPETITION. Nothing is refused; unselecting every club clears the lock; national and custom teams and the CAREER team choice are never locked. A saved DIY competition stores its world (a "WM" record, version 2); older DIY files load as 1996-97. It works under SWOS++ (engine_wmodes_swospp). - Original main menu (
mainbtn.py, patcher tick box, Marco): an install-time choice, off by default. Ticked, the patch leaves out the WORLD button and the MOD label, puts CAREER back in the middle of its row and makes 1996-97 the default world; the other worlds stay in each mode's list. Unticking it and running the patcher again restores the mod's menu and the world that was chosen. Saves are not touched, and SWOS++'s own menu entry stays where SWOS++ puts it. - Long benches in friendlies and DIY competitions (
benchx, Panchina): in World 2026-27 each club uses the bench of its own league (7 to 15 places, 5 substitutions, one more in extra time where the rule has it); between two different benches both clubs use the longer one. The 1996-97 and 1984-85 worlds, national teams and custom teams keep the game's 5 substitutes and own number of changes (2 in a friendly, 3 in league or career, the DIY setting). The line-up screen scrolls down to the extra players and the line-up shown is the one that plays; the extra players' places are remembered for up to 4 clubs. The bench menus show a strip with the value and the three best skills of the highlighted substitute (the squad screen's letters; goalkeepers: value only; two comparison boxes in the substitutions menu); it is hidden under SWOS++. - Offers for your players (
406-sellA, Francesco): a club bids for one of your players only if he would be at least its 12th best (margin 2); the prices are unchanged.
30Limits and open issues
- Play-offs (2.5). NSL Finals and NSSL Playoffs are top-4 knockouts: the real formats (NSL: 6 clubs; both: a "double chance" for the top two) need per-round control of the entrants, i.e. a type-2 contest in slot 4, whose buffer (443h) is too small. Kept for a future version (
finals97.py, option A). The regular-season winner that loses the play-off still shows a small icon at the top of its season record (not yet traced in the code). - C1/C2 groups. In 1996-97 C1 had 2 groups and C2 had 3. The mod uses one group per series. The full reality (128 teams) does not fit the limit of about 93 teams per nation. C1 with two groups would fit (92), but it needs promotions and relegations between parallel divisions, and checks on the 80-team career limit and on global numbers: estimated 2–3 sessions.
- Intercontinental in slot 4. A finalist in a division with play-offs gets no Intercontinental. The routine
cseg_8BF89(called bycseg_8B2D3) has not been analysed: if it keeps data tied to the slot number, the buffer swap could leave it inconsistent. In the season record the Intercontinental in slot 4 has no name. - Invented players and long careers (1.1). The squads of the 138 clubs added in 1.1–1.2 are invented (no sources); the additions were tested for one season. Strings are no longer a limit: new names go to the added obj2 page.
- Libertadores 2.0. In group 5 the real 1997 calendar does not fit six matchdays: the order is the closest fit (Millonarios exact, the others swap 1–2 matches). The holder rules when the holder also qualifies through its league or for the CONMEBOL have not happened in a test game yet. In career the bracket stays the 1997 one (holder vs the 3rd of its own group); real later editions changed format.
- Dedicated trophies. South American cups use the trophies of the European cups of the same rank.
- Old saves. They cache the team data from when they were created: the new squads show only in a new career.
- Duplicates. 5 repeated names remain (mid-season transfers or namesakes). The original SWOS data had 61.
- English bench (after 1.0). In the pre-match line-up English clubs show 14 players (11 + 3 on the bench). The original game does the same, and
TEAM.008has 16 players per club: it is a game rule. To do: find where the bench size comes from (rules at buffer +3Dh…41h, values 5/2/8 set byInitCareer) and raise it to 5.
31History and next steps
| Session | Content | Test |
|---|---|---|
| 1–2 | LE tools; cause of the 1997 freeze; Italy with 4 divisions, base 1850 | passed |
| 5 | Real C1/C2 1996-97 clubs | passed |
| 9 | South American cups in menus and world view; string pool | passed |
| 10 | South American clubs in the cups in career mode; qualifiers from the standings; holder | passed |
| 11 | Supercopa in slot 1; page added to object 1 | passed |
| 12 | List persistence with checksum; CONMEBOL swap; trophies; Intercontinental in menus and in slot 2 | persistence, slot 2, CONMEBOL trophies |
| 13 | Intercontinental finalists at season end; S2 format; Intercontinental in slot 4 | season end, S2 slot 4 |
| 14 | Real 1996-97 squads and calibrated strength for all 36 C1/C2 clubs | passed |
| 15–16 | Port to ENGLISH/FRENCH/GERMAN; HTML patcher; release 1.0 and 1.0.1 (GOG) | passed |
| 17–20 | Analysis 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.1 | passed (1 season) |
| 21–24 | CONCACAF 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.2 | passed (1 season) |
| 25 | Group formats decoded; Copa Libertadores with 5 groups of 4 (20 clubs, top 3 + best 4th), trailer 'C5' (report by Playaveli, Swos2020); release 1.3 | passed (1 season) |
| 26 | Classic 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 sources | passed |
| 27 | Copa 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) |
| 28 | Argentina 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) |
| 29 | Classic 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) |
| 30 | Season 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 divisions | passed (IT) |
| 31 | Career 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) |
| 32 | Release 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 own | passed (IT, 2 seasons) |
| 33 | Release 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) |
| 34 | Release 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 editor | passed (automated harness + Davide's playtest) |
| 35 | Release 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 / FRG | passed (automated harness + Davide's playtest) |
Roadmap
- Classic careers: a name per world in the menus, long careers, more worlds (e.g. South America for its national teams).
- Long careers: 6–8 season tests with the 1.1–1.2 additions; real squads for the new clubs from the community.
- Europe: Intertoto Cup, European Super Cup, 1997-98 Champions League format.
- 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.