![]() |
Routines |
Prev: 37022 | Up: Map | Next: 37376 |
|
||||
37072 | DEFB %00011101 | |||
This entry point is used by the routines at Start_1UP_Game and Start_2UP_Game.
|
||||
Intro_Music | 37073 | DI | Disable interrupts. | |
37074 | LD A,(45818) | If Flag_Sound is zero then return. | ||
37077 | AND A | |||
37078 | RET Z | |||
37079 | LD A,(37072) | A=37072. | ||
37082 | AND %00011111 | Keep only bits 0-4. | ||
37084 | LD H,A | H=A. | ||
37085 | AND %00000111 | Keep only bits 0-2. | ||
37087 | LD L,A | L=A. | ||
37088 | LD IX,37160 | IX=Intro_Music_Data | ||
The
|
||||
Intro_Music_Loop | 37092 | LD C,(IX+0) | C=the next note byte from IX+0. | |
37095 | XOR A | If the current note is 0 then return. | ||
37096 | OR C | |||
37097 | RET Z | |||
37098 | INC IX | Move the index onto the next note. | ||
37100 | LD B,(IX+0) | B=the next note byte from IX+0. | ||
37103 | INC IX | Move the index onto the next note. | ||
37105 | LD E,(IX+0) | E=the next note byte from IX+0. | ||
37108 | INC IX | Move the index onto the next note. | ||
37110 | LD D,(IX+0) | D=the next note byte from IX+0. | ||
37113 | INC IX | Move the index onto the next note. | ||
37115 | LD A,B | |||
37116 | AND A | |||
37117 | JR NZ,Intro_Music_Play | |||
37119 | INC A | |||
37120 | CP C | |||
37121 | JR NZ,Intro_Music_Play | |||
Introduce a small delay.
|
||||
37123 | LD BC,2804 | BC=2804. | ||
Intro_Music_Delay | 37126 | DEC BC | Decrease BC by one. | |
37127 | LD A,B | Jump back to Intro_Music_Delay until BC is zero. | ||
37128 | OR C | |||
37129 | JR NZ,Intro_Music_Delay | |||
Jump back to continue playing the music.
|
||||
37131 | JR Intro_Music_Loop | Jump to Intro_Music_Loop. | ||
Process the note data and create the sounds.
|
||||
Intro_Music_Play | 37133 | PUSH BC | Stash BC on the stack. | |
37134 | LD A,H | |||
37135 | OUT (254),A | |||
Intro_Music_Delay_1 | 37137 | DEC BC | Decrease BC by one. | |
37138 | LD A,B | Jump back to Intro_Music_Delay_1 until BC is zero. | ||
37139 | OR C | |||
37140 | JR NZ,Intro_Music_Delay_1 | |||
37142 | LD A,L | |||
37143 | OUT (254),A | |||
37145 | POP BC | Restore BC from the stack. | ||
37146 | PUSH BC | But stash a copy of it back on the stack for the next loop. | ||
Intro_Music_Delay_2 | 37147 | DEC BC | Decrease BC by one. | |
37148 | LD A,B | Jump back to Intro_Music_Delay_2 until BC is zero. | ||
37149 | OR C | |||
37150 | JR NZ,Intro_Music_Delay_2 | |||
37152 | POP BC | Restore BC from the stack again. | ||
37153 | DEC DE | Decrease DE by one. | ||
37154 | LD A,D | Jump back to Intro_Music_Play until DE is zero. | ||
37155 | OR E | |||
37156 | JR NZ,Intro_Music_Play | |||
37158 | JR Intro_Music_Loop | Jump to Intro_Music_Loop. | ||
Intro_Music_Data | 37160 | DEFB 109,0,140,0 | ||
37164 | DEFB 1,0,0,0 | |||
37168 | DEFB 109,0,140,0 | |||
37172 | DEFB 1,0,0,0 | |||
37176 | DEFB 129,0,118,0 | |||
37180 | DEFB 1,0,0,0 | |||
37184 | DEFB 129,0,118,0 | |||
37188 | DEFB 1,0,0,0 | |||
37192 | DEFB 144,0,105,0 | |||
37196 | DEFB 1,0,0,0 | |||
37200 | DEFB 144,0,105,0 | |||
37204 | DEFB 1,0,0,0 | |||
37208 | DEFB 129,0,118,0 | |||
37212 | DEFB 1,0,0,0 | |||
37216 | DEFB 129,0,118,0 | |||
37220 | DEFB 1,0,0,0 | |||
37224 | DEFB 109,0,38,0 | |||
37228 | DEFB 1,0,0,0 | |||
37232 | DEFB 109,0,38,0 | |||
37236 | DEFB 1,0,0,0 | |||
37240 | DEFB 109,0,38,0 | |||
37244 | DEFB 1,0,0,0 | |||
37248 | DEFB 109,0,38,0 | |||
37252 | DEFB 1,0,0,0 | |||
37256 | DEFB 109,0,38,0 | |||
37260 | DEFB 1,0,0,0 | |||
37264 | DEFB 109,0,38,0 | |||
37268 | DEFB 1,0,0,0 | |||
37272 | DEFB 109,0,38,0 | |||
37276 | DEFB 1,0,0,0 | |||
37280 | DEFB 109,0,38,0 | |||
37284 | DEFB 1,0,0,0 | |||
37288 | DEFB 109,0,38,0 | |||
37292 | DEFB 1,0,0,0 | |||
37296 | DEFB 109,0,38,0 | |||
37300 | DEFB 1,0,0,0 | |||
37304 | DEFB 109,0,38,0 | |||
37308 | DEFB 1,0,0,0 | |||
37312 | DEFB 109,0,38,0 | |||
37316 | DEFB 1,0,0,0 | |||
37320 | DEFB 109,0,37,1 | |||
37324 | DEFB 1,0,0,0 | |||
37328 | DEFB 0,31,1,0 | |||
37332 | DEFB 0,0,0,0 | |||
37336 | DEFB 0,255,240,0 | |||
37340 | DEFB 0,0,0,0 | |||
37344 | DEFB 0,255,0,1 | |||
37348 | DEFB 3,6,13,27 | |||
37352 | DEFB 0,0,0,182 | |||
37356 | DEFB 109,219,182,109 | |||
37360 | DEFB 219,54,0,192 | |||
37364 | DEFB 182,109,219,182 | |||
37368 | DEFB 109,219,1,0 | |||
37372 | DEFB 216,182,109,219 |
Prev: 37022 | Up: Map | Next: 37376 |