Skip to content

MainMenu 1.1.0

Choose a tag to compare

@UsaRandom UsaRandom released this 12 Aug 10:22
· 21 commits to main since this release

Twenty-seven commits since 1.0.0. The largest part of this release is boot time on a big card, and
most of the rest is the art cache finally keeping what it decodes.

Boot on a large card

The library index is repaired rather than rebuilt. It has always stored a signature per
directory, so it knows not just that the card moved but where.

The cold scan itself is 2.23× faster — 111,049 µs/ROM down to 49,842. Each directory is now
read out in full before anything in it is opened, because FatFs here has one 512-byte sector window
for the whole filesystem and the enumeration and the sidecar probes were evicting each other for
the entire scan.

The boot plate stays up while that happens, and there is a boot record on the card now
(mainmenu/launch.log) saying which path was taken and what it cost.

Art that survives being switched off

Two separate faults, and the second made the first pointless:

  • The atlas index was published when the tile count hit a multiple of eight — a running total
    across every previous boot — so between zero and seven tiles of a session were unreferenced. The
    only reliable writer was the clean shutdown that happens on the way to launching a game.
  • The tile data was never durable either. FatFs writes a file's directory entry in f_sync, not
    f_write, and the pak was held open all session. Every flush laid bytes into clusters no
    directory entry ever claimed.

Both fixed. The cache also builds itself now: an ordered background pass over the library that
decodes every cover into the atlas and finishes. Before, filling the atlas was a side effect of
filling a 36-slot display pool that stops when full, so it only ever held tiles you had personally
scrolled past.

Plus a per-JPEG buffer leak, heap garbage reaching thumbs.pak, and interlaced PNGs now refused
rather than drawn wrong.

Cheats

Per-region cheat sets, conditional codes, and every code type the database can key. cheats.db now
ships inside the cartridge, so a bare card has cheats without installing anything. The corpus
licence is corrected to CC BY-SA 4.0 — it was documented as MIT, which was wrong.

It runs on a stock N64

A console with no Expansion Pak did not previously reach its first frame. It does now, detecting
its own RDRAM and running a second set of numbers: two framebuffers, a Latin-charset body font
(1.28 MB → 106 KB in RAM), a smaller icon cache, and box art stored at half size so the grid still
fills. A 499-title card fits with 94 KB to spare.

Nothing changes when an Expansion Pak is present. Verified against main: 14 input scripts,
identical frame counts, and every boot allocation byte-for-byte the same.

Cheats are the exception — the Datel engine lives at a fixed 7.77 MB address, upstream's included,
so there is no lighter fallback. The cheats screen now says why instead of silently doing nothing.

Music and controls

midi64 updated: 50.1 of 60 frames make their field on a settled screen, up from 46.2, and 46 KB
less heap. Tab paging moves to either shoulder (Z or L, R), and Players moves to B.

Known limits

  • The 4 MB profile is tested under ares only. No stock N64 has run it.
  • Box art softness at half size has not been judged against a real high-resolution scan.
  • Cheats need an Expansion Pak.