Asset Types#
dk64_lib models ROM data as table entries. Every parsed object carries raw
metadata from dk64_lib.data_types.base.BaseData: raw_data,
offset, size, was_compressed, and the source rom.
Pointer Tables#
The high-level ROM facade currently knows these table families:
Table |
Data |
Current support |
|---|---|---|
|
MIDI music |
Stubbed as raw MIDI-style music sequence data. |
|
Geometry |
Parsed into map geometry objects and exported as OBJ/MTL/PNG, glTF/PNG, GLB, or DAE/PNG files. |
|
Wall collision |
Stubbed as raw wall collision records. |
|
Floor collision |
Stubbed as raw floor collision records. |
|
Model two geometry |
Stubbed as raw model two geometry records. The exact meaning of “model two” still needs to be decoded. |
|
Actor geometry |
Stubbed as raw actor geometry records, likely including bones and texture references. |
|
Textures |
Exported as guessed PNGs when byte size matches a known RGBA5551 size. |
|
Cutscenes |
Wrapped as raw cutscene records and exported as binary files. |
|
Setups |
Stubbed as raw setup records. The exact setup format is not decoded yet. |
|
Instance scripts |
Stubbed as raw instance script records. |
|
Animation |
Stubbed as raw animation records. It is not yet known whether entries target textures, models, or both. |
|
Text |
Parsed into text lines, fragments, normal text records, and sprite tokens. |
|
Animation code |
Stubbed as raw animation code records. |
|
Textures |
Exported as guessed PNGs when byte size matches a known RGBA5551 size. |
|
Paths |
Stubbed as raw path records. |
|
Spawners |
Stubbed as raw spawner records. |
|
DKTV inputs |
Stubbed as raw DKTV input records. |
|
Triggers |
Stubbed as raw trigger records. |
|
Unknown |
Stubbed as an unknown raw table. Known entries include index |
|
Autowalks |
Stubbed as raw autowalk records. |
|
Critter data |
Stubbed as raw critter records. |
|
Exits |
Stubbed as raw map exit records. |
|
Race checkpoints |
Stubbed as raw race checkpoint records. |
|
Geometry textures |
Decoded to PNG from display-list metadata, or guessed by size when unreferenced. |
|
Uncompressed file sizes |
Stubbed as raw uncompressed file size records. |
Text Data#
dk64_lib.data_types.text.TextData parses text table entries into
immutable records:
text_linesis a tuple of parsed line records.Each line can contain one or more fragments.
Fragments contain normal text records or sprite tokens.
text_line.textjoins those fragments into a readable string.
Sprite tokens are resolved against release or kiosk sprite lookup tables, depending on the ROM type.
Geometry Data#
dk64_lib.data_types.geometry.GeometryData parses map geometry table
entries. A geometry entry can also be a pointer record that references another
geometry table entry.
Parsed geometry exposes:
display_listsasdk64_lib.f3dex2.display_list.DisplayListobjects.vertex_chunk_dataas 52-byte display-list chunk metadata records.dl_expansionsfor expansion records that point at additional display lists.save_to_obj()for OBJ export, textured by default.save_to_gltf()for separate glTF JSON, binary, and PNG export.save_to_glb()for single-file binary glTF export.save_to_dae()for COLLADA export, textured by default.
Display lists are decoded into F3DEX2 commands, vertices, and triangles. The textured OBJ, glTF/GLB, and DAE exporters follow texture state commands to group mesh faces by material.
Texture Data#
dk64_lib.data_types.texture.TextureData currently wraps raw texture
table entries. Rom.export_textures() and the textured geometry export path
decode referenced table 25 texture bytes into PNG images when geometry display
lists provide enough format, size, palette, and tile information. For table 7,
table 14, and unreferenced table 25 entries, Rom.export_textures() also
writes best-effort RGBA5551 PNGs when the decompressed byte length matches a
known size guess.
Supported texture decoding includes:
RGBA16
RGBA32
CI4 and CI8 with palette data
IA formats
I formats
A few packed mipmap layouts used by DK64 assets
Unknown or unsupported texture combinations produce placeholder RGBA data instead of failing the full export.
For the detailed geometry texture pipeline, including OBJ, glTF/GLB, and DAE materials, UV conversion, vertex colors, palette handling, and the currently decoded packed mipmap layouts, see Textured Geometry Pipeline.
Cutscene Data#
dk64_lib.data_types.cutscene.CutsceneData currently stores cutscene
table entries as raw binary records. The high-level exporter writes those bytes
to cutscene_###_offset_########.bin files.
Stubbed Table Data#
dk64_lib.data_types.table_stubs.StubTableData is used for tables with
provisional names but no decoded binary layout yet. These classes intentionally
preserve raw bytes and pointer metadata only. They give future reverse
engineering work stable API names without implying that the table format is
understood.
Use dk64_lib.rom.Rom.get_stub_table_data() for a specific table ID, or
one of the named convenience methods such as get_animation_data() or
get_actor_geometry_data(). Tables 6 and 20 are still unlabeled in
the library.
Raw Assets#
Rom.export_assets() and Rom.export_raw_tables() export raw entries from
known, parsed, and stubbed pointer tables. Use these when a table is not parsed
yet or when you need exact decompressed bytes for research.