Prev: 31591 Up: Map Next: 32217
31874: Title Screen
Used by the routines at GameEntryPoint and StartGame.
title-screen-animation
TitleScreen 31874 DI Disable interrupts.
31875 XOR A Set border to BLACK.
31876 OUT (254),A
31878 LD (23624),A Write BLACK to *BORDCR.
31881 CALL ClearScreen Call ClearScreen.
More copy protection/ copyright checks.
Checks "MEGADODO SOFTWARE 1983" starts with an "M".
31884 LD A,(25653) Jump to RestartSpectum if *Messaging_MegadodoSoftware is not equal to 77 (ASCII "M").
31887 CP 77
31889 JR NZ,RestartSpectum
Checks "M.W.Ward" starts with an "M".
31891 LD A,(25686) Compare *Messaging_Author with 77 (ASCII "M").
31894 CP 77
RestartSpectum 31896 JP NZ,0 Restart the Spectrum if either string doesn't start with an "M".
Draw a MegaDodo!
megadodo-logo
31899 LD HL,16463 Set the screen buffer location 16463.
31902 LD DE,25019 Point DE to the MegaDodo graphic: Graphics_MegaDodo.
31905 LD B,2 Set a counter in B for 2 rows.
DrawMegaDodo_RowLoop 31907 PUSH BC Stash the row counter on the stack.
31908 LD C,2 And a counter in C for 2 columns.
DrawMegaDodo_ColumnLoop 31910 PUSH HL Stash the screen position on the stack.
31911 LD B,8 Set a line counter in B (8 lines in a UDG).
DrawMegaDodo_LineLoop 31913 LD A,(DE) Copy the UDG data to the screen buffer.
31914 LD (HL),A
31915 INC DE Move to the next UDG graphic data byte.
31916 INC H Move down one pixel line in the screen buffer.
31917 DJNZ DrawMegaDodo_LineLoop Decrease the line counter by one and loop back to DrawMegaDodo_LineLoop until all 8 lines of the UDG character have been drawn.
31919 POP HL Restore the starting screen position from the stack.
31920 INC HL Move right one character block.
31921 DEC C Decrease the column counter by one.
31922 JR NZ,DrawMegaDodo_ColumnLoop Jump to back DrawMegaDodo_ColumnLoop until the row has been populated.
31924 LD L,111 Update the screen position.
31926 POP BC Restore the row counter from the stack.
31927 DJNZ DrawMegaDodo_RowLoop Decrease the row counter by one and loop back to DrawMegaDodo_RowLoop until both rows have been drawn to the screen buffer.
Colour the MegaDodo graphic.
31929 LD H,88 Update HL to the MegaDodo position in the attribute buffer.
31931 LD A,4 Write INK:GREEN, PAPER:BLACK to the top two blocks.
31933 LD (HL),A
31934 INC HL
31935 LD (HL),A
31936 LD L,79 Update the attribute buffer positioning.
31938 LD (HL),A Write the attribute to the bottom two blocks.
31939 INC HL
31940 LD (HL),A
Prints megadodo
31941 LD HL,25653 HL=Messaging_MegadodoSoftware.
31944 LD DE,16551 DE=16551 (screen buffer location).
31947 LD BC,2309 Set to print 9 characters in CYAN.
31950 CALL Configurable_PrintString Call Configurable_PrintString.
Prints software
31953 LD B,8 Printing 8 characters.
31955 LD E,177 Update the screen buffer address.
31957 CALL Configurable_PrintString Call Configurable_PrintString.
Prints presents
31960 LD HL,25643 HL=Messaging_Presents.
31963 LD DE,16620 DE=16620 (screen buffer location).
31966 LD BC,2115 Set to print 8 characters in INK:MAGENTA, PAPER:BLACK(BRIGHT).
31969 CALL SpectrumFont_PrintString Call SpectrumFont_PrintString.
Prints megadodo-software
31972 LD DE,20515 DE=20515 (screen buffer location).
31975 LD BC,6210 Set to print 24 characters in INK:RED, PAPER:BLACK(BRIGHT).
31978 CALL SpectrumFont_PrintString Call SpectrumFont_PrintString.
Prints written-by
31981 LD E,102 Update the screen buffer address.
31983 LD BC,4868 Set to print 19 characters in GREEN.
31986 CALL SpectrumFont_PrintString Call SpectrumFont_PrintString.
Prints s-to-start
31989 LD E,231 Update the screen buffer address.
31991 LD BC,4103 Set to print 16 characters in WHITE.
31994 CALL SpectrumFont_PrintString Call SpectrumFont_PrintString.
Colour the area where "PHEENIX" will be displayed.
31997 LD HL,22784 Write YELLOW to 256 bytes from 22784 to 23040 in the attribute buffer.
32000 LD DE,22785
32003 LD BC,255
32006 LD (HL),6
32008 LDIR
pheenix
Write "PHEENIX" using the box graphic.
32010 LD B,81 Set a counter in B for 81 boxes.
DrawBox_Loop 32012 PUSH BC Stash the box counter on the stack.
32013 LD DE,25994 DE=Table_PheenixLogoPositionData.
Calculate the current position byte.
This is the position table + the total bytes - the counter (which counts down from 81). Which just means, the table data is evaluated in order, from start-to-finish.
32016 LD A,81 HL=Table_PheenixLogoPositionData+(81-B).
32018 SUB B
32019 LD L,A
32020 LD H,0
32022 ADD HL,DE
Set the screen position to draw the box.
32023 LD L,(HL) L=*HL.
32024 LD H,72 H=72.
Now draw the box.
32026 LD DE,25059 Point DE to the box graphic: Graphics_Box.
32029 LD B,8 Set a line counter in B (8 lines in a UDG).
DrawBox_LineLoop 32031 LD A,(DE) Copy the UDG data to the screen buffer.
32032 LD (HL),A
32033 INC DE Move to the next UDG graphic data byte..
32034 INC H Move down one pixel line in the screen buffer.
32035 DJNZ DrawBox_LineLoop Decrease the line counter by one and loop back to DrawBox_LineLoop until all 8 lines of the UDG character have been drawn.
Check a few times for the player pressing "S" to start the game.
This has the effect of slowing the drawing down, so "PHEENIX" doesn't just appear instantly - rather it's drawn, one box at a time.
32037 LD BC,10 Set a counter in BC for 0010 loops.
Input_StartGame_Loop 32040 CALL Input_StartGame Call Input_StartGame.
32043 DJNZ Input_StartGame_Loop Decrease the loop counter by one and loop back to Input_StartGame_Loop until the counter is zero.
32045 DEC C Decrease C by one.
32046 JR NZ,Input_StartGame_Loop Jump back to Input_StartGame_Loop until C is zero.
32048 POP BC Restore the box counter from the stack.
32049 LD HL,26354 Evaluate Flag_TitleScreenStart...
32052 LD A,(HL)
32053 OR A
32054 LD (HL),0 Write 0 to *Flag_TitleScreenStart.
32056 JP NZ,StartGame Jump to StartGame if the player has pressed "S" to start.
32059 DJNZ DrawBox_Loop Decrease the box counter by one and loop back to DrawBox_Loop until all all the game name has been drawn out in boxes.
Flash the "PHEENIX" logo.
32061 LD B,56 Set a counter in B for 56 colour loops.
PheenixLogoFlash_Loop 32063 PUSH BC Stash the colour loop counter on the stack.
32064 LD HL,22784 Fetch the attribute for the first byte in the attribute buffer where the "PHEENIX" logo is displayed. Store this in A.
32067 LD A,(HL)
32068 INC A Increment the attribute byte by one.
32069 AND %00000111 Keep only the INK bits (0-2).
32071 JR NZ,PheenixLogoFlash_WriteAttributeByte Jump to PheenixLogoFlash_WriteAttributeByte if the result is not zero (checking for BLACK).
Don't use INK: BLACK...
32073 INC A Increment A containing the attribute byte by one - to BLUE.
PheenixLogoFlash_WriteAttributeByte 32074 LD (HL),A Write the attribute byte back to the attribute buffer.
32075 LD DE,22785 Copy the attribute byte to the rest of the attribute buffer section containing the "PHEENIX" logo. This is 0255 bytes, from 22785 to 23040.
32078 LD BC,255
32081 LDIR
Check a few times for the player pressing "S" to start the game.
32083 LD BC,16 Set a counter in BC for 0016 loops.
Input_StartGameColourFlash_Loop 32086 CALL Input_StartGame Call Input_StartGame.
32089 DJNZ Input_StartGameColourFlash_Loop Decrease the loop counter by one and loop back to Input_StartGameColourFlash_Loop until the counter is zero.
32091 DEC C Decrease C by one.
32092 JR NZ,Input_StartGameColourFlash_Loop Jump to Input_StartGameColourFlash_Loop until C is zero.
32094 POP BC Restore the colour loop counter from the stack.
32095 LD HL,26354 Evaluate Flag_TitleScreenStart...
32098 LD A,(HL)
32099 OR A
32100 LD (HL),0 Write 0 to *Flag_TitleScreenStart.
32102 JR NZ,StartGame Jump to StartGame if the player has pressed "S" to start.
32104 DJNZ PheenixLogoFlash_Loop Decrease counter by one and loop back to PheenixLogoFlash_Loop until counter is zero.
Start "Demo Mode".
32106 XOR A Write 0 to *Flag_GameOver.
32107 LD (26357),A
32110 INC A Write 1 to;
32111 LD (26355),A
32114 LD (26351),A
32117 LD A,4 Write 4 to *26353.
32119 LD (26353),A
32122 INC A Write 5 to *Player_Lives.
32123 LD (26352),A
Set the level text in the header.
32126 LD A,50 Write 50 (ASCII "2") to *Messaging_Header_LevelNumber.
32128 LD (25895),A
32131 LD A,6 Write 6 to *26776.
32133 LD (26776),A
32136 CALL TransitionEffect Call TransitionEffect.
32139 CALL 29708 Call 29708.
Demo_Loop 32142 PUSH BC Stash BC on the stack.
32143 LD A,B A=B.
32144 AND %00001111 Keep only bits 0-3.
32146 PUSH AF Stash AF on the stack.
32147 LD A,B A=B.
32148 RRCA RRCA.
32149 RRCA RRCA.
32150 AND %00000111 Keep only bits 0-2.
32152 JR NZ,TitleScreen_0 Jump to TitleScreen_0 if A is not equal to A.
32154 INC A Increment A by one.
TitleScreen_0 32155 LD C,A C=A.
32156 LD B,16 Set B to print 16 characters.
Prints s-to-start
32158 LD HL,25694 HL=Messaging_PressSToStart.
32161 LD DE,16423 DE=16423 (screen buffer location).
32164 CALL SpectrumFont_PrintString Call SpectrumFont_PrintString.
32167 POP AF Restore AF from the stack.
32168 JR NZ,TitleScreen_1 Jump to TitleScreen_1 if A is not equal to A.
32170 CALL 26382 Call 26382.
32173 LD (26356),A Write A to *26356.
TitleScreen_1 32176 CALL 27886 Call 27886.
32179 CALL 30230 Call 30230.
32182 CALL Handler_Aliens Call Handler_Aliens.
32185 CALL 31154 Call 31154.
32188 CALL 29268 Call 29268.
32191 CALL 26768 Call 26768.
32194 CALL Input_StartGame Call Input_StartGame.
32197 POP BC Restore BC from the stack.
32198 LD HL,26354 Evaluate Flag_TitleScreenStart...
32201 LD A,(HL)
32202 OR A
32203 LD (HL),0 Write 0 to *Flag_TitleScreenStart.
32205 JR NZ,StartGame Jump to StartGame if the player has pressed "S" to start.
32207 LD A,(26357) Jump to TitleScreen if *Flag_GameOver is not zero.
32210 OR A
32211 JP NZ,TitleScreen
32214 INC B Increment B by one.
32215 JR Demo_Loop Jump to Demo_Loop.
Prev: 31591 Up: Map Next: 32217