Skip to content

fix(sound): consume Director dispatch argument - #586

Open
benletchford wants to merge 1 commit into
masterfrom
dev/fix-sound-dispatch-64
Open

fix(sound): consume Director dispatch argument#586
benletchford wants to merge 1 commit into
masterfrom
dev/fix-sound-dispatch-64

Conversation

@benletchford

Copy link
Copy Markdown
Owner

Closes #583.

Director 3 uses the private SoundDispatch selector $00640004 as a Pascal procedure with one INTEGER argument. Its literal selector has a zero encoded parameter count, so the generic unknown-selector path left that word on the stack and the extension eventually returned through it as an address.

Teach the selector-size table its historical two-byte frame and handle the procedure without writing a nonexistent result slot. The caller return address immediately above the argument remains intact. A focused regression pins both the stack adjustment and preserved return address.

Verification:

  • cargo test --lib --quiet (2,950 passed, 3 ignored)
  • cargo check --no-default-features --quiet
  • cargo clippy --lib --quiet
  • cargo fmt --all -- --check
  • The official Journeyman Project Director 3 demo completes 2,000,000 instructions and reaches later UI frames instead of halting at 604,266 instructions on invalid PC $0000003B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SoundDispatch selector $00640004 leaves a Director extension argument on the stack

1 participant