Profile Dsub section
Table of Contents

Introduction

The Dsub section tells Grid Cartographer whether the game loaded in Dosbox is the correct one and if so, to read out information from various addresses in memory.

As seen with the example below, a profile for a game can accommodate different versions of a game (the executive file of the game, usually an exe/com/bat-file), whether it's due to differently patched versions, different language versions or due to modded versions. As long as the underlying location data for the game is structured the same way, then using different versions shouldn't matter.

  • detect sys="" prg="" ph3="" ph2="" ph1="" ph0=""

In the first step Grid Cartographer checks various checksums, both of the Dosbox version deployed detect sys="" (system) and of the game loaded prg="" (program) and ph3="" ph2="" ph1="" ph0="" (program hash). To get these checksums, start the custom Dosbox, load a game and then start Grid Cartographer and switch on the Debug HUD (under Options > Game Link > General Settings). Then you can note the various checksums and then put them into the XML-profile file.

Example: Wizardry

debugHUD.png
<dsub>

        <!-- WIZ1.EXE -->
        <detect sys="e9b551c5" prg="195febac" ph3="0" ph2="817af007" ph1="710" ph0="1dc">
            <peek bytes="d9c6 d9c4 d9c0 d9c2" />
        </detect>

        <!-- WIZDOS.EXE -->
        <detect sys="e9b551c5" prg="a30a3a8a" ph3="0" ph2="84c17511" ph1="56c" ph0="bec0">
            <peek bytes="e1b6 e1b4 e1b0 e1b2" />
        </detect>

</dsub>

Peek bytes

  • peek bytes=""

These contain the memory addresses in Dosbox memory that are read out and their content sent over to Grid Cartographer. While the below example from Wizardry has clearly defined information for x-/y-axis, facing (the direction the party or your single character is looking) and the floor number, general checks on RAM addresses can test basically for everything.

For example you could show your avatar in your map in GC only when your character is at full health, and when he's injured the avatar disappears. For that you would need to identify the RAM address for your char that shows his current HP (yes, it's not a very useful example, but it gives you an idea that you're not limited to locational data when looking at RAM addresses and what to peek at.

Example: Wizardry

Offset value 0 1 2 3 4 5 6 7 8 9 10 11 12
Dosbox memory address _ _ _ _ _ d9c6 d9c4 d9c0 d9c2 _ _ _ _
Content _ _ _ _ _ X-axis position Y-axis position Facing direction Floor level number _ _ _ _


<peek bytes="d9c6 d9c4 d9c0 d9c2" />
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License