# PC enhanced weapons

Options > Extras > Enhanced weapons enables dual Colts and the requested double-shotgun pellet pattern.

The separate Extras > Weapon bobbing toggle defaults Off and works with all
ten weapons, including both Colt hands. It offsets weapon render copies and
fixed-screen muzzle flashes together along an arch spanning0..6 GBA pixels to
the right and0..2 pixels down, scaled by movement amplitude. Both Colts and
their flashes share the same offset and move in parallel. The phase is exactly
the recovered footstep phase (camera counter times1872): sound13 lands bottom
left, sound14 bottom right, and the weapon rises to the normal baseline between
steps. Jump height adds up to4px of dip, including stationary jumps, returning
on landing. The baseline never moves upward past the art's original crop.
Original weapon and muzzle-flash sizes are preserved. Original positions are
the upper-left bounds of the movement; both sprites only shift further
right/down. Only the left-hand artwork itself is mirrored. There
is no edge filling, resampling or viewport strip extension.
At rest offsets are zero, preserving the original image and positions.
Weapon bob amplitude reaches full strength at normal straight speed8, rather
than diagonal speed: the original camera's squared-speed amplitude was half
strength when walking straight, leaving vertical offsets below one native
pixel. Only weapon/flash presentation is normalized; camera/footsteps remain
the original recovered behavior.
All display entry points retain the original strict OBJ cycle budget.
In native-aspect software output, bobbing weapon pixels may extend past the
centered3:2 canvas. PC-only OAM snapshots separate unshifted original weapon art
from the HUD; output-space translation applies bobbing before clipping at the
actual viewport edge. No border pixels are invented or stretched. Both Colt
hands stay together, while HUD anchors and reticle remain fixed. The reference
renderer and exactly3:2 output retain the existing OAM composition path, and
zero-offset idle rendering bypasses the separate weapon pass.
It does not move the crosshair or modify canonical weapon coordinates, aim,
firing, magazines or reload timing. Standing still on the ground has no sway;
automap, death and third-person views suppress it. Pause holds the current phase. Repeated
rendering never advances it. Software uses the same viewport scale for flash
offsets as the weapon; GBA flashes use the corresponding120x120 raster offset.
Original actor projection entry points retain zero offsets; the new PC collect
entry point mirrors the artwork before applying the shared screen offset.
Settings version11 retains the preference introduced in version10; versions1..9
default it Off.

The native PC pickup rules also accept ammo without weapon ownership and owned
weapons for their normal ammo grant, with ordinary capacity limits. This applies
even when Enhanced weapons is Off. The second-Colt acquisition has priority
over duplicate-ammo handling, so it still unlocks duals with a full ammo pool.
It defaults to Off and persists in Settings v6 (16 bytes, byte9 bit7, existing
CRC). Versions1..5 keep their previous preferences and migrate with it Off.
Extras retains its grid-aligned labels/values; the new row is at y120 and Back
at y152. English, German and French use the original fonts.

With this enabled, a fresh New Game starts Egypt with one Colt and the original
Colt pickup's half-capacity ammunition. Password/level-select starts outside the
first level upgrade any starting Colt to dual ownership, retaining the original
ammunition, other gear and selected weapon ID. If Colts are initially selected,
both are drawn at level entry; otherwise selecting Colts chooses the dual pair.
The first level keeps its single Colt, and carried/restarted campaign inventory
retains the variant actually earned. A Colt pickup while already owning one accepts the second
gun, adds the usual pickup ammunition and equips dual Colts. A further Colt is
refused as before. The pickup still runs original script triggers, sound, HUD
notice, collected statistics and removal. The recovered pickup entry point
retains its original behavior; an explicit PC runtime policy permits this one
repeat acquisition.

The user chose to retain the current key assignments: Colts are key2, chainsaw
key1. Press2 while Colts are requested to toggle single/dual after acquisition.
Wheel order is chainsaw, single Colt, dual Colts, then the other original weapon
IDs; unowned/empty entries are skipped. Rapid wheel events use the requested
variant. Q remembers the previous weapon and variant. Both variants share the
original Colt inventory bit, ammunition, HUD and NETRICSA record.

The original Colt controller supplies damage, aim, sounds, ammunition and statistics.
With Enhanced weapons On, single and dual Colts use the requested0.45second
interval per hand. Duals alternate right/left every0.225seconds. Each independently
plays the original recoil animation at normal speed. The first shot is right-handed.
The shared controller runs two phases per world tick for duals; an explicit firing
deadline admits starts. The click edge is delivered once, and other weapons'
cooldowns retain one update per world tick.
Each fire press queues two alternating shots, including a click released before
the next simulation tick. Held fire opens another pair at the next admitted
start, completing its second shot after release. Additional click edges queue
another pair during Colt recoil/cadence. Clicks during magazine reload are
discarded, including its completion tick; nearby button interaction also clears
both the ordinary click and dual-pair queues. A held trigger may resume firing
after reload, but a released click cannot cause a delayed shot. Pending
shots still obey the magazine, reload and shot deadlines. Changing weapon or
variant, death, pause, lost focus and disabled input cancel unstarted shots;
an already started shot still commits normally. Single Colts keep one-shot clicks.

Each hand tracks six shots separately from the original infinite reserve ammo/HUD.
Automatic reload begins only when the next hand in the alternating sequence is empty.
The newly emptied right gun does not block the left gun's sixth shot: full duals
fire12shots before reloading. Unequal magazines still respect hand order and
never fire an empty gun or skip its turn. Once recoil finishes, the right Colt reloads;
the left (duals only) starts0.33seconds later. Each reload takes1.07seconds and the
complete dual reload takes1.40seconds. Each hand lowers and rises using original
art while the other stays visible. Each hand's reload start plays the original
empty-trigger click(sound0x28) as a centered local cue, once per reload phase;
it is not looped, attenuated or restarted by pause. Reloading blocks queued weapon changes until
completion of both hands, freezes during pause, and resumes held fire with the right hand.
The fixed simulation clock uses1/1200second units:540per shot,270between hands,
1284per hand reload,396left-start delay and1680for the pair. reload_end retains
the right-hand deadline throughout: phase2 is right-only; phase3 includes overlap
and the left-only tail. Each hand refills and finishes its projection independently.
Fractional deadlines carry across ticks; rendering frequency
does not change the average rate. Each event is quantized to the next60Hz update.
The policy is absent when Enhanced weapons is Off, preserving original behavior.
Press R to reload partially used single or dual Colts manually. This enters the
same recoil wait, right/left animation, sound and timing path as automatic reload;
both selected hands refill without changing reserve ammo. Full magazines, other
weapons, weapon/variant transitions and automap ignore the request. Reload is a
one-press action: OS repeats cannot restart it, and pause/focus loss consumes
pending requests. It never restarts the level.
Re-equipping a gun resets its six-shot counter. A full switch back to Colts
refills the right gun and the left if duals are selected; a single-to-dual
transition refills only the newly drawn left gun. The right counter is retained
through variant changes because that gun remains equipped.
Changing single/dual waits for both active hand animations, then moves only the
left hand at the original draw/store speed. The right hand stays in place.
Quick clicks during this transition remain buffered for its completion.
Ordinary changes to another weapon retain the existing full lower/raise path.

Presentation reuses the original Colt art and palette, reflecting its entire
sprite across the240px canvas for the left hand. A temporary OAM projection
includes both hands without adding gameplay sprite objects. Colt idle uses30
tiles, firing at most45. The two independently animated images occupy reserved
weapon banks at tile0 and tile80, after queued sprite uploads have completed,
so overlapping recoil frames cannot overwrite each other. No HUD cache
allocation is needed. Both renderers, pause and NETRICSA's
weapon-only snapshot use the same projection. Left muzzle flashes are mirrored
through an explicit PC projection path; original D490/D884 entry points retain
their previous semantics. Third-person still hides first-person weapons/flashes.

Value-only campaign carry/restart snapshots include dual ownership, selection,
the Extras policy, magazine counts and Q history. Carried counts are checked
against the next gun if Colts remain selected; re-equipping them instead refills
the guns being drawn. There are no new ROM writes or save-game files.
Disabling enhanced weapons restores single-Colt selection and original pickup
acceptance.

The double shotgun uses14fixed pellets while this option is On: three at
vertical+2.58degrees/horizontal-5.14,0,+5.14; four at+0.86/-6.84,-1.72,+1.72,+6.84;
three at-0.86/-5.14,0,+5.14; four at-2.58/-6.84,-1.72,+1.72,+6.84.
Each pellet contributes5base damage,70if all hit the same enemy. The view-local
pattern rotates around actual yaw/free-aim pitch or the selected GBA auto-aim
slope, using the original math tables. Angle rounding is within one turn/65536.
Both modes use explicit full-precision rays; the original GBA heading-override
quirk remains only with the option Off. All pellets retain unlimited PC range,
wall/floor/ceiling stops, impact effects and the original two-shell consumption,
single trigger statistic and firing animation/sound.

Its alternate firing interval is1.75seconds (105simulation ticks). The original
17drawable sequence entries plus the idle frame are distributed evenly over that
cycle, with5/6tick holds. Idle is the final timed slot within the105ticks, before
another shot or a queued weapon change can start. The last-shell six-entry
sequence already ends on idle and uses17/18tick holds without duplicating it.
Weapon runtime consumes completion before the next controller admission, avoiding
an extra idle tick. Native game_runtime routes only an active alternate shotgun's
sprite-animation stage through weapon_runtime_animate; other objects retain the
original animation path. Pause freezes the cycle. Queued weapon changes wait for
the full animation. New clicks during reload/recovery are discarded rather than
firing after the animation; a fresh ready click and continuously held fire work.
Switching the option Off restores the original animation clock on the next update.

Alternate shotgun reload audio: on first entering the shell-insertion artwork
(sprite23 in sequence12), play the original mechanism cue0x28 once, centered
on the protected local player source. A separate runtime edge latch prevents
repeats across its three sequence entries or during pause/resume. The cue is
emitted after animation advances, on the same tick as the insertion frame.
The last-shell sequence22 has no shell insertion and emits no reload cue.
Original mode and the105tick shot interval remain unchanged.
The existing timing fixture verifies eight insertion cues across software
and GBA third-person runs, no replay while paused on insertion, and no cue
for the last-shell case. GCC ASan/UBSan/leaks and MSVC agree on2318869checks/
5881frames; Windows number/wheel routes and original switch regression pass.
Static125libraries/frontend rebuild passes. See the current alternate-weapons
validation JSON reports; no physical listening or campaign playthrough.

The original damage routine rejects repeated damage calls on an enemy in the
same frame. The alternate blast therefore traces/impacts all14pellets, groups
damage per entity and applies each group once through native combat. Per-pellet
hit counts are retained. Difficulty/armor rounding and rewards apply to that
grouped damage; no entity protection flags are cleared. Original Off behavior
and all other weapons retain their previous paths.

Validation: tests/test_alternate_weapons.py runs with ASan/UBSan/leaks; the
Windows counterpart is scripts/test-alternate-weapons.ps1. Checks cover genuine
world pickup/removal, requested shot deadlines and six-round magazines with
12alternating shots before each full dual reload and next-hand checks for unequal magazines,
right-before-left overlapping reload duration/order,1.40second total and centered one-shot reload audio,
per-hand re-equipping, pause, carry and disabled-policy behavior,
paired short/rapid clicks, reload buffering, focus/pause cancellation and single-shot fallback,
eight shotgun cases (six alternate/two original) with84pellet-direction checks
against independent floating-point camera rotation, including steep pitch and
GBA auto-aim, plus actual70damage/14hits, shell consumption and original Off damage,
three full-game shotgun timing cases (software/GBA chase/last shell) proving
105ticks between held starts, evenly paced entries, pause and deferred switching,
original-speed recoil, unlimited reserve ammo, alternating hands, other-gun cooldowns,
pixel-symmetric idle sprites, an unchanged right-hand image throughout variant
draw/store, click buffering, Q/wheel order, carry/restart and both renderers.
Actual hidden-window number-key/wheel messages and the existing ten-weapon
switch suite pass on MSVC. Settings/persistence runs in all three languages;
original pickup and actor projection comparisons remain passing. Coverage also
includes all36password/level-select starter rows with alternate mode both On and
Off, plus a retained single-Colt campaign carry into the next level. Current counts
and source hashes are in alternate-weapons-validation.json,
windows-alternate-weapons-validation.json, audio-settings-validation.json and
windows-audio-settings-validation.json. Full campaign playthroughs remain manual.
