Skip to navigation

Elite on the BBC Micro and NES

Sound: MakeSoundsAtVBlank

[NES version, Bank 7]

Name: MakeSoundsAtVBlank [Show more] Type: Subroutine Category: Sound Summary: Wait for the next VBlank and make the current sounds (music and sound effects)
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * SendDataNowToPPU calls MakeSoundsAtVBlank * SendViewToPPU calls MakeSoundsAtVBlank

Returns: X X is preserved
.MakeSoundsAtVBlank TXA ; Store X on the stack, so we can retrieve it below PHA JSR WaitForVBlank ; Wait for the next VBlank to pass JSR MakeSounds_b6 ; Call the MakeSounds routine to make the current sounds ; (music and sound effects) PLA ; Restore X from the stack so it is preserved TAX RTS ; Return from the subroutine