Naming

Technical appendix · Home · Français

There are two databases:

  • maup.exe.i64: IDA, named by earlier work. Not changed by the re-check, so its misleading names remain.

  • maup.exe.bndb: Binary Ninja, with the corrected names. symbols.tsv lists them all, with each address in both bases and the old IDA name where it differs.

  • MAUPITI1.EXE.bndb: Binary Ninja, with the names in symbols-maupiti1.tsv. Its address = file offset = EA - 0xEA00.

Binary Ninja may guess the wrong architecture for MAUPITI1.EXE. Opened as x86-16, the flat view has no entry point and shows only a hex dump. To rebuild it, run exec(open("<repo>/tools/bn_seed_m1.py").read()) in its Python console, which creates the functions and applies the names.

Renames needed if you work in IDA

IDA name Binary Ninja name Reason
Font_LoadCharset Intro_Run runs the intro
Font_LoadStrings Intro_OpLoadPicture loads pictures
sub_14930 Img_Decode image decoder
sub_157C3 Txt_DrawIndexed service 9, decodes and draws a string
sub_171A4 Intro_OpShowCredit shows a credit
sub_1428C Ui_CaptureSpriteSheet copies 64 rows to the sheet
sub_10536 Game_Main main entry
Vid_CanvasPtr Vid_PagePtr addresses the page
Vid_BlitTile16x12 Vid_BlitTile size is set by CX
Vid_FlushCanvas_Mono Vid_SpriteDispatch mode dispatcher
Vid_FlushCanvas_CGA16 Vid_SpriteAmstrad mode 0
Vid_FlushCanvas_EGA Vid_SpriteEga mode 2
wConStagingSeg wPageSeg the draw page
wVidCanvasSeg / Ofs wSheetSeg / Ofs sprite sheet
word_1CC2B wPage2Seg second page
bGlyphDirectStore bBlitViaPutPixel meaning was inverted
wGlyphRowPitch wTextColorCur holds colour
word_1A4F4 wTextColor holds colour
bHufIndexVariant bSoundCard sound card type
bConOpenState bConCurrentDisk disk number
wLzChunkLimitLo/Hi wLzProgressLimitLo/Hi no chunk format
unk_1CBAB IntroStringBuf decode buffer

Name prefixes

Con_ archives, Huf_ streams, Lz_ codec, Mau_ raw files, Save_ saves, Img_ images, Txt_ strings, Font_ fonts, Vid_ drawing, Ui_ sheet widgets, Intro_ intro, Far_ pointer helpers, SvcNN INT 0FEh services whose role isn't established.

Limits of the Binary Ninja view

  • The view is a flat map of the file, including the MZ header, with no segments.
  • Far calls and DS: references aren't resolved, so names on globals don't appear in code that uses them. For example, [0x496] shows as data_496, and constant values shown for it can be wrong.
  • Some names are symbols without a discovered function.
  • Both databases' names match symbols.tsv and symbols-maupiti1.tsv.
  • MAUPITI1.EXE's Main function stops after its first far call, so its code continues in Main_Body.
  • Local variables are named only in key functions: Img_Decode, Txt_Decode5Bit, Vid_DrawGlyph, Vid_DrawString, Lz_ReadDistance, Lz_Decompress, Lz_DecompressFar. Many others read arguments through mov bp,cx, which Binary Ninja doesn't model as arguments.

Previous: Speech · Next: Refuted claims · Technical appendix · Home