Prev: 30683 Up: Map Next: 30999
30795: Display Title Screen
Used by the routine at TitleScreen.
title-screen
DisplayTitleScreen 30795 LD A,2 A=2.
30797 CALL 5633 Call CHAN_OPEN.
30800 LD A,4 Set the border to GREEN using BORDER.
30802 CALL 8859
30805 SET 3,(IY+1) Set bit 3 of *FLAGS which sets keyboard mode "L".
30809 SET 3,(IY+48) Set bit 3 of *FLAGS2 which sets CAPS LOCK "on".
Set the UDG graphics pointer.
30813 LD HL,62409 Write 62409 (CustomFont) to *CHARS.
30816 LD (23606),HL
30819 LD A,39 Write INK: WHITE, PAPER: GREEN to *ATTR_P.
30821 LD (23693),A
30824 LD A,32 Write INK: BLACK, PAPER: GREEN to *BORDCR.
30826 LD (23624),A
30829 CALL 3503 Call CL_ALL.
Draw three sections which are white on the left, and black on the right:
empty-sections
Set the point in the attribute buffer where the black sections will begin.
30832 LD HL,22561 HL=22561 (attribute buffer location).
30835 LD B,3 Set a counter for the three sections to paint.
TitleScreen_SectionLoop 30837 PUSH BC Stash the section counter on the stack.
30838 LD C,6 In each section there are six rows, so set another counter for this.
TitleScreen_RowLoop 30840 LD B,30 The entire length of each row is 30 character blocks.
TitleScreen_Row 30842 LD A,B Is the current position 23 ... This is the split for white/ black.
30843 CP 23
30845 LD A,120 A=INK: BLACK, PAPER: WHITE (BRIGHT) .
30847 JR NC,TitleScreen_Paint Jump to TitleScreen_Paint if the current position was 23 on line TitleScreen_Row.
30849 LD A,7 A=INK: WHITE, PAPER: BLACK .
TitleScreen_Paint 30851 LD (HL),A Write the attribute byte to the pointer held in HL.
30852 INC HL Increment the attribute buffer pointer by one.
30853 DJNZ TitleScreen_Row Decrease the length counter by one and loop back to TitleScreen_Row until the counter is zero.
30855 INC HL Increment the attribute buffer pointer by two, this moves to the start of the next row.
30856 INC HL
30857 DEC C Decrease the row counter by one and jump back to TitleScreen_RowLoop until all rows have been painted.
30858 JR NZ,TitleScreen_RowLoop
This section is now completely painted so move onto the next one.
30860 LD DE,32 Move to the next section.
30863 ADD HL,DE
30864 POP BC Restore the section counter from the stack.
30865 DJNZ TitleScreen_SectionLoop Decrease the section counter by one and loop back to TitleScreen_SectionLoop until all three sections have been painted.
Now print the icons in each box:
options
30867 LD DE,31309 Set a pointer in DE where the icon graphics begin: Graphics_KeyboardIcon.
Set up printing the keyboard icon.
30870 LD HL,16417 HL=16417 (screen buffer location).
30873 LD BC,2096 BC=2096 (width/ length).
30876 PUSH BC Stash the width/ length on the stack.
30877 CALL PrintGraphic Call PrintGraphic.
30880 POP BC Restore the width/ length from the stack.
30881 LD HL,22561 HL=22561 (attribute buffer location).
30884 CALL WriteAttributeData Call WriteAttributeData.
Set up printing the joystick icon.
30887 LD HL,18433 HL=18433 (screen buffer location).
30890 LD BC,2088 BC=2088 (width/ length).
30893 CALL PrintGraphic Call PrintGraphic.
Set up printing the information icon.
30896 LD HL,18660 HL=18660 (screen buffer location).
30899 LD BC,552 BC=552 (width/ length).
30902 PUSH BC Stash the width/ length on the stack.
30903 CALL PrintGraphic Call PrintGraphic.
30906 POP BC Restore the width/ length from the stack.
30907 LD HL,23012 HL=23012 (attribute buffer location).
30910 CALL WriteAttributeData Call WriteAttributeData.
Now handle printing the text.
30913 LD DE,31025 DE=Messaging_TitleScreen.
30916 LD BC,199 BC=0199.
30919 CALL 8252 Call PR_STRING.
30922 LD A,1 A=1.
30924 CALL 5633 Call CHAN_OPEN.
30927 LD HL,31224 HL=Messaging_FooterCopyright.
30930 CALL 6269 Call OUT_LINE2.
30933 LD A,2 A=2.
30935 CALL 5633 Call CHAN_OPEN.
Lastly, print the current user-defined keys.
30938 LD HL,28525 HL=KeyboardKeymap.
30941 LD BC,5899 BC=5899.
PrintKeys_Loop 30944 PUSH BC Stash BC and HL on the stack.
30945 PUSH HL
30946 CALL 3554 Call 3554 (CL_SET).
30949 LD A,16 Set INK: WHITE.
30951 RST 16
30952 LD A,7
30954 RST 16
30955 LD A,17 Set PAPER: BLACK.
30957 RST 16
30958 XOR A
30959 RST 16
30960 POP HL Restore HL from the stack.
30961 PUSH HL Stash HL on the stack.
30962 LD A,(HL) A=*HL.
30963 CP 13 Jump to PrintEnter if the key is "enter".
30965 JR Z,PrintEnter
30967 CP 32 Jump to PrintSpace if the key is an ASCII "space".
30969 JR Z,PrintSpace
30971 RST 16 Print the key to the screen.
PrintKeys_Next 30972 POP HL Restore HL from the stack.
30973 INC HL Increment HL by two.
30974 INC HL
30975 POP BC Restore BC from the stack.
30976 DEC B Decrease B by one.
30977 LD A,B Jump back to PrintKeys_Loop until B is equal to 18.
30978 CP 18
30980 JR NZ,PrintKeys_Loop
30982 RET Return.
Prints the word "ENTER".
PrintEnter 30983 LD HL,31303 HL=Messaging_Enter.
30986 CALL 6269 Call OUT_LINE2.
30989 JR PrintKeys_Next Jump to PrintKeys_Next.
Prints the word "SPACE".
PrintSpace 30991 LD HL,31297 HL=Messaging_Space.
30994 CALL 6269 Call OUT_LINE2.
30997 JR PrintKeys_Next Jump to PrintKeys_Next.
Prev: 30683 Up: Map Next: 30999