card
A memory card, its files listed, dumped and deleted, and a number saved to it with an icon and a title, and loaded back.
Controls
Up and down choose what to do and Cross does it. Left and right change the number to save. In the list, up and down choose a file. Circle goes back to the menu.
A port of Sony's card sample (sample/graphics/card in the Net Yaroze samples), which lists the files on a card, creates one, deletes one, dumps one and tests whether a card is there, through the kernel's file functions. This one does those to the card in slot 1, and to them adds a save that the console's own card screen can show: the file has a name in Sony's form, BA-NETYAROZE and a name of the program's own, and begins with the header Sony's convention sets out (docs/manuals/savefile.md): "SC", the icon's frames and the file's blocks, its title in full-width Shift-JIS, and the icon's palette, then the icon, 16 by 16 pixels of 4 bits, and then the program's data. The icon is a TIM made by png2tim from gen/icon.png, whose pixels and palette are already in the form the header wants, and the program shows it at the top of the screen.
A card holds 15 blocks of 8 KB, and a file is a whole number of them; it is read and written in sectors of 128 bytes. A card is formatted once, which writes its directory. TestCard says whether a card is there and whether it is formatted; it talks to the card over the port the controller shares, so the program calls it when it starts and when asked, as the sample did, not every frame.
Sony's checklist (docs/manuals/requirements.md) told Net Yaroze programs on magazine discs not to touch memory cards at all, since a save's name should carry the game's product code and a Net Yaroze program had none. The program here is for learning how cards work; the name it saves under is the one Sony's member FAQ suggested.
Differences from the sample: it uses slot 1 rather than 2; its "create" is the save, which writes a proper header and a number rather than an empty file; it adds load and format; and it writes with yaroze.CardWrite and reads with CardRead and CardFiles, which keep the kernel's calls in one place.