tiles
Tile scrolling: a map of 16 by 16 cells two screens wide and two high, drawn by the library's fixed background, scrolled with the directions.
Controls
The directions scroll the map.
A port of the SCEE tutorial's chapter 7, example 4. A background in the library is three parts: the cells, GsCELL, each a 16 by 16 square of a texture page and its palette; the map, GsMAP, a grid of indexes into the cells; and the background itself, GsBG, the window it is drawn in, how far it is scrolled, its brightness, and the map. GsInitFixBg16 prepares a work area once, and GsSortFixBg16 then makes the packets for just the cells that show, each frame, into that area rather than the frame's own, however big the map is: here 40 by 32 cells, 1,280 of them, of which a 320 by 240 window shows 21 by 16 at most.
The cells are cut from the tutorial's own BG.TIM, an 8-bit image of sixteen tiles in two rows, which sits at 320, 0 in video memory beside the display buffers, its palette at 320, 509. The map is the tutorial's: a band of stone along the top and bottom of each screen, ground between, and a number in each.
Differences from the tutorial: the picture is 240 lines, where the tutorial's was 256 on a PAL console, so the map scrolls 16 lines further; and the scroll position is shown with the window rather than the background's fields.