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.tsvand 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
StartHapticcall 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
_PCinstead of_PS2tutorial 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 (
sProfileHeader0x5e10 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 ofZHitmanActionCloseCombatHit.
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 callsInit(0x100, 1000, false): 1,000 instances without double buffering. DrawBufferViewUpdatedraws at mostfree 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 0x5b1a00againstInit(0x100, 800, true).
- The crowd bone-array pool is set up differently. The PS2 calls
ZHM3HitmanMovementGuide¶
ZHM3HitmanMovementGuide::InitializeClimbWindowGuide, PS2 0x2da76c, PC 0x5bffe0,src/hitman3/background/hitmanguide.cpp.- The two start points of a climb-through-window guide differ (
cenandsare 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]}andm_vGuideStartPosB = {0, [geom+0x44], [geom+0x48]}before thevaddwith the centre (m_vSizeis at 0x40). It has nofadd/fsubof 20 or 30. - The PC's
CalcWindowMatPos(0x629540) andCalcLargeWindowPropertiesuse 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.
- The two start points of a climb-through-window guide differ (
hitman3/characters¶
ZHitman3¶
ZHitman3::Initialize, PS2 0x313580, PC 0x5f94a0,src/hitman3/characters/zhitman3.cpp.m_bAutoAimEnabled(PS2 +0xb08, PC +0xb58) is set tofalseon the PC. The PS2 readsGetConfiguration()->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 againsthm3itemtype.h.
- The PC adds
ZHitman3::LocalStateIK, PS2 0x3203f4, PC 0x5ebf60.- The first-person pelvis drop
g_1PPelvisis -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::StateFitplaces the pelvis from the state's first three floats and, withm_PelvisPlacementWeight1, 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.
- The first-person pelvis drop
ZHitman3::CanUnpackSniper, PS2 0x32904c, PC 0x5ee730.- The PC also refuses when
m_bIsInWateris 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
CalcLineCollisiontests. Ghidra's body stops at a jump table, so thestructureandcallsflags were noise.
- The PC also refuses when
ZHitman3::IsItemActionInRange, PS2 0x316900, PC 0x5f3ae0.- For an item of type
eHM3ContainerSuitcaseSniper01(0xc3), the PC takes the item position fromZHM3ItemTool::GetCenSize, the centre of the prim's bounding box. The PS2 always usesGetCen. - So the range for picking up the sniper case is measured from the visible case on the PC.
- For an item of type
ZHitman3::OnProjectileHit, PS2 0x322d88, PC 0x600310. This pair is already listed inpc-comparison.md.- The PS2 starts vibration with
StartHaptic. Explosive damage below 50 givesHE_EXPLOSION_SMALL, 50 and moreHE_EXPLOSION_LARGE. A pump-gun or shotgun hit givesHE_PROJECTILEHIT_LARGE, any other weaponHE_PROJECTILEHIT_SMALL. - The PC has no haptics. It still makes the
GetWeaponTypevirtual 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).
- The PS2 starts vibration with
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 100HE_BUMP_MEDIUM, from 300HE_BUMP_LARGE. The PC has no haptic. - The fall damage agrees: 400 units fall free, then
m_fDamagePerMeterper unit. So do the 150-unit soft landing and the 25 fps timing.
- The PS2 rumbles on landing: a fall of more than 25 units gives
ZHM3MovementPrimaryMove::ActorCollision, PS2 0x34fac8, PC 0x626e10.- The PS2 gives a
HE_BUMP_EXTRASMALLrumble when Hitman pushes through a crowd boid withdistFactor > 0.3. The PC has none. - The push radius and force (50), the 0.02 factor, the 0.4 slowdown bound and the
FindNodesradius (100) agree.
- The PS2 gives a
ZHM3MovementClimbThroughWindow::GotControl, PS2 0x35aa4c, PC 0x6231c0.- The PC sets Hitman's
m_DontAnimateAttachers(PC +0xff6, PS2 +0xfa6). It is 0 whenIsCarryingSuitcase(), 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 (
OnClimbGuideEntersets 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_DontAnimateAttachersis a mask of the hand attacher bones.ZOldDraw(zolddrawps2.cpp, the port'sZOldDrawSDL::FinishBones) callsZLNKWHANDS::SetAttachBones(~mask), which keeps the animated pose of the bones not in the mask inm_AttachBones, andGetAttachBones(mask), which gives the bones in the mask that kept pose. Bit 0 iseLHandAttacherand bit 1eRHandAttacher. The PC's byte at +0x568 of the movement ism_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'sTerminateControl(0x623360) sets the byte back to 0 afterOnGenericGuideLeave. - 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.
- The PC sets Hitman's
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.
- The horizontal mouse turn is scaled by 0.18 on the PC (0x794fa4). The PS2 uses
Actor actions¶
ZHM3ActorActionPushed::IsCollidingWithBackground, PS2 0x37de9c, PC 0x63ff70,src/hitman3/characters/hm3actoractions.cpp. This pair is listed inpc-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 storedm_iColiBoxStripCount(+0xa0) into it. It does not callGetStrips: the strips are collected once and reused. - The final test is
ZCollisionBox::CheckBoxCollisionon both. On the PC it looked like another function only because of folding (see the noise patterns).
- On every call, the PS2 locks a 0x6000-byte stack buffer and sets the box. It then gathers
the strips again with
ZHM3ActorActionPushed::LoadSave, PS2 0x37e15c, PC 0x643740.- The PC streams two more members after
m_vColiBoxSize:m_iColiBoxStripCountandm_aColiData(0x2400 bytes). These are the cached strips above, so this is a save-format difference.
- The PC streams two more members after
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'slTextureId. - The sprite setup and the
rLaserAimscene value agree.
- The PC finds the laser sprite texture through the D3D material of the prim (parameter
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) afterdepth * 0.0005(0x7652ec). - The units differ too. The PS2 turns the size into camera units through
ZCameraSpace::Proj3Dwith0.5 / resolutionper pixel, so it is a screen size. The PC callsSSpriteArrayElementRaw::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.
- The laser dot size differs. With
hitman3/hitman3¶
ZHM3GameData::IsFrontEnd, PS2 0x3da208, PC 0x69cd80,src/hitman3/hitman3/hm3gamedata.cpp. This pair is already listed inpc-comparison.md.- The scene-name test is
stristr(scene, "hitmanbloodmoney")on the PS2 andstristr(scene, "hitmanbloodmoney.")on the PC (0x7a7aa4).
- The scene-name test is
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_tthere (vtable 0x7a7a54). It puts a new 16-byteNetStatusMonitor_Menu_tin 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.
- 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
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
sHeaderblocks are 0x16f0 bytes on both. The extra 128 bytes come after them (the PC binding array starts at +0x5c94 against PS2 +0x5c94 inZLevelLinking), 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.aButtonConfigInfoand rewrite the"dataProfile"global (WriteGlobalsinlined). The PS2 always stores the binding and never writes the global. s_asActionNamesis[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,CycleCoinsandFireWeapon2b. - It folds
Holsterinto the inventory row andPickupMenuOpen/CloseintoPickupFast. It foldsActionMenuOpen/Close,ContainerMenuCloseandUseActionintoActionMenuFast, andEnter,StatContinue,MapSelectandAcceptintoZW_SELECT. - It has no
DropVideo/DropCutSequencerow.
- The PC function takes a fourth argument. Only when it is set does the PC store the binding
in
ZLevelLinking::Initialize(PS2 0x3df4b0, PC 0x6b1200) andZLevelLinking::Clear(PS2 0x3e1124, PC 0x6b10c0). These two were mapped the wrong way round (see Wrong pairs). Against the right partners:- The PC
Initializere-applies every saved key binding afterReadGlobals. It callsOverrideAction(i, device, control, true)for each control id that is not -1. - The PC
Clearalso resets the 32 bindings to -1 and calls a virtual (+0x24) on the global 0x8abac4 for each. - Both are otherwise the same.
Initializesets difficulty 0, current level -1,LLNONE, 75,000 money and runs the default weapons once.Clearsets the unlocked flags to 2,LLNONEand 75,000 per header, runsSetDifficulty(i)andAddDefaultAvailableWeapons, thenSetDifficulty(1).
- The PC
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).
- Before the plain text, the PS2 looks for
ZHM3LevelControlM00::CaseFirstBriefing, PS2 0x3e57f4, PC 0x6b5750. This pair is already listed inpc-comparison.md.- The PC adds the splash
"59_Splash_05"forOSDELEM_COMPASS(element 1), between60_Splash_06and58_Splash_04. The PC shows eight splashes at the first briefing and the PS2 seven. - The disc's
M00_main.LOChas the text too ("Compass / The compass is displayed in the upper right corner."), andZOSDdraws the compass forOSDELEM_COMPASSon 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.
- The PC adds the splash
M05¶
ZHM3LevelControlM05::Init2(PS2 0x3f0750, PC 0x6be730),OpenGarage(0x3f1770, PC 0x6bda20) andCloseGarage(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.
- The PS2 labels the garage door action with hard-coded English:
PS2 stubs and PC-only code paths¶
- The one
stub-on-one-sidepair in these subsystems,ZHM3GameData::Load(PS2 0x3d93f0, empty) against PC 0x69d3c0, is a wrong pair. PC 0x69d3c0 isZHM3GameData::OnDecalRemoval, which forwards tom_pTrailControl->OnDecalRemoval(index). - PC-only code paths found inside matched functions:
- The network status monitor installed by
ZHM3LevelControl::PostInit2. - The crowd memory
printfinZHFlow::ClassInit2. - The save flag and the larger action table of
ZLevelLinking::OverrideAction, and the re-applied bindings inZLevelLinking::Initialize. - The option byte 0x7f40aa for the fibre-wire auto-crouch.
- The network status monitor installed by
- 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_ps2keeps everyluivalue a register ever held inluihistand never clears it when the register is overwritten. A lateraddiu $t7, $t7, 0x150(afteraddiu $t7, $zero, 0xc), or theaddiuof a jump-table address, is then read as%loof an old high half and lands on unrelated strings and floats. Examples:"SoundSpline", 0.347 and 0.1695 inZHFlow::DrawBufferViewUpdate;"Item_KeyPoolHouse_01"inGetCenSize,GetBBOffsetSizeandZHitmanPutDownSuitcase::CallBack;"Inventory","eSneakStartForward"and"CAMERA_ASPECT_NORMAL". Fix: drop a register fromluihistwhenever it is written, or use the history only for registers that are not written between theluiand the use. - PS2 register state carried across branch targets (2 pairs). The linear sweep keeps
hiandadthrough labels. Alw 0x38($t7)orlwc1 0x8($t7)at a branch target, where$t7holds a pointer on that path, is read as a constant-pool load: 25.0 inCDoorAnim::CheckMovement, 1.2 and 0.1 inZHM3CoverCorner::GetQuality. Fix: reset the register state at every branch target, which the sweep can collect in a first pass. disasm_pcreads past the function (1 pair). When a Ghidra body has a chunk before the entry (min<addr) and the span is too large, the fallbackend = addr + sizeruns into the following functions.ZHM3LevelControlM13::PostInit2got +100 and +200 from three functions after 0x6c8eb6. Fix: usemax + 1whenmaxis 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 threeXMLParsereaders 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.0fintosecs + 0x1400and compares times against0xc00. 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 anadd/sub/cmpnext to a* (1/1024)(0x756108). - Floats that the PC handles as integers (2 pairs). These are
m_fDanceWaitTimer == 999.0fcompiled ascmp [x], 0x4479c000, andmov ebp, 0x420c0000(35.0) followed by stores ofebp. Fix: treatcmpimmediates 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}inSitDown/LieDown,vProbeSizeinCanDismountUp, the cover debug-text positions inFindCovers), calls whose result is unused (strcmp(..., "HitmanTemplate"),"HitmanAs!CatererMale_01"), and an unreachableMissionFailed(".../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(bothDualWeaponsUnEquip*) andZLevelLinking::GetCurrentLevelNum(ZHM3WardenRemovesCIAAgent) are called only to decide anint3. 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; jpfollowed byjnecounts as two branches. The 21 min/max steps ofInitializeVerticalPlanegave 42 branches and astructureflag. Fix: do not count ajpthat tests the samefnstswflags as the next conditional jump, or count the pair as one. - Ghidra bodies cut at jump tables (1 pair).
ZHitman3::CanUnpackSniperhas a 707-byte body in a 1,840-byte span, because Ghidra did not follow the jump table. Fix: whenmax - minis much larger thansizeand 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, $t4against the PCmov eax, 0xcb10; call __chkstkgave-int 52144 +int 51984. Fix: ignore an immediate that feedssubu $spor the stack probe. - Tables of strings that the PC indexes directly (4 pairs).
szActionNames,g_aHM3ItemTypeNameList,s_asLevelnameand theszIntroMovie/szWeaponFileNameglobals 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 inUpdateCollisionSoundAndEffects),CalcStatForRating(its integer weights 6, 8, 10, 12, 9, 5 and 3 become float constants inZRatingSystem::CalculateRating) andClearPlayList. The constant rule only looks into matched callees. - SEH state numbers (1 pair). The PC
mov [ebp - 4], 0x41/0x42try-level stores inZHitman3::CreateLnkActionwere compared as literals. Fix: ignore stores to the SEH state slot.
Unresolved¶
- The PC partners of
ZHM3ActionControl::CanLookKeyhole(PS2 0x34a868) andZHitman3::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 beyondm_aiOptions[32].ZHitman3::Initialize: whether the PC switches auto-aim on later depends onZHitman3::SetAutoAimEnabled, which is unmatched (12 bytes, possibly folded). Only the initial value is established.- The 15
minorpairs 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.