Fix target joystick calibration arguments and scene transitions

Avoid a demonstrated CMOC -O2 removed-index-reload error with independent calibration and position pointers. Keep established joystick readiness across menus, stabilize shared fire/keyboard scans, and protect input sampling from IRQ interference.

Ship pristine QUADPSL04.DSK. Native right-port emulated analog/button checks pass for both directions, four lasting T-piece turns, and steering after keyboard resume. Host input/store/rules/video regressions and unchanged memory guards pass. Preserve personal score disks and record physical/128 KB/audio limits.
This commit is contained in:
Brian Holman committed 2026-11-11 14:26:06 -07:00
1 parent 2e163049d1
commit a07c41555a
22 files changed
+446 -100

No files matched your search

+95
View File
@@ -110,3 +110,98 @@ steering. Hold fire 400 ms to open Actions; release must not rotate or select a
second action. Check keyboard fallback and, separately, the left-port setting.
If X still sticks, distinguish movement that never starts from movement that
works once and then locks; record which system and port exhibit it.
## Actual build-02 result and CoCoMan reference
Brian confirmed DOS loaded QUADPSL02.DSK; he still could not move left and
reported press/release rotations cancelling. Passive observation of his current
VCC Plus session showed pieces collecting at the right edge. Build 02 therefore
did not pass actual joystick acceptance. Keyboard smoke tests and the prior
static button mocks were insufficient to establish that result.
On November 11 Brian granted read-only access to CoCoMan. Relevant working-tree
references were game/main.c, game/keys.c and game/title.c, based on revision
439bd25ac46fbc7ecdfd67d98893a1cff90aef66 (main.c had local edits). CoCoMan keeps
its input record across pause/resume. Its published vcc/input.h contract masks
interrupts during the shared PIA transaction. Its keyboard/title readers mask
button-grounded rows, and title_keys checks button state on both sides of the
scan and retries if it changed. No CoCoMan source was modified or copied; its
custom assembly and VCC input extension were not imported.
## Build-03 candidate changes
- Standard CMOC disableInterrupts/enableInterrupts now bracket the foreground
analog/button/keyboard transaction. Player_disableSound is asserted before
and after sampling. The IRQ-sharing risk is addressed; its role in Brian's
horizontal failure has not been demonstrated with real analog readings.
- keyboard_read samples standard readJoystickButtons before and after the key
scan and retries if they differ. A single fire edge during build 02's scan
can bypass its initial row mask; the authored hardware mock reproduces this
gap. Logical fire uses the same stable final sample as the keyboard filter.
- Scene transitions clear transient key/button/repeat state and preserve the
joystick's established neutral readiness and hysteresis. Keyboard confirmation
does not change port selection. Cold start, explicit port change and explicit
neutral calibration still reset readiness. Held confirm/fire retains a release
guard; Up requires neutral again before a hard drop after a transition.
- The smaller original coco.h position reader is retained. A trial using the
standard bcontrol full-resolution reader exceeded the unchanged memory bounds
and was not delivered. No VCC-specific API, new hardware code or assembly is
used. Caption pointer iteration, equivalent compact hysteresis, shared return
code, seven effect-duration bytes in low static data and shorter status text
keep the correction inside the original memory/stack contract.
Host regressions cover each reachable key-probe boundary for one press/release
edge on each of four button lines, four lasting L-piece rotations, steering with
fire, keyboard-confirmed transitions, and held-button release guarding. Rules,
persistence and video suites pass. This is simulated hardware evidence. Actual
analog joystick acceptance remains pending; Controls readings are still entry
snapshots, not live measurements. A very brief press/release entirely between
samples cannot be observed by either endpoint check.
### Official build-03 artifact and isolated checks
VCC Plus 3.6.1 (53), project 7D6E1D9C-DF7C-4B15-B64D-6B30732417CB,
revision 3, Release disk action. Build C4E09234-A50B-4930-996E-A37A5521BFE7
succeeded with zero diagnostics; artifact A699546A-0A49-4521-BDF0-BA493FCFA850.
QUAD.bin is 26,574 bytes, SHA-256
86d1854f901c4c80f7b06b1fc048b7957f6fcd35ed2a8d1dd78fb7538df3a96b.
QUADPSL03.DSK is 161,280 bytes, SHA-256
80c511fe9c9b1a0faaeffa688dec6d73de39280f8eb3c9ce584727fc396f09ca.
The delivery matches the official artifact and contains only QUAD.BIN,
WORDS.DAT and QPTEXT.DAT, plus the DOS launcher; no QPSAVE data is present.
MC6809/512 KB owned run 74607F0C-BE7D-4931-9378-48DA2E4263D4 is stopped.
Actual guest captures show keyboard start, left/right movement, rotation,
pause and keyboard-confirmed resume followed by movement. Title and gameplay
idle PCM are zero in both channels. Movement has a positive effect (peak 7,936
in each channel, 21 changing edges) and a silent final 500 ms. Captures span
120 fields each. Host suites passed with ASan/UBSan; 128 KB, physical joystick
and the user's normal-window audio symptom are not qualified by this worker.
An experimental file-path output exclusion was accepted by the MCP inventory,
but later broke native project opening with a misleading missing-resource error.
It was removed: outputDirectories must contain real folders, not DSK file paths.
The first refresh was rejected to avoid adopting the personal build-02 disk as
an input. A second refresh approved the source changes and output exclusions.
The ordinary STDIO helper must stay connected until its native refresh dialog
is reviewed. Closing C Development later invalidated the temporary connection;
all owned workers had already been stopped.
## Final build 04: demonstrated target compiler error
Build 03 was withdrawn after native testing found that correct raw analog values
were paired with an incorrect horizontal calibration argument in generated code.
Independent base pointers in sample() avoid the bundled CMOC -O2 index-reload
error. This is the demonstrated cause of constant right movement and inability
to move left. Full excerpts, paused guest state and native qualification:
[CMOC_JOYSTICK_ARGUMENTS.md](CMOC_JOYSTICK_ARGUMENTS.md).
Final clean disk SHA-256:
1cddb6bdf17857b915e96a6929e14181bad05cfae73278a4919add26fea0ba45.
Official build53 native Release build A7A18927 succeeded. Code/const end $7AD4,
static end $13FD, stack reserve 1024 bytes. Right-port Keyboard joystick mapping
passes native analog left/right, four lasting T-piece turns and steering after
keyboard-confirmed resume. DualSense mapping was restored and game left paused.
These tests use actual emulated analog/button circuits; physical controller/CoCo,
left port and 128 KB remain pending. Build04 audio was not recaptured after this
pointer-only correction; build03's isolated audio evidence remains historical.