Page loading, images and backgrounds

URL classification, native texture formats, upper images and browser resource budgets.

The American V2 HTML scene gives its document a 240 × 165 rectangle at (0, 0), rather than the full 256 × 192 lower screen. The remaining space belongs to native controls and scrolling. The constructor stores the rectangle at offsets 52–58 and passes it to both graphics and interaction clipping. The upper screen has a separate presentation path. [1]

URL types

The resource classifier examines URL text, including these suffixes in lowercase, uppercase and mixed case. A MIME type alone does not enable another decoder. The normal page opener accepts HTTP(S) documents of kind one or four. An extensionless HTTP destination is kind five and fails that gate, although a subordinate descriptor has its own kind-five conversion. [1]

SuffixKindUse
.html / .htm / .cgi1HTML
.css2Stylesheet
.tmb3Thumbnail
.txt4Text document
Extensionless HTTP path5Special classification
.ppm6Flipnote
.lst7List
.ntft8Direct texture
.nbf9Background
.npf10Indexed texture
.uls11UGO
.post12Native upload
.reply13Native reply
.kbd14Native keyboard

PNG, JPEG, GIF, BMP, SVG, WebP, JavaScript, web fonts and MP4 return kind zero in the checked classifier. Its suffix handling is not a general URL parser: fallback searches for .htm, .kbd, .uls and .lst can classify a name such as item.htmlx. Queries on recognised document and texture paths retain their types in the tested cases. Use explicit canonical suffixes. [1]

The queue refuses absolute URLs of 255 bytes or more. A lower descriptor accepts 255 but refuses 256; the earlier queue is the tighter normal limit. Keep the complete resolved URL within 254 bytes. Anchor attributes retain literal ampersands, percent escapes, plus signs and vertical bars. In particular, page.htm?a=1&b=2 stores the amp entity spelling, rather than converting it to a query separator. Text entity conversion is a different path. [1]

Scheme recognition includes rom, nand, sd, http, https and cnt. This does not authorise local reads from a served page: the normal opener requires HTTP(S), while the examined resource service loop acquires only its HTTP scheme kind and leaves the inspected local branches without acquired data. [1]

Loading order and failures

  1. Wait for the HTML resource and parse its head.
  2. Queue the single linked stylesheet, if present, and wait for it.
  3. Parse CSS, release its request and parse the body.
  4. Lay out the document, collect image and background work, then adopt the root size and requested scroll position.

A stylesheet refused at initial queueing can leave body processing to continue without CSS. A stylesheet accepted into the queue but failing later takes the failure transition instead. Queue acquisition is serial. Missing inline images can leave their declared rectangle and linked hit area in place without submitting a texture, so useful neighbouring text is still needed. These outcomes are distinct from a successful complete page load. [1]

Inline image data

FormatInline consumer
NTFT, kind 8Raw direct-colour bytes; graphics format 7
NPF, kind 10UGAR with two sections: palette, then indexed texture; graphics format 3
TMB, kind 31,696 bytes; its 1,536-byte pixel section begins at 160
NBF, kind 9A separate background consumer; not accepted by the inline image gate

The image parser recognises src, width, height, alt and align. Src and the 16-bit dimensions are retained; alt does not install a fallback caption. Left and right alignment alter its float byte, whereas the recognised top, middle and bottom tokens do not. Put an explicitly sized image inside an anchor when its rectangle should be tappable. [1]

Texture storage uses powers of two from eight through 1,024 pixels in each dimension. A smaller dimension uses eight; an intermediate dimension rounds up. A visible 100 × 24 rectangle therefore needs storage addressing consistent with 128 × 32, while its declared rectangle remains 100 × 24. The examined coordinate submission uses those declared dimensions; it does not provide CSS image fitting or intrinsic-size discovery. Larger texture dimensions have not been verified by this mapping. [1]

Direct textures and indexed textures use different transparency flags. The indexed upload enables colour-zero transparency; the direct-colour upload does not enable that indexed flag. A descriptor already at state four reuses its texture and palette offsets instead of transferring them again. NPF texture and palette sections are rounded to four bytes for transfer, but the palette allocation counter advances in 32-byte units. Exact texture and palette ceilings are excluded, as shown below. [1]

Independent limits

ResourceBoundary
Document nodes1,024 × 44 bytes; node allocation also checks styles
Stylesheet rules256 × 80 bytes
Node styles512 × 80 bytes
Text and href copiesGuard at 0xFF9C within a 64 KiB allocation
Resource descriptors256 entries, 296-byte stride
Pending resources128 entries
Resource-buffer heap1,024,000 bytes in the checked initialiser
Ordinary unbuffered HTTP acquisition102,400-byte buffer request
Image and rectangle records512 × 20 bytes
Thumbnail recordsFive accepted kind-three records
Glyph records10,240
Text coloursFifteen RGB15 values
Effective table columnsOne through sixteen
Texture transfersNew total must be less than 0x20000 bytes
Indexed-palette transfersNew transfer total must be less than 0x4000 bytes

A resource can be marked pending before the client discovers that its 128-entry array is full, without then being appended to that array. Pool exhaustion is not a pagination mechanism. Textures, rectangles and repeated background tiles also compete for entries independently of their byte sizes. [1]

Native lower wallpaper

The lower NBF wallpaper uses exactly 80 bytes and one 8 × 8, four-bit tile. Give its background metadata an absolute URL: the kind-nine queue call has no document base with which to resolve a relative path. [1]

OffsetBytesData
0x004UGAR
0x044Little-endian section count: 2
0x084First section length: 32
0x0C4Second section length: 32
0x1032Sixteen little-endian RGB555 words
0x30328 × 8 tile; left pixel in the low nibble

Palette words zero through fourteen become Main BG bank eleven indices one through fifteen; source word fifteen is unused. Native palette index zero is retained, including its transparency behaviour. Opaque pattern pixels should therefore use indices one through fifteen. The American V2 consumer at 02036E74 replaces tile 128 in CommonBGBG.ZCGR and queues thirty palette bytes to 0x05000162. Browser mode fourteen selects WallPaperBG.ZSCR: all 1,024 map entries contain 0xB080, repeating tile 128 in palette bank eleven across a 256 × 256 map. This consumes no HTML drawing entries and does not recolour native Back, scrollbar or upper-board graphics. [1]

NTFT background tiles

NTFT backgrounds resolve relative to the document and repeat through the HTML image writer. The loop uses the full root extent and the strict vertical condition tile_y + tile_height < root_height. Horizontal origins advance to the right edge before starting another row. This can omit the last partial or exactly ending row. A 240 × 165 root with 8 × 8 tiles requests 600 records but retains only 512; 32 × 32 tiles request forty. At a root height of 400, the latter request 96. Use a matching solid base colour and budget the repeated entries, rather than assuming a tiny file has a small drawing cost. [1]

Upper-screen NBF

A normal full upper image is 49,680 bytes. At offset zero its sixteen-byte UGAR header declares two sections of 512 and 49,152 bytes. Offset 0x10 holds 256 RGB555 palette words; offset 0x210 holds the 256 × 192 one-byte indices. This is a different format and consumer from the eighty-byte lower wallpaper. [1]

The American V2 reader at 0201F2AC obtains a fixed 0xC210 extent, checks the container and section count, and caches its accepted URL. It does not separately require both conventional section lengths. Transfer kind 31 writes the SUB BG palette at 0x05000400; kind 29 selects the SUB bitmap destination, represented by 0x06200000 in the controlled copy check. [1]

A nonempty upperlink bypasses ordinary upper-title setup. The NBF branch clears or hides the native text child and selects upper mode four, allowing a complete prepared image without duplicate title text. The same URL can reuse its cached image: change the URL when changing dynamic artwork. A custom upper image replaces the ordinary PPM preview, so provide an explicit PPM link for playback. Keep changing star counts in native controls or supported star nodes rather than baking them into an image intended to remain cached. [1]

Scope and implementation references

Parser, resource and display-budget checks cover the three V2 regions. The detailed lower/upper NBF transfer checks and hardware-register submissions described here are American V2 observations with declared memory and service fixtures. They establish formats, arguments and finite drawing records, not physical GPU output or an entire network session. Relevant American V2 entry points include URL classification 02074418, page opening 0207318C, loading 02072A28, resource queueing 02075734, texture transfer 0207348C and inline resource admission 02073E4C. [1]

Completed transfer does not validate a resource

American V2 descriptor creation 0207522C, classification, queueing, arena reservation and body adoption were joined for HTML, CSS, NTFT, PPM and ULS routes. The checked PNG and literal .ugo suffixes are refused at descriptor admission. These examples do not independently establish every suffix in the classifier. A nonempty completed body sets state three, stores the received size, returns ownership tag one and retains its pointer. A zero result releases the buffer and sets FFFFFFFF. [2]

Non-HTML bytes at an HTML URL and non-NTFT bytes at an NTFT URL still reach that completed state. Readiness describes transfer completion, not format validity. The later parser and resource constructor remain necessary. Response decoding adds another distinction: an extended Nitro header can decode bytes while the application publishes zero length, and different rejection paths keep different transfer states. A single generic ready/error Boolean would lose those original contracts. [2]

A full queue can leave an untracked pending descriptor

Enqueue 020758E0 marks an eligible descriptor state one before checking the 128-entry capacity. At count 127 it stores the pointer and increments count. At 128 it does not store the pointer, but leaves that descriptor pending. Logical reset visits only pointers actually in the queue, so the untracked descriptor stays pending in the checked saturated fixture. Existing ready/pending inputs use their bypass paths; reset ends at count zero and active index FFFFFFFF. This is a bounded capacity result, not proof of ordinary page saturation, physical transfer abort or complete cache eviction. [2]

Sources

  1. [1] Flipnote Decompilation Project — Original HTML resource loading, textures and NBF presentation
  2. [2] Flipnote Decompilation Project — Resource completion, body adoption and queue-capacity edges

← All documentation