.MakeSound ASL A \ Set A = A * 8 ASL A \ ASL A \ so we can use it as an index into the soundData table, \ which has 8 bytes per entry CLC \ Set (Y X) = soundData + A ADC #LO(soundData) \ TAX \ starting with the low byte in X LDA #7 \ Set A = 7 for the OSWORD command to make a sound BNE MakeSoundEnvelope \ Jump to MakeSoundEnvelope to set up Y and apply the \ OSWORD command to the (Y X) block, which makes the \ relevant sound (this BNE is effectively a JMP as A is \ never zero)Name: MakeSound [Show more] Type: Subroutine Category: Sound Summary: Make a soundContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ApplyAerodynamics (Part 2 of 3) calls MakeSound * Crash calls MakeSound * ExplodeAlien calls MakeSound * MainLoop (Part 3 of 15) calls MakeSound * MakeEngineSound calls MakeSound * ProcessLanding (Part 6 of 7) calls MakeSound * ScaleFlightForces calls MakeSound * ScorePoints calls MakeSound * ToggleEngineSound calls MakeSound
Arguments: A The sound number from the soundData table (0 to 7)
[X]
Subroutine MakeSoundEnvelope (category: Sound)
Either make a sound or set up an envelope
[X]
Variable soundData (category: Sound)
OSWORD blocks for making the various game sounds