Skip to content

Championships in pod-ui ​

The front end could already run a standard championship from its first race to the ending videos. Today it gained everything else a championship has in POD. Each piece was a self-contained task, so each went to an unattended agent on the API with a worktree of its own (working rule 9). This session read the reports, tested each branch and merged them.

Un-POD's menu 60 after the first race of a standard championship: the standings, with the player secondUn-POD's rendering, menu 60's standings page (page 2) after a test race with made-up results. POD's own screen has not been captured yet.

What was ported ​

  • Saves. POD keeps a championship in Data\ChShip\POD<n>.<kind>. The reader and writer are pod_formats::chship, specified in the format page. Menus 40 and 45 load and save it. Observed in POD's save reader 0x46bc60 and its restore 0x46b3cc.
  • The race end's championship pages (menu 60) and the next-track screen (menu 20). They show the standings after each race and the next circuit.
  • Custom and random championships (menu 19, actions 20 and 21). The random one draws its tracks with the Watcom C library's rand (0x4c7f37), seeded from the clock (srand, 0x4c7f5b).

Un-POD's menu 20, the next track: Beltane's map with the car settings, OK and previous menu buttonsUn-POD's rendering, menu 20: the next circuit's name and map before the second race.

Un-POD's menu 45, the championship save slots, with a save named MYCUP in slot 3Un-POD's rendering, menu 45 after a save was typed into the third slot. The port wrote it as CHSHIP/POD2.NS.

Menu 19 is an older custom chooser. Its handler and actions are in POD, but no menu and no code leads to it (observed). The port draws it only when a test enters it directly. It has no background picture of its own.

Un-POD's menu 19, entered directly: three chosen circuits listed, two OK buttons, Unselect and GO GO GOUn-POD's rendering, menu 19, which nothing in POD reaches: three circuits chosen.

Merging three models into one ​

Each of the three branches changed the championship's data in its own way. POD keeps the lap count at 0x633330 and the mirror mask at 0x4fdf16, outside the championship, so both now live on the game state. Three behaviours came out of the merge, each observed in POD:

  • Clearing the standings (0x46c3e8) also clears the race order, because its fill covers it.
  • The race set-up (0x4284a8) writes the circuit's laps, so a save holds the last race's laps.
  • A save carries the real mirror mask.

Time attack ​

Later the same day time attack was ported too. Its way in is the race mode's item 6, which leads to the track screen and then to menu 18. Menu 18 has three types: three laps, one lap ("free run") and a ghost race. Each type writes its own mode bits and lap count, lights itself and selects go (observed in actions 15, 14 and 77). A time attack race has one car. Its end opens menu 7, 6 or 5 by type, and each leads back to menu 18 or to the main menu. A second round of agents then ported the "Top 5" ghost panel, with a reader for the .ght ghost bundles (docs/formats/ghost.md; POD's disc has none, the extras' two fan tracks read and write back byte for byte), the racer table's save and restore between runs, and the drawing of every time-attack end page (0x4c3264, 0x4c3a9c, 0x4c40ec, 0x4c5414). No POD capture of those pages exists, so they are checked against the strings and positions the code reads. What the race does with the ghost bits is unknown.

The same round finished the mirror: the track screen's mirror button (menu 17, item 59, action 66) and POD's menu_back (0x430368) case by case, where going back from menu 17 clears the mask. 0x44d398 turned out to be the network championship's default track list. The details are in the front end's notes.

Un-POD's menu 18, time attack on Bank, with the three-lap type lit in green and Race selectedUn-POD's rendering, menu 18 with the three-lap type lit. No POD capture of this screen exists, so it is not compared.

A third round ​

Five more agents then took the next pieces, each in a worktree of its own:

  • Best times. The front end reads the track's RECORDS file, puts the race's results into its tables the way POD does, and writes the file back. The insertion was measured: 65 insertions give the same tables as POD's own code run under the Unicorn emulator. The end pages, the records screen and the track screen now draw from the real tables.
  • Ghost files. Time attack's panel imports and exports .ght bundles.
  • The mirror. The track screen draws the mirrored map and reverses the circuit's name. The function first taken for a championship prize, 0x4a5bb0, turned out to be reached from a typed code (observed: its caller is the code check at 0x46ccf8).
  • Championship menus. Menu 21, the first track's view, now comes between the car screen and a championship's first race, as in POD. Menu 60's two team pages are drawn. Menu 41 is unreachable and menu 44 is not in the menu file (observed).
  • Item states. POD's item drawer (0x42b9b0) shows that hidden items draw nothing: the frames on menu 18 belong to its background picture.

Next ​

  • Captures of POD's championship and time-attack screens, to check the new pages pixel for pixel.
  • The championship screens checked against POD's captures, which race-loop has been asked for.

Prose CC0 1.0, code Apache 2.0. POD: Planet of Death is © Ubi Soft; none of its files are on this site.