Lightbox and working-pixel flags

Four retained page ages, visible depth, Copy and transition colours.

A working pixel contains current ink, preview/draft information and four retained lightbox ages. The number of pages shown by Lightbox is a palette choice; it does not resize the stored history. The following connected ageing and palette checks use American V2 original code, with separately checked Japanese V2 and European routine mappings. [1]

BitMeaning in the examined routines
0x80Current layer zero ink
0x40Current layer one ink
0x20Special preview/selection/transition palette mode
0x10Separate draft/selection visibility plane
0x08, 0x04, 0x02, 0x01Four ages, newest first

Ageing on page changes

Previous and next page routines 02008E74 and 02008F44 call 02014A34 before restoring their destination frame. In basic mode with Copy off, it derives each staging pixel as follows: [1]

aged = ((pixel & 0x0E) >> 1)
     | ((pixel & 0xC0) ? 0x08 : 0)
     | (pixel & 0x10);

The oldest age disappears, current ink supplies the newest age and the separate 0x10 plane survives. Copy retains the current 0xC0 ink as well. Advanced mode instead uses only the active layer for the newest age and optional copied ink; its active-bit getter returns fifteen or fourteen, corresponding to low-byte ink bits seven or six. The Copy-disabled path still uses the original ink-clear routine at 0200BF30. [1]

Visible page count

Profile byte thirteen is written by 02027024 and read by 02027004. The menu handler is 020685A8. Palette generator 02014C7C clamps the setting to one through four and selects an original six-colour bank. Older retained ages beyond that bank's depth map to paper. Increasing the visible depth can therefore expose retained older age bits without navigating again. With Lightbox disabled, all four age entries become paper. [1]

The Lightbox enable getter at 02005EC4 also suppresses the effect while camera-busy routine 020192E0 is active. Draft visibility getter 02014BE0 shares that camera gate. Camera state is therefore separate from the persistent page-depth choice. [1]

Page-transition presentation

Transition routine 02015F80 converts staging pixels to special 0x20 palette indices. Priority is visible layer zero, visible layer one, enabled 0x10 plane, then the newest enabled age. Four ages use indices four through seven on one paper polarity and eight through eleven on the other. This transition consumer has been traced, while the complete animated transition and its timing remain unverified by the ageing checks. [1]

RoutineAmerican V2European V2Japanese V2
Age producer02014A3402014AB002014A88
Transition colouriser02015F8002015FFC02015FD4

The checks compare complete 49,152-byte planes across every possible working-pixel byte, and separately connect the profile setter/getter to the palette generator. First-page behaviour, loops, complete multi-page decoding, draft editing and physical presentation still require their respective complete paths. [1]

From packed history to transition indices

American V2 age producer 02014A34 and transition colouriser 02015F80 were joined across complete planes containing every possible packed byte. Let current ink be both high bits in basic mode or the selected high bit in advanced mode. The staged byte is ((p & 0E) >> 1) | (current ? 08 : 00) | (p & 10) | (copy ? current : 00). Copy controls retained current ink, not whether the age advances. [2]

Visible layer zero outranks visible layer one, then enabled draft outranks lightbox history. The youngest age bit wins: bits three through zero choose indices four–seven for one paper polarity or eight–eleven for the other. Draft uses twelve or thirteen; paper uses three or zero. The transition byte is 20 | index. These are indexed pixels, not RGB values. Hidden ink does not win merely because its high bit is set. [2]

A rebuilt palette may not be submitted

Static analysis of 02014C7C accounts for the 256-entry sixteen-bit palette at 021903C0. Bit 20 selects a transition lookup using the low nibble; other pixels use the lower-six-bit draft/history priorities after visible ink. The draft getter 02014BE0 is disabled while photo predicate 020192E0 is active. At the end, 02011CCC gates publication: only a false result calls 0201504C, cleans 512 cache bytes and requests the channel-two palette transfer. Construction and hardware publication are separate operations. This final connection is static evidence; it has not been executed as a complete display transition. [2]

Sources

  1. [1] Flipnote Decompilation Project — Original Lightbox ageing and palette depth
  2. [2] Flipnote Decompilation Project — Lightbox age conversion and palette publication gates

← All documentation