Sound effects (ayFX on the PSG, mixed over the FM music):
- 8-effect bank from sfx/sfx_bank.afb embedded as sfx_bank.h in fixed
main ROM (interrupt-readable without bank switching). Triggers: random
cat-paw footstep (0-2) per move, fanfare (4) on reaching the exit, map
unfold (5) on M, laugh (6) on C, ta-daa (7) when advancing the title/
hint/win screens. Priorities keep footsteps below UI/finish sounds.
- The H_TIMI hook now also runs ayFX_Update + PSG_Apply each frame;
PSG switched to indirect (buffered) access with AYFX_BUFFER_DEFAULT.
- Interrupt-safety fixes this surfaced: all joystick reads go through
ReadJoy() (DI/EI around Joystick_Read, which drives the PSG and raced
the ISR's PSG_Apply — caused noise, phantom input, minimap-on-move),
and the PSG mixer is muted at startup (zeroed buffer = all channels
enabled active-low, which PSG_Apply drove as noise during the logo).
Torus scrolling fix (bug from 7c24daa, exposed by mixed-direction play):
- ScrollDraw's bulk strip fills only honoured the scroll-axis base, so
with a non-zero orthogonal base the newly revealed edge was drawn
rotated by 2/4/6 tiles — phantom walls/passages while collision stayed
correct. Vertical strips are now pre-rotated by g_BaseX in staging;
horizontal column fills split at the 256-row wrap via FillStripColumns.
CLAUDE.md updated for both (SFX table + ISR rules, both-axis fill rule).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
330 B
330 B