Prev: 38175 Up: Map Next: 38212
38183: Set parameters (for cheat routine sound) and play
The entry point at 38183 is referenced only by the unused cheat/debug routine at 35420.
38183 LD HL,1222 Load HL with bytecodes for instruction ADD A,4
38186 LD DE,0 Load D with 0 and E with 0
This entry point is used by the routine at 38175.
38189 CALL 38212 Load A with current border colour
38192 LD (38204),HL Set instruction at 38204 to XOR 128, ADD A,4 or ADD A,32 depending upon value in HL
38195 OUT (254),A Set current border colour and reset speaker state
38197 XOR 16 Flip "speaker" bit
38199 LD B,E Copy E into B
38200 DJNZ 38200 Delay for period determined by B
38202 EX AF,AF' Switch AF and AF'
38203 LD A,E Copy E into A
The instruction at 38204 is modified by the instruction at 38192, resulting in different sounds.
38204 XOR 128 Change E (delay constant)...
38206 LD E,A ...
38207 EX AF,AF' Switch AF and AF' again
38208 DEC D Decrease D (initially zero)...
38209 JR NZ,38195 ...and repeat loop (256 times)
38211 RET Return
Prev: 38175 Up: Map Next: 38212