Prev: DCDC Up: Map Next: DD6F
DD52: Sound: Tile Movement
Used by the routines at MoveTile_Right, MoveTile_Left, MoveTile_Down and MoveTile_Up.
Input
B Loop counter
Sound_TileMovement DD52 LD HL,$E761 HL=Tile_SpacesToMove.
DD55 LD A,$14 Load the base pitch value (14) into A.
DD57 SUB (HL) Subtract the number of tile slots moved from the base pitch.
DD58 LD C,B C=B.
DD59 SLA C Multiply C by 04.
DD5B SLA C
DD5D ADD A,C C+=A.
DD5E LD C,A
DD5F LD A,$05 A=05.
Sound_TileMovement_0 DD61 LD B,C B=C.
DD62 SLA B Shift B left (with carry).
Sound_TileMovement_1 DD64 DJNZ Sound_TileMovement_1 Decrease counter by one and loop back to Sound_TileMovement_1 until counter is zero.
DD66 XOR %00010000 Flip bit 4.
DD68 OUT ($FE),A Send to the speaker.
DD6A DEC C Decrease C by one.
DD6B JP NZ,Sound_TileMovement_0 Jump to Sound_TileMovement_0 if C is not zero.
DD6E RET Return.
Prev: DCDC Up: Map Next: DD6F