FujiNet Project Adds High-Score Tables to PAC-MAN, Donkey Kong and Other Classics

Atari 8-bit Donkey Kong: red girders, blue ladders, Kong at the top right and Mario at bottom left

FujiNet's "High Score Enabled" feature lets unmodified disk games save their score tables to shared TNFS servers. In December 2023 Thom Cherryhomes (tschak909) announced on AtariAge that most existing Atari games with built-in score tables had already been converted. The next step was more ambitious: adding high-score tables to games that never had one. He did the first two himself, PAC-MAN and Donkey Kong, published the work in the atari-game-ports folder of the fujinet-high-scores GitHub repository, and asked for volunteers to do the rest.

What the patched games do

Both conversions use the same design:

  • an ANTIC mode 6 score display, spliced into the game's own screen by changing its display list
  • ten places, seven-digit scores and three initials per entry
  • the table stored on sectors 719 and 720 of a single-density disk, which the ATR header marks as high-score-enabled so FujiNet allows writes there

The patching method is always the same. Find a point in the game where you can jump to new code, read the score sectors, run the high-score entry, write the sectors back if anything changed, and return to the game. Many of these games take over the whole machine, so the routine saves the game's VBI, keyboard and DLI vectors (VVBLKI, VVBLKD, VKEYBD, VDSLST), swaps in its own along with its own display list, and restores everything afterwards. It reads and writes through the OS DSKINV routine. One trick: the code reads sector 1 and throws the result away, to make FujiNet drop its disk cache before the scores are re-read.

Because the system uses plain sector reads and writes and no networking, the patched disks also keep local high scores on a real disk drive, SIO2SD or any other device. FujiNet is only needed for the shared, online leaderboard.

A template for volunteers

A README in the repository describes the build kit for each game: a Makefile that produces a complete single-density ATR, the small picoboot loader in the boot sectors to autorun the game, hiscore.asm and hiscore_table.asm (a 256-byte table) assembled with MADS, and two tiny C programs, write-high-score and high-score-enable, that put the table on sectors 719/720 and set the ATR header flag. Each game also gets a C score scraper for the scores.irata.online website, which notices when the disk image changes and regenerates that game's HTML score table.

Cherryhomes said the most useful help would be disassemblies that rebuild byte-for-byte into the original binaries. Forum member TGB1718 offered his own disassembler, which can output MADS-format source.

Progress

By the time the README was posted, Baja Buggies, Centipede, Donkey Kong, PAC-MAN, Pengo and Rear Guard were done, with Berzerk, Dig Dug, Miner 2049er, Moon Patrol Redux, Popcorn and QIX on the to-do list. The folder has since grown to include Atlantis, Crystal Castles, Defender, Donkey Kong Jr., Kangaroo, Missile Command, Popeye, River Raid, Star Wars and others.

Where to get it

Ready-made ATR images and full sources are at github.com/FujiNetWIFI/fujinet-high-scores (atari-game-ports/). With a FujiNet, the converted games can also be played from high-score-enabled TNFS servers, and their tables are visible at scores.irata.online.

Credits