b $C2E8 data used by sound routine B $C2E8 outer loop counter B $C2E9 inner loop counter B $C2EA four "delay" counters used by $C33A B $C2EE four bytes which are added to the previous four bytes at the end of the sound routine c $C2F9 Sound routine - data block format: outer loop counter, inner loop counter, first set of four bytes controlling delay loop before playing a sound byte, second set of four bytes controlling delay loop before playing a sound byte ; @label:$C2F9=$C2F9 C $C2F9 set destination address (data block at $C2E8) C $C2FC ten bytes to be copied C $C2FF copy ten bytes from where HL is pointing (by caller) to the data block at $C2E8 C $C301 disable interrupts C $C302 point HL at $C2E8 (a data block of ten bytes for the current sound) C $C305 load first byte into B - i.e. initialise loop counter C $C306 preserve BC - outer loop counter C $C307 point HL at $C2E9 - 2nd byte of data block C $C30A load 2nd byte of data block into B - inner loop counter C $C30B preserve BC - inner loop counter C $C30C set B to four - loop counter C $C30E point HL at third byte of data block C $C311 preserve BC and HL C $C313 load next byte from data block into B - counter used by $C33A below C $C314 call $C33A which just counts down from B to zero before returning (?!) C $C317 load A with value of unknown57 (initially $30) - sound byte to play? C $C31A XOR with $30 (110000 in binary) - toggle sound byte; black border C $C31C store result in unknown57 (current sound byte to play?) C $C31F write value in A to the loudspeaker (either $0 or $30) C $C321 restore HL which is pointing into the data block C $C322 increment HL to point to the next byte in the data block C $C323 restore loop counter C $C324 loop back to $C311 three times C $C326 restore BC C $C327 loop back to $C30B "second byte in data block" times C $C329 load B with $04 C $C32B exchange contents of DE and HL - DE points at wherever HL is up to C $C32C point HL at 3rd byte in data block at $C2E8 C $C32F let (HL) = (HL) + (DE) - so the last 4 bytes in the data block are added to the preceding four C $C332 increment DE and HL C $C334 loop back to $C32F three times C $C336 restore BC C $C337 loop back to $C306 "first byte in data block" times C $C339 return to caller