Routines |
Prev: A7BA | Up: Map | Next: A884 |
Used by the routine at C95A.
|
||||
A7CE | LD HL,($A03E) | Set HL to the score | ||
A7D1 | CALL $A402 | Convert score number to list of charcodes | ||
A7D4 | LD A,($A0AA) | Set charcode ten thousands of score into 13th position of password | ||
A7D7 | LD ($A898),A | |||
A7DA | LD A,($A0A9) | Set charcode thousands of score into 2nd position of password | ||
A7DD | LD ($A88D),A | |||
A7E0 | LD A,($A0A8) | Set charcode of hundreds of score into 6th position of password | ||
A7E3 | LD ($A891),A | |||
A7E6 | LD A,($A0A7) | Set charcode of tens of score into 10th position of password | ||
A7E9 | LD ($A895),A | |||
A7EC | LD A,($A0A6) | Set charcode of units of score into 8th position of password | ||
A7EF | LD ($A893),A | |||
A7F2 | LD A,($A063) | Convert number of lives to list of charcodes | ||
A7F5 | LD L,A | |||
A7F6 | LD H,$00 | |||
A7F8 | CALL $A402 | |||
A7FB | LD A,($A0A6) | Set charcode of units of lives into 4th position of password | ||
A7FE | LD ($A88F),A | |||
A801 | LD A,($A050) | Set charcode $30 + double fire weapon available into 1st position of password | ||
A804 | ADD A,$30 | |||
A806 | LD ($A88C),A | |||
A809 | LD A,($A051) | Set charcode $30 + laser weapon available into 5th position of password | ||
A80C | ADD A,$30 | |||
A80E | LD ($A890),A | |||
A811 | LD A,($A052) | Set charcode $30 + multiple weapon available into 7th position of password | ||
A814 | ADD A,$30 | |||
A816 | LD ($A892),A | |||
A819 | LD A,($A053) | Set charcode $30 + spray weapon available into 3th position of password | ||
A81C | ADD A,$30 | |||
A81E | LD ($A88E),A | |||
A821 | LD A,($A04D) | Convert shield power to list of charcodes | ||
A824 | LD L,A | |||
A825 | LD H,$00 | |||
A827 | CALL $A402 | |||
A82A | LD A,($A0A7) | Set charcode of tens of shield power into 12th position of password | ||
A82D | LD ($A897),A | |||
A830 | LD A,($A0A6) | Set charcode of units of shield power into 9th position of password | ||
A833 | LD ($A894),A | |||
A836 | LD A,($A06C) | Convert number of smartbomb to list of charcodes | ||
A839 | LD L,A | |||
A83A | LD H,$00 | |||
A83C | CALL $A402 | |||
A83F | LD A,($A0A6) | Set charcode of units of smartbombs into 11th position of password | ||
A842 | LD ($A896),A | |||
A845 | LD B,$0D | For every charcode in the password substract the current number to 9. So 0 => 9 1 => 8 2 => 7 ... | ||
A847 | LD E,$00 | |||
A849 | LD ($A093),HL | |||
A84C | LD HL,$A88C | |||
A84F | LD C,(HL) | |||
A850 | LD A,$39 | |||
A852 | SUB C | |||
A853 | ADD A,$30 | |||
A855 | LD (HL),A | |||
A856 | SUB $30 | Set into E the protection code (checksum) Checksum will be the sum of all the digits of the code | ||
A858 | ADD A,E | |||
A859 | LD E,A | |||
A85A | INC HL | Increment address for the next charcode | ||
A85B | DJNZ $A84F | Jump until all charcodes processed | ||
A85D | LD L,E | Convet checksum to list of charcodes | ||
A85E | LD H,$00 | |||
A860 | CALL $A402 | |||
A863 | LD A,($A0A8) | Set the hundreds of checksum into 15th position of password | ||
A866 | LD ($A89A),A | |||
A869 | LD A,($A0A7) | Set the tens of checksum into 16th position of password | ||
A86C | LD ($A89B),A | |||
A86F | LD A,($A0A6) | Set the units of checksum into 14th position of password | ||
A872 | LD ($A899),A | |||
A875 | LD IX,$A884 | Set IX the address for the text definition of password | ||
A879 | LD B,$01 | Set B the number of lines to draw | ||
A87B | CALL $A13E | Draw windows with password | ||
A87E | CALL $97EA | Reset sound data and wait for FIRE key press | ||
A881 | JP $9498 | Jump to init game |
Prev: A7BA | Up: Map | Next: A884 |