![]() |
Routines |
Prev: 7B67 | Up: Map | Next: 7DD9 |
Used by the routines at GameEntryPoint and StartGame.
|
|||||
TitleScreen | 7C82 | DI | Disable interrupts. | ||
7C83 | XOR A | Set border to BLACK. | |||
7C84 | OUT ($FE),A | ||||
7C86 | LD ($5C48),A | Write BLACK to *BORDCR. | |||
7C89 | CALL ClearScreen | Call ClearScreen. | |||
More copy protection/ copyright checks.
Checks "MEGADODO SOFTWARE 1983" starts with an "M".
|
|||||
7C8C | LD A,($6435) | Jump to RestartSpectum if *Messaging_MegadodoSoftware is not equal to 4D (ASCII "M"). | |||
7C8F | CP $4D | ||||
7C91 | JR NZ,RestartSpectum | ||||
Checks "M.W.Ward" starts with an "M".
|
|||||
7C93 | LD A,($6456) | Compare *Messaging_Author with 4D (ASCII "M"). | |||
7C96 | CP $4D | ||||
RestartSpectum | 7C98 | JP NZ,$0000 | Restart the Spectrum if either string doesn't start with an "M". | ||
Draw a MegaDodo!
|
|||||
7C9B | LD HL,$404F | Set the screen buffer location 404F. | |||
7C9E | LD DE,$61BB | Point DE to the MegaDodo graphic: Graphics_MegaDodo. | |||
7CA1 | LD B,$02 | Set a counter in B for 02 rows. | |||
DrawMegaDodo_RowLoop | 7CA3 | PUSH BC | Stash the row counter on the stack. | ||
7CA4 | LD C,$02 | And a counter in C for 02 columns. | |||
DrawMegaDodo_ColumnLoop | 7CA6 | PUSH HL | Stash the screen position on the stack. | ||
7CA7 | LD B,$08 | Set a line counter in B (08 lines in a UDG). | |||
DrawMegaDodo_LineLoop | 7CA9 | LD A,(DE) | Copy the UDG data to the screen buffer. | ||
7CAA | LD (HL),A | ||||
7CAB | INC DE | Move to the next UDG graphic data byte. | |||
7CAC | INC H | Move down one pixel line in the screen buffer. | |||
7CAD | DJNZ DrawMegaDodo_LineLoop | Decrease the line counter by one and loop back to DrawMegaDodo_LineLoop until all 08 lines of the UDG character have been drawn. | |||
7CAF | POP HL | Restore the starting screen position from the stack. | |||
7CB0 | INC HL | Move right one character block. | |||
7CB1 | DEC C | Decrease the column counter by one. | |||
7CB2 | JR NZ,DrawMegaDodo_ColumnLoop | Jump to back DrawMegaDodo_ColumnLoop until the row has been populated. | |||
7CB4 | LD L,$6F | Update the screen position. | |||
7CB6 | POP BC | Restore the row counter from the stack. | |||
7CB7 | 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.
|
|||||
7CB9 | LD H,$58 | Update HL to the MegaDodo position in the attribute buffer. | |||
7CBB | LD A,$04 | Write INK:GREEN, PAPER:BLACK to the top two blocks. | |||
7CBD | LD (HL),A | ||||
7CBE | INC HL | ||||
7CBF | LD (HL),A | ||||
7CC0 | LD L,$4F | Update the attribute buffer positioning. | |||
7CC2 | LD (HL),A | Write the attribute to the bottom two blocks. | |||
7CC3 | INC HL | ||||
7CC4 | LD (HL),A | ||||
Prints
![]() |
|||||
7CC5 | LD HL,$6435 | HL=Messaging_MegadodoSoftware. | |||
7CC8 | LD DE,$40A7 | DE=40A7 (screen buffer location). | |||
7CCB | LD BC,$0905 | Set to print 09 characters in CYAN. | |||
7CCE | CALL Configurable_PrintString | Call Configurable_PrintString. | |||
Prints
![]() |
|||||
7CD1 | LD B,$08 | Printing 08 characters. | |||
7CD3 | LD E,$B1 | Update the screen buffer address. | |||
7CD5 | CALL Configurable_PrintString | Call Configurable_PrintString. | |||
Prints
![]() |
|||||
7CD8 | LD HL,$642B | HL=Messaging_Presents. | |||
7CDB | LD DE,$40EC | DE=40EC (screen buffer location). | |||
7CDE | LD BC,$0843 | Set to print 08 characters in INK:MAGENTA, PAPER:BLACK(BRIGHT). | |||
7CE1 | CALL SpectrumFont_PrintString | Call SpectrumFont_PrintString. | |||
Prints
![]() |
|||||
7CE4 | LD DE,$5023 | DE=5023 (screen buffer location). | |||
7CE7 | LD BC,$1842 | Set to print 18 characters in INK:RED, PAPER:BLACK(BRIGHT). | |||
7CEA | CALL SpectrumFont_PrintString | Call SpectrumFont_PrintString. | |||
Prints
![]() |
|||||
7CED | LD E,$66 | Update the screen buffer address. | |||
7CEF | LD BC,$1304 | Set to print 13 characters in GREEN. | |||
7CF2 | CALL SpectrumFont_PrintString | Call SpectrumFont_PrintString. | |||
Prints
![]() |
|||||
7CF5 | LD E,$E7 | Update the screen buffer address. | |||
7CF7 | LD BC,$1007 | Set to print 10 characters in WHITE. | |||
7CFA | CALL SpectrumFont_PrintString | Call SpectrumFont_PrintString. | |||
Colour the area where "PHEENIX" will be displayed.
|
|||||
7CFD | LD HL,$5900 | Write YELLOW to 0100 bytes from 5900 to 5A00 in the attribute buffer. | |||
7D00 | LD DE,$5901 | ||||
7D03 | LD BC,$00FF | ||||
7D06 | LD (HL),$06 | ||||
7D08 | LDIR | ||||
Write "PHEENIX" using the box graphic.
|
|||||
7D0A | LD B,$51 | Set a counter in B for 51 boxes. | |||
DrawBox_Loop | 7D0C | PUSH BC | Stash the box counter on the stack. | ||
7D0D | LD DE,$658A | DE=Table_PheenixLogoPositionData. | |||
Calculate the current position byte.
This is the position table + the total bytes - the counter (which counts down from 51). Which just means, the table data is evaluated in order, from start-to-finish.
|
|||||
7D10 | LD A,$51 | HL=Table_PheenixLogoPositionData+(51-B). | |||
7D12 | SUB B | ||||
7D13 | LD L,A | ||||
7D14 | LD H,$00 | ||||
7D16 | ADD HL,DE | ||||
Set the screen position to draw the box.
|
|||||
7D17 | LD L,(HL) | L=*HL. | |||
7D18 | LD H,$48 | H=48. | |||
Now draw the box.
|
|||||
7D1A | LD DE,$61E3 | Point DE to the box graphic: Graphics_Box. | |||
7D1D | LD B,$08 | Set a line counter in B (08 lines in a UDG). | |||
DrawBox_LineLoop | 7D1F | LD A,(DE) | Copy the UDG data to the screen buffer. | ||
7D20 | LD (HL),A | ||||
7D21 | INC DE | Move to the next UDG graphic data byte.. | |||
7D22 | INC H | Move down one pixel line in the screen buffer. | |||
7D23 | DJNZ DrawBox_LineLoop | Decrease the line counter by one and loop back to DrawBox_LineLoop until all 08 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.
|
|||||
7D25 | LD BC,$000A | Set a counter in BC for 000A loops. | |||
Input_StartGame_Loop | 7D28 | CALL Input_StartGame | Call Input_StartGame. | ||
7D2B | DJNZ Input_StartGame_Loop | Decrease the loop counter by one and loop back to Input_StartGame_Loop until the counter is zero. | |||
7D2D | DEC C | Decrease C by one. | |||
7D2E | JR NZ,Input_StartGame_Loop | Jump back to Input_StartGame_Loop until C is zero. | |||
7D30 | POP BC | Restore the box counter from the stack. | |||
7D31 | LD HL,$66F2 | Evaluate Flag_TitleScreenStart... | |||
7D34 | LD A,(HL) | ||||
7D35 | OR A | ||||
7D36 | LD (HL),$00 | Write 00 to *Flag_TitleScreenStart. | |||
7D38 | JP NZ,StartGame | Jump to StartGame if the player has pressed "S" to start. | |||
7D3B | 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.
|
|||||
7D3D | LD B,$38 | Set a counter in B for 38 colour loops. | |||
PheenixLogoFlash_Loop | 7D3F | PUSH BC | Stash the colour loop counter on the stack. | ||
7D40 | LD HL,$5900 | Fetch the attribute for the first byte in the attribute buffer where the "PHEENIX" logo is displayed. Store this in A. | |||
7D43 | LD A,(HL) | ||||
7D44 | INC A | Increment the attribute byte by one. | |||
7D45 | AND %00000111 | Keep only the INK bits (0-2). | |||
7D47 | JR NZ,PheenixLogoFlash_WriteAttributeByte | Jump to PheenixLogoFlash_WriteAttributeByte if the result is not zero (checking for BLACK). | |||
Don't use INK: BLACK...
|
|||||
7D49 | INC A | Increment A containing the attribute byte by one - to BLUE. | |||
PheenixLogoFlash_WriteAttributeByte | 7D4A | LD (HL),A | Write the attribute byte back to the attribute buffer. | ||
7D4B | LD DE,$5901 | Copy the attribute byte to the rest of the attribute buffer section containing the "PHEENIX" logo. This is 00FF bytes, from 5901 to 5A00. | |||
7D4E | LD BC,$00FF | ||||
7D51 | LDIR | ||||
Check a few times for the player pressing "S" to start the game.
|
|||||
7D53 | LD BC,$0010 | Set a counter in BC for 0010 loops. | |||
Input_StartGameColourFlash_Loop | 7D56 | CALL Input_StartGame | Call Input_StartGame. | ||
7D59 | DJNZ Input_StartGameColourFlash_Loop | Decrease the loop counter by one and loop back to Input_StartGameColourFlash_Loop until the counter is zero. | |||
7D5B | DEC C | Decrease C by one. | |||
7D5C | JR NZ,Input_StartGameColourFlash_Loop | Jump to Input_StartGameColourFlash_Loop until C is zero. | |||
7D5E | POP BC | Restore the colour loop counter from the stack. | |||
7D5F | LD HL,$66F2 | Evaluate Flag_TitleScreenStart... | |||
7D62 | LD A,(HL) | ||||
7D63 | OR A | ||||
7D64 | LD (HL),$00 | Write 00 to *Flag_TitleScreenStart. | |||
7D66 | JR NZ,StartGame | Jump to StartGame if the player has pressed "S" to start. | |||
7D68 | DJNZ PheenixLogoFlash_Loop | Decrease counter by one and loop back to PheenixLogoFlash_Loop until counter is zero. | |||
Start "Demo Mode".
|
|||||
7D6A | XOR A | Write 00 to *Flag_GameOver. | |||
7D6B | LD ($66F5),A | ||||
7D6E | INC A | Write 01 to; | |||
7D6F | LD ($66F3),A | ||||
7D72 | LD ($66EF),A | ||||
7D75 | LD A,$04 | Write 04 to *66F1. | |||
7D77 | LD ($66F1),A | ||||
7D7A | INC A | Write 05 to *Player_Lives. | |||
7D7B | LD ($66F0),A | ||||
Set the level text in the header.
|
|||||
7D7E | LD A,$32 | Write 32 (ASCII "2") to *Messaging_Header_LevelNumber. | |||
7D80 | LD ($6527),A | ||||
7D83 | LD A,$06 | Write 06 to *6898. | |||
7D85 | LD ($6898),A | ||||
7D88 | CALL TransitionEffect | Call TransitionEffect. | |||
7D8B | CALL $740C | Call 740C. | |||
Demo_Loop | 7D8E | PUSH BC | Stash BC on the stack. | ||
7D8F | LD A,B | A=B. | |||
7D90 | AND %00001111 | Keep only bits 0-3. | |||
7D92 | PUSH AF | Stash AF on the stack. | |||
7D93 | LD A,B | A=B. | |||
7D94 | RRCA | RRCA. | |||
7D95 | RRCA | RRCA. | |||
7D96 | AND %00000111 | Keep only bits 0-2. | |||
7D98 | JR NZ,TitleScreen_0 | Jump to TitleScreen_0 if A is not equal to A. | |||
7D9A | INC A | Increment A by one. | |||
TitleScreen_0 | 7D9B | LD C,A | C=A. | ||
7D9C | LD B,$10 | Set B to print 10 characters. | |||
Prints
![]() |
|||||
7D9E | LD HL,$645E | HL=Messaging_PressSToStart. | |||
7DA1 | LD DE,$4027 | DE=4027 (screen buffer location). | |||
7DA4 | CALL SpectrumFont_PrintString | Call SpectrumFont_PrintString. | |||
7DA7 | POP AF | Restore AF from the stack. | |||
7DA8 | JR NZ,TitleScreen_1 | Jump to TitleScreen_1 if A is not equal to A. | |||
7DAA | CALL $670E | Call 670E. | |||
7DAD | LD ($66F4),A | Write A to *66F4. | |||
TitleScreen_1 | 7DB0 | CALL $6CEE | Call 6CEE. | ||
7DB3 | CALL $7616 | Call 7616. | |||
7DB6 | CALL Handler_Aliens | Call Handler_Aliens. | |||
7DB9 | CALL $79B2 | Call 79B2. | |||
7DBC | CALL $7254 | Call 7254. | |||
7DBF | CALL $6890 | Call 6890. | |||
7DC2 | CALL Input_StartGame | Call Input_StartGame. | |||
7DC5 | POP BC | Restore BC from the stack. | |||
7DC6 | LD HL,$66F2 | Evaluate Flag_TitleScreenStart... | |||
7DC9 | LD A,(HL) | ||||
7DCA | OR A | ||||
7DCB | LD (HL),$00 | Write 00 to *Flag_TitleScreenStart. | |||
7DCD | JR NZ,StartGame | Jump to StartGame if the player has pressed "S" to start. | |||
7DCF | LD A,($66F5) | Jump to TitleScreen if *Flag_GameOver is not zero. | |||
7DD2 | OR A | ||||
7DD3 | JP NZ,TitleScreen | ||||
7DD6 | INC B | Increment B by one. | |||
7DD7 | JR Demo_Loop | Jump to Demo_Loop. |
Prev: 7B67 | Up: Map | Next: 7DD9 |