Skip to content

PC Differences: Game and Characters

The counts and mapping states on this page are from the run of 24 November 2026, before the rerun with tools/pccompare/overrides.tsv and the comparison fixes; see PC Differences.

This page records the PC/PS2 differences found in the game subsystems hitman3/characters, hitman3/levelcontrol, hitman3/background and hitman3/hitman3. The input was build/pc-compare/diffs.tsv from the run of 24 November 2026 (see PC Comparison). Every pair whose category is constants, strings, calls, structure or stub-on-one-side was reviewed: 87 pairs. The 15 largest minor pairs with a non-empty minor column were spot-checked as well, and one more pair (ZLevelLinking::Initialize) was added because it turned out to be swapped with a flagged one. Each pair was read side by side with show_pair.py. Callers, callees and data tables came from build/pc-compare/pc-decomp/, the unpacked PC executable and extracted/HITMAN3.ELF where needed.

Of the 87 flagged pairs, 25 are real differences, 50 are noise and 12 are wrong pairs. None was left undecided. None of the 15 minor pairs showed a real difference. The extra pair is a wrong pair. The verdicts are in build/pc-compare/review/game-and-characters-verdicts.tsv (columns pc_addr ps2_addr ps2_name verdict note, 103 rows).

Subsystem Flagged Real Noise Wrong pair
hitman3/characters 46 14 26 6
hitman3/levelcontrol 23 8 12 3
hitman3/background 16 2 12 2
hitman3/hitman3 2 1 0 1

By category: constants 8 real out of 34 (8 of the 34 are wrong pairs), strings 11 out of 26, calls 4 out of 21, structure 2 out of 5. The single stub-on-one-side pair is a wrong pair.

Patterns

  • No rumble on the PC. Every PS2 StartHaptic call in these subsystems is gone on the PC: projectile hits, explosions, landing after a fall, pushing through a crowd, entering a climb guide. The thresholds that only select a rumble strength (25/100/300 fall heights, 50 damage, 0.3 push factor) then show up as one-sided constants.
  • PC controls. The PC rebinding table has more actions and an action set per row, the mouse turns faster horizontally, auto-aim starts disabled, and "auto-crouch when tightening the fibre wire" is a menu option instead of a config value.
  • Small gameplay fixes on the PC. The PC refuses to pull out the VHS cassette, refuses to unpack the sniper case while Hitman stands in water, measures the sniper case pickup range from its mesh centre, and caches the collision strips of a pushed actor. These look like the later version.
  • Localisation and platform texts. The PC replaces the hard-coded English garage door labels of M05 with the generic localised door texts, looks for _PC instead of _PS2 tutorial texts, and adds a compass splash to the tutorial briefing.
  • Tuning values differ in a few places: the first-person pelvis drop (-23 on the PS2, -18 on the PC), the crowd instance pool (800 double-buffered against 1000), the laser dot size, the climb-through-window start points.
  • The saved profile is 128 bytes larger on the PC (sProfileHeader 0x5e10 against 0x5e90), and the pushed-actor action saves two more members.
  • MSVC folds identical functions that the mapping treats as different. Four flagged "call differences" are byte-identical PS2 functions that the PC executable has only once.
  • Wrong pairs are mostly swapped siblings: CBodyContainer::Open/Close, ZLevelLinking::Initialize/Clear, ZMusicController::Fade/ControlMix, ZHM3LevelControlHideout::CheckCustomWeaponState/ReplaceCustomPistolWithDualShit, and two vtable slots of ZHitmanActionCloseCombatHit.

Behaviour differences

hitman3/background

ZHFlow (crowds)

  • ZHFlow::ClassInit2, PS2 0x2c3628, PC 0x5b34e0, src/hitman3/background/humanflow.cpp.
    • The crowd bone-array pool is set up differently. The PS2 calls m_BoneArrayManager.Init(0x100, 800, true): 800 instances, double-buffered, so 1,600 are allocated. The PC calls Init(0x100, 1000, false): 1,000 instances without double buffering.
    • DrawBufferViewUpdate draws at most free instances - 100, capped at 300 (50 for a secondary camera), on both sides. So the PC has more headroom for one buffer but no second buffer.
    • The PC also prints the memory use with printf("HFlow runtime memory used: anims %.2fKb crowd %.2f\n", ...).
    • Evidence: push ebx (0); push 0x3e8; push 0x100; call 0x5b1a00 against Init(0x100, 800, true).

ZHM3HitmanMovementGuide

  • ZHM3HitmanMovementGuide::InitializeClimbWindowGuide, PS2 0x2da76c, PC 0x5bffe0, src/hitman3/background/hitmanguide.cpp.
    • The two start points of a climb-through-window guide differ (cen and s are the guide geom's centre and half size).
    • PS2: A = cen + (-s.x + 30, -s.y, -s.z - 20) and B = cen + (s.x - 30, -s.y, s.z + 20). These are the lower corners, moved 30 inwards and 20 outwards.
    • PC: A = cen + (0, s.y, -s.z) and B = cen + (0, s.y, s.z). These are the middle of the top edge, without the 20/30 offsets.
    • Evidence: the PC writes m_vGuideStartPosA = {0, [geom+0x44], -[geom+0x48]} and m_vGuideStartPosB = {0, [geom+0x44], [geom+0x48]} before the vadd with the centre (m_vSize is at 0x40). It has no fadd/fsub of 20 or 30.
    • The PC's CalcWindowMatPos (0x629540) and CalcLargeWindowProperties use the start points as the PS2's do, so 47 aligns to the new points.
    • Port: pc_tuning (port/hitman3/characters/_sdl/pctuningoverridesdl.cpp), with the PS2's height: played through in M04, the PC's top-edge points made 47 climb 100 units above the opening, through the wall, from the disc and from the PC installation alike, so the port takes the PC's middle and depth, (0, −size y, ±size z). What makes the PC's height work on the PC was not found. The 13 missions have 40 window guides; M01's starts at (6160, 500, -1880) and (6260, 500, -1920) on the PS2 and at (6180, 600, -1900) and (6240, 600, -1900) with it; Enhancements: PC version tuning.

hitman3/characters

ZHitman3

  • ZHitman3::Initialize, PS2 0x313580, PC 0x5f94a0, src/hitman3/characters/zhitman3.cpp.
    • m_bAutoAimEnabled (PS2 +0xb08, PC +0xb58) is set to false on the PC. The PS2 reads GetConfiguration()->GetGenericBool("AutoAim", true).
    • m_bAutoCrouchWhenTighteningFiberWire (PS2 +0x13eb, PC +0x143b) comes from the global option byte 0x7f40aa on the PC. The PC options code around 0x694600 reads and writes that byte as option 1. The PS2 reads the config value "AutoCrouchWhenTighteningFiberWire" (default true).
    • The PC still calls GetConfiguration() (vtable +0x5c) and discards the result.
    • Caveat: ZHitman3::SetAutoAimEnabled (PS2 0x313c24, 12 bytes) is unmatched and may be folded with other setters on the PC. So the PC may switch auto-aim on later. This entry is about the initial value.
    • Under pc_tuning, AutoAim defaults to 0 unless the profile supplies a value. PC-data menus hide the PS2 AutoAim option.
  • ZHitman3::CanPullOutFromInventory, PS2 0x31e900, PC 0x5ebd50.
    • The PC adds eHM3ItemVHSCassette (0xd5) to the item types that cannot be pulled out of the inventory. The other 42 types agree, checked against hm3itemtype.h.
  • ZHitman3::LocalStateIK, PS2 0x3203f4, PC 0x5ebf60.
    • The first-person pelvis drop g_1PPelvis is -23 on the PS2 (zhitman3.cpp) and -18 on the PC (data 0x8009b8). It is subtracted from three hip floats of the animation state.
    • The other pelvis defaults agree: -35, -10 and 4 (PC 0x8009ac to 0x8009b4).
    • The PC's 0.8 and 1.2 are asserts on the quaternion length.
    • What the value moves: Animation::Model::StateFit places the pelvis from the state's first three floats and, with m_PelvisPlacementWeight 1, the upper body from the pelvis placement, so the change moves only the hips and legs; floats 7 and 12 are the legs'. In the port's first-person view looking down (M01, 960 x 720) 47's shoes reach about 25 pixels higher with -18; the camera (156.3 above 47) and the arms do not move.
    • Port: pc_tuning (port/hitman3/characters/_sdl/pctuningoverridesdl.cpp); Enhancements: PC version tuning.
  • ZHitman3::CanUnpackSniper, PS2 0x32904c, PC 0x5ee730.
    • The PC also refuses when m_bIsInWater is set (PC +0xb8c, PS2 +0xb3c). UpdateObjectVisibleFlags (PC 0x5f7580) writes the same field when a toe is below a water patch.
    • Evidence: cmp byte ptr [edi + 0xb8c], bl; jne <return false> after the elevator-top and stairs tests.
    • The rest agrees: the box is 40 x 50 x 55 (custom case) or 60, then the eight-direction CalcLineCollision tests. Ghidra's body stops at a jump table, so the structure and calls flags were noise.
  • ZHitman3::IsItemActionInRange, PS2 0x316900, PC 0x5f3ae0.
    • For an item of type eHM3ContainerSuitcaseSniper01 (0xc3), the PC takes the item position from ZHM3ItemTool::GetCenSize, the centre of the prim's bounding box. The PS2 always uses GetCen.
    • So the range for picking up the sniper case is measured from the visible case on the PC.
  • ZHitman3::OnProjectileHit, PS2 0x322d88, PC 0x600310. This pair is already listed in pc-comparison.md.
    • The PS2 starts vibration with StartHaptic. Explosive damage below 50 gives HE_EXPLOSION_SMALL, 50 and more HE_EXPLOSION_LARGE. A pump-gun or shotgun hit gives HE_PROJECTILEHIT_LARGE, any other weapon HE_PROJECTILEHIT_SMALL.
    • The PC has no haptics. It still makes the GetWeaponType virtual call (+0x2b4) and drops the result.
    • The damage, the grace time and the vest factors agree: 0.85 for a normal vest, 0.65 for a flak vest (PC 0x78fe50 and 0x78fe54).

Movement

  • ZHM3MovementFall::GetActiveAnim, PS2 0x352188, PC 0x61f640, src/hitman3/characters/zhitman3movement.cpp.
    • The PS2 rumbles on landing: a fall of more than 25 units gives HE_BUMP_SMALL, from 100 HE_BUMP_MEDIUM, from 300 HE_BUMP_LARGE. The PC has no haptic.
    • The fall damage agrees: 400 units fall free, then m_fDamagePerMeter per unit. So do the 150-unit soft landing and the 25 fps timing.
  • ZHM3MovementPrimaryMove::ActorCollision, PS2 0x34fac8, PC 0x626e10.
    • The PS2 gives a HE_BUMP_EXTRASMALL rumble when Hitman pushes through a crowd boid with distFactor > 0.3. The PC has none.
    • The push radius and force (50), the 0.02 factor, the 0.4 slowdown bound and the FindNodes radius (100) agree.
  • ZHM3MovementClimbThroughWindow::GotControl, PS2 0x35aa4c, PC 0x6231c0.
    • The PC sets Hitman's m_DontAnimateAttachers (PC +0xff6, PS2 +0xfa6). It is 0 when IsCarryingSuitcase(), otherwise 1 or 2 depending on a byte of the movement object (+0x568).
    • The PS2 does not touch it here. The field controls whether attached items are animated with the body (OnClimbGuideEnter sets it to 1 for dual weapons on both builds), so the PC treats a carried suitcase differently during the climb.
    • The PS2 StartGuideHaptic() is absent on the PC.
    • What the values select: m_DontAnimateAttachers is a mask of the hand attacher bones. ZOldDraw (zolddrawps2.cpp, the port's ZOldDrawSDL::FinishBones) calls ZLNKWHANDS::SetAttachBones(~mask), which keeps the animated pose of the bones not in the mask in m_AttachBones, and GetAttachBones(mask), which gives the bones in the mask that kept pose. Bit 0 is eLHandAttacher and bit 1 eRHandAttacher. The PC's byte at +0x568 of the movement is m_bPlayAnimMirrored (the same offset as the PS2), so the PC holds still the attacher of the hand that grabs the frame: the left hand (1), the right one in a mirrored climb (2), and none while a suitcase is carried (IsCarryingSuitcase, 0x5f6650). The PC's TerminateControl (0x623360) sets the byte back to 0 after OnGenericGuideLeave.
    • Port: pc_tuning (port/hitman3/characters/_sdl/pctuningoverridesdl.cpp). Seen in play in M04 (OPENBLOOD_PCTUNING_TEST=climb, OPENBLOOD_PCTUNING_CLIMB_GUIDE=2): the mask is 1 for the whole climb with the setting and 0 without; 47 held nothing, so the hands look the same; Enhancements: PC version tuning.
  • ZHitman3ControlMouseStrafe::UpdateTurn, PS2 0x363af8, PC 0x62c2a0, src/hitman3/characters/zhitman3movementcontrol.cpp.
    • The horizontal mouse turn is scaled by 0.18 on the PC (0x794fa4). The PS2 uses MOUSE_TURN_SCALE = 0.05. The vertical scale is 0.05 on both.
    • This is the first-person control (scope, binoculars, first-person camera). The third-person ZHitman3ControlMouse::UpdateTurn (PS2 0x363fe4, PC 0x62c540) uses 0.05 for both axes on both versions. The port adopts the PC's 0.18 (Enhancements: Mouse turn).
    • The zoom-scale clamp, the dead zone (1/8192) and the turn status flags agree.

Actor actions

  • ZHM3ActorActionPushed::IsCollidingWithBackground, PS2 0x37de9c, PC 0x63ff70, src/hitman3/characters/hm3actoractions.cpp. This pair is listed in pc-comparison.md; this corrects the reading.
    • On every call, the PS2 locks a 0x6000-byte stack buffer and sets the box. It then gathers the strips again with GetStrips(COLIMASK_Sight), with the actor's collision control changed for the duration.
    • The PC locks the action's own 0x2400-byte m_aColiData (+0xa4), sets the box and copies the stored m_iColiBoxStripCount (+0xa0) into it. It does not call GetStrips: the strips are collected once and reused.
    • The final test is ZCollisionBox::CheckBoxCollision on both. On the PC it looked like another function only because of folding (see the noise patterns).
  • ZHM3ActorActionPushed::LoadSave, PS2 0x37e15c, PC 0x643740.
    • The PC streams two more members after m_vColiBoxSize: m_iColiBoxStripCount and m_aColiData (0x2400 bytes). These are the cached strips above, so this is a save-format difference.

Weapons

  • ZLaserAim::ClassInit, PS2 0x391758, PC 0x651490, src/hitman3/characters/hm3weapons.cpp. This is a platform difference.
    • The PC finds the laser sprite texture through the D3D material of the prim (parameter "mapDiffuse"). The PS2 uses the prim's lTextureId.
    • The sprite setup and the rLaserAim scene value agree.
  • ZLaserAim::DrawBufferViewUpdate, PS2 0x391a80, PC 0x651b10.
    • The laser dot size differs. With fPercent = depth / 2000, clamped to 1:
    • PS2: fSize = 4.5 - 3.2 * fPercent. The dot shrinks from 4.5 to 1.3 half-pixels with distance.
    • PC: 3 + 12 * fPercent. The dot grows from 3 to 15.
    • Evidence: PC fVar2 * 12.0 + 3.0 (0x768818, 0x762e10) after depth * 0.0005 (0x7652ec).
    • The units differ too. The PS2 turns the size into camera units through ZCameraSpace::Proj3D with 0.5 / resolution per pixel, so it is a screen size. The PC calls SSpriteArrayElementRaw::ResetVerticies (0x46d660, corners ±0.5) and scales the four vertices by the size (vscalar), so it is a camera-space size of 3 to 15 units.
    • Port: pc_tuning (port/hitman3/characters/_sdl/pctuningoverridesdl.cpp). At depth 461 the dot's half size is 4.5 x 3.9 camera units on the PS2 and 2.9 with it; Enhancements: PC version tuning.

hitman3/hitman3

  • ZHM3GameData::IsFrontEnd, PS2 0x3da208, PC 0x69cd80, src/hitman3/hitman3/hm3gamedata.cpp. This pair is already listed in pc-comparison.md.
    • The scene-name test is stristr(scene, "hitmanbloodmoney") on the PS2 and stristr(scene, "hitmanbloodmoney.") on the PC (0x7a7aa4).

hitman3/levelcontrol

ZHM3LevelControl

  • ZHM3LevelControl::PostInit2, PS2 0x3dbdb8, PC 0x6ae870, src/hitman3/levelcontrol/levelcontrolbase.cpp.
    • The PC has an extra tail for the online code. When the network platform object (global 0x81f844) has no status monitor in its slot +8, the PC deletes the NetPlatformStatus_t there (vtable 0x7a7a54). It puts a new 16-byte NetStatusMonitor_Menu_t in its place (vtable 0x7a7a78; 0x6d3920 sets its state to -1). This happens at every level start.
    • The rest agrees: the post filters, the notoriety display (off in M00 and M13), the statistics and the notoriety increments.

ZLevelLinking (profile, key bindings)

  • ZLevelLinking::WriteGlobals, PS2 0x3e1520, PC 0x6afbf0, src/hitman3/levelcontrol/levellinking.cpp.
    • sizeof(sProfileHeader) is 0x5e10 (24,080) on the PS2 and 0x5e90 (24,208) on the PC. The "dataProfile" global, which holds the profile and its four difficulty headers, is 128 bytes larger on the PC.
    • ReadGlobals (PC 0x6afb30) asserts the size 0x5e90.
    • The sHeader blocks are 0x16f0 bytes on both. The extra 128 bytes come after them (the PC binding array starts at +0x5c94 against PS2 +0x5c94 in ZLevelLinking), not in the per-difficulty data.
  • ZLevelLinking::OverrideAction, PS2 0x3e0ff8, PC 0x6b0950.
    • The PC function takes a fourth argument. Only when it is set does the PC store the binding in m_Profile.aButtonConfigInfo and rewrite the "dataProfile" global (WriteGlobals inlined). The PS2 always stores the binding and never writes the global.
    • s_asActionNames is [32][6] on the PC (0x816f50): up to five handle names and an action set, "ingame" or "menu". The PS2 has [32][3].
    • The PC table adds CycleCCs, CyclePistols, CycleSmgs, CycleAssaultRifles, CycleSnipers, CycleBinoculars, CycleCoins and FireWeapon2b.
    • It folds Holster into the inventory row and PickupMenuOpen/Close into PickupFast. It folds ActionMenuOpen/Close, ContainerMenuClose and UseAction into ActionMenuFast, and Enter, StatContinue, MapSelect and Accept into ZW_SELECT.
    • It has no DropVideo/DropCutSequence row.
  • ZLevelLinking::Initialize (PS2 0x3df4b0, PC 0x6b1200) and ZLevelLinking::Clear (PS2 0x3e1124, PC 0x6b10c0). These two were mapped the wrong way round (see Wrong pairs). Against the right partners:
    • The PC Initialize re-applies every saved key binding after ReadGlobals. It calls OverrideAction(i, device, control, true) for each control id that is not -1.
    • The PC Clear also resets the 32 bindings to -1 and calls a virtual (+0x24) on the global 0x8abac4 for each.
    • Both are otherwise the same. Initialize sets difficulty 0, current level -1, LLNONE, 75,000 money and runs the default weapons once. Clear sets the unlocked flags to 2, LLNONE and 75,000 per header, runs SetDifficulty(i) and AddDefaultAvailableWeapons, then SetDifficulty(1).

M00 (tutorial)

  • ZHM3LevelControlM00::GetLocalisedText, PS2 0x3e52d0, PC 0x6b2b60, src/hitman3/levelcontrol/levelcontrolm00.cpp.
    • Before the plain text, the PS2 looks for "M00/Tutorials/<name>_PS2", the PC for "..._PC" (0x7a09f4).
  • ZHM3LevelControlM00::CaseFirstBriefing, PS2 0x3e57f4, PC 0x6b5750. This pair is already listed in pc-comparison.md.
    • The PC adds the splash "59_Splash_05" for OSDELEM_COMPASS (element 1), between 60_Splash_06 and 58_Splash_04. The PC shows eight splashes at the first briefing and the PS2 seven.
    • The disc's M00_main.LOC has the text too ("Compass / The compass is displayed in the upper right corner."), and ZOSD draws the compass for OSDELEM_COMPASS on both builds.
    • Port: pc_tuning (port/hitman3/gui/_sdl/pctuningguioverridesdl.cpp); the briefing shows the Compass page between Equipment and Headlines; Enhancements: PC version tuning.

M05

  • ZHM3LevelControlM05::Init2 (PS2 0x3f0750, PC 0x6be730), OpenGarage (0x3f1770, PC 0x6bda20) and CloseGarage (0x3f1860, PC 0x6bdb20), src/hitman3/levelcontrol/levelcontrolm05.cpp.
    • The PS2 labels the garage door action with hard-coded English: "OpenGaragedoor" / "Open Garage Door" and "CloseGarageDoor" / "Close Garage Door".
    • The PC uses the localised texts of "AllLevels/Actions/OpenDoor" and "AllLevels/Actions/CloseDoor".
    • The state machine, the 0.04 animation timing, the action-area hide and the door sound agree.

PS2 stubs and PC-only code paths

  • The one stub-on-one-side pair in these subsystems, ZHM3GameData::Load (PS2 0x3d93f0, empty) against PC 0x69d3c0, is a wrong pair. PC 0x69d3c0 is ZHM3GameData::OnDecalRemoval, which forwards to m_pTrailControl->OnDecalRemoval(index).
  • PC-only code paths found inside matched functions:
    • The network status monitor installed by ZHM3LevelControl::PostInit2.
    • The crowd memory printf in ZHFlow::ClassInit2.
    • The save flag and the larger action table of ZLevelLinking::OverrideAction, and the re-applied bindings in ZLevelLinking::Initialize.
    • The option byte 0x7f40aa for the fibre-wire auto-crouch.
  • No PS2-only code path was found apart from the haptics and the PS2 tutorial text suffix.

Wrong pairs found

PC PS2 (mapped) Correct partner
0x5c0df0 0x354758 ZHM3MovementGuideTools::IsPlayerMovingTowardsGuide PS2 0x2dbb6c ZHM3MovementGuideList::GetNearbyGuide (unmatched)
0x620e80 0x34a868 ZHM3ActionControl::CanLookKeyhole PS2 0x354758 ZHM3MovementGuideTools::IsPlayerMovingTowardsGuide; the PC partner of CanLookKeyhole was not found
0x5c6e30 0x2e43c0 CBodyContainer::Close PS2 0x2e4354 CBodyContainer::Open
0x5c6e90 0x2e4354 CBodyContainer::Open PS2 0x2e43c0 CBodyContainer::Close
0x5f19d0 0x3164d8 ZHitman3::IsBalconyJumpable PS2 0x32f660 ZHitman3::CanHitmanClimbHatch (unmatched)
0x606990 0x338688 ZHitmanActionCloseCombatHit::AdjustForStatus PS2 0x3378f0 ZHitmanActionCloseCombatHit::DisplaySpecialAttackTighten
0x614180 0x3378f0 ZHitmanActionCloseCombatHit::DisplaySpecialAttackTighten PS2 0x337dac ZHitmanActionCloseCombatHit::IsSpecialAttackAligned (unmatched)
0x64c540 0x3214e8 ZHitman3::CanDragBody PS2 0x38f664 ZHM3ItemBomb::ProjectileHitEvent (unmatched); the PC partner of CanDragBody was not found
0x69d3c0 0x3d93f0 ZHM3GameData::Load PS2 0x3d9d74 ZHM3GameData::OnDecalRemoval (unmatched)
0x6b1200 0x3e1124 ZLevelLinking::Clear PS2 0x3df4b0 ZLevelLinking::Initialize
0x6b10c0 0x3df4b0 ZLevelLinking::Initialize PS2 0x3e1124 ZLevelLinking::Clear
0x6b2760 0x3e2c68 ZHM3LevelControlHideout::ReplaceCustomPistolWithDualShit PS2 0x3e2b08 ZHM3LevelControlHideout::CheckCustomWeaponState
0x6cd4b0 0x4016a8 ZMusicController::ControlMix PS2 0x4014c8 ZMusicController::Fade
0x62d4d0 0x3642d0 ZHitman3ControlMouse::SetHitmanMovementStatusStrafe PS2 0x365200 ZHitman3ControlConsole::SetHitmanMovementStatusStrafe: the stick-length test, SetHitmanMovementStatusStandStill and the stick-angle sectors of ±35°, ±55°, ±125° and ±145° (PC 0x794eb8 to 0x7950b8) are the pad version's; found by the PC fixes work, see Enhancements: Mouse turn
0x62c600 0x365200 ZHitman3ControlConsole::SetHitmanMovementStatusStrafe PS2 0x3642d0 ZHitman3ControlMouse::SetHitmanMovementStatusStrafe: the ±1/8192 dead-zone tests on m_vMove and CalcTurnSpeedFromVector(..., 0.99996), as on the PS2

Wrong callee mappings found while reading these pairs (the pairs themselves were not flagged):

PC PS2 (mapped) Correct partner
0x6b2440 0x3e2b08 ZHM3LevelControlHideout::CheckCustomWeaponState PS2 0x3e2c68 ReplaceCustomPistolWithDualShit (y - 15 placement)
0x6ca0f0 0x4014c8 ZMusicController::Fade PS2 0x4016a8 ZMusicController::ControlMix (PLF_Mix, (100 - mix) * 0.01 lowpass)
0x6ac280 0x3312dc ZHitman3::GetCurrentZone PS2 0x3dd6d0 ZHM3LevelControl::AddWitness (REFTAB Exists/Add); GetCurrentZone is PC 0x5f2220
0x5dbfb0 0x301490 ZTrailControl::DeactivateElement PS2 0x3011e8 ZTrailControl::OnDecalRemoval (with DeactivateElement inlined)
0x501510 0x1a7bec ZActor::PathChanged none: it is ZHumanBoid::IsMovementPausing (m_fPauseMovementAtDistance >= 0, inline in human.h on the PS2)
0x5eaa50 0x31a054 ZHitman3::UpdateCurrentStatusBuffer none found: it is a float setter that clamps this+0x24 to [0, 1]

Unmatched PC partners identified on the way: ZHFlow::FlowInstanceLineColi is PC 0x5ada80, ZHitman3::GetCombineItemInHands 0x5eb4a0, ZHM3ActorProperties::GetInspectionMultiplier 0x63f5f0, and the twelve ZHitman3::StartActionCloseCombat* functions are 0x5ed480 to 0x5eda40.

Noise patterns

These are the false positives that recur in these subsystems, with what compare_pairs.py could do about each.

  • Stale high halves in the PS2 sweep (7 pairs). disasm_ps2 keeps every lui value a register ever held in luihist and never clears it when the register is overwritten. A later addiu $t7, $t7, 0x150 (after addiu $t7, $zero, 0xc), or the addiu of a jump-table address, is then read as %lo of an old high half and lands on unrelated strings and floats. Examples: "SoundSpline", 0.347 and 0.1695 in ZHFlow::DrawBufferViewUpdate; "Item_KeyPoolHouse_01" in GetCenSize, GetBBOffsetSize and ZHitmanPutDownSuitcase::CallBack; "Inventory", "eSneakStartForward" and "CAMERA_ASPECT_NORMAL". Fix: drop a register from luihist whenever it is written, or use the history only for registers that are not written between the lui and the use.
  • PS2 register state carried across branch targets (2 pairs). The linear sweep keeps hi and ad through labels. A lw 0x38($t7) or lwc1 0x8($t7) at a branch target, where $t7 holds a pointer on that path, is read as a constant-pool load: 25.0 in CDoorAnim::CheckMovement, 1.2 and 0.1 in ZHM3CoverCorner::GetQuality. Fix: reset the register state at every branch target, which the sweep can collect in a first pass.
  • disasm_pc reads past the function (1 pair). When a Ghidra body has a chunk before the entry (min < addr) and the span is too large, the fallback end = addr + size runs into the following functions. ZHM3LevelControlM13::PostInit2 got +100 and +200 from three functions after 0x6c8eb6. Fix: use max + 1 when max is beyond the entry, or disassemble the Ghidra body ranges.
  • Identical PS2 functions folded by MSVC (4 flagged pairs). The mapping pairs only one PS2 function with the folded PC function, so a call to the other PS2 function looks like a removed call and the PC call like an added one. Found: ZLNKWHANDS::GetListOfLWHObjectsWithinBox = ZHM3Actor::GetListOfActorsWithinBox (ZCollisionDamage::FrameUpdate); ZCollisionBox::CheckBoxCollision = CheckSphereCollision (ZChangeDimensionHelper::ChangeDimensions); ZEnterElevator::StandActorStill = ZExitElevator::StandActorStill; and the three XMLParse readers of money, notoriety and difficulty. Fix: hash each PS2 function's words with relocations masked, and give identical functions one callee key.
  • TIMETYPE folding (3 pairs). MSVC folds FrameTime + 5.0f into secs + 0x1400 and compares times against 0xc00. The PS2 float 5 or 3 is then one-sided. Fix: accept a one-sided PS2 float N when the PC has the integer N * 1024 in an add/sub/cmp next to a * (1/1024) (0x756108).
  • Floats that the PC handles as integers (2 pairs). These are m_fDanceWaitTimer == 999.0f compiled as cmp [x], 0x4479c000, and mov ebp, 0x420c0000 (35.0) followed by stores of ebp. Fix: treat cmp immediates and register loads that are exact float bit patterns as floats too.
  • Dead code that GCC keeps (6 pairs). The PS2 still has unused local initialisers (V3 s0 = {10, 10, 10} in SitDown/LieDown, vProbeSize in CanDismountUp, the cover debug-text positions in FindCovers), calls whose result is unused (strcmp(..., "HitmanTemplate"), "HitmanAs!CatererMale_01"), and an unreachable MissionFailed(".../HitmanDied") arm. These are hard to remove by rule. A PS2 string or float used only by a call whose result is dropped could become a weak item.
  • Calls that only feed a PC assert (5 pairs). ZFurniture::IsDeadActorInsideBounds, ZHM3Inventory::GetItemType (both DualWeaponsUnEquip*) and ZLevelLinking::GetCurrentLevelNum (ZHM3WardenRemovesCIAAgent) are called only to decide an int3. Fix: when every use of a call's return value is a compare that leads to a trap jump, drop the call as assert code. The existing trap rule only drops the compare immediates.
  • x87 compares counted twice (1 pair). fcomp; fnstsw ax; test ah, N; jp followed by jne counts as two branches. The 21 min/max steps of InitializeVerticalPlane gave 42 branches and a structure flag. Fix: do not count a jp that tests the same fnstsw flags as the next conditional jump, or count the pair as one.
  • Ghidra bodies cut at jump tables (1 pair). ZHitman3::CanUnpackSniper has a 707-byte body in a 1,840-byte span, because Ghidra did not follow the jump table. Fix: when max - min is much larger than size and the C has "Could not recover jumptable", use the span for size and callees.
  • Frame sizes above 32 KiB (1 pair). ori $t4, $zero, 0xcbb0 / subu $sp, $sp, $t4 against the PC mov eax, 0xcb10; call __chkstk gave -int 52144 +int 51984. Fix: ignore an immediate that feeds subu $sp or the stack probe.
  • Tables of strings that the PC indexes directly (4 pairs). szActionNames, g_aHM3ItemTypeNameList, s_asLevelname and the szIntroMovie/szWeaponFileName globals put their first entries ("None", "NoType", "M01", "IntroMovie") on the PC side only. Fix: when a PC string comes from a pointer table, compare the table, or accept strings that the PS2 function reaches through a named data object.
  • A float run into a string (1 pair). The PC float 1/78 (0x3c520d21, bytes !\rR<) directly followed by a string was read as "!\rR<rCrowd". Fix: reject a candidate string whose first four bytes are a plausible float that the function also loads.
  • MSVC inlining with an unmatched PC callee (3 pairs). These are SetDistanceFromVolume (50 and 5.12 in UpdateCollisionSoundAndEffects), CalcStatForRating (its integer weights 6, 8, 10, 12, 9, 5 and 3 become float constants in ZRatingSystem::CalculateRating) and ClearPlayList. The constant rule only looks into matched callees.
  • SEH state numbers (1 pair). The PC mov [ebp - 4], 0x41/0x42 try-level stores in ZHitman3::CreateLnkAction were compared as literals. Fix: ignore stores to the SEH state slot.

Unresolved

  • The PC partners of ZHM3ActionControl::CanLookKeyhole (PS2 0x34a868) and ZHitman3::CanDragBody (PS2 0x3214e8) were not found. Their mapped PC functions were other functions, so both were effectively unmatched. The rerun pairs them with PC 0x615880 and 0x5f5e20 through the call graph; those pairs are not reviewed.
  • ZHitman3::CreateLnkAction: the PS2 literal 0x1000007f was not traced to an instruction. The 72 case labels agree on both sides, so the pair is recorded as noise.
  • ZLevelLinking::WriteGlobals: what the 128 extra profile bytes hold on the PC was not identified. Candidates are PC options or key bindings beyond m_aiOptions[32].
  • ZHitman3::Initialize: whether the PC switches auto-aim on later depends on ZHitman3::SetAutoAimEnabled, which is unmatched (12 bytes, possibly folded). Only the initial value is established.
  • The 15 minor pairs were spot-checked, not read line by line. Their weak items, the one-sided integers and the unmatched callees were explained, but a changed condition in a 4,000-byte function would not have been seen.