Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
384
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0080ca stz $00c8
  2. 0080cd rep #$10
  3. 0080cf jsl $009ef3
  4. 0080d3 sep #$10
  5. 0080d5 lda #$08
  6. 0080d7 sta $00c1
  7. 0080da ldy #$00
  8. 0080dc lda $00c8
  9. 0080df bne $80ca
  10. 0080e1 lda $0040,y
  11. 0080e4 bmi $80ec
  12. 0080e6 cmp #$04
  13. 0080e8 beq $811b
  14. 0080ea bcs $8133
  15. 0080ec tya
  16. 0080ed clc
  17. 0080ee adc #$10
  18. 0080f0 tay
  19. 0080f1 dec $00c1
  20. 0080f4 bne $80dc
  21. 0080f6 lda $7efffa
  22. 0080fa beq $8118
  23. 008118 jmp $80d5
  24. 00811b sty $00c0
  25. 00811e lda #$02
  26. 008120 sta $0040,y
  27. 008123 php
  28. 008124 phb
  29. 008125 rep #$20
  30. 008127 tsc
  31. 008128 sta $00c2
  32. 00812b lda $0042,y
  33. 00812e tcs
  34. 00812f plp
  35. 008130 pld
  36. 008131 plb
  37. 008132 rtl
  38. 008133 sty $00c0
  39. 008136 lda #$02
  40. 008138 sta $0040,y
  41. 00813b php
  42. 00813c phb
  43. 00813d rep #$20
  44. 00813f tsc
  45. 008140 sta $00c2
  46. 008143 lda $0042,y
  47. 008146 tcs
  48. 008147 lda #$0000
  49. 00814a tcd
  50. 00814b ldx $0046,y
  51. 00814e jmp ($8237,x)
  52. 00815e php
  53. 00815f sep #$30
  54. 008161 sta $000046,x
  55. 008165 lda #$08
  56. 008167 sta $000040,x
  57. 00816b xba
  58. 00816c sta $000048,x
  59. 008170 rep #$20
  60. 008172 lda $000044,x
  61. 008176 sta $000042,x
  62. 00817a plp
  63. 00817b rtl
  64. 00817c rep #$30
  65. 00817e lda $0000c2
  66. 008182 tcs
  67. 008183 plb
  68. 008184 plp
  69. 008185 ldy $00c0
  70. 008188 lda #$00
  71. 00818a sta $0040,y
  72. 00818d jmp $80ec
  73.  
  74. 00819c phb
  75. 00819d phd
  76. 00819e php
  77. 00819f sep #$30
  78. 0081a1 xba
  79. 0081a2 lda #$00
  80. 0081a4 pha
  81. 0081a5 plb
  82. 0081a6 ldy $00c0
  83. 0081a9 lda #$01
  84. 0081ab sta $0040,y
  85. 0081ae xba
  86. 0081af sta $0041,y
  87. 0081b2 bne $81b9
  88. 0081b9 tsc
  89. 0081ba rep #$20
  90. 0081bc sta $0042,y
  91. 0081bf lda $00c2
  92. 0081c2 tcs
  93. 0081c3 plb
  94. 0081c4 plp
  95. 0081c5 jmp $80ec
  96. 0081d9 php
  97. 0081da sep #$20
  98. 0081dc lda $000040,x
  99. 0081e0 cmp #$80
  100. 0081e2 bcc $81ec
  101. 0081e4 and #$7f
  102. 0081e6 sta $000040,x
  103. 0081ea plp
  104. 0081eb rtl
  105.  
  106. 00825f jml $01a8cf
  107. 00832f php
  108. 008330 rep #$30
  109. 008332 pha
  110. 008333 phb
  111. 008334 phd
  112. 008335 phx
  113. 008336 phy
  114. 008337 lda #$0000
  115. 00833a tcd
  116. 00833b sep #$20
  117. 00833d pha
  118. 00833e plb
  119. 00833f inc $c9
  120. 008341 jsl $0088b9
  121. 008345 jsl $0088c2
  122. 008349 inc $c8
  123. 00834b lda $4210
  124. 00834e bpl $834b
  125. 008350 lda $0106
  126. 008353 beq $8364
  127. 008355 stz $0106
  128. 008358 lda $0104
  129. 00835b sta $00d7
  130. 00835e lda $0105
  131. 008361 sta $0036
  132. 008364 lda $00ce
  133. 008367 beq $83bb
  134. 008369 jsr $87be
  135. 00836c jsr $86a8
  136. 00836f jsr $85c8
  137. 008372 jsr $8529
  138. 008375 lda $00d7
  139. 008378 bne $8391
  140. 00837a jsr $8657
  141. 00837d jsr $8714
  142. 008380 jsr $8741
  143. 008383 jsr $84eb
  144. 008386 jsr $83c4
  145. 008389 lda $00e8
  146. 00838c sta $2100
  147. 00838f bra $8396
  148. 008391 lda #$00
  149. 008393 sta $212c
  150. 008396 jsr $8406
  151. 008399 sep #$30
  152. 00839b ldx #$80
  153. 00839d lda $40,x
  154. 00839f cmp #$01
  155. 0083a1 bne $83ab
  156. 0083a3 dec $41,x
  157. 0083a5 bne $83ab
  158. 0083a7 lda #$04
  159. 0083a9 sta $40,x
  160. 0083ab txa
  161. 0083ac sec
  162. 0083ad sbc #$10
  163. 0083af tax
  164. 0083b0 bpl $839d
  165. 0083b2 rep #$10
  166. 0083b4 jsr $8852
  167. 0083b7 jsl $0088b0
  168. 0083bb rep #$30
  169. 0083bd ply
  170. 0083be plx
  171. 0083bf pld
  172. 0083c0 plb
  173. 0083c1 pla
  174. 0083c2 plp
  175. 0083c3 rti
  176. 0083c4 sep #$10
  177. 0083c6 lda $2143
  178. 0083c9 sta $00ed
  179. 0083cc lda $0100
  180. 0083cf cmp $0101
  181. 0083d2 beq $8403
  182. 0083d4 tax
  183. 0083d5 lda $2140
  184. 0083d8 cmp $7efffb
  185. 0083dc bne $8403
  186. 0083de lda $7efffb
  187. 0083e2 inc
  188. 0083e3 sta $7efffb
  189. 0083e7 lda $03c0,x
  190. 0083ea sta $2142
  191. 0083ed lda $03c1,x
  192. 0083f0 sta $2141
  193. 0083f3 lda $03c2,x
  194. 0083f6 sta $2140
  195. 0083f9 txa
  196. 0083fa inc
  197. 0083fb inc
  198. 0083fc inc
  199. 0083fd inc
  200. 0083fe and #$3c
  201. 008400 sta $0100
  202. 008403 rep #$10
  203. 008405 rts
  204. 008406 lda $0153
  205. 008409 bne $8450
  206. 00840b lda $00e0
  207. 00840e cmp $00e1
  208. 008411 bne $8414
  209. 008413 rts
  210. 008414 sep #$10
  211. 008416 tax
  212. 008417 lda $0800,x
  213. 00841a sta $0150
  214. 00841d lda $0801,x
  215. 008420 sta $0151
  216. 008423 lda $0802,x
  217. 008426 sta $0152
  218. 008429 lda $0803,x
  219. 00842c sta $0154
  220. 00842f lda $0804,x
  221. 008432 sta $0155
  222. 008435 lda $0805,x
  223. 008438 sta $0156
  224. 00843b lda $0806,x
  225. 00843e sta $0157
  226. 008441 lda $0807,x
  227. 008444 sta $0153
  228. 008447 txa
  229. 008448 clc
  230. 008449 adc #$10
  231. 00844b sta $00e0
  232. 00844e rep #$10
  233. 008450 lda $2137
  234. 008453 lda $213f
  235. 008456 lda $213d
  236. 008459 sta $0020
  237. 00845c lda $213d
  238. 00845f and #$01
  239. 008461 sta $0021
  240. 008464 rep #$20
  241. 008466 lda #$0105
  242. 008469 sec
  243. 00846a sbc $0020
  244. 00846d bmi $84ea
  245. 00846f beq $84ea
  246. 008471 asl a
  247. 008472 asl a
  248. 008473 asl a
  249. 008474 asl a
  250. 008475 asl a
  251. 008476 sta $0022
  252. 008479 asl a
  253. 00847a asl a
  254. 00847b clc
  255. 00847c adc $0022
  256. 00847f sta $0022
  257. 008482 lda $0156
  258. 008485 sec
  259. 008486 sbc $0022
  260. 008489 beq $848d
  261. 00848b bcs $84a0
  262. 00848d lda $0156
  263. 008490 sta $0022
  264. 008493 sep #$20
  265. 008495 lda $0153
  266. 008498 trb $00e7
  267. 00849b stz $0153
  268. 00849e rep #$20
  269. 0084a0 lda $0022
  270. 0084a3 sta $4305
  271. 0084a6 lsr a
  272. 0084a7 sta $0024
  273. 0084aa lda $0156
  274. 0084ad sec
  275. 0084ae sbc $0022
  276. 0084b1 sta $0156
  277. 0084b4 lda $0150
  278. 0084b7 sta $4302
  279. 0084ba clc
  280. 0084bb adc $0022
  281. 0084be sta $0150
  282. 0084c1 lda $0154
  283. 0084c4 sta $2116
  284. 0084c7 clc
  285. 0084c8 adc $0024
  286. 0084cb sta $0154
  287. 0084ce sep #$20
  288. 0084d0 lda $0152
  289. 0084d3 sta $4304
  290. 0084d6 lda #$80
  291. 0084d8 sta $2115
  292. 0084db lda #$01
  293. 0084dd sta $4300
  294. 0084e0 lda #$18
  295. 0084e2 sta $4301
  296. 0084e5 lda #$01
  297. 0084e7 sta $420b
  298. 0084ea rts
  299. 0084eb lda $00e6
  300. 0084ee beq $8528
  301. 0084f0 lda #$80
  302. 0084f2 sta $2115
  303. 0084f5 lda #$7c
  304. 0084f7 sta $2117
  305. 0084fa lda #$40
  306. 0084fc sta $2116
  307. 0084ff lda #$01
  308. 008501 sta $4300
  309. 008504 lda #$18
  310. 008506 sta $4301
  311. 008509 stz $4302
  312. 00850c lda #$24
  313. 00850e sta $4303
  314. 008511 lda #$7e
  315. 008513 sta $4304
  316. 008516 lda #$00
  317. 008518 sta $4305
  318. 00851b lda #$01
  319. 00851d sta $4306
  320. 008520 lda #$01
  321. 008522 sta $420b
  322. 008525 stz $00e6
  323. 008528 rts
  324. 008529 sep #$10
  325. 00852b ldy $00e4
  326. 00852e cpy $00e5
  327. 008531 beq $8584
  328. 008533 lda #$18
  329. 008535 sta $4301
  330. 008538 stz $4304
  331. 00853b stz $4306
  332. 00853e lda $0b00,y
  333. 008541 rep #$30
  334. 008543 tya
  335. 008544 clc
  336. 008545 adc #$0b00
  337. 008548 tay
  338. 008549 sep #$20
  339. 00854b lda #$01
  340. 00854d sta $4300
  341. 008550 lda $0000,y
  342. 008553 sta $2115
  343. 008556 iny
  344. 008557 lda $0000,y
  345. 00855a sta $4305
  346. 00855d xba
  347. 00855e iny
  348. 00855f lda $0000,y
  349. 008562 sta $2116
  350. 008565 iny
  351. 008566 lda $0000,y
  352. 008569 sta $2117
  353. 00856c iny
  354. 00856d sty $4302
  355. 008570 sep #$10
  356. 008572 sty $00e4
  357. 008575 xba
  358. 008576 clc
  359. 008577 adc $00e4
  360. 00857a sta $00e4
  361. 00857d lda #$01
  362. 00857f sta $420b
  363. 008582 bra $852b
  364. 008584 rts
  365. 008585 rep #$10
  366. 008587 rts
  367. 008588 sta $4306
  368. 00858b rep #$30
  369. 00858d tya
  370. 00858e clc
  371. 00858f adc #$0900
  372. 008592 tay
  373. 008593 sep #$20
  374. 008595 iny
  375. 008596 lda $0000,y
  376. 008599 sta $4305
  377. 00859c iny
  378. 00859d lda $0000,y
  379. 0085a0 sta $2115
  380. 0085a3 iny
  381. 0085a4 lda $0000,y
  382. 0085a7 sta $2116
  383. 0085aa iny
  384. 0085ab lda $0000,y
  385. 0085ae sta $2117
  386. 0085b1 iny
  387. 0085b2 lda #$09
  388. 0085b4 sta $4300
  389. 0085b7 sty $4302
  390. 0085ba lda #$01
  391. 0085bc sta $420b
  392. 0085bf iny
  393. 0085c0 iny
  394. 0085c1 sep #$10
  395. 0085c3 sty $00e2
  396. 0085c6 bra $85cf
  397. 0085c8 sep #$10
  398. 0085ca lda #$18
  399. 0085cc sta $4301
  400. 0085cf stz $4304
  401. 0085d2 ldy $00e2
  402. 0085d5 cpy $00e3
  403. 0085d8 beq $8585
  404. 0085da lda $0900,y
  405. 0085dd bpl $8588
  406. 0085df and #$7f
  407. 0085e1 sta $4306
  408. 0085e4 rep #$30
  409. 0085e6 tya
  410. 0085e7 clc
  411. 0085e8 adc #$0900
  412. 0085eb tay
  413. 0085ec sep #$20
  414. 0085ee iny
  415. 0085ef lda $0000,y
  416. 0085f2 sta $4305
  417. 0085f5 xba
  418. 0085f6 iny
  419. 0085f7 lda $0000,y
  420. 0085fa sta $2115
  421. 0085fd iny
  422. 0085fe lda $0000,y
  423. 008601 sta $2116
  424. 008604 iny
  425. 008605 lda $0000,y
  426. 008608 bmi $862a
  427. 00862a and #$7f
  428. 00862c sta $2117
  429. 00862f iny
  430. 008630 lda #$01
  431. 008632 sta $4300
  432. 008635 lda $0000,y
  433. 008638 sta $4302
  434. 00863b iny
  435. 00863c lda $0000,y
  436. 00863f sta $4303
  437. 008642 iny
  438. 008643 lda $0000,y
  439. 008646 sta $4304
  440. 008649 iny
  441. 00864a sep #$10
  442. 00864c sty $00e2
  443. 00864f lda #$01
  444. 008651 sta $420b
  445. 008654 jmp $85cf
  446. 008657 lda $f0
  447. 008659 sta $210d
  448. 00865c lda $f1
  449. 00865e sta $210d
  450. 008661 lda $f2
  451. 008663 sta $210e
  452. 008666 lda $f3
  453. 008668 sta $210e
  454. 00866b lda $f4
  455. 00866d sta $210f
  456. 008670 lda $f5
  457. 008672 sta $210f
  458. 008675 lda $f6
  459. 008677 sta $2110
  460. 00867a lda $f7
  461. 00867c sta $2110
  462. 00867f lda $f8
  463. 008681 sta $2111
  464. 008684 lda $f9
  465. 008686 sta $2111
  466. 008689 lda $fa
  467. 00868b sta $2112
  468. 00868e lda $fb
  469. 008690 sta $2112
  470. 008693 lda $fc
  471. 008695 sta $2113
  472. 008698 lda $fd
  473. 00869a sta $2113
  474. 00869d lda $fe
  475. 00869f sta $2114
  476. 0086a2 lda $ff
  477. 0086a4 sta $2114
  478. 0086a7 rts
  479. 0086a8 sep #$10
  480. 0086aa lda #$18
  481. 0086ac sta $4301
  482. 0086af lda #$01
  483. 0086b1 sta $4300
  484. 0086b4 lda #$80
  485. 0086b6 sta $2115
  486. 0086b9 ldy $00de
  487. 0086bc cpy $00df
  488. 0086bf beq $8711
  489. 0086c1 rep #$20
  490. 0086c3 lda $0800,y
  491. 0086c6 sta $20
  492. 0086c8 sep #$20
  493. 0086ca lda $0802,y
  494. 0086cd sta $22
  495. 0086cf stz $24
  496. 0086d1 lda $0803,y
  497. 0086d4 sta $25
  498. 0086d6 tya
  499. 0086d7 clc
  500. 0086d8 adc #$10
  501. 0086da sta $00de
  502. 0086dd ldy #$00
  503. 0086df lda
  504. 0086e1 sta $4302
  505. 0086e4 iny
  506. 0086e5 rep #$20
  507. 0086e7 lda
  508. 0086e9 sta $4303
  509. 0086ec iny
  510. 0086ed iny
  511. 0086ee lda
  512. 0086f0 sta $26
  513. 0086f2 and #$7fff
  514. 0086f5 clc
  515. 0086f6 adc $24
  516. 0086f8 sta $2116
  517. 0086fb iny
  518. 0086fc iny
  519. 0086fd lda
  520. 0086ff sta $4305
  521. 008702 iny
  522. 008703 iny
  523. 008704 sep #$20
  524. 008706 lda #$01
  525. 008708 sta $420b
  526. 00870b lda $27
  527. 00870d bmi $86df
  528. 00870f bra $86b9
  529. 008711 sep #$10
  530. 008713 rts
  531.  
  532. ; DMA oam
  533. 008714 stz $2102
  534. 008717 stz $2103
  535. 00871a lda #$00
  536. 00871c sta $4300
  537. 00871f lda #$04
  538. 008721 sta $4301
  539. 008724 lda #$80
  540. 008726 sta $4302
  541. 008729 lda #$01
  542. 00872b sta $4303
  543. 00872e stz $4304
  544. 008731 lda #$20
  545. 008733 sta $4305
  546. 008736 lda #$02
  547. 008738 sta $4306
  548. 00873b lda #$01
  549. 00873d sta $420b
  550. 008740 rts
  551. ; DMA oam
  552.  
  553. 008741 stz $00d6
  554. 008744 lda $00d0
  555. 008747 bne $8771
  556. 008749 lda #$00
  557. 00874b sta $2121
  558. 00874e stz $4300
  559. 008751 lda #$22
  560. 008753 sta $4301
  561. 008756 lda #$00
  562. 008758 sta $4302
  563. 00875b lda #$04
  564. 00875d sta $4303
  565. 008760 stz $4304
  566. 008763 stz $4305
  567. 008766 lda #$02
  568. 008768 sta $4306
  569. 00876b lda #$01
  570. 00876d sta $420b
  571. 008770 rts
  572. 008771 lda #$80
  573. 008773 sta $2121
  574. 008776 stz $4300
  575. 008779 lda #$22
  576. 00877b sta $4301
  577. 00877e lda #$00
  578. 008780 sta $4302
  579. 008783 lda #$06
  580. 008785 sta $4303
  581. 008788 stz $4304
  582. 00878b stz $4305
  583. 00878e lda #$01
  584. 008790 sta $4306
  585. 008793 lda #$01
  586. 008795 sta $420b
  587. 008798 stz $2121
  588. 00879b stz $4300
  589. 00879e lda #$22
  590. 0087a0 sta $4301
  591. 0087a3 lda #$00
  592. 0087a5 sta $4302
  593. 0087a8 lda #$04
  594. 0087aa sta $4303
  595. 0087ad stz $4304
  596. 0087b0 stz $4305
  597. 0087b3 lda #$01
  598. 0087b5 sta $4306
  599. 0087b8 lda #$01
  600. 0087ba sta $420b
  601. 0087bd rts
  602. 0087be lda $d5
  603. 0087c0 eor #$ff
  604. 0087c2 and $d4
  605. 0087c4 sta $d4
  606. 0087c6 lda $d3
  607. 0087c8 ora $d5
  608. 0087ca eor #$ff
  609. 0087cc and $d2
  610. 0087ce sta $d2
  611. 0087d0 lda $d4
  612. 0087d2 lda $420c
  613. 0087d5 lda $d3
  614. 0087d7 lda $420b
  615. 0087da stz $d3
  616. 0087dc stz $d5
  617. 0087de rts
  618. 0087df php
  619. 0087e0 rep #$30
  620. 0087e2 pha
  621. 0087e3 phb
  622. 0087e4 phd
  623. 0087e5 phx
  624. 0087e6 phy
  625. 0087e7 lda #$0000
  626. 0087ea tcd
  627. 0087eb sep #$20
  628. 0087ed pha
  629. 0087ee plb
  630. 0087ef lda $4211
  631. 0087f2 lda #$00
  632. 0087f4 xba
  633. 0087f5 lda $36
  634. 0087f7 tax
  635. 0087f8 jsr ($8804,x)
  636. 0087fb rep #$30
  637. 0087fd ply
  638. 0087fe plx
  639. 0087ff pld
  640. 008800 plb
  641. 008801 pla
  642. 008802 plp
  643. 008803 rti
  644. 00880c lda $00ea
  645. 00880f sta $212c
  646. 008812 rts
  647. 008813 lda $0000e8
  648. 008817 sta $002100
  649. 00881b lda #$13
  650. 00881d sta $4209
  651. 008820 lda #$04
  652. 008822 sta $36
  653. 008824 rts
  654. 008825 lda $00ea
  655. 008828 sta $212c
  656. 00882b lda #$d6
  657. 00882d sta $4209
  658. 008830 lda #$06
  659. 008832 sta $36
  660. 008834 rts
  661. 008835 jsl $0088c2
  662. 008839 lda #$02
  663. 00883b sta $36
  664. 00883d lda #$12
  665. 00883f sta $4209
  666. 008842 jsr $8657
  667. 008845 jsr $8714
  668. 008848 jsr $8741
  669. 00884b jsr $84eb
  670. 00884e jsr $83c4
  671. 008851 rts
  672. 008852 lda #$00
  673. 008854 xba
  674. 008855 lda $3e
  675. 008857 tax
  676. 008858 jmp ($885b,x)
  677. 008861 rts
  678. 0088b0 lda $0108
  679. 0088b3 ora #$80
  680. 0088b5 sta $4200
  681. 0088b8 rtl
  682. 0088b9 lda $0108
  683. 0088bc and #$7f
  684. 0088be sta $4200
  685. 0088c1 rtl
  686. 0088c2 lda $00e8
  687. 0088c5 ora #$80
  688. 0088c7 sta $2100
  689. 0088ca rtl
  690. 0088cb lda $00e8
  691. 0088ce and #$0f
  692. 0088d0 sta $00e8
  693. 0088d3 rtl
  694. 00891e tsb $00e7
  695. 008921 sta $0000
  696. 008924 lda #$00
  697. 008926 xba
  698. 008927 lda $00e1
  699. 00892a tay
  700. 00892b lda $00959a,x
  701. 00892f sta $0800,y
  702. 008932 rep #$20
  703. 008934 lda $00959b,x
  704. 008938 sta $0801,y
  705. 00893b lda $00959d,x
  706. 00893f sta $0803,y
  707. 008942 lda $00959f,x
  708. 008946 sta $0805,y
  709. 008949 sep #$20
  710. 00894b lda $0000
  711. 00894e sta $0807,y
  712. 008951 tya
  713. 008952 clc
  714. 008953 adc #$10
  715. 008955 sta $00e1
  716. 008958 rtl
  717. 0089c2 lda $00959e,x
  718. 0089c6 bmi $89fe
  719. 0089c8 phd
  720. 0089c9 lda #$80
  721. 0089cb sta $2115
  722. 0089ce lda $00959a,x
  723. 0089d2 sta $0010
  724. 0089d5 rep #$20
  725. 0089d7 lda $00959b,x
  726. 0089db sta $0011
  727. 0089de lda $00959d,x
  728. 0089e2 sta $2116
  729. 0089e5 lda $00959f,x
  730. 0089e9 tax
  731. 0089ea lda #$0000
  732. 0089ed tcd
  733. 0089ee tay
  734. 0089ef lda
  735. 0089f1 sta $2118
  736. 0089f4 iny
  737. 0089f5 iny
  738. 0089f6 dex
  739. 0089f7 dex
  740. 0089f8 bne $89ef
  741. 0089fa sep #$20
  742. 0089fc pld
  743. 0089fd rtl
  744. 0089fe lda $00959e,x
  745. 008a02 bpl $89c2
  746. 008b4c jmp ($8b4f,x)
  747. 008b86 ldx #$0000
  748. 008b89 jsl $008cf6
  749. 008b8d ldx #$0054
  750. 008b90 jsl $0089fe
  751. 008b94 ldx #$0062
  752. 008b97 jsl $0089fe
  753. 008b9b ldx #$0111
  754. 008b9e jsl $0089fe
  755. 008ba2 ldx #$0000
  756. 008ba5 jsl $0089fe
  757. 008ba9 ldx #$005b
  758. 008bac jsl $0089fe
  759. 008bb0 ldx #$0000
  760. 008bb3 jsl $008c4e
  761. 008bb7 ldx #$0007
  762. 008bba jsl $008c4e
  763. 008bbe rtl
  764. 008c4e lda #$80
  765. 008c50 sta $2115
  766. 008c53 lda $008ca0,x
  767. 008c57 sta $0002
  768. 008c5a stz $0003
  769. 008c5d rep #$20
  770. 008c5f lda $008c9a,x
  771. 008c63 sta $0010
  772. 008c66 lda $008c9c,x
  773. 008c6a sta $0012
  774. 008c6d lda $008c9e,x
  775. 008c71 sta $0000
  776. 008c74 ldx $0010
  777. 008c77 ldy $0012
  778. 008c7a stx $2116
  779. 008c7d lda $2139
  780. 008c80 sty $2116
  781. 008c83 sta $2118
  782. 008c86 txa
  783. 008c87 clc
  784. 008c88 adc $0002
  785. 008c8b tax
  786. 008c8c tya
  787. 008c8d clc
  788. 008c8e adc $0002
  789. 008c91 tay
  790. 008c92 dec $0000
  791. 008c95 bne $8c7a
  792. 008c97 sep #$20
  793. 008c99 rtl
  794. 008ca8 lda $0cb0
  795. 008cab cmp #$03
  796. 008cad beq $8cb2
  797. 008caf jmp $97d5
  798.  
  799. 008cf6 phd
  800. 008cf7 stx $0014
  801. 008cfa lda $00970d,x
  802. 008cfe sta $0010
  803. 008d01 lda $009710,x
  804. 008d05 sta $0001
  805. 008d08 rep #$20
  806. 008d0a lda $00970e,x
  807. 008d0e sta $0011
  808. 008d11 lda $0014
  809. 008d14 clc
  810. 008d15 adc #$0005
  811. 008d18 sta $0014
  812. 008d1b lda #$0000
  813. 008d1e tcd
  814. 008d1f tay
  815. 008d20 sep #$20
  816. 008d22 lda $009712,x
  817. 008d26 sta $0000
  818. 008d29 tyx
  819. 008d2a cmp #$01
  820. 008d2c bne $8d31
  821. 008d2e ldx #$0100
  822. 008d31 lda [$10],y
  823. 008d33 sta $0400,x ; Store player palette?
  824. 008d36 iny
  825. 008d37 inx
  826. 008d38 dec $0001
  827. 008d3b bne $8d31
  828. 008d3d lda $0000
  829. 008d40 bmi $8d4a
  830. 008d42 pld
  831. 008d43 ora $00d6
  832. 008d46 sta $00d6
  833. 008d49 rtl
  834.  
  835. 008e73 phd
  836. 008e74 jsr $8e9b
  837. 008e77 rep #$20
  838. 008e79 lda #$0000
  839. 008e7c tcd
  840. 008e7d lda #$000f
  841. 008e80 sta $00
  842. 008e82 lda $07e000,x
  843. 008e86 sta $0500,y
  844. 008e89 inx
  845. 008e8a inx
  846. 008e8b iny
  847. 008e8c iny
  848. 008e8d dec $00
  849. 008e8f bpl $8e82
  850. 008e91 lda #$0001
  851. 008e94 tsb $00d6
  852. 008e97 pld
  853. 008e98 sep #$20
  854. 008e9a rtl
  855. 008e9b rep #$20
  856. 008e9d and #$00ff
  857. 008ea0 xba
  858. 008ea1 lsr a
  859. 008ea2 lsr a
  860. 008ea3 lsr a
  861. 008ea4 tax
  862. 008ea5 sep #$20
  863. 008ea7 rts
  864.  
  865. 008ea8 sep #$10
  866. 008eaa ldx $00e3
  867. 008ead rep #$10
  868. 008eaf lda #$08
  869. 008eb1 sta $0900,x
  870. 008eb4 inx
  871. 008eb5 stz $0900,x
  872. 008eb8 inx
  873. 008eb9 lda #$80
  874. 008ebb sta $0900,x
  875. 008ebe inx
  876. 008ebf stz $0900,x
  877. 008ec2 inx
  878. 008ec3 lda #$7c
  879. 008ec5 sta $0900,x
  880. 008ec8 inx
  881. 008ec9 lda #$20
  882. 008ecb sta $0900,x
  883. 008ece inx
  884. 008ecf stz $0900,x
  885. 008ed2 inx
  886. 008ed3 txa
  887. 008ed4 sta $00e3
  888. 008ed7 rtl
  889.  
  890. 008f1a xba
  891. 008f1b lda $00d0
  892. 008f1e beq $8f2a
  893. 008f2a inc $00d0
  894. 008f2d ldx #$0060
  895. 008f30 lda #$08
  896. 008f32 jsl $00815e
  897. 008f36 lda #$00
  898. 008f38 rtl
  899. 008f3b xba
  900. 008f3c lda $00d0
  901. 008f3f beq $8f4b
  902. 008f4b inc $00d0
  903. 008f4e ldx #$0060
  904. 008f51 lda #$08
  905. 008f53 jsl $00815e
  906. 008f57 lda #$01
  907. 008f59 jsl $00819c
  908. 008f5d lda $00d0
  909. 008f60 bne $8f57
  910. 008f62 rtl
  911. 0097d5 phb
  912. 0097d6 lda #$00
  913. 0097d8 pha
  914. 0097d9 plb
  915. 0097da jsr $9b42
  916. 0097dd lda #$00
  917. 0097df xba
  918. 0097e0 lda $0cb0
  919. 0097e3 asl a
  920. 0097e4 tax
  921. 0097e5 rep #$20
  922. 0097e7 lda $00986b,x
  923. 0097eb sta $001e
  924. 0097ee sep #$20
  925. 0097f0 lda #$00
  926. 0097f2 xba
  927. 0097f3 lda $0cb1
  928. 0097f6 asl a
  929. 0097f7 rep #$20
  930. 0097f9 clc
  931. 0097fa adc $001e
  932. 0097fd tax
  933. 0097fe lda $00986b,x
  934. 009802 sta $001e
  935. 009805 sep #$20
  936. 009807 jsr $981d
  937. 00980a ldx $001e
  938. 00980d lda $00986d,x
  939. 009811 bmi $981b
  940. 009813 inx
  941. 009814 inx
  942. 009815 inx
  943. 009816 stx $001e
  944. 009819 bra $9807
  945. 00981b plb
  946. 00981c rtl
  947. 00981d lda #$80
  948. 00981f sta $2115
  949. 009822 rep #$20
  950. 009824 ldx $001e
  951. 009827 lda $00986b,x
  952. 00982b sta $0010
  953. 00982e lda $00986d,x
  954. 009832 and #$007f
  955. 009835 xba
  956. 009836 clc
  957. 009837 adc #$2000
  958. 00983a sta $2116
  959. 00983d sep #$20
  960. 00983f ldx $0010
  961. 009842 lda $0000,x
  962. 009845 sta $0014
  963. 009848 lda $0001,x
  964. 00984b sta $0015
  965. 00984e lda $0002,x
  966. 009851 sta $0016
  967. 009854 rep #$20
  968. 009856 lda $0003,x
  969. 009859 tax
  970. 00985a ldy #$0000
  971. 00985d lda
  972. 00985f sta $2118
  973. 009862 iny
  974. 009863 iny
  975. 009864 dex
  976. 009865 dex
  977. 009866 bne $985d
  978. 009868 sep #$20
  979. 00986a rts
  980. 009b42 lda #$80
  981. 009b44 sta $2115
  982. 009b47 lda #$00
  983. 009b49 xba
  984. 009b4a lda $0cb0
  985. 009b4d asl a
  986. 009b4e tax
  987. 009b4f rep #$20
  988. 009b51 lda $009c34,x
  989. 009b55 sta $001e
  990. 009b58 sep #$20
  991. 009b5a lda #$00
  992. 009b5c xba
  993. 009b5d lda $0cb1
  994. 009b60 asl a
  995. 009b61 tax
  996. 009b62 rep #$20
  997. 009b64 clc
  998. 009b65 adc $001e
  999. 009b68 tax
  1000. 009b69 lda $009c34,x
  1001. 009b6d tax
  1002. 009b6e sep #$20
  1003. 009b70 ldy #$2000
  1004. 009b73 jsr $9ba3
  1005. 009b76 lda $009c34,x
  1006. 009b7a beq $9ba2
  1007. 009b7c inx
  1008. 009b7d sta $0000
  1009. 009b80 jsr $9bae
  1010. 009b83 inx
  1011. 009b84 dec $0000
  1012. 009b87 bne $9b80
  1013. 009b89 ldy #$2100
  1014. 009b8c jsr $9ba3
  1015. 009b8f lda $009c34,x
  1016. 009b93 beq $9ba2
  1017. 009ba2 rts
  1018. 009ba3 lda #$00
  1019. 009ba5 jsr $9bbb
  1020. 009ba8 lda #$00
  1021. 009baa jsr $9bbb
  1022. 009bad rts
  1023. 009bae lda $009c34,x
  1024. 009bb2 bpl $9bbb
  1025. 009bbb sty $2116
  1026. 009bbe phy
  1027. 009bbf rep #$20
  1028. 009bc1 and #$007f
  1029. 009bc4 asl a
  1030. 009bc5 asl a
  1031. 009bc6 tay
  1032. 009bc7 lda #$0007
  1033. 009bca sta $0004
  1034. 009bcd lda $9bf4,y
  1035. 009bd0 sta $2118
  1036. 009bd3 dec $0004
  1037. 009bd6 bpl $9bd0
  1038. 009bd8 iny
  1039. 009bd9 iny
  1040. 009bda lda #$0007
  1041. 009bdd sta $0004
  1042. 009be0 lda $9bf4,y
  1043. 009be3 sta $2118
  1044. 009be6 dec $0004
  1045. 009be9 bpl $9be3
  1046. 009beb pla
  1047. 009bec clc
  1048. 009bed adc #$0010
  1049. 009bf0 tay
  1050. 009bf1 sep #$20
  1051. 009bf3 rts
  1052. 009d2a phb
  1053. 009d2b lda #$07
  1054. 009d2d pha
  1055. 009d2e plb
  1056. 009d2f lda #$00
  1057. 009d31 xba
  1058. 009d32 lda $0cb0
  1059. 009d35 asl a
  1060. 009d36 tax
  1061. 009d37 rep #$20
  1062. 009d39 lda $009db2,x
  1063. 009d3d sta $0010
  1064. 009d40 sep #$20
  1065. 009d42 lda #$00
  1066. 009d44 xba
  1067. 009d45 lda $0cb1
  1068. 009d48 asl a
  1069. 009d49 rep #$20
  1070. 009d4b clc
  1071. 009d4c adc $0010
  1072. 009d4f tax
  1073. 009d50 lda $009db2,x
  1074. 009d54 sta $0010
  1075. 009d57 ldy #$0020
  1076. 009d5a sep #$20
  1077. 009d5c ldx $0010
  1078. 009d5f lda $009db2,x
  1079. 009d63 sta $0000
  1080. 009d66 and #$7f
  1081. 009d68 sta $0008
  1082. 009d6b rep #$20
  1083. 009d6d lda $009db3,x
  1084. 009d71 sta $0018
  1085. 009d74 sep #$20
  1086. 009d76 inx
  1087. 009d77 inx
  1088. 009d78 inx
  1089. 009d79 stx $0010
  1090. 009d7c jsr $9d90
  1091. 009d7f lda $0000
  1092. 009d82 bpl $9d86
  1093. 009d86 plb
  1094. 009d87 lda $00d6
  1095. 009d8a ora #$02
  1096. 009d8c sta $00d6
  1097. 009d8f rtl
  1098. 009d90 ldx $0018
  1099. 009d93 rep #$20
  1100. 009d95 lda #$000f
  1101. 009d98 sta $000a
  1102. 009d9b lda $e800,x
  1103. 009d9e sta $0400,y
  1104. 009da1 inx
  1105. 009da2 inx
  1106. 009da3 iny
  1107. 009da4 iny
  1108. 009da5 dec $000a
  1109. 009da8 bpl $9d9b
  1110. 009daa sep #$20
  1111. 009dac dec $0008
  1112. 009daf bne $9d93
  1113. 009db1 rts
  1114.  
  1115. 009ef3 lda $4212
  1116. 009ef6 and #$01
  1117. 009ef8 bne $9ef3
  1118. 009efa ldx #$0007
  1119. 009efd lda $0110,x
  1120. 009f00 eor #$ff
  1121. 009f02 sta $0118,x ; Store last player inputs inverted
  1122. 009f05 lda $4218,x
  1123. 009f08 sta $0110,x ; Store player input
  1124. 009f0b dex
  1125. 009f0c bpl $9efd
  1126. 009f0e rtl
  1127.  
  1128. 009f5a ora #$00
  1129. 009f5c beq $9f7e
  1130. 009f5e phy
  1131. 009f5f phx
  1132. 009f60 sep #$10
  1133. 009f62 ldy $0101
  1134. 009f65 sta $03c2,y
  1135. 009f68 lda #$00
  1136. 009f6a sta $03c0,y
  1137. 009f6d sta $03c1,y
  1138. 009f70 tya
  1139. 009f71 inc
  1140. 009f72 inc
  1141. 009f73 inc
  1142. 009f74 inc
  1143. 009f75 and #$3c
  1144. 009f77 sta $0101
  1145. 009f7a rep #$10
  1146. 009f7c plx
  1147. 009f7d ply
  1148. 009f7e rtl
  1149.  
  1150. 009f95 sta $0772
  1151. 009f98 stz $0770
  1152. 009f9b rep #$20
  1153. 009f9d lda $07
  1154. 009f9f sec
  1155. 009fa0 sbc $0e07
  1156. 009fa3 sta $0773
  1157. 009fa6 sep #$20
  1158. 009fa8 rep #$20
  1159. 009faa lda $0773
  1160. 009fad sec
  1161. 009fae sbc #$0080
  1162. 009fb1 bpl $9fc2
  1163. 009fb3 cmp #$ff81
  1164. 009fb6 bcs $9fbb
  1165. 009fbb sep #$20
  1166. 009fbd sta $0771
  1167. 009fc0 bra $9fcf
  1168. 009fcf ora #$00
  1169. 009fd1 beq $9ffa
  1170. 009fd3 phy
  1171. 009fd4 phx
  1172. 009fd5 sep #$10
  1173. 009fd7 ldy $0101
  1174. 009fda lda $0770
  1175. 009fdd sta $03c0,y
  1176. 009fe0 lda $0771
  1177. 009fe3 sta $03c1,y
  1178. 009fe6 lda $0772
  1179. 009fe9 sta $03c2,y
  1180. 009fec tya
  1181. 009fed inc
  1182. 009fee inc
  1183. 009fef inc
  1184. 009ff0 inc
  1185. 009ff1 and #$3c
  1186. 009ff3 sta $0101
  1187. 009ff6 rep #$10
  1188. 009ff8 plx
  1189. 009ff9 ply
  1190. 009ffa rtl
  1191. 00a0a8 rep #$20
  1192. 00a0aa lda $0000,x
  1193. 00a0ad inx
  1194. 00a0ae inx
  1195. 00a0af phx
  1196. 00a0b0 tax
  1197. 00a0b1 ldy #$0000
  1198. 00a0b4 lda $14
  1199. 00a0b6 sta
  1200. 00a0b8 inc $10
  1201. 00a0ba inc $10
  1202. 00a0bc lda $0000,x
  1203. 00a0bf sta
  1204. 00a0c1 iny
  1205. 00a0c2 iny
  1206. 00a0c3 lda $0002,x
  1207. 00a0c6 sta
  1208. 00a0c8 iny
  1209. 00a0c9 iny
  1210. 00a0ca sep #$20
  1211. 00a0cc lda $1a
  1212. 00a0ce sta
  1213. 00a0d0 iny
  1214. 00a0d1 iny
  1215. 00a0d2 iny
  1216. 00a0d3 iny
  1217. 00a0d4 iny
  1218. 00a0d5 rep #$20
  1219. 00a0d7 inx
  1220. 00a0d8 inx
  1221. 00a0d9 inx
  1222. 00a0da inx
  1223. 00a0db stz $0002
  1224. 00a0de lda $0000,x
  1225. 00a0e1 sta $18
  1226. 00a0e3 lda $0002,x
  1227. 00a0e6 sta
  1228. 00a0e8 sta $0a
  1229. 00a0ea iny
  1230. 00a0eb iny
  1231. 00a0ec lda $0004,x
  1232. 00a0ef sta
  1233. 00a0f1 sta $0c
  1234. 00a0f3 iny
  1235. 00a0f4 iny
  1236. 00a0f5 inx
  1237. 00a0f6 inx
  1238. 00a0f7 inx
  1239. 00a0f8 inx
  1240. 00a0f9 inx
  1241. 00a0fa inx
  1242. 00a0fb phx
  1243. 00a0fc jsr $a145
  1244. 00a0ff plx
  1245. 00a100 lda $18
  1246. 00a102 bpl $a129
  1247. 00a104 lda $0000,x
  1248. 00a107 sta $18
  1249. 00a109 lda $0002,x
  1250. 00a10c sec
  1251. 00a10d sbc $0a
  1252. 00a10f sta
  1253. 00a111 lda $0002,x
  1254. 00a114 sta $0a
  1255. 00a116 iny
  1256. 00a117 iny
  1257. 00a118 lda $0004,x
  1258. 00a11b sec
  1259. 00a11c sbc $0c
  1260. 00a11e sta
  1261. 00a120 lda $0004,x
  1262. 00a123 sta $0c
  1263. 00a125 iny
  1264. 00a126 iny
  1265. 00a127 bra $a0f5
  1266. 00a129 lda $0000,x
  1267. 00a12c tyx
  1268. 00a12d ldy #$0007
  1269. 00a130 sta
  1270. 00a132 txy
  1271. 00a133 tyx
  1272. 00a134 lda $02
  1273. 00a136 ldy #$0005
  1274. 00a139 sta
  1275. 00a13b txa
  1276. 00a13c clc
  1277. 00a13d adc $14
  1278. 00a13f sta $14
  1279. 00a141 sep #$20
  1280. 00a143 plx
  1281. 00a144 rts
  1282. 00a145 lda $1a
  1283. 00a147 cmp #$0002
  1284. 00a14a beq $a157
  1285. 00a14c cmp #$0000
  1286. 00a14f bne $a154
  1287. 00a151 brl $a24d
  1288.  
  1289. 00a1fc phb
  1290. 00a1fd lda #$00
  1291. 00a1ff pha
  1292. 00a200 plb
  1293. 00a201 rep #$20
  1294. 00a203 phd
  1295. 00a204 lda #$0000
  1296. 00a207 tcd
  1297. 00a208 lda $a218,x
  1298. 00a20b tax
  1299. 00a20c sep #$20
  1300. 00a20e lda #$02
  1301. 00a210 pha
  1302. 00a211 plb
  1303. 00a212 jsr $a21e
  1304. 00a215 pld
  1305. 00a216 plb
  1306. 00a217 rtl
  1307.  
  1308. 00a21e stz $1c
  1309. 00a220 stz $1d
  1310. 00a222 lda #$7e
  1311. 00a224 sta $12
  1312. 00a226 sta $16
  1313. 00a228 tya
  1314. 00a229 ldy #$3000
  1315. 00a22c sty $10
  1316. 00a22e rep #$20
  1317. 00a230 tya
  1318. 00a231 clc
  1319. 00a232 adc #$0080
  1320. 00a235 sta $14
  1321. 00a237 sep #$20
  1322. 00a239 lda $0000,x
  1323. 00a23c sta $00
  1324. 00a23e inx
  1325. 00a23f lda #$00
  1326. 00a241 sta $1a
  1327. 00a243 stz $1b
  1328. 00a245 jsr $a0a8
  1329. 00a248 dec $00
  1330. 00a24a bne $a245
  1331. 00a24c rts
  1332.  
  1333. 00a24d lda $18
  1334. 00a24f ora #$8000
  1335. 00a252 tax
  1336. 00a253 lda $0000,x
  1337. 00a256 and #$00ff
  1338. 00a259 sta $04
  1339. 00a25b clc
  1340. 00a25c adc $02
  1341. 00a25e sta $02
  1342. 00a260 lda $0000,x
  1343. 00a263 and #$ff00
  1344. 00a266 sta $1e
  1345. 00a268 lda $04
  1346. 00a26a sta $06
  1347. 00a26c txa
  1348. 00a26d clc
  1349. 00a26e adc $06
  1350. 00a270 sta $06
  1351. 00a272 sep #$20
  1352. 00a274 lda #$00
  1353. 00a276 xba
  1354. 00a277 lda $0002,x
  1355. 00a27a bpl $a282
  1356. 00a27c xba
  1357. 00a27d lda #$10
  1358. 00a27f xba
  1359. 00a280 and #$7f
  1360. 00a282 rep #$20
  1361. 00a284 ora $1e
  1362. 00a286 sta
  1363. 00a288 inx
  1364. 00a289 iny
  1365. 00a28a iny
  1366. 00a28b dec $04
  1367. 00a28d beq $a2e8
  1368. 00a28f sep #$20
  1369. 00a291 stx $08
  1370. 00a293 ldx $06
  1371. 00a295 lda #$00
  1372. 00a297 xba
  1373. 00a298 lda $0002,x
  1374. 00a29b bpl $a2a1
  1375. 00a29d xba
  1376. 00a29e lda #$ff
  1377. 00a2a0 xba
  1378. 00a2a1 rep #$20
  1379. 00a2a3 sta
  1380. 00a2a5 clc
  1381. 00a2a6 adc $0a
  1382. 00a2a8 sta $0a
  1383. 00a2aa iny
  1384. 00a2ab iny
  1385. 00a2ac inx
  1386. 00a2ad sep #$20
  1387. 00a2af lda #$00
  1388. 00a2b1 xba
  1389. 00a2b2 lda $0002,x
  1390. 00a2b5 bpl $a2bb
  1391. 00a2bb rep #$20
  1392. 00a2bd sta
  1393. 00a2bf clc
  1394. 00a2c0 adc $0c
  1395. 00a2c2 sta $0c
  1396. 00a2c4 iny
  1397. 00a2c5 iny
  1398. 00a2c6 inx
  1399. 00a2c7 stx $06
  1400. 00a2c9 ldx $08
  1401. 00a2cb sep #$20
  1402. 00a2cd lda #$00
  1403. 00a2cf xba
  1404. 00a2d0 lda $0002,x
  1405. 00a2d3 bpl $a2db
  1406. 00a2d5 xba
  1407. 00a2d6 lda #$10
  1408. 00a2d8 xba
  1409. 00a2d9 and #$7f
  1410. 00a2db rep #$20
  1411. 00a2dd ora $1e
  1412. 00a2df sta
  1413. 00a2e1 inx
  1414. 00a2e2 iny
  1415. 00a2e3 iny
  1416. 00a2e4 dec $04
  1417. 00a2e6 bne $a28f
  1418. 00a2e8 rts
  1419. 00a405 lda $47
  1420. 00a407 bne $a424
  1421. 00a409 lda $44
  1422. 00a40b beq $a429
  1423. 00a429 lda #$01
  1424. 00a42b rtl
  1425. 00a70b phb
  1426. 00a70c lda $22
  1427. 00a70e pha
  1428. 00a70f plb
  1429. 00a710 rep #$20
  1430. 00a712 tya
  1431. 00a713 and #$00ff
  1432. 00a716 sta $0000
  1433. 00a719 txa
  1434. 00a71a clc
  1435. 00a71b adc $0000
  1436. 00a71e tax
  1437. 00a71f lda $0000,x
  1438. 00a722 tax
  1439. 00a723 sep #$20
  1440. 00a725 bra $a72c
  1441. 00a727 phb
  1442. 00a728 lda $22
  1443. 00a72a pha
  1444. 00a72b plb
  1445. 00a72c stx $1a
  1446. 00a72e lda $0001,x
  1447. 00a731 sta $1e
  1448. 00a733 sta $50
  1449. 00a735 lda $0002,x
  1450. 00a738 sta $1f
  1451. 00a73a lda $23
  1452. 00a73c xba
  1453. 00a73d lda $0000,x
  1454. 00a740 tax
  1455. 00a741 rep #$20
  1456. 00a743 lda $7e0000,x
  1457. 00a747 sta $1c
  1458. 00a749 tax
  1459. 00a74a lda $7e0000,x
  1460. 00a74e sta $24
  1461. 00a750 lda $7e0002,x
  1462. 00a754 sta $26
  1463. 00a756 sep #$20
  1464. 00a758 plb
  1465. 00a759 rtl
  1466. 00a75a dec $1e
  1467. 00a75c beq $a75f
  1468. 00a75e rtl
  1469. 00a75f phb
  1470. 00a760 lda $22
  1471. 00a762 pha
  1472. 00a763 plb
  1473. 00a764 ldx $1a
  1474. 00a766 inx
  1475. 00a767 inx
  1476. 00a768 inx
  1477. 00a769 lda $0000,x
  1478. 00a76c bpl $a775
  1479. 00a76e ldy $0001,x
  1480. 00a771 tyx
  1481. 00a772 lda $0000,x
  1482. 00a775 tay
  1483. 00a776 lda $0001,x
  1484. 00a779 sta $1e
  1485. 00a77b lda $0002,x
  1486. 00a77e sta $1f
  1487. 00a780 stx $1a
  1488. 00a782 lda $23
  1489. 00a784 xba
  1490. 00a785 tya
  1491. 00a786 tax
  1492. 00a787 rep #$20
  1493. 00a789 lda $7e0000,x
  1494. 00a78d cmp $1c
  1495. 00a78f beq $a7a8
  1496. 00a791 sta $1c
  1497. 00a793 tax
  1498. 00a794 lda $7e0000,x
  1499. 00a798 sta $24
  1500. 00a79a lda $7e0002,x
  1501. 00a79e sta $26
  1502. 00a7a0 sep #$20
  1503. 00a7a2 lda $1e
  1504. 00a7a4 sta $50
  1505. 00a7a6 plb
  1506. 00a7a7 rtl
  1507. 00a7a8 sta $1c
  1508. 00a7aa tax
  1509. 00a7ab lda $7e0000,x
  1510. 00a7af sta $24
  1511. 00a7b1 lda $7e0002,x
  1512. 00a7b5 sta $26
  1513. 00a7b7 sep #$20
  1514. 00a7b9 plb
  1515. 00a7ba rtl
  1516. 00a905 phb
  1517. 00a906 lda $22
  1518. 00a908 pha
  1519. 00a909 plb
  1520. 00a90a rep #$20
  1521. 00a90c tya
  1522. 00a90d and #$00ff
  1523. 00a910 sta $0000
  1524. 00a913 txa
  1525. 00a914 clc
  1526. 00a915 adc $0000
  1527. 00a918 tax
  1528. 00a919 lda $0000,x
  1529. 00a91c tax
  1530. 00a91d sep #$20
  1531. 00a91f bra $a926
  1532. 00a926 stx $1a
  1533. 00a928 lda $0002,x
  1534. 00a92b sta $1e
  1535. 00a92d lda $0003,x
  1536. 00a930 sta $1f
  1537. 00a932 rep #$20
  1538. 00a934 lda $0000,x
  1539. 00a937 sta $1c
  1540. 00a939 tax
  1541. 00a93a lda $0000,x
  1542. 00a93d sta $24
  1543. 00a93f lda $0002,x
  1544. 00a942 sta $26
  1545. 00a944 sep #$20
  1546. 00a946 plb
  1547. 00a947 rtl
  1548. 00ad4f lda #$06
  1549. 00ad51 sta $0000
  1550. 00ad54 ldx #$1700
  1551. 00ad57 lda $0000,x
  1552. 00ad5a beq $ad70
  1553. 00ad5c dec $0000
  1554. 00ad5f beq $ad6b
  1555. 00ad61 rep #$20
  1556. 00ad63 txa
  1557. 00ad64 clc
  1558. 00ad65 adc #$0080
  1559. 00ad68 tax
  1560. 00ad69 bra $ad57
  1561. 00ad70 sep #$20
  1562. 00ad72 rtl
  1563. 00ad73 rep #$20
  1564. 00ad75 stz $00
  1565. 00ad77 stz $02
  1566. 00ad79 stz $04
  1567. 00ad7b sep #$20
  1568. 00ad7d rtl
  1569. 00ae1a jsl $00af7b
  1570. 00ae1e jmp $ae30
  1571. 00ae30 lda $3a
  1572. 00ae32 beq $ae3e
  1573. 00ae3e lda #$02
  1574. 00ae40 bit $00
  1575. 00ae42 beq $ae6b
  1576. 00ae44 lda $44
  1577. 00ae46 bmi $ae6b
  1578. 00ae48 ldx $0ac4
  1579. 00ae4b beq $ae6b
  1580. 00ae4d rep #$20
  1581. 00ae4f ldx $0ac6
  1582. 00ae52 lda $0d
  1583. 00ae54 sec
  1584. 00ae55 sbc $4e
  1585. 00ae57 sta $0000,x
  1586. 00ae5a tdc
  1587. 00ae5b sta $0002,x
  1588. 00ae5e txa
  1589. 00ae5f inc
  1590. 00ae60 inc
  1591. 00ae61 inc
  1592. 00ae62 inc
  1593. 00ae63 sta $0ac6
  1594. 00ae66 dec $0ac4
  1595. 00ae69 sep #$20
  1596. 00ae6b rtl
  1597. 00ae6c ldx $0720
  1598. 00ae6f beq $ae85
  1599. 00ae71 rep #$20
  1600. 00ae73 ldx $0722
  1601. 00ae76 tdc
  1602. 00ae77 sta $0000,x
  1603. 00ae7a txa
  1604. 00ae7b inc
  1605. 00ae7c inc
  1606. 00ae7d sta $0722
  1607. 00ae80 dec $0720
  1608. 00ae83 sep #$20
  1609. 00ae85 rtl
  1610.  
  1611. 00aeb8 lda $22
  1612. 00aeba pha
  1613. 00aebb plb
  1614. 00aebc lda $27
  1615. 00aebe beq $aeca
  1616. 00aec0 bpl $aed0
  1617. 00aec2 rep #$20
  1618. 00aec4 lda $0d
  1619. 00aec6 cmp $0a
  1620. 00aec8 beq $aed0
  1621. 00aeca stz $5a
  1622. 00aecc stz $5b
  1623. 00aece bra $af29
  1624. 00aed0 sep #$20
  1625. 00aed2 lda #$00
  1626. 00aed4 xba
  1627. 00aed5 lda $27
  1628. 00aed7 and #$7f
  1629. 00aed9 sec
  1630. 00aeda sbc #$07
  1631. 00aedc clc
  1632. 00aedd adc ($2a)
  1633. 00aedf tay
  1634. 00aee0 lda ($2a),y
  1635. 00aee2 bpl $aee7
  1636. 00aee7 tax
  1637. 00aee8 lda $20
  1638. 00aeea rep #$20
  1639. 00aeec beq $aef4
  1640. 00aeee txa
  1641. 00aeef eor #$ffff
  1642. 00aef2 inc
  1643. 00aef3 tax
  1644. 00aef4 txa
  1645. 00aef5 clc
  1646. 00aef6 adc $07
  1647. 00aef8 sta $5a
  1648. 00aefa sep #$20
  1649. 00aefc iny
  1650. 00aefd lda #$00
  1651. 00aeff xba
  1652. 00af00 lda ($2a),y
  1653. 00af02 bpl $af07
  1654. 00af07 rep #$20
  1655. 00af09 clc
  1656. 00af0a adc $0a
  1657. 00af0c sta $5c
  1658. 00af0e sep #$20
  1659. 00af10 iny
  1660. 00af11 lda ($2a),y
  1661. 00af13 sta $5e
  1662. 00af15 iny
  1663. 00af16 lda ($2a),y
  1664. 00af18 sta $5f
  1665. 00af1a iny
  1666. 00af1b lda ($2a),y
  1667. 00af1d sta $60
  1668. 00af1f iny
  1669. 00af20 lda ($2a),y
  1670. 00af22 sta $61
  1671. 00af24 iny
  1672. 00af25 lda ($2a),y
  1673. 00af27 sta $62
  1674. 00af29 sep #$20
  1675. 00af2b lda $0f
  1676. 00af2d bne $af74
  1677. 00af2f lda #$00
  1678. 00af31 xba
  1679. 00af32 lda $26
  1680. 00af34 beq $af74
  1681. 00af36 tay
  1682. 00af37 lda ($2a),y
  1683. 00af39 bpl $af3e
  1684. 00af3e tax
  1685. 00af3f lda $20
  1686. 00af41 rep #$20
  1687. 00af43 beq $af4b
  1688. 00af45 txa
  1689. 00af46 eor #$ffff
  1690. 00af49 inc
  1691. 00af4a tax
  1692. 00af4b txa
  1693. 00af4c clc
  1694. 00af4d adc $07
  1695. 00af4f sta $54
  1696. 00af51 sep #$20
  1697. 00af53 iny
  1698. 00af54 lda #$00
  1699. 00af56 xba
  1700. 00af57 lda ($2a),y
  1701. 00af59 bpl $af5e
  1702. 00af5e rep #$20
  1703. 00af60 clc
  1704. 00af61 adc $0a
  1705. 00af63 sta $56
  1706. 00af65 sep #$20
  1707. 00af67 iny
  1708. 00af68 lda ($2a),y
  1709. 00af6a sta $58
  1710. 00af6c iny
  1711. 00af6d lda ($2a),y
  1712. 00af6f sta $59
  1713. 00af71 iny
  1714. 00af72 bra $af78
  1715. 00af78 phk
  1716. 00af79 plb
  1717. 00af7a rtl
  1718.  
  1719. 00af7b lda $00
  1720. 00af7d beq $afaa
  1721. 00af7f lda #$02
  1722. 00af81 trb $00
  1723. 00af83 rep #$20
  1724. 00af85 lda $07
  1725. 00af87 sec
  1726. 00af88 sbc $0e07
  1727. 00af8b clc
  1728. 00af8c adc #$0030
  1729. 00af8f cmp #$0160
  1730. 00af92 bcs $afaa
  1731. 00af94 lda $0a
  1732. 00af96 sec
  1733. 00af97 sbc $0e0a
  1734. 00af9a clc
  1735. 00af9b adc #$0080
  1736. 00af9e cmp #$0200
  1737. 00afa1 bcs $afaa
  1738. 00afa3 sep #$20
  1739. 00afa5 lda #$02
  1740. 00afa7 tsb $00
  1741. 00afa9 rtl
  1742. 00b0f9 lda $010a
  1743. 00b0fc adc #$01
  1744. 00b0fe sta $010a
  1745. 00b101 lda $010b
  1746. 00b104 adc #$03
  1747. 00b106 sta $010b
  1748. 00b109 lda $010c
  1749. 00b10c adc #$05
  1750. 00b10e sta $010c
  1751. 00b111 lda $010d
  1752. 00b114 adc #$07
  1753. 00b116 sta $010d
  1754. 00b119 lda $0cb4
  1755. 00b11c bne $b133
  1756. 00b11e lda $010d
  1757. 00b121 adc $010c
  1758. 00b124 sta $010c
  1759. 00b127 adc $010b
  1760. 00b12a sta $010b
  1761. 00b12d adc $010a
  1762. 00b130 sta $010a
  1763. 00b133 rtl
  1764. 00c904 lda $0d00
  1765. 00c907 bne $c924
  1766. 00c924 lda #$00
  1767. 00c926 xba
  1768. 00c927 lda $0cb4
  1769. 00c92a and #$07
  1770. 00c92c pha
  1771. 00c92d asl a
  1772. 00c92e asl a
  1773. 00c92f tax
  1774. 00c930 rep #$20
  1775. 00c932 clc
  1776. 00c933 lda $0d07
  1777. 00c936 adc $00c964,x
  1778. 00c93a sta $0006
  1779. 00c93d sec
  1780. 00c93e lda $0d0d
  1781. 00c941 sbc $0d4e
  1782. 00c944 clc
  1783. 00c945 adc $00c966,x
  1784. 00c949 sta $0008
  1785. 00c94c sep #$20
  1786. 00c94e jsl $00c984
  1787. 00c952 bne $c958
  1788. 00c954 jsl $00d399
  1789. 00c958 lda #$00
  1790. 00c95a xba
  1791. 00c95b pla
  1792. 00c95c tax
  1793. 00c95d lda $000a
  1794. 00c960 sta $0170,x
  1795. 00c963 rtl
  1796. 00c984 rep #$20
  1797. 00c986 lda $0006
  1798. 00c989 sec
  1799. 00c98a sbc $0e07
  1800. 00c98d bmi $c9ab
  1801. 00c98f cmp #$0100
  1802. 00c992 bcs $c9ab
  1803. 00c994 lda $0008
  1804. 00c997 sec
  1805. 00c998 sbc $0e0a
  1806. 00c99b bmi $c9ab
  1807. 00c99d cmp #$0100
  1808. 00c9a0 bcs $c9ab
  1809. 00c9a2 lda #$0000
  1810. 00c9a5 sta $000a
  1811. 00c9a8 sep #$20
  1812. 00c9aa rtl
  1813. 00c9ab lda #$0004
  1814. 00c9ae sta $000a
  1815. 00c9b1 sep #$20
  1816. 00c9b3 rtl
  1817.  
  1818. ; Part of active gameplay
  1819. 00c9b4 lda #$00
  1820. 00c9b6 pha
  1821. 00c9b7 plb
  1822. 00c9b8 jsr $c9e6
  1823. 00c9bb jsl $00e0c6
  1824. 00c9bf jsr $cc89
  1825. 00c9c2 jsl $00cd06
  1826. 00c9c6 jsr $cd53
  1827. 00c9c9 jsr $cd8f
  1828. 00c9cc jsr $cde5
  1829. 00c9cf jsl $00ce74
  1830. 00c9d3 jsl $00cf6f
  1831. 00c9d7 rep #$30
  1832. 00c9d9 lda #$0000
  1833. 00c9dc tcd
  1834. 00c9dd sep #$20
  1835. 00c9df pha
  1836. 00c9e0 plb
  1837. 00c9e1 jsl $00c904
  1838. 00c9e5 rtl
  1839. ; Part of active gameplay
  1840.  
  1841. ; Player simulation handling?
  1842. 00c9e6 jsl $00ca41
  1843. 00c9ea rep #$20
  1844. 00c9ec lda #$0d00 ; Very suspicious indeed
  1845. 00c9ef tcd
  1846. 00c9f0 sep #$20
  1847. 00c9f2 jsr $cc45
  1848. 00c9f5 jsr $cfd3
  1849. 00c9f8 rts
  1850.  
  1851. 00ca41 lda $00cc
  1852. 00ca44 beq $ca83
  1853. 00ca46 ldx #$0d00
  1854. 00ca49 ldy #$0110
  1855. 00ca4c lda $0011,x
  1856. 00ca4f beq $ca54
  1857. 00ca54 rep #$20
  1858. 00ca56 lda $0008,y
  1859. 00ca59 sta $0064,x
  1860. 00ca5c lda $0000,y ; When y is 110 we are looking at player 1's input
  1861. 00ca5f sta $0066,x
  1862. 00ca62 sep #$20
  1863. 00ca64 ldx #$0d80
  1864. 00ca67 ldy #$0110 ; This is incorrect, player 2 should be loading #$0112
  1865. 00ca6a lda $0011,x
  1866. 00ca6d beq $ca72
  1867. 00ca72 rep #$20
  1868. 00ca74 lda $0008,y
  1869. 00ca77 sta $0064,x
  1870. 00ca7a lda $0000,y
  1871. 00ca7d sta $0066,x
  1872. 00ca80 sep #$20
  1873. 00ca82 rtl
  1874.  
  1875. 00cc45 lda $00
  1876. 00cc47 beq $cc58
  1877. 00cc49 bmi $cc54
  1878. 00cc4b lda $44
  1879. 00cc4d bmi $cc59
  1880. 00cc4f jsl $02a210
  1881. 00cc53 rts
  1882.  
  1883. 00cc89 lda #$02
  1884. 00cc8b sta $000f
  1885. 00cc8e rep #$20
  1886. 00cc90 lda #$1000
  1887. 00cc93 tcd
  1888. 00cc94 sep #$20
  1889. 00cc96 lda $00
  1890. 00cc98 beq $cca5
  1891. 00cca5 dec $000f
  1892. 00cca8 bmi $ccb6
  1893. 00ccaa rep #$20
  1894. 00ccac tdc
  1895. 00ccad clc
  1896. 00ccae adc #$00a0
  1897. 00ccb1 tcd
  1898. 00ccb2 sep #$20
  1899. 00ccb4 bra $cc96
  1900. 00ccb6 rts
  1901.  
  1902. 00cd06 rep #$20
  1903. 00cd08 lda #$11e0
  1904. 00cd0b tcd
  1905. 00cd0c sep #$20
  1906. 00cd0e lda $00
  1907. 00cd10 beq $cd1d
  1908. 00cd1d rtl
  1909. 00cd53 lda #$05
  1910. 00cd55 sta $000f
  1911. 00cd58 rep #$20
  1912. 00cd5a lda #$1500
  1913. 00cd5d tcd
  1914. 00cd5e sep #$20
  1915. 00cd60 lda $00
  1916. 00cd62 beq $cd6d
  1917. 00cd6d dec $000f
  1918. 00cd70 bmi $cd7e
  1919. 00cd72 rep #$20
  1920. 00cd74 tdc
  1921. 00cd75 clc
  1922. 00cd76 adc #$0040
  1923. 00cd79 tcd
  1924. 00cd7a sep #$20
  1925. 00cd7c bra $cd60
  1926. 00cd7e rts
  1927. 00cd8f lda #$02
  1928. 00cd91 sta $000f
  1929. 00cd94 rep #$20
  1930. 00cd96 lda #$1c00
  1931. 00cd99 tcd
  1932. 00cd9a sep #$20
  1933. 00cd9c lda $00
  1934. 00cd9e beq $cda9
  1935. 00cda9 dec $000f
  1936. 00cdac bmi $cdba
  1937. 00cdae rep #$20
  1938. 00cdb0 tdc
  1939. 00cdb1 clc
  1940. 00cdb2 adc #$0080
  1941. 00cdb5 tcd
  1942. 00cdb6 sep #$20
  1943. 00cdb8 bra $cd9c
  1944. 00cdba rts
  1945. 00cde5 lda #$04
  1946. 00cde7 sta $000f
  1947. 00cdea rep #$20
  1948. 00cdec lda #$1280
  1949. 00cdef tcd
  1950. 00cdf0 sep #$20
  1951. 00cdf2 lda $00
  1952. 00cdf4 beq $cdff
  1953. 00cdff dec $000f
  1954. 00ce02 bmi $ce10
  1955. 00ce04 rep #$20
  1956. 00ce06 tdc
  1957. 00ce07 clc
  1958. 00ce08 adc #$0080
  1959. 00ce0b tcd
  1960. 00ce0c sep #$20
  1961. 00ce0e bra $cdf2
  1962. 00ce10 rts
  1963. 00ce74 lda #$05
  1964. 00ce76 sta $000f
  1965. 00ce79 rep #$20
  1966. 00ce7b lda #$1700
  1967. 00ce7e tcd
  1968. 00ce7f sep #$20
  1969. 00ce81 lda $00
  1970. 00ce83 beq $ce8e
  1971. 00ce85 lda #$00
  1972. 00ce87 xba
  1973. 00ce88 lda $11
  1974. 00ce8a tax
  1975. 00ce8b jsr ($cea0,x)
  1976. 00ce8e dec $000f
  1977. 00ce91 bmi $ce9f
  1978. 00ce93 rep #$20
  1979. 00ce95 tdc
  1980. 00ce96 clc
  1981. 00ce97 adc #$0080
  1982. 00ce9a tcd
  1983. 00ce9b sep #$20
  1984. 00ce9d bra $ce81
  1985. 00ce9f rtl
  1986. 00cf19 jsl $058c00
  1987. 00cf1d rts
  1988. 00cf24 jsl $05b007
  1989. 00cf28 rts
  1990. 00cf6f lda #$07
  1991. 00cf71 sta $000f
  1992. 00cf74 rep #$20
  1993. 00cf76 lda #$1a00
  1994. 00cf79 tcd
  1995. 00cf7a sep #$20
  1996. 00cf7c lda $00
  1997. 00cf7e beq $cf89
  1998. 00cf89 dec $000f
  1999. 00cf8c bmi $cf9a
  2000. 00cf8e rep #$20
  2001. 00cf90 tdc
  2002. 00cf91 clc
  2003. 00cf92 adc #$0040
  2004. 00cf95 tcd
  2005. 00cf96 sep #$20
  2006. 00cf98 bra $cf7c
  2007. 00cf9a rtl
  2008.  
  2009. 00cfd3 jsr $cfee
  2010. 00cfd6 jsl $00aeb8
  2011. 00cfda lda #$02
  2012. 00cfdc bit $01
  2013. 00cfde beq $cfed
  2014. 00cfed rts
  2015.  
  2016. 00cfee lda $0cd4
  2017. 00cff1 bne $d008
  2018. 00cff3 lda $02
  2019. 00cff5 cmp #$02
  2020. 00cff7 beq $d00d
  2021. 00cff9 cmp #$04
  2022. 00cffb beq $d00d
  2023. 00cffd lda $0cd1
  2024. 00d000 ora $0cd0
  2025. 00d003 ora $0cc3
  2026. 00d006 beq $d00d
  2027. 00d008 jsl $00af7b
  2028. 00d00c rts
  2029.  
  2030. 00d00d lda #$02
  2031. 00d00f tsb $00
  2032. 00d011 rep #$20
  2033. 00d013 stz $0004
  2034. 00d016 stz $0006
  2035. 00d019 lda $07
  2036. 00d01b sec
  2037. 00d01c sbc $0e07
  2038. 00d01f tax
  2039. 00d020 sec
  2040. 00d021 sbc #$0018
  2041. 00d024 bpl $d02b
  2042. 00d02b txa
  2043. 00d02c sec
  2044. 00d02d sbc #$00e8
  2045. 00d030 bmi $d035
  2046. 00d035 lda $0a
  2047. 00d037 sec
  2048. 00d038 sbc $0e0a
  2049. 00d03b tax
  2050. 00d03c sec
  2051. 00d03d sbc #$0020
  2052. 00d040 bpl $d047
  2053. 00d047 txa
  2054. 00d048 sec
  2055. 00d049 sbc #$00d0
  2056. 00d04c bmi $d051
  2057. 00d051 lda $07
  2058. 00d053 sec
  2059. 00d054 sbc $0004
  2060. 00d057 sta $07
  2061. 00d059 lda $0a
  2062. 00d05b cmp $0d
  2063. 00d05d bne $d067
  2064. 00d05f lda $0d
  2065. 00d061 sec
  2066. 00d062 sbc $0006
  2067. 00d065 sta $0d
  2068. 00d067 lda $0a
  2069. 00d069 sec
  2070. 00d06a sbc $0006
  2071. 00d06d sta $0a
  2072. 00d06f sep #$20
  2073. 00d071 lda $44
  2074. 00d073 bpl $d0a3
  2075. 00d0a3 rts
  2076.  
  2077. 00d0a6 rep #$20
  2078. 00d0a8 lda $0cb0
  2079. 00d0ab and #$00ff
  2080. 00d0ae asl a
  2081. 00d0af tax
  2082. 00d0b0 lda $00d0ba,x
  2083. 00d0b4 sta $0cca
  2084. 00d0b7 sep #$20
  2085. 00d0b9 rtl
  2086.  
  2087. 00d0d0 ldx $07
  2088. 00d0d2 stx $0006
  2089. 00d0d5 ldx $0d
  2090. 00d0d7 stx $0008
  2091. 00d0da lda $4e
  2092. 00d0dc bne $d0f8
  2093. 00d0de jsl $00d2f8
  2094. 00d0e2 lda $0000
  2095. 00d0e5 sta $2f
  2096. 00d0e7 lda $000a
  2097. 00d0ea sta $2e
  2098. 00d0ec beq $d0f7
  2099. 00d0f7 rtl
  2100. 00d2f8 jsl $00d309
  2101. 00d2fc beq $d2ff
  2102. 00d2ff jsl $00d365
  2103. 00d303 bne $d308
  2104. 00d305 jmp $d3c1
  2105. 00d309 rep #$20
  2106. 00d30b lda $0006
  2107. 00d30e sec
  2108. 00d30f sbc $0e07
  2109. 00d312 clc
  2110. 00d313 adc #$00b0
  2111. 00d316 cmp #$0260
  2112. 00d319 sta $0002
  2113. 00d31c bcs $d327
  2114. 00d31e lda #$0000
  2115. 00d321 sta $000a
  2116. 00d324 sep #$20
  2117. 00d326 rtl
  2118. 00d365 ldy #$1280
  2119. 00d368 jsr $daf9
  2120. 00d36b bne $d394
  2121. 00d36d ldy #$1300
  2122. 00d370 jsr $daf9
  2123. 00d373 bne $d394
  2124. 00d375 ldy #$1380
  2125. 00d378 jsr $daf9
  2126. 00d37b bne $d394
  2127. 00d37d ldy #$1400
  2128. 00d380 jsr $daf9
  2129. 00d383 bne $d394
  2130. 00d385 ldy #$1480
  2131. 00d388 jsr $daf9
  2132. 00d38b bne $d394
  2133. 00d38d stz $4a
  2134. 00d38f stz $4b
  2135. 00d391 lda #$00
  2136. 00d393 rtl
  2137. 00d399 ldy #$1280
  2138. 00d39c jsr $daf9
  2139. 00d39f bne $d3ce
  2140. 00d3a1 ldy #$1300
  2141. 00d3a4 jsr $daf9
  2142. 00d3a7 bne $d3ce
  2143. 00d3a9 ldy #$1380
  2144. 00d3ac jsr $daf9
  2145. 00d3af bne $d3ce
  2146. 00d3b1 ldy #$1400
  2147. 00d3b4 jsr $daf9
  2148. 00d3b7 bne $d3ce
  2149. 00d3b9 ldy #$1480
  2150. 00d3bc jsr $daf9
  2151. 00d3bf bne $d3ce
  2152. 00d3c1 rep #$20
  2153. 00d3c3 jsr $df51
  2154. 00d3c6 lda $0000
  2155. 00d3c9 asl a
  2156. 00d3ca tax
  2157. 00d3cb jsr ($d3d4,x)
  2158. 00d3ce sta $000a
  2159. 00d3d1 sep #$20
  2160. 00d3d3 rtl
  2161. 00d422 lda #$0000
  2162. 00d425 rts
  2163. 00d44c lda $0008
  2164. 00d44f and #$000f
  2165. 00d452 sec
  2166. 00d453 sbc #$0010
  2167. 00d456 eor #$ffff
  2168. 00d459 inc
  2169. 00d45a sta $0004
  2170. 00d45d stz $0002
  2171. 00d460 lda #$0001
  2172. 00d463 rts
  2173. 00daf9 lda $0000,y
  2174. 00dafc beq $db17
  2175. 00db17 lda #$00
  2176. 00db19 rts
  2177. 00df51 jsr $df85
  2178. 00df54 xba
  2179. 00df55 sta $0010
  2180. 00df58 lda $0006
  2181. 00df5b and #$00f0
  2182. 00df5e lsr a
  2183. 00df5f lsr a
  2184. 00df60 lsr a
  2185. 00df61 lsr a
  2186. 00df62 clc
  2187. 00df63 adc $0010
  2188. 00df66 sta $0010
  2189. 00df69 lda $0008
  2190. 00df6c eor #$ffff
  2191. 00df6f and #$00f0
  2192. 00df72 clc
  2193. 00df73 adc $0010
  2194. 00df76 sta $0010
  2195. 00df79 tax
  2196. 00df7a lda $7f2000,x
  2197. 00df7e and #$00ff
  2198. 00df81 sta $0000
  2199. 00df84 rts
  2200. 00df85 lda $0cdc
  2201. 00df88 tax
  2202. 00df89 jmp ($df8c,x)
  2203. 00dfa0 lda $0007
  2204. 00dfa3 and #$000f
  2205. 00dfa6 clc
  2206. 00dfa7 adc $0cde
  2207. 00dfaa tax
  2208. 00dfab lda $070000,x
  2209. 00dfaf and #$00ff
  2210. 00dfb2 rts
  2211. 00dfed jsr $dff4
  2212. 00dff0 jsr $e010
  2213. 00dff3 rtl
  2214. 00dff4 lda #$00
  2215. 00dff6 xba
  2216. 00dff7 lda $0cb0
  2217. 00dffa asl a
  2218. 00dffb asl a
  2219. 00dffc tax
  2220. 00dffd rep #$20
  2221. 00dfff lda $078084,x
  2222. 00e003 sta $0cdc
  2223. 00e006 lda $078086,x
  2224. 00e00a sta $0cde
  2225. 00e00d sep #$20
  2226. 00e00f rts
  2227. 00e010 rep #$20
  2228. 00e012 phd
  2229. 00e013 phb
  2230. 00e014 lda #$0000
  2231. 00e017 tcd
  2232. 00e018 sta $0012
  2233. 00e01b sep #$20
  2234. 00e01d lda $0cb0
  2235. 00e020 asl a
  2236. 00e021 tax
  2237. 00e022 ldy $e069,x
  2238. 00e025 tyx
  2239. 00e026 lda $0000,x
  2240. 00e029 sta $0000
  2241. 00e02c inx
  2242. 00e02d stx $0010
  2243. 00e030 jsr $e03b
  2244. 00e033 dec $0000
  2245. 00e036 bne $e030
  2246. 00e038 plb
  2247. 00e039 pld
  2248. 00e03a rts
  2249. 00e03b lda #$00
  2250. 00e03d xba
  2251. 00e03e lda ($10)
  2252. 00e040 xba
  2253. 00e041 tax
  2254. 00e042 ldy $0012
  2255. 00e045 rep #$20
  2256. 00e047 inc $0010
  2257. 00e04a sep #$20
  2258. 00e04c phb
  2259. 00e04d lda #$7f
  2260. 00e04f pha
  2261. 00e050 plb
  2262. 00e051 lda #$00
  2263. 00e053 sta $0008
  2264. 00e056 lda $0f8000,x
  2265. 00e05a sta $2000,y
  2266. 00e05d inx
  2267. 00e05e iny
  2268. 00e05f dec $0008
  2269. 00e062 bne $e056
  2270. 00e064 plb
  2271. 00e065 sty $0012
  2272. 00e068 rts
  2273. 00e0c6 lda #$00
  2274. 00e0c8 xba
  2275. 00e0c9 lda #$00
  2276. 00e0cb tcd
  2277. 00e0cc lda $0cf0
  2278. 00e0cf tax
  2279. 00e0d0 jmp ($e0d3,x)
  2280.  
  2281. 00e0d7 rep #$30
  2282. 00e0d9 ldx #$00fe
  2283. 00e0dc lda #$2020
  2284. 00e0df sta $7e2400,x
  2285. 00e0e3 dex
  2286. 00e0e4 dex
  2287. 00e0e5 bpl $e0df
  2288. 00e0e7 ldy #$001e
  2289. 00e0ea lda $e17f,y
  2290. 00e0ed sta $0400,y
  2291. 00e0f0 dey
  2292. 00e0f1 dey
  2293. 00e0f2 bpl $e0ea
  2294. 00e0f4 sep #$20
  2295. 00e0f6 lda #$02
  2296. 00e0f8 tsb $00d6
  2297. 00e0fb ldx #$0047
  2298. 00e0fe ldy #$001c
  2299. 00e101 lda #$24
  2300. 00e103 sta $7e2400,x
  2301. 00e107 inx
  2302. 00e108 inx
  2303. 00e109 dey
  2304. 00e10a bne $e103
  2305. 00e10c lda #$54
  2306. 00e10e sta $7e245c
  2307. 00e112 lda #$49
  2308. 00e114 sta $7e245e
  2309. 00e118 lda #$4d
  2310. 00e11a sta $7e2460
  2311. 00e11e lda #$45
  2312. 00e120 sta $7e2462
  2313. 00e124 stz $0cf4
  2314. 00e127 lda $0d10
  2315. 00e12a sta $0008
  2316. 00e12d lda $0d11
  2317. 00e130 sta $000a
  2318. 00e133 lda $0d12
  2319. 00e136 sta $000c
  2320. 00e139 stz $0007
  2321. 00e13c ldx #$0042
  2322. 00e13f jsr $e48c
  2323. 00e142 lda #$ff
  2324. 00e144 sta $0cfe
  2325. 00e147 ldx #$0086
  2326. 00e14a jsr $e368
  2327. 00e14d jsl $00e528
  2328. 00e151 ldx #$0002
  2329. 00e154 ldy #$0010
  2330. 00e157 lda #$28
  2331. 00e159 sta $7e2400,x
  2332. 00e15d inx
  2333. 00e15e dey
  2334. 00e15f bne $e159
  2335. 00e161 jsl $00e56f
  2336. 00e165 jsl $00e59b
  2337. 00e169 lda #$24
  2338. 00e16b sta $7e2457
  2339. 00e16f jsl $00e5de
  2340. 00e173 lda #$02
  2341. 00e175 sta $0cf0
  2342. 00e178 stz $0cf1
  2343. 00e17b stz $0cf2
  2344. 00e17e rtl
  2345.  
  2346. 00e19f jsr $ec25
  2347. 00e1a2 stz $0cf4
  2348. 00e1a5 ldx $0d14
  2349. 00e1a8 cpx $0cfe
  2350. 00e1ab beq $e1bf
  2351. 00e1ad stx $0cfe
  2352. 00e1b0 stx $0000
  2353. 00e1b3 ldx $0d18
  2354. 00e1b6 stx $0002
  2355. 00e1b9 ldx #$0086
  2356. 00e1bc jsr $e368
  2357. 00e1bf lda $0cb3
  2358. 00e1c2 beq $e1c7
  2359. 00e1c7 inc $0cf4
  2360. 00e1ca lda #$00
  2361. 00e1cc xba
  2362. 00e1cd lda $0cf1
  2363. 00e1d0 tax
  2364. 00e1d1 jsr ($e1d5,x)
  2365. 00e1d4 rtl
  2366. 00e1db lda $0102
  2367. 00e1de cmp $0103
  2368. 00e1e1 bne $e1fc
  2369. 00e1e3 lda $0d47
  2370. 00e1e6 beq $e1eb
  2371. 00e1eb lda $0cf3
  2372. 00e1ee beq $e1f3
  2373. 00e1f3 lda $0cd3
  2374. 00e1f6 beq $e1fb
  2375. 00e1fb rts
  2376. 00e368 rep #$30
  2377. 00e36a lda $0002
  2378. 00e36d bne $e372
  2379. 00e372 ldy #$2000
  2380. 00e375 sty $0004
  2381. 00e378 cmp #$0051
  2382. 00e37b bcc $e383
  2383. 00e37d lda #$0050
  2384. 00e380 sta $0002
  2385. 00e383 lda $0000
  2386. 00e386 bmi $e397
  2387. 00e388 beq $e397
  2388. 00e38a ldy $0002
  2389. 00e38d cpy $0000
  2390. 00e390 bcs $e39d
  2391. 00e397 stz $0000
  2392. 00e39a jmp $e416
  2393. 00e39d cmp #$0051
  2394. 00e3a0 bcs $e3ae
  2395. 00e3a2 lda $0002
  2396. 00e3a5 sec
  2397. 00e3a6 sbc $0000
  2398. 00e3a9 sta $0002
  2399. 00e3ac bra $e3ce
  2400. 00e3ce lda $0000
  2401. 00e3d1 lsr a
  2402. 00e3d2 lsr a
  2403. 00e3d3 lsr a
  2404. 00e3d4 beq $e3e6
  2405. 00e3d6 tay
  2406. 00e3d7 lda #$20c0
  2407. 00e3da ora $0004
  2408. 00e3dd sta $7e2400,x
  2409. 00e3e1 inx
  2410. 00e3e2 inx
  2411. 00e3e3 dey
  2412. 00e3e4 bne $e3dd
  2413. 00e3e6 lda $0000
  2414. 00e3e9 and #$0007
  2415. 00e3ec sta $0000
  2416. 00e3ef beq $e416
  2417. 00e3f1 clc
  2418. 00e3f2 adc $0002
  2419. 00e3f5 cmp #$0008
  2420. 00e3f8 bcc $e434
  2421. 00e3fa lda #$20c8
  2422. 00e3fd sbc $0000
  2423. 00e400 sta $7e2400,x
  2424. 00e404 inx
  2425. 00e405 inx
  2426. 00e406 lda $0000
  2427. 00e409 sbc #$0008
  2428. 00e40c clc
  2429. 00e40d adc $0002
  2430. 00e410 sta $0002
  2431. 00e413 stz $0000
  2432. 00e416 lda $0002
  2433. 00e419 lsr a
  2434. 00e41a lsr a
  2435. 00e41b lsr a
  2436. 00e41c beq $e434
  2437. 00e41e tay
  2438. 00e41f lda #$20c8
  2439. 00e422 sta $7e2400,x
  2440. 00e426 inx
  2441. 00e427 inx
  2442. 00e428 dey
  2443. 00e429 bne $e41f
  2444. 00e42b lda $0002
  2445. 00e42e and #$0007
  2446. 00e431 sta $0002
  2447. 00e434 lda $0000
  2448. 00e437 clc
  2449. 00e438 adc $0002
  2450. 00e43b asl a
  2451. 00e43c tay
  2452. 00e43d lda $e46a,y
  2453. 00e440 adc $0002
  2454. 00e443 ora $0004
  2455. 00e446 sta $7e2400,x
  2456. 00e44a inx
  2457. 00e44b inx
  2458. 00e44c sep #$20
  2459. 00e44e lda $0cf4
  2460. 00e451 beq $e466
  2461. 00e466 inc $00e6
  2462. 00e469 rts
  2463. 00e48c jsr $e4a7
  2464. 00e48f ldy #$0001
  2465. 00e492 lda ($10),y
  2466. 00e494 sta $7e2404,x
  2467. 00e498 lda #$24
  2468. 00e49a sta $7e2405,x
  2469. 00e49e inx
  2470. 00e49f inx
  2471. 00e4a0 iny
  2472. 00e4a1 cpy #$000b
  2473. 00e4a4 bcc $e492
  2474. 00e4a6 rts
  2475. 00e4a7 rep #$20
  2476. 00e4a9 sep #$10
  2477. 00e4ab lda #$0000
  2478. 00e4ae tcd
  2479. 00e4af ldy $0008
  2480. 00e4b2 lda $e62b,y
  2481. 00e4b5 sta $0010
  2482. 00e4b8 ldy $000a
  2483. 00e4bb lda ($10),y
  2484. 00e4bd sta $10
  2485. 00e4bf ldy $000c
  2486. 00e4c2 lda ($10),y
  2487. 00e4c4 sta $10
  2488. 00e4c6 sep #$30
  2489. 00e4c8 lda ($10)
  2490. 00e4ca tay
  2491. 00e4cb lda $0007
  2492. 00e4ce bpl $e4da
  2493. 00e4da phy
  2494. 00e4db lda $eb99,y
  2495. 00e4de bmi $e4fc
  2496. 00e4fc pla
  2497. 00e4fd rep #$30
  2498. 00e4ff and #$00ff
  2499. 00e502 asl a
  2500. 00e503 asl a
  2501. 00e504 asl a
  2502. 00e505 tay
  2503. 00e506 lda $ea69,y
  2504. 00e509 sta $7e2400,x
  2505. 00e50d lda $ea6b,y
  2506. 00e510 sta $7e2402,x
  2507. 00e514 lda $ea6d,y
  2508. 00e517 sta $7e2440,x
  2509. 00e51b lda $ea6f,y
  2510. 00e51e sta $7e2442,x
  2511. 00e522 sep #$20
  2512. 00e524 inc $00e6
  2513. 00e527 rts
  2514. 00e528 phb
  2515. 00e529 lda #$7e
  2516. 00e52b pha
  2517. 00e52c plb
  2518. 00e52d inc $00e6
  2519. 00e530 ldx #$001c
  2520. 00e533 lda $ffc0
  2521. 00e536 sta $7e23fa,x
  2522. 00e53a lda $ffc1
  2523. 00e53d sta $7e23fc,x
  2524. 00e541 lda $ffc2
  2525. 00e544 sta $7e23fe,x
  2526. 00e548 ldy #$0000
  2527. 00e54b lda $ffb8,y
  2528. 00e54e bne $e561
  2529. 00e550 lda #$20
  2530. 00e552 sta $7e2400,x
  2531. 00e556 inx
  2532. 00e557 inx
  2533. 00e558 iny
  2534. 00e559 cpy #$0007
  2535. 00e55c bcc $e54b
  2536. 00e55e lda $ffb8,y
  2537. 00e561 sta $7e2400,x
  2538. 00e565 inx
  2539. 00e566 inx
  2540. 00e567 iny
  2541. 00e568 cpy #$0008
  2542. 00e56b bcc $e55e
  2543. 00e56d plb
  2544. 00e56e rtl
  2545. 00e56f inc $00e6
  2546. 00e572 ldx #$0002
  2547. 00e575 ldy #$0000
  2548. 00e578 lda $0c90,y
  2549. 00e57b bne $e58e
  2550. 00e57d lda #$20
  2551. 00e57f sta $7e2400,x
  2552. 00e583 inx
  2553. 00e584 inx
  2554. 00e585 iny
  2555. 00e586 cpy #$0007
  2556. 00e589 bcc $e578
  2557. 00e58b lda $0c90,y
  2558. 00e58e sta $7e2400,x
  2559. 00e592 inx
  2560. 00e593 inx
  2561. 00e594 iny
  2562. 00e595 cpy #$0008
  2563. 00e598 bcc $e58b
  2564. 00e59a rtl
  2565. 00e59b lda #$20
  2566. 00e59d xba
  2567. 00e59e lda $0cbd
  2568. 00e5a1 asl a
  2569. 00e5a2 asl a
  2570. 00e5a3 ora #$80
  2571. 00e5a5 rep #$20
  2572. 00e5a7 sta $7e249c
  2573. 00e5ab inc
  2574. 00e5ac sta $7e249e
  2575. 00e5b0 inc
  2576. 00e5b1 sta $7e24dc
  2577. 00e5b5 inc
  2578. 00e5b6 sta $7e24de
  2579. 00e5ba sep #$20
  2580. 00e5bc lda $0cbc
  2581. 00e5bf asl a
  2582. 00e5c0 asl a
  2583. 00e5c1 ora #$80
  2584. 00e5c3 rep #$20
  2585. 00e5c5 sta $7e24a0
  2586. 00e5c9 inc
  2587. 00e5ca sta $7e24a2
  2588. 00e5ce inc
  2589. 00e5cf sta $7e24e0
  2590. 00e5d3 inc
  2591. 00e5d4 sta $7e24e2
  2592. 00e5d8 sep #$20
  2593. 00e5da inc $00e6
  2594. 00e5dd rtl
  2595. 00e5de lda $0d6f
  2596. 00e5e1 beq $e5e7
  2597. 00e5e7 lda $0d6e
  2598. 00e5ea dec
  2599. 00e5eb bpl $e5ee
  2600. 00e5ee sta $7e2456
  2601. 00e5f2 inc $00e6
  2602. 00e5f5 rtl
  2603. 00ec25 lda #$00
  2604. 00ec27 xba
  2605. 00ec28 lda $0158
  2606. 00ec2b cmp $0159
  2607. 00ec2e bne $ec31
  2608. 00ec30 rts
  2609. 018203 rep #$20
  2610. 018205 lda #$0000
  2611. 018208 tcd
  2612. 018209 sep #$20
  2613. 01820b jsr $8241
  2614. 01820e bra $8220
  2615. 018215 rep #$20
  2616. 018217 lda #$0000
  2617. 01821a tcd
  2618. 01821b sep #$20
  2619. 01821d jsr $8268
  2620. 018220 ldx $0010
  2621. 018223 beq $8240
  2622. 018225 lda #$f9
  2623. 018227 sta $2140
  2624. 01822a jsr $82e4
  2625. 01822d lda $2140
  2626. 018230 dec
  2627. 018231 bne $822d
  2628. 018233 inc
  2629. 018234 sta $7efffb
  2630. 018238 lda #$00
  2631. 01823a sta $0100
  2632. 01823d sta $0101
  2633. 018240 rtl
  2634. 018241 lda $0d12
  2635. 018244 cmp #$02
  2636. 018246 beq $8258
  2637. 018258 lda #$b0
  2638. 01825a sta $0010
  2639. 01825d lda #$a0
  2640. 01825f sta $0011
  2641. 018262 lda #$09
  2642. 018264 sta $0012
  2643. 018267 rts
  2644. 018268 lda $0cb0
  2645. 01826b asl a
  2646. 01826c tax
  2647. 01826d rep #$20
  2648. 01826f lda $00f8ed,x
  2649. 018273 sta $0000
  2650. 018276 lda $0cb1
  2651. 018279 and #$00ff
  2652. 01827c clc
  2653. 01827d adc $0000
  2654. 018280 sta $0000
  2655. 018283 lda $0cb1
  2656. 018286 and #$00ff
  2657. 018289 asl a
  2658. 01828a clc
  2659. 01828b adc $0000
  2660. 01828e tax
  2661. 01828f lda $00f8ed,x
  2662. 018293 sta $0010
  2663. 018296 sep #$20
  2664. 018298 lda $00f8ef,x
  2665. 01829c sta $0012
  2666. 01829f rts
  2667. 0182e4 php
  2668. 0182e5 rep #$30
  2669. 0182e7 ldy #$0000
  2670. 0182ea lda #$bbaa
  2671. 0182ed cmp $2140
  2672. 0182f0 bne $82ed
  2673. 0182f2 sep #$20
  2674. 0182f4 lda #$cc
  2675. 0182f6 bra $8326
  2676. 0182f8 lda
  2677. 0182fa iny
  2678. 0182fb xba
  2679. 0182fc lda #$00
  2680. 0182fe bra $8313
  2681. 018300 xba
  2682. 018301 lda
  2683. 018303 iny
  2684. 018304 bpl $830c
  2685. 01830c xba
  2686. 01830d cmp $2140
  2687. 018310 bne $830d
  2688. 018312 inc
  2689. 018313 rep #$20
  2690. 018315 sta $2140
  2691. 018318 sep #$20
  2692. 01831a dex
  2693. 01831b bne $8300
  2694. 01831d cmp $2140
  2695. 018320 bne $831d
  2696. 018322 adc #$03
  2697. 018324 beq $8322
  2698. 018326 pha
  2699. 018327 rep #$20
  2700. 018329 lda
  2701. 01832b iny
  2702. 01832c iny
  2703. 01832d tax
  2704. 01832e lda
  2705. 018330 iny
  2706. 018331 iny
  2707. 018332 sta $2142
  2708. 018335 sep #$20
  2709. 018337 cpx #$0001
  2710. 01833a lda #$00
  2711. 01833c rol a
  2712. 01833d sta $2141
  2713. 018340 adc #$7f
  2714. 018342 pla
  2715. 018343 sta $2140
  2716. 018346 cmp $2140
  2717. 018349 bne $8346
  2718. 01834b bvs $82f8
  2719. 01834d plp
  2720. 01834e rts
  2721.  
  2722. ; Main game loop?
  2723. 01975d jsr $981f
  2724. 019760 lda #$01
  2725. 019762 jsl $00819c
  2726. 019766 bra $975d
  2727. ; Main game loop?
  2728.  
  2729. 01978b lda $00cc
  2730. 01978e beq $97db
  2731. 019790 lda $0ca0
  2732. 019793 cmp #$06
  2733. 019795 beq $97a2
  2734. 0197a2 lda $0cd0
  2735. 0197a5 ora $0cd1
  2736. 0197a8 ora $0cc3
  2737. 0197ab bne $97db
  2738. 0197ad lda $0119
  2739. 0197b0 and $0111
  2740. 0197b3 and #$10
  2741. 0197b5 beq $97be
  2742. 0197be lda $7efffa
  2743. 0197c2 beq $97db
  2744. 0197db stz $0140
  2745. 0197de rts
  2746.  
  2747. ; Main entry point?
  2748. 01981f ldx $0cb4
  2749. 019822 inx
  2750. 019823 stx $0cb4
  2751. 019826 lda #$00
  2752. 019828 xba
  2753. 019829 lda $0ca0
  2754. 01982c tax
  2755. 01982d jmp ($9830,x) ; Jump to game mode
  2756. ; Main entry point?
  2757.  
  2758. ; Character select ($0ca0 = #$00)
  2759. 019868 jsr $a5d8
  2760. 01986b lda #$02
  2761. 01986d sta $0ca0
  2762. 019870 rts
  2763. ; Character select ($0ca0 = #$00)
  2764.  
  2765. ; Open stage 1 ($0ca0 = #$02)
  2766. 019871 jsr $9e4f
  2767. 019874 jsl $00dfed
  2768. 019878 stz $0cd3
  2769. 01987b stz $0cd2
  2770. 01987e lda #$04
  2771. 019880 sta $0ca0
  2772. 019883 rts
  2773. ; Open stage 1 ($0ca0 = #$02)
  2774.  
  2775. ; Open stage 2 ($0ca0 = #$04)
  2776. 019884 jsl $008ea8
  2777. 019888 ldx #$0000
  2778. 01988b jsl $008cf6
  2779. 01988f jsr $9e5a
  2780. 019892 jsr $a69e
  2781. 019895 jsl $0297eb
  2782. 019899 lda #$01
  2783. 01989b sta $0cd1
  2784. 01989e stz $0cc3
  2785. 0198a1 stz $0cd0
  2786. 0198a4 stz $0cc2
  2787. 0198a7 stz $0cd5
  2788. 0198aa stz $0cd6
  2789. 0198ad rep #$20
  2790. 0198af stz $0780
  2791. 0198b2 stz $0782
  2792. 0198b5 stz $0784
  2793. 0198b8 stz $0786
  2794. 0198bb stz $07ae
  2795. 0198be stz $07b8
  2796. 0198c1 stz $07b0
  2797. 0198c4 stz $07b2
  2798. 0198c7 stz $07b4
  2799. 0198ca stz $07b6
  2800. 0198cd sep #$20
  2801. 0198cf stz $0cab
  2802. 0198d2 stz $0caa
  2803. 0198d5 stz $0cac
  2804. 0198d8 lda #$20
  2805. 0198da sta $0ca5
  2806. 0198dd jsl $0297eb
  2807. 0198e1 lda #$01
  2808. 0198e3 jsl $00819c
  2809. 0198e7 dec $0ca5
  2810. 0198ea bpl $98dd
  2811. 0198ec lda #$01
  2812. 0198ee sta $0106
  2813. 0198f1 sta $0104
  2814. 0198f4 lda #$02
  2815. 0198f6 sta $0105
  2816. 0198f9 lda #$01
  2817. 0198fb jsl $00819c
  2818. 0198ff lda #$02
  2819. 019901 jsl $008f1a
  2820. 019905 lda #$06
  2821. 019907 sta $0ca0
  2822. 01990a lda $0cb3
  2823. 01990d beq $992e
  2824. 01992e rts
  2825. ; Open stage 2 ($0ca0 = #$04)
  2826.  
  2827. ; Active gameplay ($0ca0 = #$06)
  2828. 01992f jsr $a847
  2829. 019932 lda $00cc
  2830. 019935 beq $995f
  2831. 019937 ldx $0d6e
  2832. 01993a bne $995f
  2833. 01995f jsr $a280
  2834. 019962 jsr $a33f
  2835. 019965 jsl $00c9b4
  2836. 019969 jsl $0297eb
  2837. 01996d jsl $028000
  2838. 019971 jsl $01c078
  2839. 019975 jsl $02c56a
  2840. 019979 jsl $00b0f9
  2841. 01997d jsl $01a701
  2842. 019981 jsr $99ed
  2843. 019984 lda $0cd0
  2844. 019987 beq $9996
  2845. 019995 rts
  2846. ; Active gameplay
  2847.  
  2848. 019996 jsr $978b
  2849. 019999 lda $0140
  2850. 01999c beq $9995
  2851.  
  2852. 0199ed lda $0cd0
  2853. 0199f0 ora $00d0
  2854. 0199f3 bne $9a0f
  2855. 0199f5 lda $7efffa
  2856. 0199f9 beq $9a0f
  2857. 019a0f rts
  2858.  
  2859. 019e4f ldx #$0d00
  2860. 019e52 jsr $a635
  2861. 019e55 jsl $00d0a6
  2862. 019e59 rts
  2863.  
  2864. ; Part of open stage 2
  2865. 019e5a lda #$f0
  2866. 019e5c jsl $009f5a
  2867. 019e60 lda #$0a
  2868. 019e62 jsl $00819c
  2869. 019e66 jsl $01a097
  2870. 019e6a jsl $028b2e
  2871. 019e6e jsl $00e0d7
  2872. 019e72 jsr $a068
  2873. 019e75 sei
  2874. 019e76 jsl $0088b9
  2875. 019e7a jsl $0088c2
  2876. 019e7e stz $015c
  2877. 019e81 stz $015d
  2878. 019e84 ldx #$0000
  2879. 019e87 jsl $008b4c
  2880. 019e8b jsl $008ca8
  2881. 019e8f jsl $019f4d
  2882. 019e93 jsl $018203
  2883. 019e97 jsl $018215
  2884. 019e9b jsl $0088cb
  2885. 019e9f jsl $0088b0
  2886. 019ea3 cli
  2887. 019ea4 jsr $a643
  2888. 019ea7 jsl $009d2a
  2889. 019eab jsl $01a1ce
  2890. 019eaf jsl $01a072
  2891. 019eb3 jsr $9eb7
  2892. 019eb6 rts
  2893. ; Part of open stage 2
  2894.  
  2895. 019eb7 lda $0cb3
  2896. 019eba bne $9ed2
  2897. 019ebc jsl $01a40c
  2898. 019ec0 beq $9ec7
  2899. 019ec2 cmp $0cb1
  2900. 019ec5 bne $9ed2
  2901. 019ed2 rts
  2902.  
  2903. 019f4d ldx #$0085
  2904. 019f50 jsl $0089c2
  2905. 019f54 lda #$1f
  2906. 019f56 ldy #$0060
  2907. 019f59 jsl $008e73
  2908. 019f5d lda #$1e
  2909. 019f5f ldy #$0040
  2910. 019f62 jsl $008e73
  2911. 019f66 lda #$2b
  2912. 019f68 ldy #$0020
  2913. 019f6b jsl $008e73
  2914. 019f6f lda $00f7ff
  2915. 019f73 bne $9f7e
  2916. 019f7e ldx #$0165
  2917. 019f81 jsl $0089c2
  2918. 019f85 lda #$17
  2919. 019f87 ldy #$0080
  2920. 019f8a jsl $008e73
  2921. 019f8e stz $075a
  2922. 019f91 lda #$00
  2923. 019f93 xba
  2924. 019f94 lda $0cb0
  2925. 019f97 asl a
  2926. 019f98 tax
  2927. 019f99 rep #$20
  2928. 019f9b lda $0cb1
  2929. 019f9e asl a
  2930. 019f9f and #$00ff
  2931. 019fa2 clc
  2932. 019fa3 adc $019fad,x
  2933. 019fa7 tax
  2934. 019fa8 sep #$20
  2935. 019faa jmp ($9fad,x)
  2936. 019fe5 lda $00f7ff
  2937. 019fe9 bne $9ff4
  2938. 019ff4 ldx #$0165
  2939. 019ff7 jsl $0089c2
  2940. 019ffb lda #$17
  2941. 019ffd ldy #$0080
  2942. 01a000 jsl $008e73
  2943. 01a004 rtl
  2944.  
  2945. 01a068 ldx #$000f
  2946. 01a06b stz $0cf0,x
  2947. 01a06e dex
  2948. 01a06f bpl $a06b
  2949. 01a071 rts
  2950.  
  2951. 01a072 ldx #$0a80
  2952. 01a075 stx $0ac6
  2953. 01a078 ldx #$0011
  2954. 01a07b stx $0ac4
  2955. 01a07e ldx #$0700
  2956. 01a081 stx $0722
  2957. 01a084 ldx #$0010
  2958. 01a087 stx $0720
  2959. 01a08a ldx #$0724
  2960. 01a08d stx $0746
  2961. 01a090 ldx #$0010
  2962. 01a093 stx $0744
  2963. 01a096 rtl
  2964.  
  2965. 01a097 rep #$20
  2966. 01a099 lda #$0080
  2967. 01a09c ldx #$0e00
  2968. 01a09f ldy #$0004
  2969. 01a0a2 jsr $a162
  2970. 01a0a5 rep #$20
  2971. 01a0a7 lda #$02a0
  2972. 01a0aa ldx #$1000
  2973. 01a0ad ldy #$0003
  2974. 01a0b0 jsr $a162
  2975. 01a0b3 lda #$04a0
  2976. 01a0b6 ldx #$11e0
  2977. 01a0b9 ldy #$0001
  2978. 01a0bc jsr $a162
  2979. 01a0bf lda #$0a80
  2980. 01a0c2 ldx #$1280
  2981. 01a0c5 ldy #$0005
  2982. 01a0c8 jsr $a162
  2983. 01a0cb lda #$1240
  2984. 01a0ce ldx #$1500
  2985. 01a0d1 ldy #$0006
  2986. 01a0d4 jsr $a162
  2987. 01a0d7 lda #$1080
  2988. 01a0da ldx #$1680
  2989. 01a0dd ldy #$0001
  2990. 01a0e0 jsr $a162
  2991. 01a0e3 lda #$0880
  2992. 01a0e6 ldx #$1700
  2993. 01a0e9 ldy #$0006
  2994. 01a0ec jsr $a162
  2995. 01a0ef lda #$0e40
  2996. 01a0f2 ldx #$1a00
  2997. 01a0f5 ldy #$0008
  2998. 01a0f8 jsr $a162
  2999. 01a0fb lda #$0680
  3000. 01a0fe ldx #$1c00
  3001. 01a101 ldy #$0003
  3002. 01a104 jsr $a162
  3003. 01a107 sep #$20
  3004. 01a109 stz $0160
  3005. 01a10c stz $0161
  3006. 01a10f stz $0162
  3007. 01a112 stz $0163
  3008. 01a115 stz $0164
  3009. 01a118 stz $0165
  3010. 01a11b stz $0759
  3011. 01a11e stz $0ce1
  3012. 01a121 stz $0cd7
  3013. 01a124 stz $0cd6
  3014. 01a127 stz $0caa
  3015. 01a12a stz $0cab
  3016. 01a12d stz $0cac
  3017. 01a130 rep #$20
  3018. 01a132 stz $0170
  3019. 01a135 stz $0172
  3020. 01a138 stz $0174
  3021. 01a13b stz $0176
  3022. 01a13e stz $0166
  3023. 01a141 stz $0168
  3024. 01a144 stz $016a
  3025. 01a147 stz $016c
  3026. 01a14a lda #$ffff
  3027. 01a14d sta $0748
  3028. 01a150 sta $074a
  3029. 01a153 sta $074c
  3030. 01a156 sta $074e
  3031. 01a159 stz $0754
  3032. 01a15c stz $0756
  3033. 01a15f sep #$20
  3034. 01a161 rtl
  3035.  
  3036. ;
  3037. 01a162 xba
  3038. 01a163 sta $0000
  3039. 01a166 xba
  3040. 01a167 and #$00ff
  3041. 01a16a sec
  3042. 01a16b sbc #$0012
  3043. 01a16e sta $0002
  3044. 01a171 lda $0000
  3045. 01a174 and #$00ff
  3046. 01a177 sta $0000
  3047. 01a17a sty $0004
  3048. 01a17d lda #$0010
  3049. 01a180 tay
  3050. 01a181 stz $0000,x
  3051. 01a184 inx
  3052. 01a185 inx
  3053. 01a186 dey
  3054. 01a187 dey
  3055. 01a188 bne $a181
  3056. 01a18a lda $0000
  3057. 01a18d sta $0000,x
  3058. 01a190 inx
  3059. 01a191 inx
  3060. 01a192 lda $0002
  3061. 01a195 tay
  3062. 01a196 stz $0000,x
  3063. 01a199 inx
  3064. 01a19a inx
  3065. 01a19b dey
  3066. 01a19c dey
  3067. 01a19d bne $a196
  3068. 01a19f dec $0004
  3069. 01a1a2 bne $a17d
  3070. 01a1a4 rts
  3071. ;
  3072.  
  3073. 01a1a5 lda #$00
  3074. 01a1a7 sta $2101
  3075. 01a1aa lda #$a9
  3076. 01a1ac sta $2105
  3077. 01a1af lda #$71
  3078. 01a1b1 sta $2107
  3079. 01a1b4 lda #$78
  3080. 01a1b6 sta $2108
  3081. 01a1b9 lda #$7c
  3082. 01a1bb sta $2109
  3083. 01a1be lda #$7c
  3084. 01a1c0 sta $210a
  3085. 01a1c3 lda #$22
  3086. 01a1c5 sta $210b
  3087. 01a1c8 lda #$26
  3088. 01a1ca sta $210c
  3089. 01a1cd rts
  3090. 01a1ce jsr $a1a5
  3091. 01a1d1 lda #$22
  3092. 01a1d3 sta $210b
  3093. 01a1d6 stz $00ea
  3094. 01a1d9 lda #$00
  3095. 01a1db xba
  3096. 01a1dc lda $0cb0
  3097. 01a1df asl a
  3098. 01a1e0 tax
  3099. 01a1e1 lda $0cb1
  3100. 01a1e4 asl a
  3101. 01a1e5 jsr ($a1e9,x)
  3102. 01a1e8 rtl
  3103. 01a1fd tax
  3104. 01a1fe jmp ($a201,x)
  3105. 01a207 lda #$30
  3106. 01a209 sta $0ce0
  3107. 01a20c rts
  3108. 01a280 lda $7efffa
  3109. 01a284 beq $a289
  3110. 01a289 lda $0cd1
  3111. 01a28c ora $0cd0
  3112. 01a28f ora $0cb3
  3113. 01a292 ora $0cc3
  3114. 01a295 bne $a2bd
  3115. 01a297 rep #$20
  3116. 01a299 inc $0cc8
  3117. 01a29c lda $0cba
  3118. 01a29f asl a
  3119. 01a2a0 tax
  3120. 01a2a1 lda $01a2be,x
  3121. 01a2a5 cmp $0cc8
  3122. 01a2a8 bcs $a2bb
  3123. 01a2aa stz $0cc8
  3124. 01a2ad lda $01a2c6,x
  3125. 01a2b1 cmp $0cb6
  3126. 01a2b4 bcc $a2bb
  3127. 01a2b6 beq $a2bb
  3128. 01a2b8 inc $0cb6
  3129. 01a2bb sep #$20
  3130. 01a2bd rts
  3131. 01a33f lda $0cd1
  3132. 01a342 ora $0cd0
  3133. 01a345 ora $0cc3
  3134. 01a348 bne $a37d
  3135. 01a34a rep #$20
  3136. 01a34c inc $0cbe
  3137. 01a34f lda $0cbe
  3138. 01a352 cmp #$01e0
  3139. 01a355 sep #$20
  3140. 01a357 bcc $a37d
  3141. 01a359 stz $0cbe
  3142. 01a35c stz $0cbf
  3143. 01a35f ldx $0cbc
  3144. 01a362 beq $a37e
  3145. 01a364 dec $0cbc
  3146. 01a367 bpl $a379
  3147. 01a379 jsl $00e59b
  3148. 01a37d rts
  3149. 01a40c lda #$00
  3150. 01a40e xba
  3151. 01a40f lda $0cb0
  3152. 01a412 tax
  3153. 01a413 lda $01a418,x
  3154. 01a417 rtl
  3155.  
  3156. ; More player init
  3157. 01a542 lda #$01
  3158. 01a544 sta $00,x
  3159. 01a546 stz $02,x
  3160. 01a548 stz $03,x
  3161. 01a54a stz $04,x
  3162. 01a54c stz $05,x
  3163. 01a54e stz $68,x
  3164. 01a550 stz $69,x
  3165. 01a552 stz $6a,x
  3166. 01a554 stz $72,x
  3167. 01a556 stz $73,x
  3168. 01a558 stz $52,x
  3169. 01a55a stz $51,x
  3170. 01a55c stz $20,x
  3171. 01a55e stz $38,x
  3172. 01a560 stz $44,x
  3173. 01a562 stz $46,x
  3174. 01a564 stz $47,x
  3175. 01a566 stz $3b,x
  3176. 01a568 stz $70
  3177. 01a56a stz $71
  3178. 01a56c ldy #$0000
  3179. 01a56f sty $78,x
  3180. 01a571 sty $48,x
  3181. 01a573 sty $4c,x
  3182. 01a575 sty $7e,x
  3183. 01a577 sty $4a,x
  3184. 01a579 sty $4e,x
  3185. 01a57b rts
  3186. ; More player init
  3187.  
  3188. ; Player init
  3189. 01a5d8 lda #$00
  3190. 01a5da xba
  3191. 01a5db lda $0d12
  3192. 01a5de tax
  3193.  
  3194. 01a5df ldy #$0000
  3195. 01a5e2 jsl $00a1fc
  3196.  
  3197. 01a5e6 ldy #$0d00
  3198. 01a5e9 jsl $01a5fc
  3199.  
  3200. 01a5ed lda $00cd
  3201. 01a5f0 bit #$02 ; Check if two player
  3202. 01a5f2 beq $a5fb
  3203.  
  3204. 01a5f4 ldy #$0d80
  3205. 01a5f7 jsl $01a5fc
  3206. 01a5fb rts
  3207. ; Player init
  3208.  
  3209. ; Player intialization?
  3210. 01a5fc lda #$00
  3211. 01a5fe xba
  3212. 01a5ff lda $0012,y
  3213. 01a602 asl a
  3214. 01a603 tax
  3215. 01a604 rep #$20
  3216. 01a606 lda $01a629,x
  3217. 01a60a sta $002a,y
  3218. 01a60d lda $01a62b,x
  3219. 01a611 sta $0028,y
  3220. 01a614 sep #$20
  3221. 01a616 lda #$00
  3222. 01a618 sta $0043,y
  3223. 01a61b lda #$00
  3224. 01a61d xba
  3225. 01a61e rep #$20
  3226. 01a620 lda #$0050
  3227. 01a623 sta $0018,y
  3228. 01a626 sep #$20
  3229. 01a628 rtl
  3230. ; Player intialization?
  3231.  
  3232. 01a635 rep #$20
  3233. 01a637 lda $0018,x
  3234. 01a63a sta $0014,x
  3235. 01a63d sta $0016,x
  3236. 01a640 sep #$20
  3237. 01a642 rts
  3238.  
  3239. ; EVEN MORE PLAYER INIT
  3240. 01a643 ldx #$0d00
  3241. 01a646 jsr $a542
  3242. 01a649 phx
  3243. 01a64a pld
  3244. 01a64b jsr $a657
  3245. 01a64e jsr $a670
  3246. 01a651 ldx #$0000
  3247. 01a654 phx
  3248. 01a655 pld
  3249. 01a656 rts
  3250. ; EVEN MORE PLAYER INIT
  3251.  
  3252. 01a657 lda #$02
  3253. 01a659 sta $22
  3254. 01a65b lda #$0a
  3255. 01a65d sta $02
  3256. 01a65f lda #$00
  3257. 01a661 xba
  3258. 01a662 lda $12
  3259. 01a664 lsr a
  3260. 01a665 tax
  3261. 01a666 lda $01a66d,x
  3262. 01a66a sta $23
  3263. 01a66c rts
  3264.  
  3265. 01a670 lda #$00
  3266. 01a672 xba
  3267. 01a673 lda $12
  3268. 01a675 tax
  3269. 01a676 lda $01a687,x
  3270. 01a67a tax
  3271. 01a67b sep #$20
  3272. 01a67d jsl $008cf6
  3273. 01a681 lda #$00
  3274. 01a683 sta $21
  3275. 01a685 rts
  3276.  
  3277. 01a69e stz $0cbe
  3278. 01a6a1 stz $0cbf
  3279. 01a6a4 lda #$00
  3280. 01a6a6 xba
  3281. 01a6a7 lda $0cb0
  3282. 01a6aa asl a
  3283. 01a6ab asl a
  3284. 01a6ac clc
  3285. 01a6ad adc $0cb1
  3286. 01a6b0 tax
  3287. 01a6b1 lda $01a6d5,x
  3288. 01a6b5 cmp #$ff
  3289. 01a6b7 beq $a6c7
  3290. 01a6b9 stz $0cbc
  3291. 01a6bc sta $0cbd
  3292. 01a6bf stz $0cc4
  3293. 01a6c2 sta $0cc5
  3294. 01a6c5 bra $a6d0
  3295. 01a6d0 jsl $00e59b
  3296. 01a6d4 rts
  3297. 01a701 rep #$20
  3298. 01a703 lda #$015a
  3299. 01a706 tcd
  3300. 01a707 sep #$20
  3301. 01a709 lda #$00
  3302. 01a70b xba
  3303. 01a70c lda $02
  3304. 01a70e tax
  3305. 01a70f jsr ($a71b,x)
  3306. 01a712 rep #$20
  3307. 01a714 lda #$0000
  3308. 01a717 tcd
  3309. 01a718 sep #$20
  3310. 01a71a rtl
  3311. 01a721 lda #$02
  3312. 01a723 sta $02
  3313. 01a725 rts
  3314. 01a726 rts
  3315. 01a727 lda $0cb0
  3316. 01a72a asl a
  3317. 01a72b tax
  3318. 01a72c jmp ($a72f,x)
  3319. 01a74c lda $0cb1
  3320. 01a74f asl a
  3321. 01a750 tax
  3322. 01a751 jmp ($a754,x)
  3323. 01a75a lda $03
  3324. 01a75c tax
  3325. 01a75d jmp ($a760,x)
  3326. 01a764 lda #$0b
  3327. 01a766 jsl $009f5a
  3328. 01a76a ldx #$00de
  3329. 01a76d stx $00
  3330. 01a76f lda #$02
  3331. 01a771 sta $03
  3332. 01a773 rts
  3333. 01a774 ldx $00
  3334. 01a776 dex
  3335. 01a777 stx $00
  3336. 01a779 bne $a77f
  3337. 01a77f rts
  3338.  
  3339. 01a847 rep #$20
  3340. 01a849 ldx #$01ff
  3341. 01a84c lda #$e000
  3342. 01a84f sta $017d,x
  3343. 01a852 dex
  3344. 01a853 dex
  3345. 01a854 dex
  3346. 01a855 dex
  3347. 01a856 bpl $a84f
  3348. 01a858 ldx #$001f
  3349. 01a85b lda #$5555
  3350. 01a85e sta $0380,x
  3351. 01a861 dex
  3352. 01a862 dex
  3353. 01a863 bpl $a85e
  3354. 01a865 sep #$20
  3355. 01a867 rts
  3356. 01a8cf rep #$30
  3357. 01a8d1 lda #$00a0
  3358. 01a8d4 tcd
  3359. 01a8d5 sep #$20
  3360. 01a8d7 lda #$00
  3361. 01a8d9 xba
  3362. 01a8da lda $08
  3363. 01a8dc tax
  3364. 01a8dd jsr ($a8e7,x)
  3365. 01a8e0 stz $00d0
  3366. 01a8e3 jml $00817c
  3367. 01a8eb lda #$01
  3368. 01a8ed sta $0a
  3369. 01a8ef stz $09
  3370. 01a8f1 stz $212d
  3371. 01a8f4 lda #$97
  3372. 01a8f6 sta $2131
  3373. 01a8f9 lda #$02
  3374. 01a8fb sta $2130
  3375. 01a8fe inc $09
  3376. 01a900 jsr $a918
  3377. 01a903 jsr $a920
  3378. 01a906 lda $09
  3379. 01a908 cmp #$1f
  3380. 01a90a beq $a914
  3381. 01a90c lda $0a
  3382. 01a90e jsl $00819c
  3383. 01a912 bra $a8fe
  3384. 01a914 stz $00ea
  3385. 01a917 rts
  3386. 01a918 lda $09
  3387. 01a91a ora #$e0
  3388. 01a91c sta $2132
  3389. 01a91f rts
  3390. 01a920 ldx #$00ff
  3391. 01a923 lda $0500,x
  3392. 01a926 lsr a
  3393. 01a927 lsr a
  3394. 01a928 and #$1f
  3395. 01a92a sta $0b
  3396. 01a92c rep #$20
  3397. 01a92e lda $04ff,x
  3398. 01a931 asl a
  3399. 01a932 asl a
  3400. 01a933 asl a
  3401. 01a934 sep #$20
  3402. 01a936 xba
  3403. 01a937 and #$1f
  3404. 01a939 sta $0c
  3405. 01a93b lda $04ff,x
  3406. 01a93e and #$1f
  3407. 01a940 sta $0d
  3408. 01a942 lda $09
  3409. 01a944 eor #$1f
  3410. 01a946 cmp $0b
  3411. 01a948 bcs $a94c
  3412. 01a94a sta $0b
  3413. 01a94c cmp $0c
  3414. 01a94e bcs $a952
  3415. 01a950 sta $0c
  3416. 01a952 cmp $0d
  3417. 01a954 bcs $a958
  3418. 01a956 sta $0d
  3419. 01a958 lda $0b
  3420. 01a95a asl a
  3421. 01a95b asl a
  3422. 01a95c sta $0f
  3423. 01a95e lda $0d
  3424. 01a960 sta $0e
  3425. 01a962 lda #$00
  3426. 01a964 xba
  3427. 01a965 lda $0c
  3428. 01a967 xba
  3429. 01a968 rep #$20
  3430. 01a96a lsr a
  3431. 01a96b lsr a
  3432. 01a96c lsr a
  3433. 01a96d ora $0e
  3434. 01a96f sta $05ff,x
  3435. 01a972 sep #$20
  3436. 01a974 dex
  3437. 01a975 dex
  3438. 01a976 bpl $a923
  3439. 01a978 rts
  3440. 01a979 lda #$01
  3441. 01a97b sta $0a
  3442. 01a97d lda #$1f
  3443. 01a97f sta $09
  3444. 01a981 lda #$17
  3445. 01a983 sta $00ea
  3446. 01a986 stz $212d
  3447. 01a989 lda #$97
  3448. 01a98b sta $2131
  3449. 01a98e lda #$02
  3450. 01a990 sta $2130
  3451. 01a993 dec $09
  3452. 01a995 jsr $a918
  3453. 01a998 jsr $a920
  3454. 01a99b lda $09
  3455. 01a99d beq $a9a7
  3456. 01a99f lda $0a
  3457. 01a9a1 jsl $00819c
  3458. 01a9a5 bra $a993
  3459. 01a9a7 stz $2131
  3460. 01a9aa stz $2130
  3461. 01a9ad rts
  3462. 01b045 lda #$01
  3463. 01b047 jsl $00819c
  3464. 01b04b jsr $b050
  3465. 01b04e bra $b045
  3466. 01b050 lda #$00
  3467. 01b052 xba
  3468. 01b053 lda $0088
  3469. 01b056 tax
  3470. 01b057 jmp ($b05a,x)
  3471. 01b13e jsr $b175
  3472. 01b141 ldx $008d
  3473. 01b144 dex
  3474. 01b145 stx $008d
  3475. 01b148 beq $b16f
  3476. 01b14a rts
  3477. 01b14b lda #$42
  3478. 01b14d jsl $009f5a
  3479. 01b151 ldx #$0007
  3480. 01b154 ldy #$000f
  3481. 01b157 lda $008f
  3482. 01b15a beq $b15f
  3483. 01b15f lda $01b12e,x
  3484. 01b163 sta $0400,y
  3485. 01b166 dey
  3486. 01b167 dex
  3487. 01b168 bpl $b15f
  3488. 01b16a ora #$02
  3489. 01b16c tsb $00d6
  3490. 01b16f lda #$04
  3491. 01b171 sta $0088
  3492. 01b174 rts
  3493. 01b175 jsl $00ca41
  3494. 01b179 lda $0d67
  3495. 01b17c and $0d65
  3496. 01b17f bit #$23
  3497. 01b181 bne $b192
  3498. 01b183 bit #$d0
  3499. 01b185 bne $b14b
  3500. 01b187 lda $0d66
  3501. 01b18a and $0d64
  3502. 01b18d bit #$c0
  3503. 01b18f bne $b14b
  3504. 01b191 rts
  3505. 01b1d5 lda $008f
  3506. 01b1d8 and #$01
  3507. 01b1da asl a
  3508. 01b1db clc
  3509. 01b1dc adc #$02
  3510. 01b1de sta $0d12
  3511. 01b1e1 lda #$00
  3512. 01b1e3 jsl $008f3b
  3513. 01b1e7 lda $008b
  3514. 01b1ea sta $0cb0
  3515. 01b1ed lda $008c
  3516. 01b1f0 sta $0cb1
  3517. 01b1f3 ldx #$0010
  3518. 01b1f6 jsl $0081d9
  3519. 01b1fa jml $00817c
  3520. 01c078 rep #$20
  3521. 01c07a lda #$0000
  3522. 01c07d tcd
  3523. 01c07e sep #$20
  3524. 01c080 jsr $c086
  3525. 01c083 sep #$20
  3526. 01c085 rtl
  3527. 01c086 ldx #$0000
  3528. 01c089 stx $00
  3529. 01c08b stx $02
  3530. 01c08d lda #$02
  3531. 01c08f bit $0d01
  3532. 01c092 bne $c0ac
  3533. 01c094 ldx $0d4e
  3534. 01c097 bne $c0ac
  3535. 01c099 jsr $caf0
  3536. 01c09c ldx $0d5a
  3537. 01c09f beq $c0a4
  3538. 01c0a1 jsr $c0ad
  3539. 01c0a4 ldx $0d54
  3540. 01c0a7 beq $c0ac
  3541. 01c0a9 jsr $c6e4
  3542. 01c0ac rts
  3543.  
  3544. 01c0ad ldy #$0d00
  3545. 01c0b0 lda #$02
  3546. 01c0b2 sta $0f
  3547. 01c0b4 ldx #$1000
  3548. 01c0b7 lda $0000,x
  3549. 01c0ba beq $c0bf
  3550. 01c0bf dec $0f
  3551. 01c0c1 bmi $c0cf
  3552. 01c0c3 rep #$20
  3553. 01c0c5 txa
  3554. 01c0c6 clc
  3555. 01c0c7 adc #$00a0
  3556. 01c0ca tax
  3557. 01c0cb sep #$20
  3558. 01c0cd bra $c0b7
  3559. 01c0cf ldx #$11e0
  3560. 01c0d2 lda $0000,x
  3561. 01c0d5 beq $c0da
  3562. 01c0da lda #$04
  3563. 01c0dc sta $0f
  3564. 01c0de ldx #$1280
  3565. 01c0e1 lda $0000,x
  3566. 01c0e4 beq $c0e9
  3567. 01c0e9 dec $0f
  3568. 01c0eb bmi $c0f9
  3569. 01c0ed rep #$20
  3570. 01c0ef txa
  3571. 01c0f0 clc
  3572. 01c0f1 adc #$0080
  3573. 01c0f4 tax
  3574. 01c0f5 sep #$20
  3575. 01c0f7 bra $c0e1
  3576. 01c0f9 rts
  3577.  
  3578. 01c6e4 lda $00cb
  3579. 01c6e7 bne $c735
  3580. 01c6e9 ldx #$0d00
  3581. 01c6ec lda #$02
  3582. 01c6ee sta $0f
  3583. 01c6f0 ldy #$1000
  3584. 01c6f3 lda $0000,x
  3585. 01c6f6 beq $c6fb
  3586. 01c6f8 jsr $c736
  3587. 01c6fb dec $0f
  3588. 01c6fd bmi $c70b
  3589. 01c6ff rep #$20
  3590. 01c701 tya
  3591. 01c702 clc
  3592. 01c703 adc #$00a0
  3593. 01c706 tay
  3594. 01c707 sep #$20
  3595. 01c709 bra $c6f3
  3596. 01c70b ldy #$11e0
  3597. 01c70e lda $0000,x
  3598. 01c711 beq $c716
  3599. 01c713 jsr $c736
  3600. 01c716 lda #$04
  3601. 01c718 sta $0f
  3602. 01c71a ldy #$1280
  3603. 01c71d lda $0000,x
  3604. 01c720 beq $c725
  3605. 01c722 jsr $c736
  3606. 01c725 dec $0f
  3607. 01c727 bmi $c735
  3608. 01c729 rep #$20
  3609. 01c72b tya
  3610. 01c72c clc
  3611. 01c72d adc #$0080
  3612. 01c730 tay
  3613. 01c731 sep #$20
  3614. 01c733 bra $c71d
  3615. 01c735 rts
  3616. 01c736 lda $005a,y
  3617. 01c739 beq $c75a
  3618. 01c75a rts
  3619. 01caf0 lda #$08
  3620. 01caf2 bit $0d68
  3621. 01caf5 beq $cb02
  3622. 01cb02 ldx #$fff4
  3623. 01cb05 stx $18
  3624. 01cb07 ldx #$0009
  3625. 01cb0a stx $1a
  3626. 01cb0c rts
  3627. 028000 phd
  3628. 028001 lda #$80
  3629. 028003 sta $00d8
  3630. 028006 ldx #$0003
  3631. 028009 stx $00dc
  3632. 02800c stz $0148
  3633. 02800f stz $0149
  3634. 028012 stz $014a
  3635. 028015 stz $014b
  3636. 028018 ldx #$0380
  3637. 02801b stx $00da
  3638. 02801e ldx #$0180
  3639. 028021 phx
  3640. 028022 pld
  3641. 028023 jsr $894c
  3642. 028026 jsr $80a0
  3643. 028029 lda #$00
  3644. 02802b pha
  3645. 02802c plb
  3646. 02802d ldy #$0011
  3647. 028030 sty $0ac4
  3648. 028033 ldy #$0a80
  3649. 028036 sty $0ac6
  3650. 028039 ldy #$0010
  3651. 02803c sty $0720
  3652. 02803f ldy #$0700
  3653. 028042 sty $0722
  3654. 028045 ldy #$0010
  3655. 028048 sty $0744
  3656. 02804b ldy #$0724
  3657. 02804e sty $0746
  3658. 028051 jsr $8928
  3659. 028054 lda #$00
  3660. 028056 xba
  3661. 028057 lda $00d8
  3662. 02805a sec
  3663. 02805b sbc $00d9
  3664. 02805e beq $8094
  3665. 028060 bmi $8094
  3666. 028062 rep #$20
  3667. 028064 sta $0000
  3668. 028067 lda #$e000
  3669. 02806a ldx #$0000
  3670. 02806d sta $00,x
  3671. 02806f xba
  3672. 028070 sta $02,x
  3673. 028072 xba
  3674. 028073 inx
  3675. 028074 inx
  3676. 028075 inx
  3677. 028076 inx
  3678. 028077 dec $0000
  3679. 02807a bne $806d
  3680. 02807c lda #$03a0
  3681. 02807f sec
  3682. 028080 sbc $00da
  3683. 028083 beq $8092
  3684. 028085 bcc $8092
  3685. 028087 sep #$20
  3686. 028089 ldx $00da
  3687. 02808c stz $0000,x
  3688. 02808f dec
  3689. 028090 bne $808c
  3690. 028092 sep #$20
  3691. 028094 pld
  3692. 028095 lda $00d8
  3693. 028098 sta $00d9
  3694. 02809b jsl $028ae7
  3695. 02809f rtl
  3696. 0280a0 rep #$20
  3697. 0280a2 lda #$0010
  3698. 0280a5 sec
  3699. 0280a6 sbc $0720
  3700. 0280a9 beq $80ce
  3701. 0280ab ldx #$0700
  3702. 0280ae dec
  3703. 0280af sta $0acc
  3704. 0280b2 stx $0aca
  3705. 0280b5 ldy $0000,x
  3706. 0280b8 inx
  3707. 0280b9 inx
  3708. 0280ba stx $0aca
  3709. 0280bd sep #$20
  3710. 0280bf jsr $8161
  3711. 0280c2 rep #$20
  3712. 0280c4 dec $0acc
  3713. 0280c7 bmi $80ce
  3714. 0280c9 ldx $0aca
  3715. 0280cc bra $80b5
  3716. 0280ce lda #$0011
  3717. 0280d1 sec
  3718. 0280d2 sbc $0ac4
  3719. 0280d5 beq $80ea
  3720. 0280d7 ldx #$0a80
  3721. 0280da dec
  3722. 0280db beq $80e2
  3723. 0280e2 ldy $0002,x
  3724. 0280e5 sep #$20
  3725. 0280e7 jsr $8161
  3726. 0280ea rep #$20
  3727. 0280ec lda #$0010
  3728. 0280ef sec
  3729. 0280f0 sbc $0744
  3730. 0280f3 beq $8118
  3731. 028118 sep #$20
  3732. 02811a rts
  3733. 028161 lda #$00
  3734. 028163 xba
  3735. 028164 lda $0010,y
  3736. 028167 tax
  3737. 028168 jmp ($816b,x)
  3738. 028180 lda $0044,y
  3739. 028183 beq $81a2
  3740. 0281a2 lda $0001,y
  3741. 0281a5 bit #$04
  3742. 0281a7 beq $81b7
  3743. 0281b7 phd
  3744. 0281b8 phy
  3745. 0281b9 pld
  3746. 0281ba rep #$20
  3747. 0281bc lda $07
  3748. 0281be sec
  3749. 0281bf sbc $0e07
  3750. 0281c2 sta $0000
  3751. 0281c5 lda $0a
  3752. 0281c7 sec
  3753. 0281c8 sbc $0e0a
  3754. 0281cb clc
  3755. 0281cc adc #$000a
  3756. 0281cf sep #$20
  3757. 0281d1 eor #$ff
  3758. 0281d3 rep #$20
  3759. 0281d5 inc
  3760. 0281d6 sta $0002
  3761. 0281d9 sep #$20
  3762. 0281db lda $21
  3763. 0281dd ora $0ce0
  3764. 0281e0 stz $0006
  3765. 0281e3 sta $0007
  3766. 0281e6 lda #$7e
  3767. 0281e8 pha
  3768. 0281e9 plb
  3769. 0281ea ldy $1c
  3770. 0281ec lda #$00
  3771. 0281ee xba
  3772. 0281ef lda $0004,y
  3773. 0281f2 tax
  3774. 0281f3 jmp ($81f6,x)
  3775.  
  3776. ; Object drawing?
  3777. 028226 lda $22
  3778. 028228 sta $0012
  3779. 02822b lda $50
  3780. 02822d sta $000a
  3781. 028230 stz $50
  3782. 028232 lda $52
  3783. 028234 sta $000c
  3784. 028237 lda $51
  3785. 028239 sta $000d
  3786. 02823c lda #$00
  3787. 02823e xba
  3788. 02823f lda $3b
  3789. 028241 tax
  3790. 028242 beq $8248
  3791. 028248 lda $20
  3792. 02824a beq $824f
  3793. 02824c brl $8350
  3794.  
  3795. 02824f rep #$20
  3796. 028251 lda $0000
  3797. 028254 clc
  3798. 028255 adc $0281fc,x
  3799. 028259 sta $0000
  3800. 02825c sep #$20
  3801. 02825e pld
  3802. 02825f lda $0005,y
  3803. 028262 sta $0004
  3804. 028265 sta $0005
  3805. 028268 lda $0007,y
  3806. 02826b sta $0014
  3807. 02826e lda $0008,y
  3808. 028271 sta $0015
  3809. 028274 dec $00d8
  3810. 028277 bne $827f
  3811. 02827f rep #$20
  3812. 028281 lda $0009,y
  3813. 028284 clc
  3814. 028285 adc $0000
  3815. 028288 sta $0000
  3816. 02828b lda $000b,y
  3817. 02828e clc
  3818. 02828f adc $0002
  3819. 028292 sta $0002
  3820. 028295 clc
  3821. 028296 adc #$0020
  3822. 028299 cmp #$0100
  3823. 02829c bcc $82b0
  3824. 0282b0 sep #$20
  3825. 0282b2 lda $0000
  3826. 0282b5 sta $00
  3827. 0282b7 rep #$20
  3828. 0282b9 lda $000d,y
  3829. 0282bc bit #$0e00
  3830. 0282bf bne $82c9
  3831. 0282c1 and #$c1ff
  3832. 0282c4 ora $0006
  3833. 0282c7 bra $82d6
  3834. 0282d6 sta $02
  3835. 0282d8 sep #$20
  3836. 0282da lda $000e,y
  3837. 0282dd and #$10
  3838. 0282df beq $82ee
  3839. 0282e1 ldx $00dc
  3840. 0282e4 lda $028948,x
  3841. 0282e8 ora $0148
  3842. 0282eb sta $0148
  3843. 0282ee lda $0001
  3844. 0282f1 beq $8300
  3845. 028300 jsr $8913
  3846. 028303 lda $0002
  3847. 028306 sta $01
  3848. 028308 rep #$20
  3849. 02830a tdc
  3850. 02830b clc
  3851. 02830c adc #$0004
  3852. 02830f tcd
  3853. 028310 tya
  3854. 028311 clc
  3855. 028312 adc #$0006
  3856. 028315 tay
  3857. 028316 sep #$20
  3858. 028318 dec $0004
  3859. 02831b beq $8320
  3860. 02831d brl $8274
  3861. 028320 lda $000a
  3862. 028323 beq $834f
  3863. 028325 rep #$20
  3864. 028327 sty $0010
  3865. 02832a lda $00df
  3866. 02832d and #$00ff
  3867. 028330 tax
  3868. 028331 lda $0014
  3869. 028334 sta $0800,x
  3870. 028337 sep #$20
  3871. 028339 lda $0012
  3872. 02833c sta $0802,x
  3873. 02833f lda $000d
  3874. 028342 sta $0803,x
  3875. 028345 txa
  3876. 028346 clc
  3877. 028347 adc #$10
  3878. 028349 sta $00df
  3879. 02834c ldy $0010
  3880. 02834f rts
  3881. ; Object drawing?
  3882.  
  3883. ; Object drawing?
  3884. 028350 rep #$20
  3885. 028352 lda $0000
  3886. 028355 sec
  3887. 028356 sbc $0281fc,x
  3888. 02835a sta $0000
  3889. 02835d sep #$20
  3890. 02835f pld
  3891. 028360 lda $0005,y
  3892. 028363 sta $0004
  3893. 028366 sta $0005
  3894. 028369 lda $0007,y
  3895. 02836c sta $0014
  3896. 02836f lda $0008,y
  3897. 028372 sta $0015
  3898. 028375 dec $00d8
  3899. 028378 bne $8380
  3900. 028380 rep #$20
  3901. 028382 lda $0000
  3902. 028385 sec
  3903. 028386 sbc $0009,y
  3904. 028389 sta $0000
  3905. 02838c sec
  3906. 02838d sbc #$0008
  3907. 028390 sta $0008
  3908. 028393 lda $000b,y
  3909. 028396 clc
  3910. 028397 adc $0002
  3911. 02839a sta $0002
  3912. 02839d clc
  3913. 02839e adc #$0020
  3914. 0283a1 cmp #$0100
  3915. 0283a4 bcc $83b9
  3916. 0283b9 sep #$20
  3917. 0283bb rep #$20
  3918. 0283bd lda $000d,y
  3919. 0283c0 bit #$0e00
  3920. 0283c3 bne $83d0
  3921. 0283c5 and #$c1ff
  3922. 0283c8 ora $0006
  3923. 0283cb eor #$4000
  3924. 0283ce bra $83e0
  3925. 0283e0 sta $02
  3926. 0283e2 sep #$20
  3927. 0283e4 lda $000e,y
  3928. 0283e7 and #$10
  3929. 0283e9 beq $8406
  3930. 0283eb ldx $00dc
  3931. 0283ee lda $028948,x
  3932. 0283f2 ora $0148
  3933. 0283f5 sta $0148
  3934. 0283f8 rep #$20
  3935. 0283fa lda $0008
  3936. 0283fd sec
  3937. 0283fe sbc #$0008
  3938. 028401 sta $0008
  3939. 028404 sep #$20
  3940. 028406 lda $0008
  3941. 028409 sta $00
  3942. 02840b lda $0009
  3943. 02840e beq $841d
  3944. 02841d jsr $8913
  3945. 028420 lda $0002
  3946. 028423 sta $01
  3947. 028425 rep #$20
  3948. 028427 tdc
  3949. 028428 clc
  3950. 028429 adc #$0004
  3951. 02842c tcd
  3952. 02842d tya
  3953. 02842e clc
  3954. 02842f adc #$0006
  3955. 028432 tay
  3956. 028433 sep #$20
  3957. 028435 dec $0004
  3958. 028438 beq $843d
  3959. 02843a brl $8375
  3960. 02843d lda $000a
  3961. 028440 beq $846c
  3962. 028442 rep #$20
  3963. 028444 sty $0010
  3964. 028447 lda $00df
  3965. 02844a and #$00ff
  3966. 02844d tax
  3967. 02844e lda $0014
  3968. 028451 sta $0800,x
  3969. 028454 sep #$20
  3970. 028456 lda $0012
  3971. 028459 sta $0802,x
  3972. 02845c lda $000d
  3973. 02845f sta $0803,x
  3974. 028462 txa
  3975. 028463 clc
  3976. 028464 adc #$10
  3977. 028466 sta $00df
  3978. 028469 ldy $0010
  3979. 02846c rts
  3980. ; Object drawing?
  3981.  
  3982. 02866a phd
  3983. 02866b phy
  3984. 02866c pld
  3985. 02866d rep #$20
  3986. 02866f lda $07
  3987. 028671 sec
  3988. 028672 sbc $0e07
  3989. 028675 sta $000a
  3990. 028678 lda $0a
  3991. 02867a sec
  3992. 02867b sbc $0e0a
  3993. 02867e clc
  3994. 02867f adc #$000a
  3995. 028682 sep #$20
  3996. 028684 eor #$ff
  3997. 028686 rep #$20
  3998. 028688 inc
  3999. 028689 sta $000c
  4000. 02868c sep #$20
  4001. 02868e lda $21
  4002. 028690 ora $0ce0
  4003. 028693 stz $0006
  4004. 028696 sta $0007
  4005. 028699 lda $22
  4006. 02869b pha
  4007. 02869c plb
  4008. 02869d ldy $1c
  4009. 02869f iny
  4010. 0286a0 iny
  4011. 0286a1 iny
  4012. 0286a2 iny
  4013. 0286a3 sty $0016
  4014. 0286a6 lda #$00
  4015. 0286a8 xba
  4016. 0286a9 lda $3b
  4017. 0286ab tax
  4018. 0286ac beq $86b2
  4019. 0286b2 lda $20
  4020. 0286b4 beq $86b9
  4021. 0286b9 rep #$20
  4022. 0286bb lda $0281fc,x
  4023. 0286bf clc
  4024. 0286c0 adc $000a
  4025. 0286c3 sta $000a
  4026. 0286c6 sep #$20
  4027. 0286c8 pld
  4028. 0286c9 ldy $0016
  4029. 0286cc rep #$20
  4030. 0286ce lda $0002,y
  4031. 0286d1 sta $0000
  4032. 0286d4 lda $0004,y
  4033. 0286d7 sta $0002
  4034. 0286da lda $0000,y
  4035. 0286dd ora #$8000
  4036. 0286e0 tay
  4037. 0286e1 lda $000a
  4038. 0286e4 clc
  4039. 0286e5 adc $0000
  4040. 0286e8 sta $0000
  4041. 0286eb lda $000c
  4042. 0286ee clc
  4043. 0286ef adc $0002
  4044. 0286f2 sta $0002
  4045. 0286f5 sep #$20
  4046. 0286f7 jsr $8713
  4047. 0286fa ldy $0016
  4048. 0286fd rep #$20
  4049. 0286ff lda $0000,y
  4050. 028702 bpl $8710
  4051. 028704 lda $0016
  4052. 028707 clc
  4053. 028708 adc #$0006
  4054. 02870b sta $0016
  4055. 02870e bra $86c9
  4056. 028710 sep #$20
  4057. 028712 rts
  4058. 028713 lda $0000,y
  4059. 028716 sta $0004
  4060. 028719 sta $0005
  4061. 02871c dec $00d8
  4062. 02871f bne $8725
  4063. 028725 lda #$00
  4064. 028727 xba
  4065. 028728 lda $0001,y
  4066. 02872b bpl $8730
  4067. 02872d xba
  4068. 02872e dec
  4069. 02872f xba
  4070. 028730 rep #$20
  4071. 028732 clc
  4072. 028733 adc $0000
  4073. 028736 sta $0000
  4074. 028739 sep #$20
  4075. 02873b sta $00
  4076. 02873d lda #$00
  4077. 02873f xba
  4078. 028740 lda $0002,y
  4079. 028743 bpl $8748
  4080. 028745 xba
  4081. 028746 dec
  4082. 028747 xba
  4083. 028748 rep #$20
  4084. 02874a clc
  4085. 02874b adc $0002
  4086. 02874e sta $0002
  4087. 028751 bmi $8758
  4088. 028753 cmp #$00e0
  4089. 028756 bcc $876a
  4090. 028758 tya
  4091. 028759 clc
  4092. 02875a adc #$0004
  4093. 02875d tay
  4094. 02875e sep #$20
  4095. 028760 inc $00d8
  4096. 028763 dec $0004
  4097. 028766 bne $871c
  4098. 028768 bra $87d2
  4099. 0287d2 rts
  4100.  
  4101. 028913 dec $00dc
  4102. 028916 bmi $8928
  4103. 028918 lda $0148
  4104. 02891b stx $0010
  4105. 02891e ldx $00da
  4106. 028921 sta $0000,x
  4107. 028924 ldx $0010
  4108. 028927 rts
  4109.  
  4110. 028928 lda $0148
  4111. 02892b stz $0148
  4112. 02892e stx $0010
  4113. 028931 ldx $00da
  4114. 028934 sta $0000,x
  4115. 028937 inx
  4116. 028938 stx $00da
  4117. 02893b ldx $0010
  4118. 02893e lda #$03
  4119. 028940 sta $00dc
  4120. 028943 rts
  4121. 02894c rts
  4122. 028ae7 lda $7efffa
  4123. 028aeb beq $8b2d
  4124. 028b2d rtl
  4125.  
  4126. 028b2e ldx #$0e00
  4127. 028b31 jsr $8c92
  4128. 028b34 lda #$00
  4129. 028b36 sta $0011,x
  4130. 028b39 ldx #$0e80
  4131. 028b3c jsr $8c92
  4132. 028b3f lda #$02
  4133. 028b41 sta $0011,x
  4134. 028b44 ldx #$0f00
  4135. 028b47 jsr $8c92
  4136. 028b4a lda #$04
  4137. 028b4c sta $0011,x
  4138. 028b4f ldx #$0f80
  4139. 028b52 jsr $8c92
  4140. 028b55 lda #$06
  4141. 028b57 sta $0011,x
  4142. 028b5a phb
  4143. 028b5b lda #$02
  4144. 028b5d pha
  4145. 028b5e plb
  4146. 028b5f jsr $8cf5
  4147. 028b62 jsr $8d11
  4148. 028b65 jsr $8d2d
  4149. 028b68 jsr $8ca3
  4150. 028b6b jsr $8ccc
  4151. 028b6e jsr $8b7f
  4152. 028b71 jsr $8bd2
  4153. 028b74 jsr $8c11
  4154. 028b77 jsr $8c33
  4155. 028b7a jsr $8c69
  4156. 028b7d plb
  4157. 028b7e rtl
  4158.  
  4159. 028b7f ldx #$8f45
  4160. 028b82 lda #$00
  4161. 028b84 xba
  4162. 028b85 lda $0cb0
  4163. 028b88 asl a
  4164. 028b89 tax
  4165. 028b8a ldy $8f45,x
  4166. 028b8d sty $0010
  4167. 028b90 lda $0cb1
  4168. 028b93 asl a
  4169. 028b94 asl a
  4170. 028b95 asl a
  4171. 028b96 rep #$20
  4172. 028b98 clc
  4173. 028b99 adc $0010
  4174. 028b9c tay
  4175. 028b9d lda $8f45,y
  4176. 028ba0 sta $0e07
  4177. 028ba3 sta $0e38
  4178. 028ba6 lda $8f47,y
  4179. 028ba9 sta $0e0a
  4180. 028bac clc
  4181. 028bad adc #$00ff
  4182. 028bb0 eor #$ffff
  4183. 028bb3 sta $0e3a
  4184. 028bb6 lda $8f49,y
  4185. 028bb9 sta $0e87
  4186. 028bbc sta $0eb8
  4187. 028bbf lda $8f4b,y
  4188. 028bc2 sta $0e8a
  4189. 028bc5 clc
  4190. 028bc6 adc #$00ff
  4191. 028bc9 eor #$ffff
  4192. 028bcc sta $0eba
  4193. 028bcf sep #$20
  4194. 028bd1 rts
  4195. 028bd2 ldx #$0000
  4196. 028bd5 stx $0f87
  4197. 028bd8 stx $0f8a
  4198. 028bdb lda $0cb0
  4199. 028bde cmp #$0a
  4200. 028be0 bne $8bef
  4201. 028bef cmp #$08
  4202. 028bf1 bne $8c07
  4203. 028c07 stx $0f07
  4204. 028c0a stx $0f38
  4205. 028c0d stx $0f0a
  4206. 028c10 rts
  4207. 028c11 lda #$00
  4208. 028c13 xba
  4209. 028c14 lda $0cb0
  4210. 028c17 asl a
  4211. 028c18 tax
  4212. 028c19 ldy $8e57,x
  4213. 028c1c sty $0010
  4214. 028c1f lda $0cb1
  4215. 028c22 asl a
  4216. 028c23 rep #$20
  4217. 028c25 clc
  4218. 028c26 adc $0010
  4219. 028c29 tay
  4220. 028c2a lda $8e57,y
  4221. 028c2d sta $0eb4
  4222. 028c30 sep #$20
  4223. 028c32 rts
  4224. 028c33 lda #$00
  4225. 028c35 xba
  4226. 028c36 lda $0cb0
  4227. 028c39 asl a
  4228. 028c3a tax
  4229. 028c3b ldy $8d49,x
  4230. 028c3e sty $0010
  4231. 028c41 lda $0cb1
  4232. 028c44 asl a
  4233. 028c45 asl a
  4234. 028c46 asl a
  4235. 028c47 rep #$20
  4236. 028c49 clc
  4237. 028c4a adc $0010
  4238. 028c4d tay
  4239. 028c4e lda $8d49,y
  4240. 028c51 sta $0e2a
  4241. 028c54 lda $8d4b,y
  4242. 028c57 sta $0e2c
  4243. 028c5a lda $8d4d,y
  4244. 028c5d sta $0e30
  4245. 028c60 lda $8d4f,y
  4246. 028c63 sta $0e2e
  4247. 028c66 sep #$20
  4248. 028c68 rts
  4249. 028c69 lda #$00
  4250. 028c6b xba
  4251. 028c6c lda $0cb0
  4252. 028c6f asl a
  4253. 028c70 tax
  4254. 028c71 ldy $8eab,x
  4255. 028c74 sty $0010
  4256. 028c77 lda $0cb1
  4257. 028c7a asl a
  4258. 028c7b asl a
  4259. 028c7c rep #$20
  4260. 028c7e clc
  4261. 028c7f adc $0010
  4262. 028c82 tay
  4263. 028c83 lda $8eab,y
  4264. 028c86 sta $0e32
  4265. 028c89 lda $8ead,y
  4266. 028c8c sta $0eb2
  4267. 028c8f sep #$20
  4268. 028c91 rts
  4269. 028c92 rep #$20
  4270. 028c94 stz $0002,x
  4271. 028c97 stz $0004,x
  4272. 028c9a stz $0060,x
  4273. 028c9d stz $0062,x
  4274. 028ca0 sep #$20
  4275. 028ca2 rts
  4276. 028ca3 lda #$00
  4277. 028ca5 xba
  4278. 028ca6 lda $0cb0
  4279. 028ca9 asl a
  4280. 028caa tax
  4281. 028cab ldy $905b,x
  4282. 028cae sty $0010
  4283. 028cb1 lda $0cb1
  4284. 028cb4 asl a
  4285. 028cb5 rep #$20
  4286. 028cb7 clc
  4287. 028cb8 adc $0010
  4288. 028cbb tax
  4289. 028cbc lda $02905b,x
  4290. 028cc0 sta $0e46
  4291. 028cc3 lda #$7000
  4292. 028cc6 sta $0e44
  4293. 028cc9 sep #$20
  4294. 028ccb rts
  4295. 028ccc lda #$00
  4296. 028cce xba
  4297. 028ccf lda $0cb0
  4298. 028cd2 asl a
  4299. 028cd3 tax
  4300. 028cd4 ldy $9081,x
  4301. 028cd7 sty $0010
  4302. 028cda lda $0cb1
  4303. 028cdd asl a
  4304. 028cde rep #$20
  4305. 028ce0 clc
  4306. 028ce1 adc $0010
  4307. 028ce4 tax
  4308. 028ce5 lda $029081,x
  4309. 028ce9 sta $0ec6
  4310. 028cec lda #$7800
  4311. 028cef sta $0ec4
  4312. 028cf2 sep #$20
  4313. 028cf4 rts
  4314. 028cf5 lda #$00
  4315. 028cf7 xba
  4316. 028cf8 lda $0cb0
  4317. 028cfb asl a
  4318. 028cfc asl a
  4319. 028cfd tax
  4320. 028cfe rep #$20
  4321. 028d00 lda $078000,x
  4322. 028d04 sta $0e14
  4323. 028d07 lda $078002,x
  4324. 028d0b sta $0e16
  4325. 028d0e sep #$20
  4326. 028d10 rts
  4327. 028d11 lda #$00
  4328. 028d13 xba
  4329. 028d14 lda $0cb0
  4330. 028d17 asl a
  4331. 028d18 asl a
  4332. 028d19 tax
  4333. 028d1a rep #$20
  4334. 028d1c lda $07802c,x
  4335. 028d20 sta $0e94
  4336. 028d23 lda $07802e,x
  4337. 028d27 sta $0e96
  4338. 028d2a sep #$20
  4339. 028d2c rts
  4340. 028d2d lda #$00
  4341. 028d2f xba
  4342. 028d30 lda $0cb0
  4343. 028d33 asl a
  4344. 028d34 asl a
  4345. 028d35 tax
  4346. 028d36 rep #$20
  4347. 028d38 lda $078058,x
  4348. 028d3c sta $0f14
  4349. 028d3f lda $07805a,x
  4350. 028d43 sta $0f16
  4351. 028d46 sep #$20
  4352. 028d48 rts
  4353. 0290a7 lda #$00
  4354. 0290a9 xba
  4355. 0290aa lda $0cb0
  4356. 0290ad asl a
  4357. 0290ae tax
  4358. 0290af lda $0cb1
  4359. 0290b2 asl a
  4360. 0290b3 jsr ($90f8,x)
  4361. 0290b6 lda $0cb3
  4362. 0290b9 bne $90f5
  4363. 0290bb lda $32
  4364. 0290bd cmp #$02
  4365. 0290bf beq $90f5
  4366. 0290c1 lda $0cc2
  4367. 0290c4 bne $90f0
  4368. 0290c6 rep #$20
  4369. 0290c8 lda $07
  4370. 0290ca cmp $2c
  4371. 0290cc beq $90f5
  4372. 0290ce cmp $38
  4373. 0290d0 bne $90f0
  4374. 0290d2 dec $40
  4375. 0290d4 bne $90f5
  4376. 0290f0 ldx #$01a4
  4377. 0290f3 stx $40
  4378. 0290f5 sep #$20
  4379. 0290f7 rtl
  4380. 02910c tax
  4381. 02910d jmp ($9110,x)
  4382. 029116 lda $60
  4383. 029118 tax
  4384. 029119 jmp ($911c,x)
  4385. 029122 lda #$01
  4386. 029124 sta $61
  4387. 029126 lda #$02
  4388. 029128 sta $60
  4389. 02912a rts
  4390. 02912b dec $61
  4391. 02912d bne $9133
  4392. 02912f lda #$04
  4393. 029131 sta $60
  4394. 029133 rts
  4395. 029134 rts
  4396. 0292d4 lda #$00
  4397. 0292d6 xba
  4398. 0292d7 lda $0cb0
  4399. 0292da asl a
  4400. 0292db tax
  4401. 0292dc lda $0cb1
  4402. 0292df asl a
  4403. 0292e0 jmp ($92e3,x)
  4404. 0292f7 tax
  4405. 0292f8 jmp ($92fb,x)
  4406. 029301 rtl
  4407.  
  4408. 0297eb ldx #$0e00
  4409. 0297ee phx
  4410. 0297ef pld
  4411. 0297f0 jsr $980c
  4412. 0297f3 ldx #$0e80
  4413. 0297f6 phx
  4414. 0297f7 pld
  4415. 0297f8 jsr $9995
  4416. 0297fb ldx #$0f00
  4417. 0297fe phx
  4418. 0297ff pld
  4419. 029800 jsr $9b3b
  4420. 029803 rep #$20
  4421. 029805 lda #$0000
  4422. 029808 tcd
  4423. 029809 sep #$20
  4424. 02980b rtl
  4425.  
  4426. 02980c lda #$00
  4427. 02980e xba
  4428. 02980f lda $02
  4429. 029811 tax
  4430. 029812 jmp ($9815,x)
  4431. 02981b lda #$02
  4432. 02981d sta $02
  4433. 02981f stz $1a
  4434. 029821 stz $1b
  4435. 029823 stz $20
  4436. 029825 stz $21
  4437. 029827 lda #$3e
  4438. 029829 sta $36
  4439. 02982b jmp $9968
  4440. 02982e jsl $029f77
  4441. 029832 rep #$20
  4442. 029834 lda $38
  4443. 029836 clc
  4444. 029837 adc #$0008
  4445. 02983a sta $38
  4446. 02983c sep #$20
  4447. 02983e dec $36
  4448. 029840 bpl $9846
  4449. 029842 lda #$04
  4450. 029844 sta $02
  4451. 029846 rts
  4452. 029847 jsl $0290a7
  4453. 02984b ldx #$0000
  4454. 02984e stx $26
  4455. 029850 stx $28
  4456. 029852 lda $0cc2
  4457. 029855 bne $9865
  4458. 029857 ldx $07
  4459. 029859 stx $38
  4460. 02985b ldx $0a
  4461. 02985d stx $3a
  4462. 02985f jsr $988d
  4463. 029862 jsr $9956
  4464. 029865 jsr $9968
  4465. 029868 lda $07
  4466. 02986a and #$08
  4467. 02986c eor $1a
  4468. 02986e bne $988c
  4469. 029870 lda $1a
  4470. 029872 eor #$08
  4471. 029874 sta $1a
  4472. 029876 lda $20
  4473. 029878 rep #$20
  4474. 02987a jsl $029f19
  4475. 02987e jsl $029f92
  4476. 029882 jsl $029fe3
  4477. 029886 jsl $02a0a2
  4478. 02988a sep #$20
  4479. 02988c rts
  4480. 02988d lda #$00
  4481. 02988f xba
  4482. 029890 lda $32
  4483. 029892 tax
  4484. 029893 jmp ($9896,x)
  4485. 0298a2 rep #$20
  4486. 0298a4 ldx #$0d00
  4487. 0298a7 lda $0007,x
  4488. 0298aa bmi $98df
  4489. 0298ac sec
  4490. 0298ad sbc $07
  4491. 0298af sbc #$0088
  4492. 0298b2 bmi $98df
  4493. 0298df sep #$20
  4494. 0298e1 rts
  4495. 029956 lda #$00
  4496. 029958 xba
  4497. 029959 lda $33
  4498. 02995b tax
  4499. 02995c jmp ($995f,x)
  4500. 029967 rts
  4501. 029968 rep #$20
  4502. 02996a ldx $46
  4503. 02996c jmp ($996f,x)
  4504. 029973 lda $07
  4505. 029975 sta $00f0
  4506. 029978 lda #$0009
  4507. 02997b sec
  4508. 02997c sbc $0a
  4509. 02997e sta $00f2
  4510. 029981 sep #$20
  4511. 029983 rts
  4512. 029995 lda #$00
  4513. 029997 xba
  4514. 029998 lda $02
  4515. 02999a tax
  4516. 02999b jmp ($999e,x)
  4517. 0299a6 lda #$02
  4518. 0299a8 sta $02
  4519. 0299aa stz $1a
  4520. 0299ac stz $1b
  4521. 0299ae stz $20
  4522. 0299b0 stz $21
  4523. 0299b2 lda #$1f
  4524. 0299b4 sta $36
  4525. 0299b6 jmp $9b0e
  4526. 0299b9 jsl $02a162
  4527. 0299bd rep #$20
  4528. 0299bf lda $38
  4529. 0299c1 clc
  4530. 0299c2 adc #$0010
  4531. 0299c5 sta $38
  4532. 0299c7 sep #$20
  4533. 0299c9 dec $36
  4534. 0299cb bpl $99e4
  4535. 0299cd lda $0cb0
  4536. 0299d0 cmp #$01
  4537. 0299d2 bne $99e0
  4538. 0299e0 lda #$04
  4539. 0299e2 sta $02
  4540. 0299e4 rts
  4541. 0299f0 jsl $0292d4
  4542. 0299f4 ldx $07
  4543. 0299f6 stx $38
  4544. 0299f8 ldx $0a
  4545. 0299fa stx $3a
  4546. 0299fc jsr $9a2a
  4547. 0299ff jsr $9afc
  4548. 029a02 jsr $9b0e
  4549. 029a05 lda $07
  4550. 029a07 and #$10
  4551. 029a09 eor $1a
  4552. 029a0b bne $9a29
  4553. 029a0d lda $1a
  4554. 029a0f eor #$10
  4555. 029a11 sta $1a
  4556. 029a13 lda $20
  4557. 029a15 rep #$20
  4558. 029a17 jsl $029f48
  4559. 029a1b jsl $02a17d
  4560. 029a1f jsl $029fe3
  4561. 029a23 jsl $02a1af
  4562. 029a27 sep #$20
  4563. 029a29 rts
  4564. 029a2a lda #$00
  4565. 029a2c xba
  4566. 029a2d lda $32
  4567. 029a2f tax
  4568. 029a30 jmp ($9a33,x)
  4569. 029a3d lda $34
  4570. 029a3f tax
  4571. 029a40 jmp ($9a43,x)
  4572. 029a64 rep #$20
  4573. 029a66 lda $0e26
  4574. 029a69 bpl $9a80
  4575. 029a80 xba
  4576. 029a81 and #$ff00
  4577. 029a84 lsr a
  4578. 029a85 clc
  4579. 029a86 adc $06
  4580. 029a88 sta $06
  4581. 029a8a sep #$20
  4582. 029a8c lda #$00
  4583. 029a8e adc $08
  4584. 029a90 sta $08
  4585. 029a92 lda $0e20
  4586. 029a95 sta $20
  4587. 029a97 sep #$20
  4588. 029a99 rts
  4589. 029afc lda #$00
  4590. 029afe xba
  4591. 029aff lda $33
  4592. 029b01 tax
  4593. 029b02 jmp ($9b05,x)
  4594. 029b0d rts
  4595. 029b0e rep #$20
  4596. 029b10 ldx $46
  4597. 029b12 jmp ($9b15,x)
  4598. 029b19 lda $07
  4599. 029b1b sta $00f4
  4600. 029b1e lda #$0109
  4601. 029b21 sec
  4602. 029b22 sbc $0a
  4603. 029b24 sta $00f6
  4604. 029b27 sep #$20
  4605. 029b29 rts
  4606. 029b3b lda #$00
  4607. 029b3d xba
  4608. 029b3e lda $02
  4609. 029b40 tax
  4610. 029b41 jmp ($9b44,x)
  4611. 029b4a lda #$02
  4612. 029b4c sta $02
  4613. 029b4e ldx #$0000
  4614. 029b51 stz $06
  4615. 029b53 stx $07
  4616. 029b55 stz $09
  4617. 029b57 stx $0a
  4618. 029b59 jmp $9bed
  4619. 029b5c rts
  4620. 029b5d lda $03
  4621. 029b5f tax
  4622. 029b60 jsr ($9b66,x)
  4623. 029b63 jmp $9bed
  4624. 029b6e lda $0cb1
  4625. 029b71 beq $9b81
  4626. 029b81 ldx #$ffe0
  4627. 029b84 stx $0a
  4628. 029b86 lda #$02
  4629. 029b88 sta $03
  4630. 029b8a rts
  4631. 029b90 lda $00d0
  4632. 029b93 bne $9bbf
  4633. 029b95 lda $0cb3
  4634. 029b98 bne $9b9f
  4635. 029b9a lda $0cd1
  4636. 029b9d bne $9bbf
  4637. 029bbf rts
  4638. 029bed rep #$20
  4639. 029bef lda $07
  4640. 029bf1 sta $00f8
  4641. 029bf4 lda #$fffc
  4642. 029bf7 sec
  4643. 029bf8 sbc $0a
  4644. 029bfa sta $00fa
  4645. 029bfd sep #$20
  4646. 029bff rts
  4647. 029f19 and #$00ff
  4648. 029f1c tax
  4649. 029f1d lda $029f38,x
  4650. 029f21 clc
  4651. 029f22 adc $07
  4652. 029f24 sta $000a
  4653. 029f27 lda $029f3a,x
  4654. 029f2b clc
  4655. 029f2c adc $0a
  4656. 029f2e eor #$ffff
  4657. 029f31 and #$ff00
  4658. 029f34 sta $000c
  4659. 029f37 rtl
  4660. 029f48 and #$00ff
  4661. 029f4b tax
  4662. 029f4c lda $029f67,x
  4663. 029f50 clc
  4664. 029f51 adc $07
  4665. 029f53 sta $000a
  4666. 029f56 lda $029f69,x
  4667. 029f5a clc
  4668. 029f5b adc $0a
  4669. 029f5d eor #$ffff
  4670. 029f60 and #$ff00
  4671. 029f63 sta $000c
  4672. 029f66 rtl
  4673. 029f77 rep #$20
  4674. 029f79 lda $38
  4675. 029f7b sta $000a
  4676. 029f7e lda $3a
  4677. 029f80 sta $000c
  4678. 029f83 jsl $029f92
  4679. 029f87 jsl $029fe3
  4680. 029f8b jsl $02a0a2
  4681. 029f8f sep #$20
  4682. 029f91 rtl
  4683. 029f92 lda $000a
  4684. 029f95 and #$0100
  4685. 029f98 asl a
  4686. 029f99 asl a
  4687. 029f9a sta $0010
  4688. 029f9d lda $000a
  4689. 029fa0 and #$00ff
  4690. 029fa3 lsr a
  4691. 029fa4 lsr a
  4692. 029fa5 lsr a
  4693. 029fa6 clc
  4694. 029fa7 adc $0010
  4695. 029faa sta $0010
  4696. 029fad clc
  4697. 029fae adc $44
  4698. 029fb0 sta $0016
  4699. 029fb3 lda $000c
  4700. 029fb6 and #$00f8
  4701. 029fb9 asl a
  4702. 029fba asl a
  4703. 029fbb clc
  4704. 029fbc adc $0010
  4705. 029fbf clc
  4706. 029fc0 adc $44
  4707. 029fc2 sta $0014
  4708. 029fc5 ldx #$0000
  4709. 029fc8 lda $000a
  4710. 029fcb bit #$0008
  4711. 029fce beq $9fd3
  4712. 029fd0 ldx #$0002
  4713. 029fd3 stx $3e
  4714. 029fd5 ldx #$0000
  4715. 029fd8 bit #$0010
  4716. 029fdb beq $9fe0
  4717. 029fdd ldx #$0002
  4718. 029fe0 stx $3c
  4719. 029fe2 rtl
  4720. 029fe3 jsr $a00f
  4721. 029fe6 xba
  4722. 029fe7 lsr a
  4723. 029fe8 sta $0012
  4724. 029feb lda $000a
  4725. 029fee and #$00e0
  4726. 029ff1 lsr a
  4727. 029ff2 lsr a
  4728. 029ff3 lsr a
  4729. 029ff4 lsr a
  4730. 029ff5 sta $22
  4731. 029ff7 clc
  4732. 029ff8 adc $0012
  4733. 029ffb sta $0012
  4734. 029ffe lda $000c
  4735. 02a001 and #$00e0
  4736. 02a004 lsr a
  4737. 02a005 sta $24
  4738. 02a007 clc
  4739. 02a008 adc $0012
  4740. 02a00b sta $0012
  4741. 02a00e rtl
  4742. 02a00f lda $14
  4743. 02a011 tax
  4744. 02a012 jmp ($a015,x)
  4745. 02a029 lda $000b
  4746. 02a02c and #$000f
  4747. 02a02f sta $1c
  4748. 02a031 sta $1e
  4749. 02a033 clc
  4750. 02a034 adc $16
  4751. 02a036 tax
  4752. 02a037 lda $070000,x
  4753. 02a03b and #$00ff
  4754. 02a03e rts
  4755. 02a0a2 lda #$0000
  4756. 02a0a5 sep #$20
  4757. 02a0a7 lda $00e5
  4758. 02a0aa tay
  4759. 02a0ab lda #$81
  4760. 02a0ad sta $0b00,y
  4761. 02a0b0 iny
  4762. 02a0b1 lda #$40
  4763. 02a0b3 sta $0b00,y
  4764. 02a0b6 iny
  4765. 02a0b7 rep #$20
  4766. 02a0b9 lda $0016
  4767. 02a0bc sta $0b00,y
  4768. 02a0bf iny
  4769. 02a0c0 iny
  4770. 02a0c1 sty $0018
  4771. 02a0c4 rep #$20
  4772. 02a0c6 lda $000c
  4773. 02a0c9 and #$00e0
  4774. 02a0cc lsr a
  4775. 02a0cd lsr a
  4776. 02a0ce sta $0004
  4777. 02a0d1 lsr a
  4778. 02a0d2 lsr a
  4779. 02a0d3 lsr a
  4780. 02a0d4 sta $0000
  4781. 02a0d7 sta $0002
  4782. 02a0da jsr $a0f9
  4783. 02a0dd lda #$0007
  4784. 02a0e0 sec
  4785. 02a0e1 sbc $0002
  4786. 02a0e4 beq $a0f0
  4787. 02a0e6 dec
  4788. 02a0e7 sta $0000
  4789. 02a0ea sta $0002
  4790. 02a0ed jsr $a0f9
  4791. 02a0f0 sep #$20
  4792. 02a0f2 tya
  4793. 02a0f3 sta $00e5
  4794. 02a0f6 rep #$20
  4795. 02a0f8 rtl
  4796. 02a0f9 ldx $0012
  4797. 02a0fc lda $0ea000,x
  4798. 02a100 xba
  4799. 02a101 clc
  4800. 02a102 adc $3c
  4801. 02a104 tax
  4802. 02a105 lda $0d0000,x
  4803. 02a109 xba
  4804. 02a10a clc
  4805. 02a10b adc $3e
  4806. 02a10d tax
  4807. 02a10e jsr $a139
  4808. 02a111 ldx $0012
  4809. 02a114 lda $0ea000,x
  4810. 02a118 xba
  4811. 02a119 clc
  4812. 02a11a adc $3c
  4813. 02a11c tax
  4814. 02a11d lda $0d0004,x
  4815. 02a121 xba
  4816. 02a122 clc
  4817. 02a123 adc $3e
  4818. 02a125 tax
  4819. 02a126 jsr $a139
  4820. 02a129 lda #$0010
  4821. 02a12c clc
  4822. 02a12d adc $0012
  4823. 02a130 sta $0012
  4824. 02a133 dec $0000
  4825. 02a136 bpl $a0f9
  4826. 02a138 rts
  4827. 02a139 bpl $a14e
  4828. 02a13b lda $0c0000,x
  4829. 02a13f sta $0b00,y
  4830. 02a142 iny
  4831. 02a143 iny
  4832. 02a144 lda $0c0004,x
  4833. 02a148 sta $0b00,y
  4834. 02a14b iny
  4835. 02a14c iny
  4836. 02a14d rts
  4837. 02a14e lda $0e8000,x
  4838. 02a152 sta $0b00,y
  4839. 02a155 iny
  4840. 02a156 iny
  4841. 02a157 lda $0e8004,x
  4842. 02a15b sta $0b00,y
  4843. 02a15e iny
  4844. 02a15f iny
  4845. 02a160 rts
  4846. 02a162 rep #$20
  4847. 02a164 lda $38
  4848. 02a166 sta $000a
  4849. 02a169 lda $3a
  4850. 02a16b sta $000c
  4851. 02a16e jsl $02a17d
  4852. 02a172 jsl $029fe3
  4853. 02a176 jsl $02a1af
  4854. 02a17a sep #$20
  4855. 02a17c rtl
  4856. 02a17d lda $000c
  4857. 02a180 and #$01f0
  4858. 02a183 asl a
  4859. 02a184 sta $0010
  4860. 02a187 lda $000a
  4861. 02a18a and #$01f0
  4862. 02a18d lsr a
  4863. 02a18e lsr a
  4864. 02a18f lsr a
  4865. 02a190 lsr a
  4866. 02a191 clc
  4867. 02a192 adc $0010
  4868. 02a195 clc
  4869. 02a196 adc $44
  4870. 02a198 sta $0010
  4871. 02a19b ldx #$0000
  4872. 02a19e lda $000a
  4873. 02a1a1 and #$00ff
  4874. 02a1a4 bit #$0010
  4875. 02a1a7 beq $a1ac
  4876. 02a1a9 ldx #$0002
  4877. 02a1ac stx $3e
  4878. 02a1ae rtl
  4879. 02a1af lda #$0000
  4880. 02a1b2 sep #$20
  4881. 02a1b4 lda $00e5
  4882. 02a1b7 tay
  4883. 02a1b8 lda #$81
  4884. 02a1ba sta $0b00,y
  4885. 02a1bd iny
  4886. 02a1be lda #$20
  4887. 02a1c0 sta $0b00,y
  4888. 02a1c3 iny
  4889. 02a1c4 rep #$20
  4890. 02a1c6 lda $0010
  4891. 02a1c9 sta $0b00,y
  4892. 02a1cc iny
  4893. 02a1cd iny
  4894. 02a1ce rep #$20
  4895. 02a1d0 lda $000c
  4896. 02a1d3 eor #$ffff
  4897. 02a1d6 and #$00e0
  4898. 02a1d9 lsr a
  4899. 02a1da lsr a
  4900. 02a1db lsr a
  4901. 02a1dc lsr a
  4902. 02a1dd lsr a
  4903. 02a1de sta $0000
  4904. 02a1e1 sta $0002
  4905. 02a1e4 jsr $a1f0
  4906. 02a1e7 sep #$20
  4907. 02a1e9 tya
  4908. 02a1ea sta $00e5
  4909. 02a1ed rep #$20
  4910. 02a1ef rtl
  4911. 02a1f0 ldx $0012
  4912. 02a1f3 lda $0fc000,x
  4913. 02a1f7 xba
  4914. 02a1f8 clc
  4915. 02a1f9 adc $3e
  4916. 02a1fb tax
  4917. 02a1fc jsr $a139
  4918. 02a1ff lda #$0010
  4919. 02a202 clc
  4920. 02a203 adc $0012
  4921. 02a206 sta $0012
  4922. 02a209 dec $0000
  4923. 02a20c bpl $a1f0
  4924. 02a20e rts
  4925.  
  4926. 02a210 lda #$00
  4927. 02a212 xba
  4928. 02a213 lda $02
  4929. 02a215 tax
  4930. 02a216 jsr ($a21a,x)
  4931. 02a219 rtl
  4932.  
  4933. 02a6f5 lda #$00
  4934. 02a6f7 xba
  4935. 02a6f8 lda $03
  4936. 02a6fa tax
  4937. 02a6fb jsr ($a71e,x)
  4938. 02a6fe jsr $ae45
  4939. 02a701 jsr $ae56
  4940. 02a704 lda $0f
  4941. 02a706 beq $a70e
  4942. 02a70e lda $74
  4943. 02a710 beq $a714
  4944. 02a714 jsl $00ae30
  4945. 02a718 jsr $a744
  4946. 02a71b brl $a7c0
  4947. 02a744 lda $7efffa
  4948. 02a748 bne $a74d
  4949. 02a74a jmp $a79d
  4950. 02a79d rts
  4951. 02a7b5 jsl $00a405
  4952. 02a7b9 lda $47
  4953. 02a7bb bne $a79e
  4954. 02a7bd jmp $a6f5
  4955. 02a7c0 lda $72
  4956. 02a7c2 beq $a7c6
  4957. 02a7c6 lda $73
  4958. 02a7c8 beq $a7d2
  4959. 02a7d2 lda $0cd4
  4960. 02a7d5 bne $a7ec
  4961. 02a7d7 lda $0cd2
  4962. 02a7da beq $a7e2
  4963. 02a7e2 lda $0cd0
  4964. 02a7e5 bne $a7ef
  4965. 02a7e7 lda $0cc3
  4966. 02a7ea bne $a7f4
  4967. 02a7ec lda #$01
  4968. 02a7ee rts
  4969. 02a821 lda $04
  4970. 02a823 tax
  4971. 02a824 jsr ($a836,x)
  4972. 02a827 jsr $ae57
  4973. 02a82a jsr $af35
  4974. 02a82d bmi $a835
  4975. 02a82f jsr $b04a
  4976. 02a832 jsr $b05f
  4977. 02a835 rts
  4978. 02a83a stz $68
  4979. 02a83c lda #$02
  4980. 02a83e sta $04
  4981. 02a840 ldx $0a
  4982. 02a842 stx $0d
  4983. 02a844 lda $09
  4984. 02a846 sta $0c
  4985. 02a848 jsr $c181
  4986. 02a84b jsl $00a75a
  4987. 02a84f jsr $b01e
  4988. 02a852 beq $a85a
  4989. 02a85a lda #$00
  4990. 02a85c sta $68
  4991. 02a85e rts
  4992. 02a944 lda $04
  4993. 02a946 tax
  4994. 02a947 jsr ($a959,x)
  4995. 02a94a jsr $ae57
  4996. 02a94d jsr $af35
  4997. 02a950 bmi $a958
  4998. 02a952 jsr $b04a
  4999. 02a955 jmp $b05f
  5000. 02a95d stz $68
  5001. 02a95f lda #$02
  5002. 02a961 sta $04
  5003. 02a963 jsr $c194
  5004. 02a966 jsr $b01e
  5005. 02a969 beq $a971
  5006. 02a96b jsr $af48
  5007. 02a96e jmp $afd5
  5008. 02a971 lda #$0c
  5009. 02a973 sta $03
  5010. 02a975 stz $04
  5011. 02a977 rts
  5012. 02a978 lda $04
  5013. 02a97a tax
  5014. 02a97b jsr ($a98d,x)
  5015. 02a97e jsr $ae57
  5016. 02a981 jsr $af35
  5017. 02a984 bmi $a98c
  5018. 02a986 jsr $b04a
  5019. 02a989 jsr $b05f
  5020. 02a98c rts
  5021. 02a991 stz $68
  5022. 02a993 lda #$06
  5023. 02a995 sta $3c
  5024. 02a997 lda #$02
  5025. 02a999 sta $04
  5026. 02a99b lda $3c
  5027. 02a99d beq $a9a8
  5028. 02a99f dec $3c
  5029. 02a9a1 bne $a9ac
  5030. 02a9a3 jsr $c181
  5031. 02a9a6 bra $a9ac
  5032. 02a9a8 jsl $00a75a
  5033. 02a9ac jsr $b01e
  5034. 02a9af beq $a9b7
  5035. 02a9b1 lda #$0a
  5036. 02a9b3 sta $03
  5037. 02a9b5 stz $04
  5038. 02a9b7 rts
  5039. 02ab90 lda $38
  5040. 02ab92 beq $ab97
  5041. 02ab97 lda $12
  5042. 02ab99 tax
  5043. 02ab9a jmp ($ab9d,x)
  5044. 02aba3 lda $04
  5045. 02aba5 tax
  5046. 02aba6 jmp ($aba9,x)
  5047. 02abb1 lda $05
  5048. 02abb3 tax
  5049. 02abb4 jmp ($abb7,x)
  5050. 02abbb stz $68
  5051. 02abbd lda #$3a
  5052. 02abbf jsl $009f95
  5053. 02abc3 lda #$06
  5054. 02abc5 sta $75
  5055. 02abc7 ldx #$d845
  5056. 02abca bra $ac1b
  5057. 02ac1b jsl $00a727
  5058. 02ac1f lda #$20
  5059. 02ac21 sta $68
  5060. 02ac23 jsr $b492
  5061. 02ac26 lda #$02
  5062. 02ac28 sta $05
  5063. 02ac2a jsr $af35
  5064. 02ac2d bpl $ac33
  5065. 02ac33 rts
  5066. 02ac8b lda $1f
  5067. 02ac8d beq $ac9c
  5068. 02ac8f bmi $aca6
  5069. 02ac91 jsr $af35
  5070. 02ac94 bmi $aca1
  5071. 02ac96 jsr $ae57
  5072. 02ac99 jsr $b064
  5073. 02ac9c jsl $00a75a
  5074. 02aca0 rts
  5075. 02aca6 lda #$80
  5076. 02aca8 trb $69
  5077. 02acaa jsr $af35
  5078. 02acad bmi $acbd
  5079. 02acaf lda #$00
  5080. 02acb1 sta $03
  5081. 02acb3 stz $04
  5082. 02acb5 stz $05
  5083. 02acb7 jsr $b04a
  5084. 02acba jsr $b05f
  5085. 02acbd rts
  5086. 02ae45 lda #$80
  5087. 02ae47 bit $69
  5088. 02ae49 bne $ae55
  5089. 02ae4b lda $70
  5090. 02ae4d beq $ae55
  5091. 02ae55 rts
  5092. 02ae56 rts
  5093. 02ae57 lda $12
  5094. 02ae59 cmp #$02
  5095. 02ae5b beq $ae62
  5096. 02ae62 ldy $07
  5097. 02ae64 sty $0004
  5098. 02ae67 lda $20
  5099. 02ae69 rep #$20
  5100. 02ae6b beq $ae77
  5101. 02ae6d lda $0004
  5102. 02ae70 sec
  5103. 02ae71 sbc #$0078
  5104. 02ae74 sta $0004
  5105. 02ae77 sep #$20
  5106. 02ae79 lda #$00
  5107. 02ae7b xba
  5108. 02ae7c lda $0cb4
  5109. 02ae7f and #$03
  5110. 02ae81 sta $0008
  5111. 02ae84 asl a
  5112. 02ae85 tax
  5113. 02ae86 jmp ($ae89,x)
  5114.  
  5115. 02ae91 lda #$01
  5116. 02ae93 sta $0000
  5117. 02ae96 ldy #$0d00
  5118. 02ae99 lda $11
  5119. 02ae9b bne $aea0
  5120. 02ae9d ldy #$0d80
  5121. 02aea0 jmp $aef8
  5122. 02aea3 lda #$02
  5123. 02aea5 sta $0000
  5124. 02aea8 ldy #$1000
  5125. 02aeab jsr $aef8
  5126. 02aeae bne $aebe
  5127. 02aeb0 ldy #$10a0
  5128. 02aeb3 jsr $aef8
  5129. 02aeb6 bne $aebe
  5130. 02aeb8 ldy #$1140
  5131. 02aebb jmp $aef8
  5132. 02aebf lda #$04
  5133. 02aec1 sta $0000
  5134. 02aec4 ldy #$11e0
  5135. 02aec7 jmp $aef8
  5136. 02aeca lda #$08
  5137. 02aecc sta $0000
  5138. 02aecf ldy #$1280
  5139. 02aed2 jsr $aef8
  5140. 02aed5 bne $aef7
  5141. 02aed7 ldy #$1300
  5142. 02aeda jsr $aef8
  5143. 02aedd bne $aef7
  5144. 02aedf ldy #$1380
  5145. 02aee2 jsr $aef8
  5146. 02aee5 bne $aef7
  5147. 02aee7 ldy #$1400
  5148. 02aeea jsr $aef8
  5149. 02aeed bne $aef7
  5150. 02aeef ldy #$1480
  5151. 02aef2 jsr $aef8
  5152. 02aef5 bne $aef7
  5153. 02aef7 rts
  5154.  
  5155. 02aef8 lda $0000,y
  5156. 02aefb beq $af21
  5157. 02af21 sep #$20
  5158. 02af23 lda $0000
  5159. 02af26 trb $6a
  5160. 02af28 lda #$00
  5161. 02af2a rts
  5162.  
  5163. 02af35 jsl $00d0d0
  5164. 02af39 beq $af47
  5165. 02af47 rts
  5166. 02af48 rep #$20
  5167. 02af4a lda $12
  5168. 02af4c and #$00ff
  5169. 02af4f tax
  5170. 02af50 lda $f97f,x
  5171. 02af53 sta $7a
  5172. 02af55 lda $f985,x
  5173. 02af58 sta $7c
  5174. 02af5a lda $42
  5175. 02af5c and #$00ff
  5176. 02af5f clc
  5177. 02af60 adc $7a
  5178. 02af62 tax
  5179. 02af63 sep #$20
  5180. 02af65 clc
  5181. 02af66 lda $0012,x
  5182. 02af69 sta $0000
  5183. 02af6c adc $06
  5184. 02af6e sta $06
  5185. 02af70 lda $0009,x
  5186. 02af73 sta $0001
  5187. 02af76 adc $07
  5188. 02af78 sta $07
  5189. 02af7a lda $0000,x
  5190. 02af7d adc $08
  5191. 02af7f sta $08
  5192. 02af81 rep #$20
  5193. 02af83 lda $42
  5194. 02af85 and #$00ff
  5195. 02af88 clc
  5196. 02af89 adc $7c
  5197. 02af8b tax
  5198. 02af8c sep #$20
  5199. 02af8e clc
  5200. 02af8f lda $0012,x
  5201. 02af92 sta $0002
  5202. 02af95 adc $09
  5203. 02af97 sta $09
  5204. 02af99 lda $0009,x
  5205. 02af9c sta $0003
  5206. 02af9f adc $0a
  5207. 02afa1 sta $0a
  5208. 02afa3 lda $0000,x
  5209. 02afa6 adc $0b
  5210. 02afa8 sta $0b
  5211. 02afaa ldx $0a
  5212. 02afac stx $0d
  5213. 02afae rep #$20
  5214. 02afb0 lda $0000
  5215. 02afb3 beq $afc3
  5216. 02afb5 bpl $afbb
  5217. 02afb7 eor #$ffff
  5218. 02afba inc
  5219. 02afbb clc
  5220. 02afbc adc $7e
  5221. 02afbe sta $7e
  5222. 02afc0 sep #$20
  5223. 02afc2 rts
  5224. 02afc3 lda $0002
  5225. 02afc6 bpl $afcc
  5226. 02afcc asl a
  5227. 02afcd clc
  5228. 02afce adc $7e
  5229. 02afd0 sta $7e
  5230. 02afd2 sep #$20
  5231. 02afd4 rts
  5232. 02afd5 rep #$20
  5233. 02afd7 lda $12
  5234. 02afd9 and #$00ff
  5235. 02afdc tax
  5236. 02afdd lda $7e
  5237. 02afdf cmp $f973,x
  5238. 02afe2 bcc $afe7
  5239. 02afe4 sep #$20
  5240. 02afe6 rts
  5241. 02afe7 sec
  5242. 02afe8 sbc $f973,x
  5243. 02afeb sta $7e
  5244. 02afed lda $42
  5245. 02afef and #$00ff
  5246. 02aff2 tax
  5247. 02aff3 sep #$20
  5248. 02aff5 lda $f96a,x
  5249. 02aff8 bmi $affe
  5250. 02affa cmp $20
  5251. 02affc bne $b00f
  5252. 02affe lda $78
  5253. 02b000 inc
  5254. 02b001 inc
  5255. 02b002 cmp #$0c
  5256. 02b004 bcc $b008
  5257. 02b008 sta $78
  5258. 02b00a jsl $00a75a
  5259. 02b00e rts
  5260. 02b01e lda #$00
  5261. 02b020 xba
  5262. 02b021 lda $67
  5263. 02b023 and #$0f
  5264. 02b025 tax
  5265. 02b026 lda $f95a,x
  5266. 02b029 sta $42
  5267. 02b02b tax
  5268. 02b02c lda $f96a,x
  5269. 02b02f bmi $b033
  5270. 02b031 sta $20
  5271. 02b033 lda #$08
  5272. 02b035 cmp $42
  5273. 02b037 rts
  5274. 02b04a lda $65
  5275. 02b04c and $67
  5276. 02b04e bit #$80
  5277. 02b050 beq $b05e
  5278. 02b05e rts
  5279. 02b05f jsr $b2b1
  5280. 02b062 beq $b097
  5281. 02b064 lda $65
  5282. 02b066 and $67
  5283. 02b068 and #$40
  5284. 02b06a beq $b097
  5285. 02b06c jsr $b0e5
  5286. 02b06f bne $b074
  5287. 02b074 lda $74
  5288. 02b076 bne $b080
  5289. 02b078 jsr $b218
  5290. 02b07b bne $b080
  5291. 02b080 jsr $b0a7
  5292. 02b083 beq $b097
  5293. 02b085 lda $70
  5294. 02b087 bne $b08e
  5295. 02b089 stz $71
  5296. 02b08b jmp $b27d
  5297. 02b097 rts
  5298. 02b0a7 lda #$04
  5299. 02b0a9 bit $01
  5300. 02b0ab beq $b0dd
  5301. 02b0dd lda #$01
  5302. 02b0df rts
  5303. 02b0e5 ldx $4e
  5304. 02b0e7 bne $b119
  5305. 02b0e9 ldx #$1500
  5306. 02b0ec jsr $b11c
  5307. 02b0ef beq $b15e
  5308. 02b0f1 ldx #$1540
  5309. 02b0f4 jsr $b11c
  5310. 02b0f7 beq $b15e
  5311. 02b0f9 ldx #$1580
  5312. 02b0fc jsr $b11c
  5313. 02b0ff beq $b15e
  5314. 02b101 ldx #$15c0
  5315. 02b104 jsr $b11c
  5316. 02b107 beq $b15e
  5317. 02b109 ldx #$1600
  5318. 02b10c jsr $b11c
  5319. 02b10f beq $b15e
  5320. 02b111 ldx #$1640
  5321. 02b114 jsr $b11c
  5322. 02b117 beq $b15e
  5323. 02b119 lda #$01
  5324. 02b11b rts
  5325. 02b11c lda $0000,x
  5326. 02b11f beq $b156
  5327. 02b156 lda #$01
  5328. 02b158 rts
  5329. 02b218 ldx $4e
  5330. 02b21a bne $b260
  5331. 02b21c ldy #$0002
  5332. 02b21f ldx #$1c00
  5333. 02b222 lda $0000,x
  5334. 02b225 beq $b253
  5335. 02b253 rep #$20
  5336. 02b255 txa
  5337. 02b256 clc
  5338. 02b257 adc #$0080
  5339. 02b25a tax
  5340. 02b25b sep #$20
  5341. 02b25d dey
  5342. 02b25e bpl $b222
  5343. 02b260 lda #$01
  5344. 02b262 rts
  5345. 02b27d lda #$00
  5346. 02b27f xba
  5347. 02b280 lda $12
  5348. 02b282 lsr a
  5349. 02b283 tax
  5350. 02b284 lda $0cb0
  5351. 02b287 cmp #$06
  5352. 02b289 bne $b28e
  5353. 02b28e lda $71
  5354. 02b290 cmp $fa2d,x
  5355. 02b293 bcc $b2a4
  5356. 02b2a4 sta $04
  5357. 02b2a6 lda #$14
  5358. 02b2a8 sta $03
  5359. 02b2aa stz $05
  5360. 02b2ac lda #$80
  5361. 02b2ae tsb $69
  5362. 02b2b0 rts
  5363. 02b2b1 lda $0cb0
  5364. 02b2b4 cmp #$06
  5365. 02b2b6 beq $b2ef
  5366. 02b2b8 lda $7efff0
  5367. 02b2bc bne $b2c6
  5368. 02b2c6 lda $65
  5369. 02b2c8 and $67
  5370. 02b2ca bit #$c0
  5371. 02b2cc beq $b2ef
  5372. 02b2ce ora $67
  5373. 02b2d0 and #$c0
  5374. 02b2d2 cmp #$c0
  5375. 02b2d4 bne $b2ef
  5376. 02b2ef lda #$01
  5377. 02b2f1 rts
  5378. 02b492 lda $67
  5379. 02b494 bit #$02
  5380. 02b496 beq $b4a1
  5381. 02b4a1 bit #$01
  5382. 02b4a3 beq $b4ab
  5383. 02b4ab rts
  5384. 02bf3d lda $03
  5385. 02bf3f tax
  5386. 02bf40 jsr ($bf48,x)
  5387. 02bf43 jsl $00ae1a
  5388. 02bf47 rts
  5389. 02bf4e ldx $0e07
  5390. 02bf51 stx $07
  5391. 02bf53 ldx $0e0a
  5392. 02bf56 stx $0a
  5393. 02bf58 stx $0d
  5394. 02bf5a stz $09
  5395. 02bf5c stz $0c
  5396. 02bf5e lda $0cb3
  5397. 02bf61 bne $bfb7
  5398. 02bf63 rep #$20
  5399. 02bf65 lda $07
  5400. 02bf67 clc
  5401. 02bf68 adc #$0074
  5402. 02bf6b sta $07
  5403. 02bf6d lda $0a
  5404. 02bf6f clc
  5405. 02bf70 adc #$0028
  5406. 02bf73 sta $0a
  5407. 02bf75 sta $0d
  5408. 02bf77 sep #$20
  5409. 02bf79 lda $0cb0
  5410. 02bf7c cmp #$02
  5411. 02bf7e bne $bf9b
  5412. 02bf9b lda #$02
  5413. 02bf9d sta $03
  5414. 02bf9f ldx #$0020
  5415. 02bfa2 lda $0cb1
  5416. 02bfa5 bne $bfb2
  5417. 02bfa7 ldx #$00f0
  5418. 02bfaa ora $0cb0
  5419. 02bfad bne $bfb2
  5420. 02bfaf ldx #$00f0
  5421. 02bfb2 stx $3c
  5422. 02bfb4 jmp $c181
  5423. 02bfdf dec $3c
  5424. 02bfe1 bne $bfec
  5425. 02bfec rts
  5426. 02c181 rep #$20
  5427. 02c183 lda $12
  5428. 02c185 and #$00ff
  5429. 02c188 tax
  5430. 02c189 lda $fa33,x
  5431. 02c18c tax
  5432. 02c18d sep #$20
  5433. 02c18f jsl $00a727
  5434. 02c193 rts
  5435. 02c194 rep #$20
  5436. 02c196 lda $12
  5437. 02c198 and #$00ff
  5438. 02c19b tax
  5439. 02c19c lda $fa39,x
  5440. 02c19f tax
  5441. 02c1a0 sep #$20
  5442. 02c1a2 ldy $78
  5443. 02c1a4 jsl $00a70b
  5444. 02c1a8 rts
  5445. 02c56a rep #$20
  5446. 02c56c lda #$1680
  5447. 02c56f tcd
  5448. 02c570 sep #$20
  5449. 02c572 jsr $c57e
  5450. 02c575 jsr $c7a7
  5451. 02c578 ldx #$0000
  5452. 02c57b phx
  5453. 02c57c pld
  5454. 02c57d rtl
  5455. 02c57e lda $0cd2
  5456. 02c581 bne $c58c
  5457. 02c583 lda #$00
  5458. 02c585 xba
  5459. 02c586 lda $70
  5460. 02c588 tax
  5461. 02c589 jmp ($c58d,x)
  5462. 02c595 jsr $c752
  5463. 02c598 ldx $72
  5464. 02c59a rep #$20
  5465. 02c59c lda $070000,x
  5466. 02c5a0 bpl $c5dc
  5467. 02c5a2 and #$7fff
  5468. 02c5a5 sep #$20
  5469. 02c5a7 tax
  5470. 02c5a8 jmp ($c5ab,x)
  5471. 02c5b1 rep #$20
  5472. 02c5b3 ldx $72
  5473. 02c5b5 inx
  5474. 02c5b6 inx
  5475. 02c5b7 stx $72
  5476. 02c5b9 ldx $72
  5477. 02c5bb lda $070000,x
  5478. 02c5bf bmi $c5a2
  5479. 02c5c1 jsr $c61d
  5480. 02c5c4 txa
  5481. 02c5c5 clc
  5482. 02c5c6 adc #$0007
  5483. 02c5c9 sta $72
  5484. 02c5cb bra $c5b9
  5485. 02c5cd ldx $72
  5486. 02c5cf inx
  5487. 02c5d0 inx
  5488. 02c5d1 stx $72
  5489. 02c5d3 bra $c59a
  5490. 02c5d5 lda #$04
  5491. 02c5d7 sta $70
  5492. 02c5d9 stz $71
  5493. 02c5db rts
  5494. 02c5dc sta $74
  5495. 02c5de inx
  5496. 02c5df inx
  5497. 02c5e0 stx $72
  5498. 02c5e2 sep #$20
  5499. 02c5e4 lda #$02
  5500. 02c5e6 sta $70
  5501. 02c5e8 stz $71
  5502. 02c5ea rts
  5503. 02c5eb rep #$20
  5504. 02c5ed ldx $74
  5505. 02c5ef jmp ($c5f2,x)
  5506. 02c5fa ldx $72
  5507. 02c5fc lda $070000,x
  5508. 02c600 bpl $c605
  5509. 02c602 jmp $c5a2
  5510. 02c617 rts
  5511. 02c61d sep #$20
  5512. 02c61f lda $070004,x
  5513. 02c623 jsr $c736
  5514. 02c626 txy
  5515. 02c627 lda #$00
  5516. 02c629 xba
  5517. 02c62a lda $76
  5518. 02c62c tax
  5519. 02c62d jmp ($c630,x)
  5520. 02c64e phx
  5521. 02c64f tyx
  5522. 02c650 ply
  5523. 02c651 lda #$01
  5524. 02c653 sta $0000,y
  5525. 02c656 lda $77
  5526. 02c658 sta $0011,y
  5527. 02c65b lda $78
  5528. 02c65d sta $0012,y
  5529. 02c660 lda $070005,x
  5530. 02c664 sta $0013,y
  5531. 02c667 lda $070006,x
  5532. 02c66b bpl $c670
  5533. 02c670 sta $0063,y
  5534. 02c673 lda #$04
  5535. 02c675 sta $0021,y
  5536. 02c678 rep #$20
  5537. 02c67a lda $070000,x
  5538. 02c67e sta $0007,y
  5539. 02c681 lda $070002,x
  5540. 02c685 sta $000a,y
  5541. 02c688 rts
  5542. 02c6d7 jsl $00ad4f
  5543. 02c6db bne $c6e0
  5544. 02c6dd jmp $c64e
  5545. 02c736 phx
  5546. 02c737 sep #$10
  5547. 02c739 tax
  5548. 02c73a sta $79
  5549. 02c73c lda $02cf44,x
  5550. 02c740 sta $77
  5551. 02c742 lda $02cf45,x
  5552. 02c746 sta $78
  5553. 02c748 lda $02cf43,x
  5554. 02c74c sta $76
  5555. 02c74e rep #$10
  5556. 02c750 plx
  5557. 02c751 rts
  5558. 02c752 lda #$00
  5559. 02c754 xba
  5560. 02c755 lda $0cb0
  5561. 02c758 asl a
  5562. 02c759 tax
  5563. 02c75a ldy $faed,x
  5564. 02c75d sty $0000
  5565. 02c760 lda #$00
  5566. 02c762 xba
  5567. 02c763 lda $0cb1
  5568. 02c766 asl a
  5569. 02c767 rep #$20
  5570. 02c769 clc
  5571. 02c76a adc $0000
  5572. 02c76d tax
  5573. 02c76e lda $070000,x
  5574. 02c772 sta $72
  5575. 02c774 rts
  5576. 02c775 lda #$00
  5577. 02c777 xba
  5578. 02c778 lda $0cb0
  5579. 02c77b asl a
  5580. 02c77c tax
  5581. 02c77d ldy $fb01,x
  5582. 02c780 sty $0000
  5583. 02c783 lda #$00
  5584. 02c785 xba
  5585. 02c786 lda $0cb1
  5586. 02c789 asl a
  5587. 02c78a rep #$20
  5588. 02c78c clc
  5589. 02c78d adc $0000
  5590. 02c790 tax
  5591. 02c791 lda $070000,x
  5592. 02c795 tax
  5593. 02c796 lda $070000,x
  5594. 02c79a sta $06
  5595. 02c79c inx
  5596. 02c79d inx
  5597. 02c79e stx $04
  5598. 02c7a0 sep #$20
  5599. 02c7a2 stz $14
  5600. 02c7a4 stz $15
  5601. 02c7a6 rts
  5602. 02c7a7 lda $0cd2
  5603. 02c7aa bne $c7b5
  5604. 02c7ac lda #$00
  5605. 02c7ae xba
  5606. 02c7af lda $00
  5607. 02c7b1 tax
  5608. 02c7b2 jmp ($c7b6,x)
  5609. 02c7be lda #$02
  5610. 02c7c0 sta $00
  5611. 02c7c2 jsr $c775
  5612. 02c7c5 rts
  5613. 02c7c6 lda $01
  5614. 02c7c8 tax
  5615. 02c7c9 jmp ($c7cc,x)
  5616. 02c7d2 ldx $06
  5617. 02c7d4 jmp ($c7d7,x)
  5618. 02c7df rep #$20
  5619. 02c7e1 ldx $04
  5620. 02c7e3 lda $070000,x
  5621. 02c7e7 bpl $c7ec
  5622. 02c7ec cmp $0e07
  5623. 02c7ef beq $c7f3
  5624. 02c7f1 bcs $c7f8
  5625. 02c7f8 sep #$20
  5626. 02c7fa rts
  5627. 058c00 lda $02
  5628. 058c02 tax
  5629. 058c03 jsr ($8c07,x)
  5630. 058c06 rtl
  5631. 058c11 stz $3b
  5632. 058c13 stz $20
  5633. 058c15 lda $0cb3
  5634. 058c18 bne $8c38
  5635. 058c1a lda #$08
  5636. 058c1c cmp $0cb0
  5637. 058c1f beq $8c31
  5638. 058c21 lda $0cd0
  5639. 058c24 bne $8c2c
  5640. 058c26 lda #$02
  5641. 058c28 sta $02
  5642. 058c2a bra $8c3d
  5643. 058c3d lda $03
  5644. 058c3f tax
  5645. 058c40 jmp ($8c43,x)
  5646. 058c49 lda $04
  5647. 058c4b tax
  5648. 058c4c jmp ($8c4f,x)
  5649. 058c53 lda $12
  5650. 058c55 beq $8c62
  5651. 058c57 lda #$02
  5652. 058c59 sta $02
  5653. 058c5b sta $03
  5654. 058c5d stz $04
  5655. 058c5f stz $05
  5656. 058c61 rts
  5657. 058c62 jsr $9185
  5658. 058c65 lda #$02
  5659. 058c67 sta $04
  5660. 058c69 rts
  5661. 058c6a lda #$80
  5662. 058c6c bit $00e7
  5663. 058c6f bne $8c99
  5664. 058c71 lda $00d0
  5665. 058c74 bne $8c99
  5666. 058c76 lda #$02
  5667. 058c78 sta $03
  5668. 058c7a stz $04
  5669. 058c7c stz $05
  5670. 058c7e lda $0cb0
  5671. 058c81 beq $8c8e
  5672. 058c8e jsl $00ad4f
  5673. 058c92 bne $8c99
  5674. 058c94 lda #$04
  5675. 058c96 jsr $914f
  5676. 058c99 rts
  5677. 058c9a lda $12
  5678. 058c9c tax
  5679. 058c9d jsr ($8cab,x)
  5680. 058ca0 jsl $00af7b
  5681. 058ca4 bcs $8caa
  5682. 058ca6 jsl $00ae6c
  5683. 058caa rts
  5684. 058cb1 lda $04
  5685. 058cb3 tax
  5686. 058cb4 jmp ($8cb7,x)
  5687. 058cbf jsr $91e1
  5688. 058cc2 lda $0cb0
  5689. 058cc5 beq $8cc7
  5690. 058cc7 lda #$02
  5691. 058cc9 sta $04
  5692. 058ccb rts
  5693. 058ccc jsr $915d
  5694. 058ccf bcc $8cd2
  5695. 058cd1 rts
  5696. 058d0d lda $04
  5697. 058d0f tax
  5698. 058d10 jmp ($8d13,x)
  5699. 058d1b jsr $91e1
  5700. 058d1e lda $0cb0
  5701. 058d21 beq $8d23
  5702. 058d23 lda #$02
  5703. 058d25 sta $04
  5704. 058d27 rts
  5705. 058d28 jsr $915d
  5706. 058d2b bcc $8cd2
  5707. 058d2d rts
  5708. 05914f sta $0012,x
  5709. 059152 lda #$01
  5710. 059154 sta $0000,x
  5711. 059157 lda #$04
  5712. 059159 sta $0011,x
  5713. 05915c rts
  5714. 05915d rep #$20
  5715. 05915f lda $0a
  5716. 059161 sec
  5717. 059162 sbc #$0004
  5718. 059165 sta $0a
  5719. 059167 sec
  5720. 059168 sbc $0e0a
  5721. 05916b cmp #$0080
  5722. 05916e sep #$20
  5723. 059170 rts
  5724. 059185 ldx #$0007
  5725. 059188 lda #$80
  5726. 05918a jsl $00891e
  5727. 05918e lda #$20
  5728. 059190 ldy #$00a0
  5729. 059193 jsl $008e73
  5730. 059197 lda #$21
  5731. 059199 ldy #$00c0
  5732. 05919c jsl $008e73
  5733. 0591a0 lda #$22
  5734. 0591a2 ldy #$00e0
  5735. 0591a5 jsl $008e73
  5736. 0591a9 rts
  5737. 0591e1 jsr $9218
  5738. 0591e4 rep #$20
  5739. 0591e6 lda $12
  5740. 0591e8 and #$00ff
  5741. 0591eb lsr a
  5742. 0591ec tax
  5743. 0591ed sep #$20
  5744. 0591ef lda $05920f,x
  5745. 0591f3 sta $21
  5746. 0591f5 rep #$20
  5747. 0591f7 txa
  5748. 0591f8 asl a
  5749. 0591f9 tax
  5750. 0591fa lda $059212,x
  5751. 0591fe tax
  5752. 0591ff sep #$20
  5753. 059201 lda #$05
  5754. 059203 sta $22
  5755. 059205 lda $0cb0
  5756. 059208 asl a
  5757. 059209 tay
  5758. 05920a jsl $00a905
  5759. 05920e rts
  5760. 059218 rep #$20
  5761. 05921a lda $0e07
  5762. 05921d clc
  5763. 05921e adc #$0080
  5764. 059221 sta $07
  5765. 059223 lda $0e0a
  5766. 059226 clc
  5767. 059227 adc #$0100
  5768. 05922a sta $0a
  5769. 05922c sep #$20
  5770. 05922e rts
  5771. 05b007 lda $02
  5772. 05b009 tax
  5773. 05b00a jsr ($b00e,x)
  5774. 05b00d rtl
  5775. 05b01f lda $03
  5776. 05b021 tax
  5777. 05b022 jsr ($b02e,x)
  5778. 05b025 dec $3c
  5779. 05b027 bne $b02d
  5780. 05b029 lda #$04
  5781. 05b02b sta $02
  5782. 05b02d rts
  5783. 05b036 lda #$02
  5784. 05b038 sta $03
  5785. 05b03a lda #$43
  5786. 05b03c jsl $009f5a
  5787. 05b040 lda #$14
  5788. 05b042 sta $3d
  5789. 05b044 jmp $b07f
  5790. 05b047 dec $3d
  5791. 05b049 bne $b056
  5792. 05b04b lda #$04
  5793. 05b04d sta $03
  5794. 05b04f lda #$07
  5795. 05b051 sta $3d
  5796. 05b053 jmp $b08f
  5797. 05b056 rts
  5798. 05b057 dec $3d
  5799. 05b059 bne $b06c
  5800. 05b05b lda #$06
  5801. 05b05d sta $03
  5802. 05b05f lda #$14
  5803. 05b061 sta $3d
  5804. 05b063 lda #$43
  5805. 05b065 jsl $009f5a
  5806. 05b069 jmp $b087
  5807. 05b06c rts
  5808. 05b06d dec $3d
  5809. 05b06f bne $b073
  5810. 05b071 stz $03
  5811. 05b073 rts
  5812. 05b074 stz $0cd6
  5813. 05b077 jsr $b08f
  5814. 05b07a jsl $00ad73
  5815. 05b07e rts
  5816. 05b07f ldx #$b0f2
  5817. 05b082 stx $0012
  5818. 05b085 bra $b095
  5819. 05b087 ldx #$b102
  5820. 05b08a stx $0012
  5821. 05b08d bra $b095
  5822. 05b08f ldx #$b112
  5823. 05b092 stx $0012
  5824. 05b095 lda #$00
  5825. 05b097 xba
  5826. 05b098 lda $00e3
  5827. 05b09b tay
  5828. 05b09c ldx #$fd57
  5829. 05b09f stx $0010
  5830. 05b0a2 jsr $b0c1
  5831. 05b0a5 ldx #$fd77
  5832. 05b0a8 stx $0010
  5833. 05b0ab rep #$20
  5834. 05b0ad lda $0012
  5835. 05b0b0 clc
  5836. 05b0b1 adc #$0008
  5837. 05b0b4 sta $0012
  5838. 05b0b7 sep #$20
  5839. 05b0b9 jsr $b0c1
  5840. 05b0bc tya
  5841. 05b0bd sta $00e3
  5842. 05b0c0 rts
  5843. 05b0c1 lda #$08
  5844. 05b0c3 sta $0901,y
  5845. 05b0c6 lda #$80
  5846. 05b0c8 sta $0900,y
  5847. 05b0cb iny
  5848. 05b0cc iny
  5849. 05b0cd lda #$80
  5850. 05b0cf sta $0900,y
  5851. 05b0d2 iny
  5852. 05b0d3 rep #$20
  5853. 05b0d5 lda $0010
  5854. 05b0d8 sta $0900,y
  5855. 05b0db iny
  5856. 05b0dc iny
  5857. 05b0dd lda $0012
  5858. 05b0e0 sta $0900,y
  5859. 05b0e3 iny
  5860. 05b0e4 iny
  5861. 05b0e5 sep #$20
  5862. 05b0e7 lda #$05
  5863. 05b0e9 sta $0900,y
  5864. 05b0ec iny
  5865. 05b0ed sep #$10
  5866. 05b0ef rep #$10
  5867. 05b0f1 rts
Advertisement
RAW Paste Data Copied
Advertisement