Browse Community

Dungeon Master Nexus for Sega Saturn Translation Kit

Overview

The Dungeon Master Nexus translation kit allows anyone to fully translate the game to another language. The only Japanese language that this kit cannot replace is the spoken dialogs in the soundtracks of the 3 game videos, but it can add subtitles into these videos.
So far, the kit was used successfully to build English and French versions of the game. You may study how they were made and duplicate them as a basis for a new translation.

Play the English or French versions

If you want to play the English or French version, then you don’t need to use this translation kit. Instead, you may either:

  • Download the whole game
  • Apply an SSP patch to a CD image of the original Japanese version that you already have. You can download the files Dungeon Master Nexus for Sega Saturn English version 2 patch.ssp and Dungeon Master Nexus for Sega Saturn French version patch.ssp from the Tools folder in the DMFiles Shared OneDrive. Then use Sega Saturn Patcher to apply the patch to a CD image of the original Japanese version of Dungeon Master Nexus.

Build a translated version

You can follow the instructions below to download and use the kit to build you own version. The kit contains all the necessary files and tools to build the English and French versions of the game. It will build the custom files from bitmaps and text files containing the English and French translations, then it will build an ISO image of the game.
The kit also contains everything you need to build you own translation to any language.

You don’t need any programming or reverse engineering skills to use the translation kit.
All you need to do is to provide translated texts and bitmaps in the target language. The kit contains a script that processes these elements to build the custom game data files and a custom ISO image of the game.
All the procedures below are written for the Windows operating system.
This page documents all the details that you need to know to build a new translation:

  • List of all the tasks that you must achieve for a complete translation
  • A description of the game data that the script modifies
  • The formats and limitations that you must conform to because of game requirements
  • The features of the script and how to use them
  • How to check your new translation in-game without playing the whole game from start to finish

Required steps

  1. Create a new translation in the kit to store your data
  2. Translate texts that the game stores as bitmap images by creating bitmaps to replace the original bitmaps that are in Japanese or English language.
  3. Customize the fonts that the game uses to display text on screen. The original fonts provide most American ASCII characters including lowercase and uppercase letters of the Latin alphabet, in addition to the Japanese characters (half-width and full width variants of both hiragana and katakana, and some kanji characters). If your target language requires additional characters, you must create bitmaps for them to customize the fonts. This was done in the French translation to add some diacritics like: à â è é ê ù ç î ï ô û ü.
  4. Translate texts that the game stores as text data. They are all listed in Translations.csv
    This step may involve the creation of additional bitmaps for some texts when they are too long to fit on screen when using the game fonts. This may apply to some item names as they are quite limited in length. The script first tries the regular encoding (using the font normally), then it tries a ‘condensed’ encoding (see the Reference section for details). If both fail then you must either shorten your text (so that regular or condensed encoding can apply successfully), or provide your own bitmap built outside of the script and containing the appropriate text.
  5. Create subtitles for the three videos and apply them into custom video files.
  6. Build your custom ISO image. If there are any issues, you may analyze the results. The script provides feedback about each text translation that helps to identify and fix issues.
  7. Check the translation in-game while playing for quality assurance. A saved game is provided to make testing much easier than playing the whole game.

You will iterate the steps above until the result is correct in the game. The sections below give details on how to proceed with each step.

1. Create a new translation

  1. Create a folder C:\DMNTranslationKit (this is an example, you may choose any other location on your computer)
  2. Download and decompress the Dungeon Master Nexus Translation Kit into this folder.
    You can download the file DungeonMasterNexusTranslationKit.7z from the Tools folder in the DMFiles Shared OneDrive.
    The kit contains everything you need to start working. You don’t need to download the components listed below only for information:
    1. The original Dungeon Master Nexus for Sega Saturn BIN/CUE disc image made by redump.org in C:\DMNTranslationKit\Output
    2. All the original game files extracted from that original CD disc image and in C:\DMNTranslationKit\Input
    3. ffmpeg in C:\DMNTranslationKit\Tools\ffmpeg, required to build subtitled videos
    4. A ready to use Windows 3.11 environment in the DOSBox emulator, along with the required components to encode the subtitled videos in C:\DMNTranslationKit\Tools\win311dosbox. This includes:
      Windows 3.1 running in the DOSBox emulator
      Microsoft Multimedia Jumpstart (Version 1.1a)
      ‘Video for Windows on Windows’ installed from folder ‘\DEVELPMT\SDK\VFW11.WIN\WINVIDEO’
      ‘VFW developer’s kit’ installed from folder ‘\DEVELPMT\SDK\VFW11.WIN\VFWDK’
      The Duck TrueMotion S V1 codec
  3. Choose the name of the new translated language. This will be referred to as [Language] in this documentation.
  4. Create a folder named C:\DMNTranslationKit\[Language] for the new language.
  5. The folder C:\DMNTranslationKit\Resources\Initial Programs contains region locked IP.BIN files for each possible Sega Saturn region.
    Choose one region for your ISO image and copy the corresponding IP.BIN file to your translation folder C:\DMNTranslationKit\[Language].
  6. The most important file for your translation work is a CSV file (Comma Separated Value) that you manipulate in Excel. The format name implies that the delimiter is a comma, however it may not be true and that depends on a combination of your Windows regional settings and Excel options:
    If the decimal separator is ‘.’ then Excel uses ‘,’ (comma) as the CSV delimiter.
    If the decimal separator is ‘,’ then Excel uses ‘;’ (semicolon) as the CSV delimiter.
    The kit contains both variants C:\DMNTranslationKit\Translations_comma.csv and C:\DMNTranslationKit\Translations_semicolon.csv.
    You can simply try and open both variants and see which one is best for you: the ‘good’ variant will show data in several columns. The ‘bad’ variant will load everything mixed up in a single column.
    You must rename the ‘good’ variant that you want to use to Translations.csv.
    The script is compatible with both variants and automatically detects the appropriate delimiter to use when loading the file.
  7. Open C:\DMNTranslationKit\Translations.csv in Excel.
  8. Duplicate an existing column like the English one as a starting point for your own translation and rename the column to [Language].
    Save the CSV file. In Excel, the file format to use when saving is: ‘CSV UTF-8 (Comma delimited) (*.csv)’.
  9. Make a copy of the batch file C:\DMNTranslationKit\Build_English.cmd and rename it so that you replace ‘English’ with the name of your translation. Do not change anything else in the file name.
    You will run this batch file later to build your ISO image.

Notes:

  • You may create as many additional columns as you want in Translations.csv while you work on your translation.
  • The script reads the following columns: File, Index, Subindex, Usage, and the column titled with the language that you specify on the command line with a value like “Japanese”, “English” or “French”. The script ignores any other column.
  • You can use another tool than Excel to edit the CSV file but you must make sure that the appropriate format is preserved:
    Encoding must be UTF8 with BOM (byte order mark)
    The separator must be either ‘,’ (comma) or ‘;’ (semicolon).
    Texts on multiple lines must be enclosed in ‘"’ (double quotes)

2. Translate bitmaps

Basics

The original game contains bitmaps with text in Japanese or English.
The Japanese folder in the translation kit contains all the original bitmaps that contain some text that you may need to translate. Note that some of them are not used at all in the game, they are supplied only to have a complete reference. The Translations.csv file mentions which files are unused (you may filter on the column named ‘Unused’).
The script does not require that you translate any of the bitmaps, so it is up to you to decide which ones to translate. If you want to translate a bitmap you must:

  1. Copy the original bitmap from the Japanese folder (or from another translation folder) to your translation folder. Do NOT rename the bitmap file or the script won’t be able to find it.
  2. Edit and update the image to replace the text (read about the requirements below)
  3. In Translations.csv, put any text (preferably the actual translation) in the cell corresponding to the translated bitmap: find the line using the ‘File’ and ‘Index’ columns, and place your text in the column corresponding to your translation. If you leave this cell empty then the script considers that this bitmap is not part of your translation and ignores the bitmap file in your translation folder when building the custom game data files.

Please check the contents of the C:\DMNTranslationKit\Resources\Bitmaps folder in the translation kit: it contains some images with the original text already removed so you can directly add your own translated text over.

Bitmap requirements

The game encodes most bitmaps with one of two formats called ‘DGT2’ (uncompressed) and ‘PRS3’ (compressed).
When editing bitmaps, be careful to comply with the following requirements:

Color depth
All the bitmaps that use format PRS3 are encoded with 256 colors (8 bits per pixel). The translated bitmaps must use the same encoding.
Some of the bitmaps that use format DGT2 are encoded with 16 colors (4 bits per pixel) and others are encoded with 256 colors (8 bits per pixel). The translated bitmaps must use the same encoding or the game crashes. The script issues a warning message if you are using the wrong encoding compared to the original bitmap.
Color palette
The color palette associates a color index (a number) with a color definition (amounts of red, green, and blue). When editing bitmaps, you must make sure to use only tools that preserve the color palette definition. In other words, a pixel using color #12 in the original bitmap, must still use color #12 in the modified bitmap.
For example, the paint.net tool does not preserve the color palette: when it loads a bitmap, it is always converted to 24-bit color components. When saving, it generates a different color palette. You may see the same image on screen, but the color indices have all been changed. This makes the modified .bmp unusable for the translation script.

The recommended tool that was used for the English and French translations is the free version of Pro Motion NG 8.0.
By default, Pro Motion NG saves BMP files as 256 colors, so if you open a 16 colors bitmap and then save it, it is converted to 256 colors. To preserve the 16 colors encoding, you must:

  1. Open a bitmap file or create a new project
  2. Open the ‘File’ menu, and select ‘Project settings’
  3. Check the ‘Save BMP, PNG, ICO, GIF with minimal Color Depth’ checkbox
  4. Click the button ‘Save as Default’ to ensure this option is always be enabled by default so you won’t have to care anymore
  5. Click ‘OK’

All the bitmaps that use format PRS3 use a common 256 colors palette. The color palette in the translated .bmp files is ignored by the script.
On the other hand, the color palette of DGT2 bitmaps is converted by the script and included in the custom data files. Please be aware that so far there have been no experiments to change the color palettes. All translated bitmaps use the same color palettes as the original images. Using custom color palettes may or may not work and result in graphical glitches or other issues, use at your own risk and make your own testing.

Dimensions
The script does not support changing the dimensions (width and height in pixels) of PRS3 encoded bitmaps.
The script supports changing the dimensions of DGT2 encoded bitmaps. Please be aware that so far there have been no experiments to change the dimensions of bitmaps. Using custom dimensions may or may not work and result in graphical glitches or other issues, use at your own risk and make your own testing.
Transparency
The game uses color #0 as the transparent color. When editing a BMP file, color #0 is just another color, so make sure that you don’t use that color when customizing bitmaps or this will result in a wrong appearance in the game.

Special cases

Some bitmaps need special care.

Champion rename screen: MENU.BPK_47 and MENU.BPK_48

When the game displays the champion rename screen, it also draws an overlay grid of lines using the background color around all the symbols that the player can select.
You must make sure not to draw anything in these locations or the game overwrites it. You may refer to the files C:\DMNTranslationKit\Resources\Bitmaps\MENU.BPK_47.bmp and C:\DMNTranslationKit\Resources\Bitmaps\MENU.BPK_48.bmp to see that grid which is highlighted with empty red/blue/green squares. When translating the ‘Del’ and ‘OK’ buttons on the bottom right of MENU.BPK_48, make sure not to place text under the vertical bar in the middle of each of these two areas.

The champion’s name being defined is displayed at the top of the rename screen using the font FONT012.
Everywhere else in the game, the champion names are displayed using font FONT256.
Consequently, if you want to properly translate the rename champion screen then you need to replace the characters in both fonts.
Translations.csv contains the necessary lines to replace the 127 characters that can be selected by the player on the rename champion screen, for both fonts FONT256 and FONT012 (so this means 254 potential character replacements). On each of these lines, the ‘Notes’ column refers to slot coordinates that you can see on C:\DMNTranslationKit\Resources\Bitmaps\MENU.BPK_47.bmp and C:\DMNTranslationKit\Resources\Bitmaps\MENU.BPK_48.bmp.

In Japanese, some katakana characters are variants of other characters with an additional diacritic named dakuten ‘゛’ or handakuten ‘゜’. For example: ホ ボ ポ
On the champion rename screen, the player may enter the variants by first selecting the base character, and then selecting the ‘゜’ or ‘゛’ diacritic in block 2 (5,5) and (5,4). The characters where these diacritics can be applied are highlighted on C:\DMNTranslationKit\Resources\Bitmaps\MENU.BPK_47.bmp and C:\DMNTranslationKit\Resources\Bitmaps\MENU.BPK_48.bmp with blue and green squares. The mixed blue and green squares are characters where both diacritics can be applied. For a proper translation, you must make sure to replace all the necessary characters and their variants in the fonts.
For example, in the English translation, the slots for the two diacritics are left blank (there is no need for diacritics in the English language), and the three variants of the same character ホ ボ ポ are all replaced with the same character bitmap representing an ’e’ in the fonts. In that way, if the player first selects the ’e’ and then selects one of the diacritic slots (even though they are empty, they can still be selected), then the visible character remains the same.
Translations to other languages that use diacritics may benefit from these two diacritic slots and their behavior: in this case, the two or three variants of the same character would not be replaced with the same character bitmap, but instead with their actual forms with the diacritics.

Warning message WARNING.BIN_2

When the game displays this message on screen, the player can answer ‘Yes’ or ‘No’. The game highlights both options using hard-coded areas of the bitmap.
You must make sure that your translated text fits into these areas. You may refer to the file C:\DMNTranslationKit\Resources\Bitmaps\WARNING.BIN_2.bmp to see these areas.

3. Customize fonts

The game uses two fonts to display text, and one is stored as 3 separate items:

FontFont data storageCharactersCharacter dimensionsText usage
FONT256File FONT256.S2D242 characters (Kana + Romaji)8x8 pixelsSpell name
Champion name
FONT012File RLOWFIX.BIN FONT item #0291 characters (Kana + Romaji)6x12 pixels (half-width)Item name
Item description
Item action
Menu
Dialog
Inscription
Spell description
Saved game - Message
Saved game - Save slot
File RLOWFIX.BIN FONT item #1250 characters (Kana + Romaji)12x12 pixels (full-width)
File RLOWFIX.BIN FONT item #2710 characters (Kanji)12x12 pixels (full-width)

If your translated language requires additional characters that are not part of the original fonts (or in other translations) then you must create the missing font characters.
Do not create new images from scratch, always copy existing files. This ensures you use the correct format, dimensions, and color palette.
For each additional character that you create, you have two storage options:

  • Create a dedicated bitmap containing only the character you want to replace. There are some samples in the English translation folder (FONT256.S2D_5.bmp, FONT256.S2D_21.bmp, RLOWFIX.BIN_0_5.bmp, RLOWFIX.BIN_0_88.bmp, RLOWFIX.BIN_2_0.bmp)
  • Replace a character in a full font bitmap. Again, you may refer to samples in the English translation folder (FONT256.S2D.bmp, RLOWFIX.BIN_1.bmp). In these two files, the katakana characters that may be used when renaming a champion are replaced with Latin characters and magic symbols

In both cases, you must modify or add a line in Translations.csv to declare your new character:

  • First, you must identify which character in the original font you want to replace. You can check Fonts.csv to see which characters are present in the original fonts (in the ‘Text’ column). FONT256 contains some blank characters that you can replace without any risk. Both FONT256 and FONT012 fonts contain Japanese characters that you may replace if you don’t need them. Make sure you don’t replace a character that you are using in any of your translated texts. Also make sure to select a character that has a value in the ‘Code’ column. Characters without codes cannot be displayed in the game even though they are present in the bitmap font. Once you have selected the character to replace, take note of the values in the ‘Font’ and ‘CharacterIndex’ columns as you need them in the next step.
  • Add a line with the appropriate name in the ‘File’ column (FONT256.S2D or RLOWFIX.BIN). For RLOWFIX.BIN, you must also specify the ‘Index’ column value 0, 1 or 2 as this font is spread over three parts. Then you must specify the character index to replace in the ‘Subindex’ column. Look at the existing lines in Translations.csv for character replacements in the English and French columns. CAUTION: if there is already an existing line with the same values in the ‘File’, ‘Index’ and ‘Subindex’ columns, do not add a new line but instead reuse the existing one.
  • In the column of your translation, place the text corresponding to the new character that you are defining. This can be either a single Unicode character, or any string of characters surrounded with curly brackets (but it must not start with “{_” which is reserved for commands). You cannot use multiple characters if they are not surrounded with curly brackets, because the text encoder would then try to encode each character individually in text strings. For example, the English and French translations use a potion icon to replace the word ‘Potion’ and the associated text is ‘{Potion}’. Any occurrence of ‘{Potion}’ in a translated text is then replaced with the character containing the potion icon instead of encoding each individual letter of the word ‘Potion’, thus saving precious screen estate.
  • Make sure the text you place in your translation column is unique. Each character must be uniquely identifiable for the encoding process to be able to determine which character to encode. If you need multiple variants of the same character, then you must surround variants with curly brackets characters { }. For example, the original Japanese font FONT012 contains both half-width (in FONT012 item #0) and full-width (in FONT012 item #1) variants of hiragana characters. However, Unicode only provides one kind of hiragana characters. If you look in the Japanese column, the half-width variants are surrounded with curly brackets, for example you have both ‘か’ (full width) and ‘{か}’ (half-width). This allows distinguishing the two variants and these representations must be used in the translated texts. Note that the original Japanese font FONT012 contains both half-width and full-width Latin characters and katakana characters, however these do not need using curly brackets because both variants exist in Unicode, which is not the case for hiragana characters.

When the script processes the Translations.csv lines about font character replacement, it first looks for a specific bitmap for that unique character. If not found, then it tries to find a full font file. If found, the specified character is copied from that full font file into the font being customized. If not found, then a warning message is issued.

Notes:

  • You may use replacement characters to store icons. For example, both the English and French translations replace a character in both game fonts with a potion icon. Using this icon is shorter than writing the word ‘Potion’ and is useful for some item and spell names.
  • Both the English and French translations replace the ‘x’ character with a smaller variant. The game displays that ‘x’ next to item names to indicate the number of items in inventory, for example ‘Apple x12’ means you have 12 apples. Using the smaller variant of the ‘x’ character allows item names to be 2 more pixels wider without overlapping the ‘x’. The original ‘x’ letter is moved elsewhere in the font for usage in actual translated texts.

4. Translate texts

You need to place your translated texts in your [Language] column in Translations.csv.

You can use the help of online translation tools like ChatGPT, DeepL, Google Translate, Yandex translate, etc. But you need to refine the translation they provide which may not match the context of the game or fit with the limitations described below.

Make sure to only use characters that exist in the default fonts, or characters that you have replaced in the fonts. The script issues a warning message if it encounters character that is not found in the font and thus cannot be encoded. The table below shows which font is used for which text usage. Make sure you add the necessary characters in each appropriate font.

Text limitations

Below are the limitations for each type of text to make sure they look nice in the game. The script will issue an error for each text that does not conform to these limitations.

Text usageFontLimitations
Champion nameFONT012 (on rename screen)5 characters of 12 pixels width = 48 pixels
Champion nameFONT256 (everywhere else)5 characters of 8 pixels width = 40 pixels
Spell nameFONT25612 characters of 8 pixels width = 96 pixels
Spell descriptionFONT0125 lines of 8 full-width characters or 17 half-width characters (85 half-width characters)
MenuFONT0128 full-width characters or 17 half-width characters
Saved game - MessageFONT0127 lines of 18 full-width characters or 36 half-width characters (252 half-width characters)
Saved game - Save slotFONT0128 full-width characters or 17 half-width characters
Item nameFONT0125 full-width characters or 11 half-width characters to leave space for item count ‘x 1’. 69 pixels
Item ActionFONT0127 full-width characters or 14 half-width characters
Item descriptionFONT0123 lines of 8 full-width characters or 17 half-width characters
plus 1 line of 4 full-width characters or 8 half-width characters (or even 9 for items weighing less than 10 Kg) to leave a space between the text and the item weight
= 60 (or 61) half-width characters
Dialog and InscriptionFONT012Default line height is 12 pixels. Some texts define a line height of 14 or 16 pixels
Default box is X1=41 Y1=57 X2=256 Y2=212 (216 x 156 pixels), allowing for 17 full-width characters or 34 half-width characters per line.
Some texts in the original game use the box X1=21 Y1=57 X2=266 Y2=201 (246 x 145 pixels), allowing for 19 full-width characters or 38 half-width characters per line (the box width allows for one more full-width character or two more half-width characters per line, but this causes a graphical glitch as these last characters remain on screen until you open the inventory).
Both boxes allow for the following number of lines:
- 13 lines of height 12 pixels
- 11 lines of height 14 pixels
- 10 lines of height 16 pixels

The safe and easy way to write Dialog and Inscription texts is to use {_AutoLeftAlign} or {_AutoCenter} commands (see below). In this case, the script ensures that the text is correctly displayed on screen in the game, otherwise it issues an error message.
If you don’t use either of these commands, then the script only checks that no line of text is above 40 half-width characters long. It does not check where the text is drawn on screen (which depends on {Box} and/or {GoTo} commands that may be part of the text). This means that you must check the text in-game to make sure it is displayed correctly.

Commands

You can use the commands in the table below in your translated texts. All commands start with ‘{_’.
Native commands are processed by the game engine and produce actual encoded bytes in the text data.
Pseudo commands are processed by the translation script and do not produce any encoded bytes in the text data.
You may refer to existing texts in the ‘Japanese’ or ‘English’ columns for usage examples of each of these commands.

CommandTypeDescription
{_White}NativeText output after this command uses the color White (which is also the default color if no command is specified)
{_Green}NativeText output after this command uses the color Green
{_Yellow}NativeText output after this command uses the color Yellow
{_Red}NativeText output after this command uses the color Red
{_LineFeed}NativeMoves the cursor to the next line, in the current box, and based on the current line height. You don’t need to explicitly use this command: any carriage return and/or line feed character in the text to encode is automatically replaced with this command by the translation script
{_GoTo_X=[decimal value]_Y=[decimal value]}NativeMoves the cursor to the specified X,Y pixel coordinates on the screen
{_LineHeight=[decimal value]}NativeDefines the line height to use when a line feed character is encountered. The default value is 12 pixels
{_Box_X1=[decimal value]_Y1=[decimal value]_X2=[decimal value]_Y2=[decimal value]}NativeDefines the bounds of the current box where text output occurs. If the text overflows on the right bound, it is printed on the next line. If a line feed character is encountered, the cursor goes to the left bound of the box, on the next line (defined by the current line height)
{_AutoLeftAlign}PseudoIf present, this command must be the very first command in the text, before any other command or text. This pseudo command automatically generates other native commands to ensure that all lines of text are aligned on the same left column. The whole text block is centered horizontally (based on the longest line) and vertically, and line height is automatically selected based on the number of lines in the text to encode
{_AutoCenter}PseudoIf present, this command must be the very first command in the text, before any other command or text. This pseudo command automatically generates other native commands to ensure that each line of text is centered horizontally. The whole text is centered vertically, and line height is automatically selected based on the number of lines in the text to encode
{_.}PseudoWhen drawing a condensed text bitmap, this command moves the ‘cursor’ one pixel to the left. This can be used to further optimize and shrink the resulting bitmap. This command only has an effect for texts where the script uses the condensed encoding, otherwise it is ignored.

Recommendation for ‘Dialog’ and ‘Inscription’ texts (stored in RLOWFIX.BIN item #5): in most cases you should use {_AutoLeftAlign} for texts with ‘Dialog’ usage, use {_AutoCenter} for texts with ‘Inscription’ usage, and remove all other commands in these translated texts. This avoids the need to compute the actual coordinates to display the texts properly. Note that you can check the actual commands generated by the script in the C:\DMNTranslationKit\Temp\[Language]\Translations_[Language].csv file after running the script.

5. Translate video subtitles

  1. Copy the .srt files from C:\DMNTranslationKit\Resources\Video subtitles or from an existing translation to your C:\DMNTranslationKit\[Language] folder as a starting point.
  2. Edit these files with a text editor to translate the text to your target language.
    You may change only the text in the srt files: you must not change the timings, because they are also hard coded in the Powershell script that you must run later in this procedure.
  3. [Optional] You may play the original videos with the subtitles (just to check that everything is fine with your .srt files). Run these 3 command lines:
    C:\DMNTranslationKit\Tools\ffmpeg\bin\ffplay.exe -vf subtitles=C\\:\\\\DMNTranslationKit\\\\[Language]\\\\DMV0.srt:force_style='Fontsize=28' C:\DMNTranslationKit\Input\DMV0.AVI
    C:\DMNTranslationKit\Tools\ffmpeg\bin\ffplay.exe -vf subtitles=C\\:\\\\DMNTranslationKit\\\\[Language]\\\\DMV1.srt:force_style='Fontsize=28' C:\DMNTranslationKit\Input\DMV1.AVI
    C:\DMNTranslationKit\Tools\ffmpeg\bin\ffplay.exe -vf subtitles=C\\:\\\\DMNTranslationKit\\\\[Language]\\\\DMV2.srt:force_style='Fontsize=28' C:\DMNTranslationKit\Input\DMV2.AVI
  4. Convert the videos to a sequence of bitmaps with hardcoded subtitles.
    Make a copy of the batch file VideoSubtitles_Step1_English.cmd and rename it so that you replace ‘English’ with the name of your translation. Do not change anything else in the file name.
    Run your copy of the batch file. The commands run ffmpeg to convert the original videos to sequences of bitmaps containing your subtitles.
    After this script has run, you should find thousands of .bmp files in the folder C:\DMNTranslationKit\Tools\win311dosbox\WINDOWS\DMN.
  5. Encode subtitled videos from the bitmap sequences (no soundtrack). This step is manual and requires using the ‘Duck TrueMotion S V1’ codec and ‘Video for Windows’ running on Windows 3.1.
    Run C:\DMNTranslationKit\VideoSubtitles_Step2_Run Windows 3.11 in DOSBox.cmd to load Windows 3.11 inside DOSBox emulation.
    Repeat the following steps for each of the three videos:
    1. Run VidEdit and use ‘File/Open’. Browse to C:\DMN. Enter ‘*.bmp’ in the ‘File Name’ field and press Enter. Select the first file in the sequence of extracted .bmp files (C:\DMN\DMV00001.BMP, C:\DMN\DMV10001.BMP, or C:\DMN\DMV20001.BMP) and click ‘OK’. Select the file format ‘DIB sequence’ and click ‘OK’.
    2. Use ‘File/Save As’. Keep the default proposed file names (C:\DMN\DMV00001.AVI, C:\DMN\DMV10001.AVI, or C:\DMN\DMV20001.AVI). Do not use other names or the last script won’t find them.
    3. Click on ‘Compression options’ button.
      In ‘Video Compression Method’, select ‘TrueMotion “S”, The Duck Corp.’ then click ‘Details»’
      Uncheck the option ‘Pad frames for CD-ROM playback’ then click ‘Configure…’
      Move ‘Detail’ slider to 100, in ‘Dither’ set ‘Amount’ to 2 and leave all other options as default. Click ‘OK’ three times to start the encoding process. Click ‘OK’ again to ignore the warning popup message ‘A frame of this file is too big to fit using the current data rate. Continue with an increased data rate?’
  6. Make a copy of the batch file VideoSubtitles_Step3_English.cmd and rename it so that you replace ‘English’ with the name of your translation. Do not change anything else in the file name.
    Run your copy of the batch file.
    This step merges the original videos (that include the soundtrack) and the subtitled videos (no soundtrack) to build the final videos. The original videos have better image quality than the re-encoded ones, so this step replaces only the required frames in the original videos with frames from the subtitled videos, leaving all other frames intact. This method ensures that the structure and parameters of the resulting AVI files are not modified and remain compatible with the game video player.
    After this script has run, you should find the files DMV0.AVI, DMV1.AVI and DMV2.AVI in your translation folder C:\DMNTranslationKit\[Language].

6. Build the ISO image

This section describes how to build a translated version of the game.

  1. Run your copy of the batch file C:\DMNTranslationKit\Build_[Language].cmd (where you replace [Language] with your language name)
    Note: the compression of PRS3 bitmaps is quite slow, but the resulting compressed data is stored in the Temp folder. The script only compresses bitmaps if their compressed data is missing or if they have been updated since the last time they were compressed. Consequently, the first execution of the script may take a long time, but subsequent script executions are much faster.
  2. If any error occurs during the build, a popup window opens at the end listing all the lines from Translations.csv that require your attention.
  3. After the build is complete, you should find two new ISO and CUE files in folder C:\DMNTranslationKit\Output. Note that the new CUE file references the same audio tracks 2 to 9 as the Japanese version:
    Dungeon Master Nexus ([Language]) (Track 1).iso\ Dungeon Master Nexus ([Language]).cue
  4. The new disc image is region locked according to the IP.BIN file present in the translation folder

You may check the contents of the C:\DMNTranslationKit\Temp\[language] folder as it contains files created by the script execution:

  • Bitmap files (*.bmp) created for customized fonts and bitmap files created for condensed strings.
  • C:\DMNTranslationKit\Temp\[language]\Translations_[language].csv is a copy of Translations.csv with additional columns. See reference section below for details.
  • C:\DMNTranslationKit\Temp\[language]\Fonts_[language].csv is a copy of Fonts.csv with additional columns. See reference section below for details.
  • The ISO folder contains all the files that were included in the CD image

7. Check translation in the game

Test in emulator

The Mednafen emulator is recommended for testing.
You also need to download the Sega Saturn BIOS files (US and JP) included in the OpenEmu BIOS Pack. Copy the BIOS files mpr-17933.bin and sega101.bin in the firmware folder of Mednafen.
Run the following command line to start the emulation:
[Installation path]\mednafen.exe "C:\DMNTranslationKit\Output\Dungeon Master Nexus ([Language]).cue"

You may change the following Mednafen emulator configuration settings to make it easier to check bitmaps in the game. They disable aspect ratio correction and interpolation to have a crisp display:

;Correct aspect ratio.
ss.correct_aspect 0

;Enable (bi)linear interpolation.
ss.videoip 0

Speed up game loading

You need to run the game a lot of times during the testing phase. This section explains how to speed up your tests.

  • You can copy the file C:\DMNTranslationKit\Resources\Test files\DMV0.AVI (0 bytes) in your translation folder so that the game goes directly to the entrance menu without playing the introduction video, saving a few seconds and one less button to press.
  • The Mednafen emulator has a ‘fast forward’ mode to run the game faster than the normal speed. By default, you must press and hold the key at the left of the ‘1’ key on the top left of the keyboard. This is the ‘`’ key on an American qwerty keyboard, or the ‘²’ key on a French azerty keyboard. You can change the following settings in the Mednafen.cfg configuration file so that you don’t have to hold the key pressed, use the maximum speed and disable sound when fast forwarding (sound is distorted anyway if you don’t disable it):
    ;Silence sound output when fast-forwarding.
    ffnosound 1
    
    ;Fast-forwarding speed multiplier.
    ffspeed 15
    
    ;Treat the fast-forward button as a toggle.
    fftoggle 1
    

How to test each text in the game

Translations.csv contains a “Translation check” column explaining how to check the translation of each text in the game.

The kit contains a saved game where the champions have all of the game items in their possession and high skill levels and statistics. You can use this file to check most translated texts in the game without leaving level 1. To use this saved game with your custom CD image in Mednafen:

  • Run the game once with Mednafen and then quit the emulator immediately. The emulator has now created some files (.smpc, .bkr and .bcr) in the sav folder. The file names contain a hash value computed from the CD image itself, so each time you build a new CD image, this hash value changes. This allows Mednafen to associate different memory backup files with each game that you emulate.
  • Copy the name of the .bkr file (make sure you use the most recent file created to get the correct hash value), then delete this file
  • Copy the file C:\DMNTranslationKit\Resources\Test files\System Backup RAM - Translation check.bkr to the sav folder and rename it with the name you copied in the previous step.
  • Run the game again with Mednafen
  • On the entrance menu, select ‘Continue’, then load the saved game from the System RAM.

Notes about the saved game:

  • Some item actions are visible only if the champion has high enough skills. Make sure you place items in the left hand of Elija to check their action names.
  • There are 4 ‘Picture part’ items that are not used in the game but exist in the data files. In the saved game, these items are left on the floor. You can only see their name and description right after you pick them up by opening the inventory screen. You cannot check them afterwards because these items do not appear in the inventory.

To test text messages related to saved games, and the bitmaps in WARNING.BIN, you must use the appropriate combination of settings (see Translations.csv for the required configuration for each translated text):

  • To connect or disconnect the memory backup cartridge:
    In the Mednafen emulator configuration file, you must configure this setting to connect the backup memory cartridge:
    ;Expansion cart.
    ss.cart auto
    You must configure this setting to disconnect the backup memory cartridge:
    ;Expansion cart.
    ss.cart none

  • Use various saved game states, like no more space available, a corrupted saved game, etc.
    Mednafen stores the Sega Saturn internal memory backup (32 KB) in an uncompressed .bkr file in the sav folder. It stores the external cartridge memory backup (512 KB) in a gzip compressed .bcr file in the sav folder. If you want to see the contents of the cartridge memory backup, you may uncompress the file with 7-zip or any other archiving tool compatible with the gzip format.
    The name of these files is the name of the CD image of the game followed by an MD5 hash of the CD image (a 32 characters hexadecimal value). Because of this hash, each time you build a new version of your Dungeon Master Nexus translation, Mednafen uses a different file name.

    The folder C:\DMNTranslationKit\Resources\Test files contains test files that you can use to check some translated texts in the game. To use these test files, you must rename them to match the name and hash value corresponding to the CD image you are testing: Run the game once with Mednafen and then quit the emulator immediately, which causes the emulator to create an .smpc file in the sav folder. You don’t need this file but you can use the same file name (without the file extension) to rename your test .bkr / .bcr files (and you can delete these files created by Mednafen if present).

Reference

Modified files

Here are the game files that the kit may modify to apply the translation:

File nameContents
DMN_ABS.TXTAbstract file stored on the CD and referenced in the ISO9660 file system. This text is never visible in the game but should be translated for completeness.
DMN_BIB.TXTBibliography file stored on the CD and referenced in the ISO9660 file system. This text is never visible in the game but should be translated for completeness.
DMV0.AVIVideo with translated subtitles
DMV1.AVIVideo with translated subtitles
DMV2.AVIVideo with translated subtitles
FONT256.S2DContains font FONT256 used to display champion names, spell names and a few user interface elements.
GAMEOVER.BINContains bitmaps displayed when all champions in the party die.
ITEM.IBSContains the PAUSE bitmap displayed when the game is paused. It also contains all item definitions and bitmaps, but these do not need translation.
LOGOBG.DG2Contains a title screen for the game. This image is not used in the game but should be translated for completeness.
MENU.BPKContains bitmaps for various aspects of the user interface.
RHIFIX.BINContains item 2 that stores spell definitions (using FONT256), including their names that can be translated.
RLOWFIX.BINContains items 0, 1, 2 that store font FONT012 used to display most texts in the game.
Contains items 3, 4, 5, 6, 7 that store most of the texts of the game (using FONT012).
Contains item 9 that stores champion definitions, including their names that can be translated (using FONT256).
Contains item 12 that stores the bitmap displayed when the game loads a new level.
TITLE.BINContains bitmaps displayed on the title screen and in the configuration menu
WARNING.BINContains bitmaps displayed when there is an issue with startup conditions about system and/or cartridge memory backup.

Text encoding optimizations

When encoding texts, the script performs two kinds of optimizations:

Condensed texts
Texts with a usage of ‘Item name’, ‘Item action’ or ‘Menu’ are quite limited in size and may benefit from this optimization (other texts are not eligible).
If a text is longer than the maximum allowed for its usage, then the script tries to condense the text. For example, an item name can be up to 11 characters long. If you use a longer text, the script tries to build a custom bitmap where characters are squeezed to try and make the text fit in the maximum pixel size allowed for the text usage (which is, for example, 69 pixels for an item name).
When using the regular encoding, each character has a fixed width (see the table describing fonts).
With condensed encoding, the script detects the actual width of each character by excluding vertical lines that only contain background pixels (plus 1 so that individual letters in a word remain discernable) and copies only the minimum number of pixels to the output bitmap. For example, with this encoding, the letter ‘i’ in FONT012 item #0 is only 3 pixels wide instead of 6. With this condensed encoding, the resulting bitmap representing the text is shorter than with the regular encoding.
If this condensed encoding is successful (shorter than the maximum number of pixels allowed) then as many font characters (marked as optimizable) as necessary are replaced with parts of the bitmap representing the condensed text. You may find the resulting bitmaps in the C:\DMNTranslationKit\Temp\[Language] folder.
If this encoding is not successful, then it means either that the text must be shortened (less characters) or a hand-made bitmap must be supplied in the translation folder. For such examples, you may check the files RHIFIX.BIN_2_9.bmp, RLOWFIX.BIN_3_402.bmp and RLOWFIX.BIN_9_9.bmp in the English translation folder.
Character pairs
After applying condensed encoding to texts where possible, a second optimization occurs before encoding texts in RLOWFIX.BIN items 3, 4, 5, 6 and 7.
This optimization intends to minimize the total size of encoded texts, because most languages are less compact than Japanese. Without this optimization, the encoded English translated text data is much bigger than the original Japanese data.
The script identifies all pairs of characters from FONT012 item #0 (containing half-width characters = 6 pixels wide) that are present in texts to encode. The most frequent pairs are copied into optimizable FONT012 item #1 and item #2 characters (containing full-width characters = 12 pixels wide). In that way, a single code in encoded text data can output 2 half-width characters packed in a single full-width character.
This optimization applies automatically, you don’t need to configure anything or take any precaution.

Structure of Translations.csv

This is the main file to edit to implement a translation to a new language. It contains the following columns:

ColumnDescription
FileName of the file containing the text or bitmap to translate
IndexFor files that contain multiple items, this is the index of the item to translate.
For files that contain a single item, the value is ‘-’.
SubindexFor items containing multiple entries, this is the index of the entry. This is used for most texts (stored in RLOWFIX.BIN items 3, 4, 5, 6 and 7), for champion names (stored in RLOWFIX.BIN item 9), spell names (stored in RHIFIX.BIN item 2), and for fonts where this specifies the character index.
For items that contain a single entry, the value is ‘-’.
UsageDescribes the type of text
UnusedThis column is set to TRUE for bitmaps or texts that the game does not use. You may translate them if you care but this is not necessary as the game never displays them to the player.
NotesAdditional Information
Translation check in gameThis column describes where and how to see the text in the game. For most texts, this relies on the saved game supplied in the kit.
Japanese
English
French
[Your Language]
These columns contain the translated texts. Note that for lines corresponding to bitmaps, this column must not be empty for the corresponding bitmap to be included in the custom game data files. The recommendation is to place here the translated text visible in the bitmap.
CharacterCountThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column only has a value for texts eligible to condensed encoding: ‘Champion name’, ‘Spell name’, ‘Item name’, ‘Item action’ and ‘Menu’
The number of characters in the text. This is the number of half-width characters for texts that use font FONT012.
MaxCharacterCountThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column only has a value for texts eligible to condensed encoding: ‘Champion name’, ‘Spell name’, ‘Item name’, ‘Item action’ and ‘Menu’
Maximum number of characters allowed in that type of text
CondensedPixelWidthThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column only has a value for texts eligible to condensed encoding: ‘Champion name’, ‘Spell name’, ‘Item name’, ‘Item action’ and ‘Menu’
The number of pixels needed to represent the text using condensed encoding
MaxCondensedPixelWidthThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column only has a value for texts eligible to condensed encoding: ‘Champion name’, ‘Spell name’, ‘Item name’, ‘Item action’ and ‘Menu’
Maximum number of pixels allowed in that type of text
EncodingThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column contains which encoding the script has selected
InformationThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column contains information messages about the text
ErrorThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column contains error messages about the text that you must analyze and fix
EncodedTextThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column contains the actual text that the script has encoded. For example, it shows the commands generated by the pseudo commands {_AutoLeftAlign} and {_AutoCenter}.
EncodedBytesThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column contains the actual encoded bytes, useful only for debugging purposes.

File names in the translation folder must match a combination of the first three columns, separated with ‘_’ characters.
Example: If you want to replace the bitmap #5 in MENU.BPK, then you must provide the custom bitmap file named MENU.BPK_5.bmp in your translation folder.

Structure of Fonts.csv

You must not make any change to the Fonts.csv file. All font customizations must be done in Translations.csv.
The file contains the following columns:

ColumnDescription
FontThe name of the font data containing the character
CharacterIndexIndex of the character in the font. In a font .bmp file, the Y coordinate of the character is this index multiplied by the height of a character (8 for FONT256 and 12 for FONT012).
CodeThis is the code that the game associates with this font character (1 byte or 2 bytes). Note that some characters in the font bitmaps do not have any associated code, which means there is no way to display these characters in the game.
OriginalTextThis is the text representation of the character bitmap in the original fonts supplied with the game
OriginalOptimizableThis column indicates if the character can be used for the automated optimizations that the script performs (condensed texts and character pairs). You may still replace these characters with your own custom bitmaps if this is useful for your translation.
Cause for non-optimizableDetails the reason why the character is excluded from automated optimizations.
PixelFirstColumnThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
Index of the first column containing a character pixel (not background) in the character bitmap
PixelWidthThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
Number of columns containing character pixels (not background) in the character bitmap
TextThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
Final text associated with the character index after character replacements specified in Translations.csv and automatic optimizations performed by the script, so the value here may differ from the content of the OriginalText column. BMP files in the C:\DMNTranslationKit\Temp\[Language] folder show the corresponding final font bitmaps included in the custom data files.
OccurrencesThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
Number of times that the value in the ‘Text’ column (a character or a pair of characters) appears in all regular and condensed texts
OptimizableThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
This column indicates if the character can be used for the automated optimizations that the script performs (condensed texts and character pairs). This value may differ from the column OriginalOptimizable for characters that were replaced and for characters that are actually in any texts.
OptimizationThis column is only present in CSV files created by the script in the C:\DMNTranslationKit\Temp\[Language] folder
Indicates which optimization replaced the character.

Mednafen documentation

Mednafen global parameters
Mednafen parameters for the Sega Saturn emulation module

Version history

Dungeon Master Nexus Translation Kit written by ChristopheF

Version 1 (2023-09-20): Initial release. Includes English translation

  • Script limited to the English version.

Version 2 (2024-01-02): Major upgrade to allow translation to any language. Includes English version 2 translation, and French translation

  • The kit now contains all the binaries needed to build a translation, including the original Dungeon Master Nexus disc image, and the tools to build subtitled videos (ffmpeg, DOSBox emulator to run Windows 3.11, Video for Windows and Duck TrueMotion codec).
  • New command line parameter to specify translation language
  • No more hardcoded lists of bitmaps to replace in data files
  • New file Fonts.csv containing full description of game fonts, replacing hard coded data in previous script
  • New format of CSV file Translations.csv describing all translation information, without any hardcoded translation operations in the script. No need to specify encoding for each line, the script automatically detects the appropriate encoding.
  • Ability to customize characters in all fonts based on information in Translations.csv
  • Translations.csv now lists all the characters that can be selected on the champion rename screen, making it easier to translate this screen.
  • Text commands: all commands renamed with prefix “{_”. Command for line height implemented. New pseudo commands {_AutoLeftAlign}, {AutoCenter}, and {.}
  • DGT2 bitmap encoder: ability to encode both 16 color and 256 color bitmaps (and detection if wrong format is used). Color palette and bitmap dimensions are now imported from .bmp instead of always using that information from original bitmaps.
  • Ability to translate and replace the ‘PAUSE’ bitmap in ITEM.IBS.
  • Translations.csv and Fonts.csv are exported after execution with information to analyze translation results. The script checks conformance of each text string with game limitations. Errors are also reported at the end of execution in a popup window.
  • The kit now contains IP.BIN files for all possible Sega Saturn regions
  • The kit now contains a saved game to help checking translation in-game. Translations.csv has a column ‘Translation check’ detailing how to check each text.
  • The kit now contains all original images containing texts to translate. They are also all listed in Translations.csv
  • The kit now contains some original bitmaps with their text removed for easier customization