Skip to content

Map Coordinates

solitonmedic edited this page Nov 21, 2026 · 1 revision

Map Coordinates

Memory Addresses

Use the position fields on Players, Enemies and Items. World X/Z form the horizontal plane; world Y is height. The tracker calls world Z “map Y.” Facing is the vector (forward X, forward Y).

Projecting onto a floor

Before pan, zoom and screen centering:

pixel_x = (world_x - reference_x) * pixels_per_100 / 100
pixel_y = (world_z - reference_z) * pixels_per_100 / 100

Use the floor's signed references at file offsets +0x4A and +0x4E, and scale at +0x48. The world-box minimum is a separate field. For Japanese File 2, choose the next same-level height band when actor height reaches its threshold; Desperate Times Main Hall changes from 1F to 2F at height 400.

Disc-code and saved-run checks establish the coordinates and projection. Live map alignment and remote-height freshness remain to be compared with the game.

Disc map data

File 1 scenario AFS archives contain mapNNN.dat (Japanese) or mapNNNe.dat (U.S.). Their room, floor and placement data match in the checked main scenarios. Archive IDs 002 and 035 are Hellfire and Below Freezing Point respectively; they do not follow scenario-menu order.

Japanese File 2 embeds maps in pit_sNNN.dat MOMO v5 containers. Container words at +0x20 and +0x24 give the embedded map offset and size.

Both map formats have a 32-byte header, 88-byte room records, 92-byte floor records, six-byte placement records and packed four-bit texture pixels. Placement X/Y are signed 16-bit values and may extend beyond the floor's world box. Texture pages start at ((page % 4) * 256, (page // 4) * 256), then add the room's U/V crop coordinates.

Read this data from the disc beforehand. The File 1 map records were absent from the checked normal-play RAM images.

Credit: DX disc-code and saved-run research. Source credits.

Clone this wiki locally