Flipnote Hatena uses UGO resources to describe menus. The documented format begins with UGAR, a section count and section lengths. The first section contains menu layout, text, category, button and action records. A second section can hold images or Flipnote previews. [1][2]
| Section | Role |
|---|---|
| Header | Magic, section count and length table |
| Table of contents | Menu records, labels and actions |
| Optional embedded data | Images or TMB preview records |
Rendering a menu
The client connects UGO records to its built-in controls, so arbitrary HTML cannot replace a native Hatena menu. The paths, embedded assets and record layout need to match the expected screen. The original-ROM guide follows how the client parses these documents and loads remote previews. [3]
The Flipnote Studio Docs and hatena-server wikis describe complementary portions of the UGO format. Their field tables are useful references, while the ROM findings help confirm how particular builds consume the data. [1][2][3]
Menu data and embedded resources
A UGO begins with UGAR, a section count and lengths for text menu data and optional embedded images. Menu data is line-based: entries are separated by LF and fields by tabs. The first field chooses the entry type, such as menu layout, top-screen contents, dropdown item, corner button or ordinary item. The embedded section can contain TMB previews for grids or NTFT icons for list menus. [1][2]
Layout types select different menu modes
The client does not render every UGO with one generic widget. The original V2 dispatcher reads a layout value and can choose different menu or list modes. A malformed layout field falls back to type 2 in the observed parser. UI behaviour such as sort controls therefore depends on both the parsed archive and the route that loaded it. [3]
Parser discipline
Check section lengths against the response body before splitting lines; preserve empty tab fields; bound item counts and embedded file extents. A renderer can safely ignore unknown entry types for display, but should not shift later image offsets based on a guessed row width. [1][2]
Menu text format
Menu control text uses UTF-8-compatible ASCII, with one record per LF-separated line and tabs between fields. Many text fields contain UTF-16LE encoded as Base64. Keep empty fields when parsing: an omitted counter may mean something different from a counter set to zero. [4]
| Record | Role and fields after type |
|---|---|
0 | Layout: large list (0), small list (1 or 3), grid (2), or alternate-icon list (4). A grid with an additional value 2 exposes a Post control. |
1 | Top-screen mode. Zero selects five encoded text positions; one selects a plaintext image or PPM URL. |
2 | Dropdown item: destination URL, encoded label and selected-state number. |
3 | Lower-right button: destination and encoded label. Up to two are documented. |
4 | List item or grid thumbnail: URL, icon index, encoded label, optional counter, optional lock marker and one uncertain field. |
5 | Partly understood behaviour: a blue background was observed in some cases; its remaining field needs investigation. |
Top-screen text positions correspond to uppertitle, uppersubleft, uppersubright, uppersubtop and uppersubbottom. A top-screen image URL instead corresponds to upperlink. For layout 2, an embedded preview is a 1,696-byte TMB; for other layouts, an embedded icon is a 2,048-byte 32 × 32 NTFT. Embedded indices are 0–99. Values from 100 refer to built-in imagery selected by layout rather than another embedded blob. [4]
Built-in icon indices
Meanings are layout dependent. index.ugo uses 100 people, 101 TV, 102 globe, 103 search and 104 frog. In other large and small lists, 101 is TV, 104 frog, 113 a group of six frogs, 114 person, 115 and 116 direction arrows, and 117 a question mark; the intervening slots are marked unused in the wiki. Layout 4 defines the following extra set. [4]
| Index | Layout 4 icon | Index | Layout 4 icon |
|---|---|---|---|
| 105 | Send | 110 | Diary or book |
| 106 | Frog with heart bubble | 111 | Profile |
| 107 | Add stars | 112 | Four frogs |
| 108 | Frog with frog bubble | 113 | Six frogs |
| 109 | Frog with TV bubble |
Grid layout 2 gives low indices 0–4 different uses according to whether the item has a URL. For an embedded TMB with no URL, 0 and 2 are a default letter icon, 1 and 4 are read Flipnote thumbnails with text, and 3 is a thumbnail with a star count. With a URL, 0 and 2 are stamped letters, 1 and 3 are unstamped letter variants. These values are not a palette or an embedded-resource offset. The flashing unread-mail indicator depends on X-DSi-Unread-Notices or X-DSi-New-Notices being 1 in the service response. [4]
UGO's exact archive header
The documented header reserves sixteen bytes for UGAR, section count 2, menu-data length and embedded-data length. A menu can have no embedded resources. Even then, read and check the declared section lengths. [1]
| Offset | Bytes | Meaning |
|---|---|---|
| 0x00 | 4 | ASCII UGAR |
| 0x04 | 4 | Section count; the documented form is 2 |
| 0x08 | 4 | First section's byte length |
| 0x0C | 4 | Second section's byte length |
Menu records are separated by byte 0A; their fields are separated by byte 09. The numeric entry type is the first field of every row. Labels use UTF-16LE text wrapped in Base64, whereas destination URLs remain plaintext. Compared with an equivalent HTML menu, the compact record format reduces file size and can combine menu items with their images in one transfer, avoiding separate requests for every icon or thumbnail. [1]
Layout 0 is the large-text list used for index.ugo; 1 is a small-text list, 2 is the Flipnote-grid or inbox layout, 3 is described as equivalent to 1, and 4 follows 0 with a different built-in icon set. A layout-two record with an extra value of 2 adds a bottom-right Post control for commenting on the selected Flipnote. [1]
The five top-screen text positions
| Mode-zero field | Equivalent metadata name | Documented presentation |
|---|---|---|
| First text field | uppertitle | Large, centred and underlined |
| Second text field | uppersubleft | Medium text, left-aligned beneath the title |
| Third text field | uppersubright | Medium text, right-aligned beneath the title |
| Fourth text field | uppersubtop | Small text in a box toward the top |
| Fifth text field | uppersubbottom | Small text centred toward the bottom |
These five encoded fields follow a top-screen record's mode value 0. Mode 1 instead takes a plaintext URL to an NBF background or PPM animation, corresponding to upperlink. [1]
Optional values must retain their positions
| Record | Field after entry type | Value or meaning |
|---|---|---|
| Type 2: dropdown | 1 / 2 / 3 | Destination URL / encoded label / selected state: 0 false, 1 true |
| Type 3: corner button | 1 / 2 | Destination URL / encoded label; at most two buttons are documented |
| Type 4: ordinary item | 1 / 2 / 3 | Destination URL / icon value / encoded label |
| Type 4: ordinary item | 4 | Counter; leave the field empty to omit it |
| Type 4: ordinary item | 5 | Lock indicator; 1 enables it, an empty field omits it |
| Type 4: ordinary item | 6 | Unknown; the wiki has observed only 0 |
| Type 5: unresolved | 1 | Unknown; an empty value was observed to provoke another GET during loading |
Dropdown entries commonly appear on comment pages, but the source allows them elsewhere too. A zero counter, an empty counter, an omitted field and a lock flag are different records. Preserve tabs even when a value is empty. Type 5 has produced a solid blue background on some pages, but the wiki reports no example of its use in the captured original Hatena pages. Neither its destination nor the purpose of the extra GET is established. [1]
Complete built-in list icon ranges
| Context | Icon value | Meaning or observed state |
|---|---|---|
| index.ugo | 100 / 101 / 102 / 103 / 104 | Group of people / TV / globe / search / frog |
| Other layout 0 or 1 lists | 100 | Unused in the wiki's table |
| Other layout 0 or 1 lists | 101 | TV |
| Other layout 0 or 1 lists | 102–103 | Unused in the wiki's table |
| Other layout 0 or 1 lists | 104 | Frog |
| Other layout 0 or 1 lists | 105–112 | Unused in the wiki's table |
| Other layout 0 or 1 lists | 113 / 114 / 115 / 116 / 117 | Six frogs / person / right arrow / left arrow / question mark |
| Layout 4 | 100 | Unused in the wiki's table |
| Layout 4 | 101 | TV |
| Layout 4 | 102–103 | Unused in the wiki's table |
| Layout 4 | 104 | Frog |
| Layout 4 | 105 / 106 / 107 | Send / frog with heart bubble / add stars |
| Layout 4 | 108 / 109 / 110 | Frog with frog bubble / frog with TV bubble / diary or book |
| Layout 4 | 111 / 112 / 113 | Profile / four frogs / six frogs |
Layout 2 distinguishes read letters from other letters
The general embedded-content index range is 0–99, but layout 2 also assigns low values to grid and letter presentation. The two branches in the wiki's table depend on whether a destination URL is present. [1]
| Icon value | No URL; TMB embed instead | URL present |
|---|---|---|
| 0 | Letter with default icon | Letter with frog stamp |
| 1 | Read Flipnote thumbnail with text | Read letter without frog stamp |
| 2 | Letter with default icon | Letter with frog stamp |
| 3 | Flipnote thumbnail with star count | Letter without frog stamp; no read-state qualifier given |
| 4 | Read Flipnote thumbnail with text | Not documented |
In particular, URL-present value 1 is explicitly a read unstamped letter, while value 3 is described only as an unstamped letter. Preserve that distinction. No URL-present meaning is provided for value 4. [1]
For embedded-section indexing, list-layout icons occupy 2,048 bytes each and grid-layout TMB records occupy 1,696 bytes each; they are concatenated without a separate per-item length table. The flashing NEW mail control on index.ugo is associated with X-DSi-Unread-Notices: 1 or X-DSi-New-Notices: 1 in the /auth response. These response headers are distinct from the UGO's binary archive header. [1]
