![]() |
Routines |
| Prev: BCA4 | Up: Map | Next: C01A |
|
Used by the routine at START.
Called once, from START, while the loading screen is still up: two voices on the beeper, a note at a time (TUNE_PLAY_NOTE), with the ROM's KEY-SCAN between notes. The voices' pointers are set from TUNE_VOICES first, so the tune starts from its beginning. The tune lasts 52.6 seconds (418 note bytes a voice, of which the last three rest in both and are passed over, so 415 notes heard, each 0.127 s; measured for the sounds page); after it both voices rest, and the routine goes on scanning the keyboard in silence.
Interrupts are off while it plays (KEY-SCAN does not need them); it turns them on as it returns, and START turns them off again three instructions later, for good.
From the first room on, these bytes are part of the clean copy of the screen (RESTOR copies the screen here), so the tune cannot be played again.
|
||||
| LOADING_TUNE | C000 | LD HL,TUNE_VOICES | Both voices to the start of the tune: the four pointers from TUNE_VOICES. | |
| C003 | LD DE,VOICE_ONE_AT | |||
| C006 | LD BC,$0008 | |||
| C009 | LDIR | |||
| C00B | DI | Interrupts off while it plays. | ||
| LOADING_TUNE_0 | C00C | CALL TUNE_PLAY_NOTE | Play a note (once both voices are resting, nothing). | |
| C00F | CALL $028E | KEY-SCAN leaves E at $FF while no key is pressed. | ||
| C012 | LD A,$FF | |||
| C014 | CP E | |||
| C015 | JP Z,LOADING_TUNE_0 | |||
| C018 | EI | A key. | ||
| C019 | RET | |||
| Prev: BCA4 | Up: Map | Next: C01A |