Prev: B332 Up: Map Next: B3FB
B3E9: Play Pitch From Table
Used by the routine at HandleBlock.
Plays four cycles of a tone whose pitch is taken from the eight values of PitchTable, which is chosen by the lowest three bits of the frame counter.
Choose a pitch from the table.
PlayPitchFromTable B3E9 LD A,($5BA2) Fetch FrameCounter.
B3EC AND %00000111 Keep bits 0 to 2.
B3EE LD L,A Set HL to the entry number.
B3EF LD H,$00
B3F1 LD BC,$B3FB Point BC at PitchTable.
B3F4 ADD HL,BC Add the entry number to the address of the table.
B3F5 LD B,(HL) Fetch the pitch.
B3F6 LD C,$04 Set the number of cycles to 04.
B3F8 JP PlayWaveSequence Jump to PlayWaveSequence.
View the equivalent code in;
Prev: B332 Up: Map Next: B3FB