gitwtfhub

wtf is openhi2txt?

inigomonyota/openhi2txt — explained in plain English

Analysis updated 2026-05-18

3C++Audience · developerComplexity · 3/5Setup · moderate

TL;DR

A C++ library and command line tool that reads arcade game high scores from MAME using existing hi2txt XML definition files.

Mindmap

mindmap
  root((OpenHi2txt))
    What it does
      Reads MAME high scores
      Uses hi2txt XML defs
    Two forms
      Embeddable C++ library
      Command line tool
    Typical use
      Load saved scores
      Refresh after game exit
    Build system
      CMake presets
      Windows and Linux
    Audience
      Frontend developers
      Arcade emulation hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Embed a high score reading library into a MAME frontend or arcade game launcher.

REASON 2

Use the command line tool as a drop-in replacement for the original hi2txt CLI in existing scripts.

REASON 3

Refresh a game's displayed high score right after that game closes in a frontend.

REASON 4

Read high score data from compressed hi2txt XML definition archives.

What's in the stack?

C++CMakerapidxmlzlib

How it stacks up

inigomonyota/openhi2txt4brm01/picture-pokerbong-water-water-bong/npu-gpu-cpu
Stars333
LanguageC++C++C++
Setup difficultymoderateeasyhard
Complexity3/51/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a C++17 compiler, CMake, and either system zlib/minizip on Linux or the bundled static libs on Windows MSVC.

Wtf does this do

OpenHi2txt is a small utility built for people who run classic arcade game emulation using MAME, the widely used arcade machine emulator. Many old arcade games store their high scores in a special format inside the emulator's save files, and a set of XML definitions called hi2txt describes how to read those scores out for a specific game. This project reads that data and is compatible with existing hi2txt XML definitions, so anyone who already has those definition files can use them here too. It comes in two forms. The first is a C++ library that other programs, such as arcade game launchers, frontends, and scraping tools, can embed directly into their own code to pull high score data programmatically. The second is a standalone command line tool that works the same way the original hi2txt command line tool did, accepting many of the same arguments, so it can slot into existing scripts and workflows without much change. A typical use in a frontend application involves loading all previously saved score data at startup, then refreshing a specific game's score right after that game closes, so the displayed high scores stay current. The command line version supports filters and display options inherited from the original hi2txt tool, plus a trace mode for debugging. The project is written in C++17 and built using CMake, with support for both Visual Studio on Windows and Ninja on Windows or Linux. It bundles a header only XML parsing library and relies on zlib and minizip for reading compressed archive files, with the command line tool being optional if you only want the library.

Yoink these prompts

Prompt 1
Explain how to embed the openhi2txt library into my own MAME frontend application.
Prompt 2
Help me build this project on Linux using the Ninja preset and system zlib.
Prompt 3
Walk me through the command line arguments this tool accepts for reading a specific ROM's high score.
Prompt 4
Describe how readAllPersistedGames and refreshGame work together in a typical frontend.

Frequently asked questions

wtf is openhi2txt?

A C++ library and command line tool that reads arcade game high scores from MAME using existing hi2txt XML definition files.

What language is openhi2txt written in?

Mainly C++. The stack also includes C++, CMake, rapidxml.

How hard is openhi2txt to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is openhi2txt for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.