Barahir is a classic Polish text/graphic adventure game for 8-bit Atari computers. After translating Incydent and Magia Kryształu, Barahir was repeatedly recommended to me as another title deserving an English translation. When I finally took a look under the hood, I realized it was a completely different beast.
What started as a straightforward translation project quickly turned into a deep reverse-engineering operation involving custom python tools, automated translation pipelines, complete assembly rewrites of engine UI routines, and precise NTSC timing fixes.



Disassembly & Building the Translation Tooling
Extracting and replacing text wasn’t a simple dump-and-replace task. The original Polish game didn’t feature auto-formatting for its text engine; instead, every single text line had hardcoded (X, Y) screen coordinates.
Because English sentences are almost universally longer than their Polish counterparts, translating line-by-line in-place was impossible. If a line grew longer, it either overflowed its pop-up box or cut off unnaturally.
To tackle this, I set up a custom workflow:
- Disassembly: I disassembled the game using rsdis – an internal tool written in PHP by Raster nearly 20 years ago. Not wanting to set up a legacy PHP environment on my laptop, I used Claude to port rsdis over to Python, adding extra parameters to create lookup tables for easier manipulation of textual data.
- Translation Pipeline: I built a custom translation tool that auto-selected text paragraphs, managed translation keys, and queried a local
LibreTranslateDocker container for the initial Polish -> English translation pass. - XEX Manipulation: To handle multi-block binaries, reordering, and address changes, I took
@vitoco’s xex-filter tool and ported it to Python as well.
Overhauling the Text & UI Engine
The first translation pass quickly revealed visual glitches. The original game engine used hardcoded window frame sizes. When a translated text was longer than original, it overflowed the frame boundaries. When it was shorter, previous text underneath remained un-cleared.
Rather than manually tweaking coordinates and frame sizes for hundreds of text boxes, I replaced the game’s original text/frame drawing routine with a newly written custom routine:
- It dynamically calculates the required frame bounds based on text length.
- It automatically clears the background frame area before rendering the text.
This eliminated hours of tedious coordinate hunting and made the layout dynamic!
Playtesting & Fine-Tuning with Jiří Bernášek (Bewesoft)
A translation is only as good as its context, and translating location descriptions blind without playing every route leads to weird wording (e.g., confusing chest/box/cage, or awkward directional prompts).
Huge thanks to Jiří Bernášek (Bewesoft), who joined the effort as the primary tester! Jiří ran exhaustive playthroughs, comparing the Polish and English versions side-by-side, catching typos, edge-case bugs, and contextual mismatching across 8 rounds of nitpicks and feedback (barahir-nitpicks1..8!).
Together, we fixed:
- Inventory limit logic bugs (crashing on 7th item pickup, local location item hoarding limits).
- Inconsistent room directions and labels (e.g., distinguishing stairways, sewer/canal naming, inside/outside castle hall transitions).
- Engine logic issues where eating food or drinking water stopped restoring player energy.
- Re-designed multi-page end screens with clean frame padding and prompt flow (“Press Fire”).
Audio, Colors & NTSC Compatibility
Barahir features an iconic intro with sampled drum beats played via low-level interrupt routines. On NTSC machines (60Hz vs 50Hz PAL), this caused severe visual glitches – making the screen jump.
Jiří pointed out that the Display List pointer doesn’t actually need to be rewritten in every single VBI if the DL ends with a JVB instruction. By locking critical I/O (STA $42 / CRITIC), initializing DL once, and throttling CMC music player calls every 6 frames under NTSC, we eliminated the screen jitter while maintaining audio sync across both NTSC and PAL hardware.
I also adjusted color tables and fixed CMC initialization so music pitch/speed remain pleasant on all systems.
Final Release & Packaging
Once the game and intro were finalized, Homesoft kindly stepped in to assemble all parts together, producing two distinct final versions:
- ATR Disk Image Version: Runs on stock 64KB Atari machines (includes intro, main game, and disk loading logic).
- 130XE Executable Binary (
.XEX): Designed for 128KB Atari 130XE systems. It runs as a standalone executable file (not a disk image) and removes disk-access delays, making room transitions instantaneous and smooth!
Downloads
You can grab the translated game packages directly from here, they will later also appear in Homesoft’s repository.
Enjoy playing Barahir in English! If you find any remaining quirks, feel free to drop a comment or reach out on the AtariAge forums.


