Prev: 29370 Up: Map Next: 32768
30300: Update Heading
Used by the routine at Update_Frame.
When *Phase is 2 updates *Heading and *Heading_Y from *Heading_Bits. When *Phase is 1 updates *View_Angle from *Angle_Delta.
Update_Heading 30300 LD A,(61268) Fetch *Phase.
30303 DEC A Decrease A by one.
30304 JR Z,Update_Heading_7 Jump to Update_Heading_7 if zero.
30306 DEC A Decrease A by one.
30307 RET NZ Return if non-zero.
30308 LD A,(61139) Fetch *Heading_Bits.
30311 AND %00011110 AND $1E.
30313 CP 30 CP $1E.
30315 RET Z Return if zero.
30316 RRA RRA.
30317 LD B,A LD B,A.
30318 LD HL,(61042) Fetch *Heading.
30321 LD DE,(61046) Fetch *Heading_Delta_A.
30325 RR B RR B.
30327 JR C,Update_Heading_1 Jump to Update_Heading_1 if carry is set.
30329 ADD HL,DE Add DE.
This entry point is used by the routine at Drift_Slot_Table.
Update_Heading_0 30330 BIT 7,H BIT 7,H.
30332 JR NZ,Update_Heading_3 Jump to Update_Heading_3 if non-zero.
30334 EX DE,HL Swap DE with HL.
30335 LD HL,128 Set HL to 128.
30338 AND A Clear carry.
30339 SBC HL,DE Subtract DE.
30341 EX DE,HL Swap DE with HL.
30342 JR NC,Update_Heading_3 Jump to Update_Heading_3 if carry is reset.
30344 LD HL,(61042) Fetch *Heading.
30347 JR Update_Heading_3 Jump to Update_Heading_3.
Update_Heading_1 30349 RR B RR B.
30351 JR C,Update_Heading_2 Jump to Update_Heading_2 if carry is set.
30353 AND A Clear carry.
30354 SBC HL,DE Subtract DE.
30356 BIT 7,H BIT 7,H.
30358 JR Z,Update_Heading_2 Jump to Update_Heading_2 if zero.
30360 EX DE,HL Swap DE with HL.
30361 LD HL,128 Set HL to 128.
30364 ADD HL,DE Add DE.
30365 EX DE,HL Swap DE with HL.
30366 JR NC,Update_Heading_4 Jump to Update_Heading_4 if carry is reset.
Update_Heading_2 30368 LD (61042),HL Write the pointer to *Heading.
30371 JR Update_Heading_4 Jump to Update_Heading_4.
Update_Heading_3 30373 RR B RR B.
30375 LD (61042),HL Write the pointer to *Heading.
Update_Heading_4 30378 LD HL,(61173) Fetch *Heading_Y.
30381 RR B RR B.
30383 LD DE,(61044) Fetch *Heading_Delta_B.
30387 JR C,Update_Heading_5 Jump to Update_Heading_5 if carry is set.
30389 ADD HL,DE Add DE.
30390 BIT 7,H BIT 7,H.
30392 JR NZ,Update_Heading_5 Jump to Update_Heading_5 if non-zero.
30394 EX DE,HL Swap DE with HL.
30395 LD HL,64 Set HL to 64.
30398 AND A Clear carry.
30399 SBC HL,DE Subtract DE.
30401 EX DE,HL Swap DE with HL.
30402 JR NC,Update_Heading_6 Jump to Update_Heading_6 if carry is reset.
30404 LD HL,(61173) Fetch *Heading_Y.
30407 JR Update_Heading_6 Jump to Update_Heading_6.
Update_Heading_5 30409 RR B RR B.
30411 JR C,Update_Heading_6 Jump to Update_Heading_6 if carry is set.
30413 AND A Clear carry.
30414 SBC HL,DE Subtract DE.
30416 BIT 7,H BIT 7,H.
30418 JR Z,Update_Heading_6 Jump to Update_Heading_6 if zero.
30420 EX DE,HL Swap DE with HL.
30421 LD HL,64 Set HL to 64.
30424 ADD HL,DE Add DE.
30425 EX DE,HL Swap DE with HL.
30426 RET NC Return if carry is reset.
Update_Heading_6 30427 LD (61173),HL Write the pointer to *Heading_Y.
30430 RET Return.
Update_Heading_7 30431 LD A,(61332) Fetch *Angle_Delta.
30434 AND A Clear carry.
30435 JR NZ,Update_Heading_9 Jump to Update_Heading_9 if non-zero.
30437 LD A,(61333) Fetch *Angle_Byte.
30440 AND A Clear carry.
30441 JR Z,Update_Heading_11 Jump to Update_Heading_11 if zero.
30443 LD A,(60973) Fetch *View_Angle.
30446 ADD A,A ADD A,A.
30447 LD A,(61334) Fetch *Angle_Limit.
30450 JR NC,Update_Heading_8 Jump to Update_Heading_8 if carry is reset.
30452 NEG Negate A.
Update_Heading_8 30454 LD (61332),A Write the value to *Angle_Delta.
Update_Heading_9 30457 LD HL,60973 Point HL at View_Angle.
30460 LD A,(61332) Fetch *Angle_Delta.
30463 LD B,(HL) LD B,(HL).
30464 ADD A,B ADD A,B.
30465 LD (HL),A LD (HL),A.
30466 JP PE,Update_Heading_10 Jump to Update_Heading_10 if overflow is set.
30469 XOR B XOR B.
30470 ADD A,A ADD A,A.
30471 JR NC,Update_Heading_10 Jump to Update_Heading_10 if carry is reset.
30473 XOR A Clear A.
30474 LD (HL),A LD (HL),A.
30475 LD (61332),A Write the value to *Angle_Delta.
Update_Heading_10 30478 XOR A Clear A.
30479 LD (61333),A Write the value to *Angle_Byte.
30482 RET Return.
Update_Heading_11 30483 LD A,(61139)
30486 AND 30
30488 CP 30
30490 JP Z,Update_Heading_23
30493 RRA
30494 LD B,A
30495 LD HL,(61042)
30498 RR B
30500 LD DE,(61335)
30504 JR C,Update_Heading_12
30506 RR B
30508 ADD HL,DE
30509 BIT 7,H
30511 JR NZ,Update_Heading_13
30513 LD HL,(61042)
30516 JR Update_Heading_13
Update_Heading_12 30518 RR B
30520 JR C,Update_Heading_13
30522 AND A
30523 SBC HL,DE
30525 EX DE,HL
30526 LD HL,192
30529 ADD HL,DE
30530 EX DE,HL
30531 JR NC,Update_Heading_14
Update_Heading_13 30533 LD (61042),HL
Update_Heading_14 30536 LD A,(61331)
30539 RR B
30541 JR C,Update_Heading_15
30543 NEG
30545 JR Update_Heading_16
Update_Heading_15 30547 RR B
30549 JR C,Update_Heading_23
Update_Heading_16 30551 LD B,A
30552 LD A,(60973)
30555 ADD A,B
30556 BIT 7,A
30558 JR Z,Update_Heading_17
30560 CP 240
30562 JR C,Update_Heading_18
30564 LD (60973),A
30567 JR Update_Heading_18
Update_Heading_17 30569 CP 17
30571 JR NC,Update_Heading_18
30573 LD (60973),A
Update_Heading_18 30576 LD A,(60973)
30579 ADD A,A
30580 RET Z
30581 ADD A,A
30582 LD E,A
30583 LD D,0
30585 JR NC,Update_Heading_19
30587 DEC D
Update_Heading_19 30588 LD A,(61314)
30591 AND A
30592 JR Z,Update_Heading_20
30594 LD IX,60160
30598 LD B,A
30599 LD C,11
30601 CALL Update_Heading_22
Update_Heading_20 30604 LD A,(61341)
30607 AND A
30608 JR Z,Update_Heading_21
30610 LD B,A
30611 LD IX,23296
30615 LD C,6
30617 CALL Update_Heading_22
Update_Heading_21 30620 LD A,(61312)
30623 AND A
30624 RET Z
30625 LD B,A
30626 LD C,16
30628 LD IX,58496
30632 CALL Update_Heading_22
30635 RET
Update_Heading_22 30636 LD L,(IX+1)
30639 LD H,(IX+2)
30642 ADD HL,DE
30643 LD (IX+1),L
30646 LD (IX+2),H
30649 LD A,B
30650 LD B,0
30652 ADD IX,BC
30654 LD B,A
30655 DJNZ Update_Heading_22
30657 RET
Update_Heading_23 30658 LD A,(60973)
30661 AND A
30662 RET Z
30663 SUB 2
30665 BIT 7,A
30667 JR Z,Update_Heading_24
30669 ADD A,4
Update_Heading_24 30671 LD (60973),A
30674 JR Update_Heading_18
30676 NOP
30677 NOP
30678 NOP
30679 NOP
30680 NOP
30681 NOP
30682 NOP
30683 NOP
30684 NOP
30685 NOP
30686 NOP
30687 NOP
30688 NOP
30689 NOP
30690 NOP
30691 NOP
30692 NOP
30693 NOP
30694 NOP
30695 NOP
30696 NOP
30697 NOP
30698 NOP
30699 NOP
30700 LD A,(49244)
30703 LD D,A
30704 LD (HL),C
30705 LD C,243
30707 DEC C
30708 LD HL,50711
30711 LD E,91
30713 HALT
30714 HALT
30715 DEC DE
30716 INC BC
30717 INC DE
30718 NOP
30719 LD A,82
30721 LD A,B
30722 LD E,(HL)
30723 LD A,B
30724 LD L,D
30725 LD A,B
30726 HALT
30727 LD A,B
30728 SUB H
30729 LD A,B
30730 OR D
30731 LD A,B
30732 CP (HL)
30733 LD A,B
30734 JP Z,Update_Frame_2
30737 LD A,B
30738 LD E,121
30740 DEC H
30741 LD A,C
30742 INC L
30743 LD A,C
30744 INC SP
30745 LD A,C
30746 INC A
30747 LD A,C
30748 LD B,E
30749 LD A,C
30750 LD C,D
30751 LD A,C
30752 LD D,C
30753 LD A,C
30754 LD E,D
30755 LD A,C
30756 LD H,C
30757 LD A,C
30758 LD L,B
30759 LD A,C
30760 LD (HL),C
30761 LD A,C
30762 LD A,E
30763 LD A,C
30764 ADD A,D
30765 LD A,C
30766 ADC A,H
30767 LD A,C
30768 SUB E
30769 LD A,C
30770 SBC A,D
30771 LD A,C
30772 AND E
30773 LD A,C
30774 XOR H
30775 LD A,C
30776 OR H
30777 LD A,C
30778 CP E
30779 LD A,C
30780 JP Reprint_Status_3
30783 LD A,C
30784 JP NC,Print_Phase_Digit_10
30787 LD A,C
30788 AND 121
30790 OUT (C),A
30792 CALL P,64377
30795 LD A,C
30796 LD (BC),A
30797 LD A,D
30798 LD A,(BC)
30799 LD A,D
30800 LD (DE),A
30801 LD A,D
30802 JR Update_Heading_25
Update_Heading_25 30804 NOP
30805 NOP
30806 NOP
30807 LD BC,0
30810 NOP
30811 NOP
30812 NOP
30813 LD C,16
30815 NOP
30816 NOP
30817 LD B,B
30818 LD H,B
30819 LD BC,0
30822 NOP
30823 CP 0
30825 EX AF,AF'
30826 DJNZ Update_Heading_26
Update_Heading_26 30828 NOP
30829 LD B,B
30830 RET PO
30831 LD BC,0
30834 NOP
30835 LD (BC),A
30836 NOP
30837 EX AF,AF'
30838 LD A,(BC)
30839 NOP
30840 ADD A,B
30841 NOP
30842 NOP
30843 INC B
30844 ADD A,B
30845 LD BC,128
30848 NOP
30849 LD BC,384
30852 ADD A,B
30853 RST 56
30854 NOP
30855 LD BC,65152
30858 ADD A,B
30859 NOP
30860 NOP
30861 LD BC,65152
30864 ADD A,B
30865 RST 56
30866 NOP
30867 LD BC,7
30870 ADD A,B
30871 NOP
30872 NOP
30873 INC B
30874 ADD A,B
30875 LD BC,128
30878 NOP
30879 LD BC,384
30882 ADD A,B
30883 RST 56
30884 NOP
30885 LD BC,65152
30888 ADD A,B
30889 NOP
30890 NOP
30891 LD BC,65152
30894 ADD A,B
30895 RST 56
30896 NOP
30897 LD BC,1
30900 LD (0),A
30903 LD BC,500
30906 NOP
30907 NOP
30908 NOP
30909 RRCA
30910 LD (BC),A
30911 NOP
30912 LD (0),A
30915 LD BC,65036
30918 NOP
30919 NOP
30920 NOP
30921 RRCA
30922 INC BC
30923 NOP
30924 INC D
30925 NOP
30926 NOP
30927 INC B
30928 NOP
30929 LD (BC),A
30930 NOP
30931 NOP
30932 NOP
30933 RRCA
30934 NOP
30935 CP 0
30937 NOP
30938 NOP
30939 RRCA
30940 NOP
30941 NOP
30942 NOP
30943 LD BC,3840
30946 NOP
30947 NOP
30948 NOP
30949 RST 56
30950 NOP
30951 RRCA
30952 LD B,0
30954 NOP
30955 NOP
30956 NOP
30957 EX AF,AF'
30958 NOP
30959 LD (BC),A
30960 NOP
30961 NOP
30962 NOP
30963 RRCA
30964 NOP
30965 CP 0
30967 NOP
30968 NOP
30969 RRCA
30970 NOP
30971 NOP
30972 NOP
30973 LD BC,3840
30976 NOP
30977 NOP
30978 NOP
30979 RST 56
30980 NOP
30981 RRCA
30982 NOP
30983 CP 0
30985 RST 56
30986 NOP
30987 RRCA
30988 NOP
30989 CP 0
30991 LD BC,3840
30994 NOP
30995 LD (BC),A
30996 NOP
30997 RST 56
30998 NOP
30999 RRCA
31000 NOP
31001 LD (BC),A
31002 NOP
31003 LD BC,3840
31006 LD BC,0
31009 NOP
31010 NOP
31011 NOP
31012 NOP
31013 LD B,(HL)
31014 RET PO
31015 NOP
31016 NOP
31017 NOP
31018 EX AF,AF'
31019 NOP
31020 LD B,(HL)
31021 RET PO
31022 NOP
31023 NOP
31024 NOP
31025 RET M
31026 NOP
31027 LD BC,216
31030 NOP
31031 NOP
31032 NOP
31033 LD (BC),A
31034 INC B
31035 DEC B
31036 LD E,216
31038 NOP
31039 NOP
31040 NOP
31041 LD C,0
31043 LD E,216
31045 NOP
31046 NOP
31047 NOP
31048 JP P,5120
31051 OUT (16),A
31053 NOP
31054 NOP
31055 NOP
31056 NOP
31057 LD A,(BC)
31058 OUT (16),A
31060 NOP
31061 NOP
31062 NOP
31063 LD (BC),A
31064 EX AF,AF'
31065 ADD HL,BC
31066 DEC BC
31067 OUT (16),A
31069 INC B
31070 NOP
31071 NOP
31072 NOP
31073 DEC BC
31074 OUT (16),A
31076 CALL M,0
31079 NOP
31080 DJNZ 31037
31082 DJNZ Update_Heading_27
Update_Heading_27 31084 NOP
31085 NOP
31086 LD (BC),A
31087 DEC BC
31088 DEC C
31089 RRCA
31090 OUT (16),A
31092 NOP
31093 INC C
31094 NOP
31095 INC BC
31096 INC C
31097 LD C,15
31099 DEC C
31100 OUT (16),A
31102 NOP
31103 NOP
31104 NOP
31105 NOP
31106 RRCA
31107 OUT (16),A
31109 NOP
31110 CALL P,768
31113 INC C
31114 LD C,15
31116 ADD HL,BC
31117 OUT (16),A
31119 INC BC
31120 NOP
31121 NOP
31122 NOP
31123 ADD HL,BC
31124 OUT (16),A
31126 DEFB 253
31127 NOP
31128 NOP
31129 NOP
31130 LD BC,0
31133 NOP
31134 NOP
31135 NOP
31136 LD (BC),A
31137 LD DE,274
31140 NOP
31141 NOP
31142 NOP
31143 NOP
31144 NOP
31145 LD (BC),A
31146 INC DE
31147 INC D
31148 LD (BC),A
31149 NOP
31150 NOP
31151 NOP
31152 NOP
31153 RET NZ
31154 LD BC,2326
31157 RET NC
31158 DJNZ Update_Heading_28
Update_Heading_28 31160 NOP
31161 NOP
31162 NOP
31163 LD B,208
31165 DJNZ Update_Heading_29
Update_Heading_29 31167 NOP
31168 RET P
31169 LD BC,1557
31172 RET NC
31173 DJNZ Update_Heading_30
Update_Heading_30 31175 NOP
31176 NOP
31177 LD BC,0
31180 NOP
31181 NOP
31182 NOP
31183 LD (BC),A
31184 INC DE
31185 RLA
31186 LD B,208
31188 DJNZ Update_Heading_31
Update_Heading_31 31190 NOP
31191 DJNZ Update_Heading_32
31193 DEC D
Update_Heading_32 31194 LD BC,0
31197 NOP
31198 NOP
31199 NOP
31200 DEC B
31201 ADD HL,DE
31202 LD A,(DE)
31203 DEC DE
31204 INC E
31205 DEC E
31206 LD H,224
31208 DJNZ Update_Heading_33
31210 DEC BC
31211 DEC C
31212 NOP
31213 DEC H
31214 RET PO
31215 DJNZ Update_Heading_35
Update_Heading_33 31217 PUSH AF
31218 DEC C
31219 NOP
31220 INC HL
31221 RET PO
Update_Heading_34 31222 DJNZ Update_Heading_36
Update_Heading_35 31224 DEC BC
31225 DI
31226 NOP
31227 LD (DE),A
31228 RET PO
31229 DJNZ Update_Heading_34
Update_Heading_36 31231 DEC BC
31232 DI
31233 NOP
31234 LD (BC),A
31235 RET PO
31236 DJNZ Update_Heading_37
Update_Heading_37 31238 NOP
31239 NOP
31240 LD BC,10270
31243 RET PO
31244 DJNZ 31241
31246 DI
31247 ADD HL,BC
31248 LD BC,2847
31251 RET PO
31252 DJNZ 31261
31254 DEC BC
31255 DI
31256 NOP
31257 LD (BC),A
31258 EX AF,AF'
31259 ADD HL,BC
31260 DJNZ Update_Heading_33
31262 DJNZ 31268
31264 NOP
31265 NOP
31266 NOP
Update_Heading_38 31267 DJNZ Update_Heading_35
31269 DJNZ Update_Heading_38
31271 NOP
31272 NOP
31273 NOP
31274 DJNZ Update_Heading_36
31276 DJNZ Update_Heading_39
Update_Heading_39 31278 NOP
31279 NOP
31280 LD (BC),A
31281 DEC BC
31282 DEC C
31283 RRCA
31284 OUT (16),A
31286 NOP
31287 INC C
31288 NOP
31289 INC BC
31290 INC C
31291 LD C,15
31293 INC C
31294 OUT (16),A
31296 NOP
31297 NOP
31298 NOP
31299 NOP
This entry point is used by the routine at Service_Interrupt.
Update_Heading_40 31300 LD A,(57713)
31303 AND A
31304 RET Z
31305 LD A,(61310)
31308 AND A
31309 RET NZ
31310 LD A,(61311)
31313 AND A
31314 JR Z,Update_Heading_41
31316 LD A,6
31318 LD (57717),A
Update_Heading_41 31321 LD A,(57715)
31324 AND A
31325 JR Z,Update_Heading_42
31327 LD A,30
31329 LD (57718),A
31332 XOR A
31333 LD (57715),A
Update_Heading_42 31336 LD A,(57716)
31339 AND A
31340 JR Z,Update_Heading_43
31342 LD A,15
31344 LD (57719),A
31347 XOR A
31348 LD (57716),A
Update_Heading_43 31351 LD A,(61141)
31354 AND A
31355 JR Z,Update_Heading_44
31357 LD A,(61150)
31360 AND A
31361 JR Z,Update_Heading_44
31363 LD A,4
31365 LD (57720),A
Update_Heading_44 31368 LD A,(57722)
31371 AND A
31372 JR Z,Update_Heading_45
31374 DEC A
31375 LD (57722),A
31378 CALL Update_Heading_64
31381 RET
Update_Heading_45 31382 LD A,(57717)
31385 AND A
31386 JR Z,Update_Heading_46
31388 DEC A
31389 LD (57717),A
31392 CALL Update_Heading_52
31395 JR Update_Heading_49
Update_Heading_46 31397 LD A,(57718)
31400 AND A
31401 JR Z,Update_Heading_47
31403 DEC A
31404 LD (57718),A
31407 CALL Update_Heading_56
31410 JR Update_Heading_50
Update_Heading_47 31412 LD A,(57719)
31415 AND A
31416 JR Z,Update_Heading_48
31418 DEC A
31419 LD (57719),A
31422 CALL Update_Heading_60
31425 JR Update_Heading_51
Update_Heading_48 31427 LD A,(61309)
31430 AND A
31431 RET Z
31432 LD A,(57720)
31435 AND A
31436 JP Z,40230
31439 DEC A
31440 LD (57720),A
31443 CALL Update_Heading_63
31446 RET
Update_Heading_49 31447 LD A,(57718)
31450 AND A
31451 JR Z,Update_Heading_50
31453 DEC A
31454 LD (57718),A
Update_Heading_50 31457 LD A,(57719)
31460 AND A
31461 JR Z,Update_Heading_51
31463 DEC A
31464 LD (57719),A
Update_Heading_51 31467 LD A,(57720)
31470 AND A
31471 RET Z
31472 DEC A
31473 LD (57720),A
31476 RET
Update_Heading_52 31477 LD C,5
31479 LD D,35
Update_Heading_53 31481 XOR A
31482 LD B,D
31483 OUT (254),A
31485 XOR 24
Update_Heading_54 31487 DJNZ Update_Heading_54
31489 LD B,D
31490 OUT (254),A
Update_Heading_55 31492 DJNZ Update_Heading_55
31494 DEC C
31495 JR NZ,Update_Heading_53
31497 RET
Update_Heading_56 31498 LD C,A
31499 LD A,40
31501 SUB C
31502 RRA
31503 RRA
31504 AND 15
31506 ADD A,5
31508 LD D,A
31509 LD A,C
31510 ADD A,C
31511 LD C,A
31512 INC C
31513 SRL D
31515 SLA C
Update_Heading_57 31517 LD H,2
31519 LD A,R
31521 LD L,A
Update_Heading_58 31522 LD A,(HL)
31523 AND 24
31525 INC L
31526 LD B,D
31527 OUT (254),A
Update_Heading_59 31529 DJNZ Update_Heading_59
31531 DEC C
31532 JR NZ,Update_Heading_58
31534 RET
Update_Heading_60 31535 LD C,A
31536 LD A,40
31538 SUB C
31539 RRA
31540 RRA
31541 AND 15
31543 ADD A,5
31545 LD D,A
31546 LD A,C
31547 ADD A,C
31548 LD C,A
31549 INC C
31550 LD H,2
31552 LD A,R
31554 LD L,A
31555 SRL D
31557 SLA C
Update_Heading_61 31559 LD A,(HL)
31560 AND 24
31562 INC L
31563 LD B,D
31564 OUT (254),A
31566 XOR 24
Update_Heading_62 31568 DJNZ Update_Heading_62
31570 DEC C
31571 JR NZ,Update_Heading_61
31573 RET
Update_Heading_63 31574 LD C,10
31576 INC A
31577 INC A
31578 ADD A,A
31579 ADD A,A
31580 LD D,A
31581 JR Update_Heading_53
Update_Heading_64 31583 LD C,80
31585 RRA
31586 RRA
31587 RRA
31588 RRA
31589 RRA
31590 AND 7
31592 ADD A,2
31594 LD D,A
31595 JR Update_Heading_57
31597 RLCA
31598 ADD A,2
This entry point is used by the routine at Set_Phase_One.
Update_Heading_65 31600 LD A,(61321)
31603 CP 11
31605 JR C,Update_Heading_66
31607 LD A,11
Update_Heading_66 31609 LD B,A
31610 ADD A,A
31611 ADD A,A
31612 ADD A,B
31613 LD HL,31646
31616 ADD A,L
31617 LD L,A
31618 JR NC,Update_Heading_67
31620 INC H
Update_Heading_67 31621 LD A,(HL)
31622 INC HL
31623 LD (61320),A
31626 LD A,(HL)
31627 INC HL
31628 LD (61411),A
31631 LD A,(HL)
31632 INC HL
31633 LD (61419),A
31636 LD A,(HL)
31637 INC HL
31638 LD (61418),A
31641 LD A,(HL)
31642 LD (61316),A
31645 RET
31646 LD (BC),A
31647 SCF
31648 NOP
31649 RRCA
31650 NOP
31651 LD (BC),A
31652 DAA
31653 NOP
31654 RRCA
31655 RRCA
31656 INC BC
31657 DAA
31658 LD BC,3855
31661 INC BC
31662 DAA
31663 LD (BC),A
31664 RRA
31665 RRCA
31666 INC BC
31667 RRA
31668 INC B
31669 CPL
31670 RRCA
31671 INC B
31672 RRA
31673 INC B
31674 RRCA
31675 RRCA
31676 INC B
31677 RRA
31678 EX AF,AF'
31679 RRA
31680 ADD HL,DE
31681 INC B
31682 RRA
31683 EX AF,AF'
31684 CPL
31685 ADD HL,DE
31686 INC B
31687 RRA
31688 DJNZ Update_Heading_68
31690 ADD HL,DE
31691 INC B
31692 RRCA
31693 DJNZ Update_Heading_69
31695 ADD HL,DE
31696 INC B
31697 RRCA
31698 JR NZ,Update_Heading_70
31700 ADD HL,DE
31701 DEC B
31702 RRCA
31703 JR NZ,Update_Heading_71
31705 ADD HL,DE
31706 NOP
31707 INC B
31708 RRCA
31709 DJNZ Update_Heading_72
31711 ADD HL,DE
31712 OR H
31713 INC B
31714 RRCA
31715 JR NZ,Update_Heading_74
31717 ADD HL,DE
31718 OR H
31719 DEC B
31720 RRCA
Update_Heading_68 31721 JR NZ,Update_Heading_75
31723 ADD HL,DE
31724 OR H
31725 NOP
Update_Heading_69 31726 LD (HL),H
31727 DEC D
31728 LD (IX+15),E
Update_Heading_70 31731 NOP
31732 NOP
31733 INC BC
31734 RRCA
31735 NOP
Update_Heading_71 31736 NOP
31737 LD (BC),A
31738 RRA
31739 RLA
31740 NOP
31741 NOP
Update_Heading_72 31742 NOP
31743 NOP
This entry point is used by the routine at Update_Phase.
Update_Heading_73 31744 LD IX,58576
Update_Heading_74 31748 BIT 0,(IX+0)
31752 JR NZ,Update_Heading_77
Update_Heading_75 31754 BIT 0,(IX+16)
31758 JR NZ,Update_Heading_77
31760 BIT 0,(IX+32)
31764 JR NZ,Update_Heading_77
31766 LD A,64
31768 CALL Random_Number
31771 LD HL,61419
31774 SUB (HL)
31775 JR NC,Update_Heading_77
31777 LD B,3
31779 LD IY,61293
Update_Heading_76 31783 PUSH BC
31784 CALL Update_Heading_81
31787 LD A,63
31789 CALL Random_Number
31792 ADD A,A
31793 ADD A,A
31794 LD HL,128
31797 LD D,0
31799 LD E,A
31800 SBC HL,DE
31802 LD (IY+0),L
31805 LD (IY+1),H
31808 LD DE,16
31811 ADD IX,DE
31813 LD DE,4
31816 ADD IY,DE
31818 POP BC
31819 DJNZ Update_Heading_76
31821 RET
Update_Heading_77 31822 LD IX,58496
31826 LD IY,61273
31830 LD B,8
Update_Heading_78 31832 BIT 0,(IX+0)
31836 JR Z,Update_Heading_79
31838 LD DE,16
31841 ADD IX,DE
31843 LD DE,4
31846 ADD IY,DE
31848 DJNZ Update_Heading_78
31850 RET
Update_Heading_79 31851 CALL Update_Heading_81
31854 LD A,63
31856 CALL Random_Number
31859 LD HL,61418
31862 SUB (HL)
31863 JR C,Update_Heading_80
31865 LD (IY+0),0
31869 LD (IY+1),0
31873 RET
Update_Heading_80 31874 LD HL,(60942)
31877 LD E,0
31879 LD A,(60947)
31882 LD D,A
31883 CALL Divide
31886 LD (IY+0),C
31889 LD (IY+1),B
31892 RET
Update_Heading_81 31893 LD HL,65504
31896 LD (60944),HL
31899 LD HL,60942
31902 PUSH IX
31904 POP DE
31905 INC DE
31906 LD BC,6
31909 LDIR
31911 LD HL,(61042)
31914 LD (IY+2),L
31917 LD (IY+3),H
31920 LD A,47
31922 CALL Random_Number
31925 RRA
31926 RRA
31927 RRA
31928 AND 15
31930 ADD A,2
31932 LD (IX+8),A
31935 LD HL,61312
31938 INC (HL)
31939 LD (IX+0),1
31943 RET
31944 INC H
31945 NOP
31946 CP D
31947 RST 56
31948 RET PO
31949 RST 56
31950 NOP
31951 EX AF,AF'
31952 LD D,0
31954 OR H
31955 RST 56
31956 RET PO
31957 RST 56
31958 NOP
31959 EX AF,AF'
31960 RLCA
31961 NOP
31962 JP 57599
31965 RST 56
31966 NOP
31967 EX AF,AF'
31968 RET M
31969 RST 56
31970 OR C
31971 RST 56
31972 RET PO
31973 RST 56
31974 NOP
31975 EX AF,AF'
31976 JP (HL)
31977 RST 56
31978 OR H
31979 RST 56
31980 RET PO
31981 RST 56
31982 NOP
31983 EX AF,AF'
31984 ADC A,255
31986 JP 57599
31989 RST 56
31990 NOP
31991 EX AF,AF'
31992 ADC A,255
31994 JP 57599
31997 RST 56
31998 NOP
31999 EX AF,AF'
32000 JP Move_Object_Slots_3
32003 RST 56
32004 RET PO
32005 RST 56
32006 NOP
32007 EX AF,AF'
32008 CP D
32009 RST 56
32010 IN A,(255)
32012 RET PO
32013 RST 56
32014 NOP
32015 EX AF,AF'
32016 OR H
32017 RST 56
32018 JP (HL)
32019 RST 56
32020 RET PO
32021 RST 56
32022 NOP
32023 EX AF,AF'
32024 OR C
32025 RST 56
32026 RET M
32027 RST 56
32028 RET PO
32029 RST 56
32030 NOP
32031 EX AF,AF'
32032 OR C
32033 RST 56
32034 RLCA
32035 NOP
32036 RET PO
32037 RST 56
32038 NOP
32039 EX AF,AF'
32040 OR H
32041 RST 56
32042 LD D,0
32044 RET PO
32045 RST 56
32046 NOP
32047 EX AF,AF'
32048 CP D
32049 RST 56
32050 INC H
32051 NOP
32052 RET PO
32053 RST 56
32054 NOP
32055 EX AF,AF'
32056 JP 12799
32059 NOP
32060 RET PO
32061 RST 56
32062 NOP
32063 EX AF,AF'
32064 ADC A,255
32066 INC A
32067 NOP
32068 RET PO
32069 RST 56
32070 NOP
32071 EX AF,AF'
32072 ADC A,255
32074 LD B,L
32075 NOP
32076 RET PO
32077 RST 56
32078 NOP
32079 EX AF,AF'
32080 JP (HL)
32081 RST 56
32082 LD C,E
32083 NOP
32084 RET PO
32085 RST 56
32086 NOP
32087 EX AF,AF'
32088 RET M
32089 RST 56
32090 LD C,(HL)
32091 NOP
32092 RET PO
32093 RST 56
32094 NOP
32095 EX AF,AF'
32096 RLCA
32097 NOP
32098 LD C,(HL)
32099 NOP
32100 RET PO
32101 RST 56
32102 NOP
32103 EX AF,AF'
32104 LD D,0
32106 LD C,E
32107 NOP
32108 RET PO
32109 RST 56
32110 NOP
32111 EX AF,AF'
32112 INC H
32113 NOP
32114 LD B,L
32115 NOP
32116 RET PO
32117 RST 56
32118 NOP
32119 EX AF,AF'
32120 LD SP,15360
32123 NOP
32124 RET PO
32125 RST 56
32126 NOP
32127 EX AF,AF'
32128 INC A
32129 NOP
32130 LD SP,57344
32133 RST 56
32134 NOP
32135 EX AF,AF'
32136 LD B,L
32137 NOP
32138 INC H
32139 NOP
32140 RET PO
32141 RST 56
32142 NOP
32143 EX AF,AF'
32144 LD C,E
32145 NOP
32146 LD D,0
32148 RET PO
32149 RST 56
32150 NOP
32151 EX AF,AF'
32152 LD C,(HL)
32153 NOP
32154 RLCA
32155 NOP
32156 RET PO
32157 RST 56
32158 NOP
32159 EX AF,AF'
32160 ADD A,B
32161 RST 56
32162 NOP
32163 NOP
32164 NOP
32165 NOP
32166 NOP
32167 NOP
32168 ADD A,B
32169 RST 56
32170 NOP
32171 NOP
32172 NOP
32173 NOP
32174 NOP
32175 NOP
32176 ADD A,B
32177 RST 56
32178 NOP
32179 NOP
32180 NOP
32181 NOP
32182 NOP
32183 NOP
32184 ADD A,B
32185 RST 56
32186 NOP
32187 NOP
32188 NOP
32189 NOP
32190 NOP
32191 NOP
32192 ADD A,B
32193 RST 56
32194 NOP
32195 NOP
32196 NOP
32197 NOP
32198 NOP
32199 NOP
32200 ADD A,B
32201 RST 56
32202 NOP
32203 NOP
32204 NOP
32205 NOP
32206 NOP
32207 NOP
32208 ADD A,B
32209 RST 56
32210 NOP
32211 NOP
32212 NOP
32213 NOP
32214 NOP
32215 NOP
32216 ADD A,B
32217 NOP
32218 NOP
32219 NOP
32220 NOP
32221 NOP
32222 NOP
32223 NOP
32224 ADD A,B
32225 NOP
32226 NOP
32227 NOP
32228 NOP
32229 NOP
32230 NOP
32231 NOP
32232 ADD A,B
32233 NOP
32234 NOP
32235 NOP
32236 NOP
32237 NOP
32238 NOP
32239 NOP
32240 ADD A,B
32241 NOP
32242 NOP
32243 NOP
32244 NOP
32245 NOP
32246 NOP
32247 NOP
32248 ADD A,B
32249 NOP
32250 NOP
32251 NOP
32252 NOP
32253 NOP
32254 NOP
32255 NOP
32256 ADD A,B
32257 NOP
32258 NOP
32259 NOP
32260 NOP
32261 NOP
32262 NOP
32263 NOP
32264 ADD A,B
32265 NOP
32266 NOP
32267 NOP
32268 NOP
32269 NOP
32270 NOP
32271 NOP
32272 OR C
32273 RST 56
32274 RLCA
32275 NOP
32276 NOP
32277 NOP
32278 NOP
32279 EX AF,AF'
32280 OR H
32281 RST 56
32282 LD D,0
32284 NOP
32285 NOP
32286 NOP
32287 EX AF,AF'
32288 CP D
32289 RST 56
32290 INC H
32291 NOP
32292 NOP
32293 NOP
32294 NOP
32295 EX AF,AF'
32296 JP 12799
32299 NOP
32300 NOP
32301 NOP
32302 NOP
32303 EX AF,AF'
32304 ADC A,255
32306 INC A
32307 NOP
32308 NOP
32309 NOP
32310 NOP
32311 EX AF,AF'
32312 ADC A,255
32314 LD B,L
32315 NOP
32316 NOP
32317 NOP
32318 NOP
32319 EX AF,AF'
32320 JP (HL)
32321 RST 56
32322 LD C,E
32323 NOP
32324 NOP
32325 NOP
32326 NOP
32327 EX AF,AF'
32328 RET M
32329 RST 56
32330 LD C,(HL)
32331 NOP
32332 NOP
32333 NOP
32334 NOP
32335 EX AF,AF'
32336 RLCA
32337 NOP
32338 LD C,(HL)
32339 NOP
32340 NOP
32341 NOP
32342 NOP
32343 EX AF,AF'
32344 LD D,0
32346 LD C,E
32347 NOP
32348 NOP
32349 NOP
32350 NOP
32351 EX AF,AF'
32352 INC H
32353 NOP
32354 LD B,L
32355 NOP
32356 NOP
32357 NOP
32358 NOP
32359 EX AF,AF'
32360 LD SP,15360
32363 NOP
32364 NOP
32365 NOP
32366 NOP
32367 EX AF,AF'
32368 INC A
32369 NOP
32370 LD SP,0
32373 NOP
32374 NOP
32375 EX AF,AF'
32376 LD B,L
32377 NOP
32378 INC H
32379 NOP
32380 NOP
32381 NOP
32382 NOP
32383 EX AF,AF'
32384 LD C,E
32385 NOP
32386 LD D,0
32388 NOP
32389 NOP
32390 NOP
32391 EX AF,AF'
32392 LD C,(HL)
32393 NOP
32394 RLCA
32395 NOP
32396 NOP
32397 NOP
32398 NOP
32399 EX AF,AF'
32400 LD C,(HL)
32401 NOP
32402 RET M
32403 RST 56
32404 NOP
32405 NOP
32406 NOP
32407 EX AF,AF'
32408 LD C,E
32409 NOP
32410 JP (HL)
32411 RST 56
32412 NOP
32413 NOP
32414 NOP
32415 EX AF,AF'
32416 LD B,L
32417 NOP
32418 IN A,(255)
32420 NOP
32421 NOP
32422 NOP
32423 EX AF,AF'
32424 INC A
32425 NOP
32426 ADC A,255
32428 NOP
32429 NOP
32430 NOP
32431 EX AF,AF'
32432 LD SP,49920
32435 RST 56
32436 NOP
32437 NOP
32438 NOP
32439 EX AF,AF'
32440 INC H
32441 NOP
32442 CP D
32443 RST 56
32444 NOP
32445 NOP
32446 NOP
32447 EX AF,AF'
32448 LD D,0
32450 OR H
32451 RST 56
32452 NOP
32453 NOP
32454 NOP
32455 EX AF,AF'
32456 RLCA
32457 NOP
32458 JP 255
32461 NOP
32462 NOP
32463 EX AF,AF'
32464 RET M
32465 RST 56
32466 OR C
32467 RST 56
32468 NOP
32469 NOP
32470 NOP
32471 EX AF,AF'
32472 JP (HL)
32473 RST 56
32474 OR H
32475 RST 56
32476 NOP
32477 NOP
32478 NOP
32479 EX AF,AF'
32480 ADC A,255
32482 JP 255
32485 NOP
32486 NOP
32487 EX AF,AF'
32488 ADC A,255
32490 JP 255
32493 NOP
32494 NOP
32495 EX AF,AF'
32496 JP Move_Object_Slots_3
32499 RST 56
32500 NOP
32501 NOP
32502 NOP
32503 EX AF,AF'
32504 CP D
32505 RST 56
32506 IN A,(255)
32508 NOP
32509 NOP
32510 NOP
32511 EX AF,AF'
32512 OR H
32513 RST 56
32514 JP (HL)
32515 RST 56
32516 NOP
32517 NOP
32518 NOP
32519 EX AF,AF'
32520 OR C
32521 RST 56
32522 RET M
32523 RST 56
32524 NOP
32525 NOP
32526 NOP
32527 EX AF,AF'
32528 POP HL
32529 RST 56
32530 NOP
32531 NOP
32532 LD B,B
32533 RST 56
32534 DJNZ Update_Heading_82
32536 POP HL
32537 RST 56
32538 NOP
32539 NOP
32540 LD B,B
32541 RST 56
32542 DJNZ Update_Heading_83
32544 POP HL
Update_Heading_82 32545 RST 56
32546 NOP
32547 NOP
32548 LD B,B
32549 RST 56
32550 DJNZ Update_Heading_84
32552 POP HL
Update_Heading_83 32553 RST 56
32554 NOP
32555 NOP
32556 LD B,B
32557 RST 56
32558 DJNZ Update_Heading_85
32560 POP HL
Update_Heading_84 32561 RST 56
32562 NOP
32563 NOP
32564 LD B,B
32565 RST 56
32566 DJNZ Update_Heading_86
32568 POP HL
Update_Heading_85 32569 RST 56
32570 NOP
32571 NOP
32572 LD B,B
32573 RST 56
32574 DJNZ Update_Heading_87
32576 RRA
Update_Heading_86 32577 NOP
32578 NOP
32579 NOP
32580 LD B,B
32581 RST 56
32582 DJNZ 32575
32584 RRA
Update_Heading_87 32585 NOP
32586 NOP
32587 NOP
32588 LD B,B
32589 RST 56
32590 DJNZ 32583
32592 RRA
32593 NOP
32594 NOP
32595 NOP
32596 LD B,B
32597 RST 56
32598 DJNZ 32591
32600 RRA
32601 NOP
32602 NOP
32603 NOP
32604 LD B,B
32605 RST 56
32606 DJNZ 32599
32608 RRA
32609 NOP
32610 NOP
32611 NOP
32612 LD B,B
32613 RST 56
32614 DJNZ 32607
32616 RRA
32617 NOP
32618 NOP
32619 NOP
32620 LD B,B
32621 RST 56
32622 DJNZ 32615
32624 NOP
32625 NOP
32626 LD A,(BC)
32627 NOP
32628 LD B,B
Update_Heading_88 32629 RST 56
32630 DJNZ Update_Heading_88
32632 NOP
32633 NOP
32634 LD A,(BC)
32635 NOP
32636 LD B,B
Update_Heading_89 32637 RST 56
32638 DJNZ Update_Heading_89
32640 NOP
32641 NOP
32642 LD A,(BC)
32643 NOP
32644 LD B,B
Update_Heading_90 32645 RST 56
32646 DJNZ Update_Heading_90
32648 NOP
32649 NOP
32650 LD A,(BC)
32651 NOP
32652 LD B,B
Update_Heading_91 32653 RST 56
32654 DJNZ Update_Heading_91
32656 NOP
32657 NOP
32658 LD A,(BC)
32659 NOP
32660 LD B,B
Update_Heading_92 32661 RST 56
32662 DJNZ Update_Heading_92
32664 NOP
32665 NOP
32666 LD A,(BC)
32667 NOP
32668 LD B,B
Update_Heading_93 32669 RST 56
32670 DJNZ Update_Heading_93
32672 NOP
32673 NOP
32674 OR 255
32676 LD B,B
32677 RST 56
32678 DJNZ 32683
32680 NOP
32681 NOP
32682 OR 255
32684 LD B,B
32685 RST 56
32686 DJNZ 32691
32688 NOP
32689 NOP
32690 OR 255
32692 LD B,B
32693 RST 56
32694 DJNZ 32699
32696 NOP
32697 NOP
32698 OR 255
32700 LD B,B
32701 RST 56
32702 DJNZ 32707
32704 NOP
32705 NOP
32706 OR 255
32708 LD B,B
32709 RST 56
32710 DJNZ 32715
32712 NOP
32713 NOP
32714 OR 255
32716 LD B,B
32717 RST 56
32718 DJNZ Update_Heading_94
32720 NOP
32721 NOP
32722 NOP
Update_Heading_94 32723 NOP
32724 LD B,B
32725 RST 56
32726 DJNZ Update_Heading_95
Update_Heading_95 32728 NOP
32729 NOP
32730 NOP
32731 NOP
32732 LD B,B
32733 RST 56
32734 DJNZ Update_Heading_96
Update_Heading_96 32736 NOP
32737 NOP
32738 NOP
32739 NOP
32740 LD B,B
32741 RST 56
32742 DJNZ Update_Heading_97
Update_Heading_97 32744 NOP
32745 NOP
32746 NOP
32747 NOP
32748 LD B,B
32749 RST 56
32750 DJNZ Update_Heading_98
Update_Heading_98 32752 NOP
32753 NOP
32754 NOP
32755 NOP
32756 LD B,B
32757 RST 56
32758 DJNZ Update_Heading_99
Update_Heading_99 32760 NOP
32761 NOP
32762 NOP
32763 NOP
32764 LD B,B
32765 RST 56
This entry point is used by the routines at Process_Scan_Index and Update_Phase.
Update_Heading_100 32766 DJNZ Multiply
Prev: 29370 Up: Map Next: 32768