Prev: 8C63 Up: Map Next: 8CB7
8C8C: Flash the score line while a countdown runs
Used by the routine at MATERIALISING.
Counts $5E3C down and, while it lasts, sets bit 7 of the six attribute cells the score sits in -- the flash bit, so the ULA does the work and nothing has to be redrawn. A beep every sixteenth step goes with it. It runs at the start of every life: PLACE_PLAYER sets the count to 104 and MATERIALISING calls this instead of rising until it runs out.
FLASH_SCORE 8C8C DEC A The countdown.
8C8D LD ($5E3C),A
8C90 JR Z,FLASH_SCORE_1
8C92 AND $0F A beep once every sixteen.
8C94 CALL Z,SOUND_LIFE_PIP
8C97 LD HL,$50C8 The attributes under the score, not the pixels.
8C9A CALL PIXEL_TO_ATTR
8C9D LD B,$06
FLASH_SCORE_0 8C9F LD A,(HL) Bit 7 is FLASH; the hardware alternates ink and paper from there on.
8CA0 OR $80
8CA2 LD (HL),A
8CA3 INC HL
8CA4 DJNZ FLASH_SCORE_0
8CA6 RET
FLASH_SCORE_1 8CA7 LD HL,$50C8
8CAA CALL PIXEL_TO_ATTR
8CAD LD B,$06
FLASH_SCORE_2 8CAF LD A,(HL)
8CB0 AND $7F
8CB2 LD (HL),A
8CB3 INC HL
8CB4 DJNZ FLASH_SCORE_2
8CB6 RET
Prev: 8C63 Up: Map Next: 8CB7