Advertisement
Er0l

SCS+TRC mirror intro

Nov 18th, 2016
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.72 KB | None | 0 0
  1. ;```````````````````````````````````````
  2. ;sprites $0d80-$0ec0
  3. ;ssin $0fc0,$36,$3f,$0a,$0040,$37 (S)
  4. ;sinus1 $0d00,$00,$7f,$02,$0100,$00 (S1)
  5. ;sinus2 $0c00,$00,$ff,$02,$0100,$7e (S2)
  6. ;```````````````````````````````````````
  7. *= $080d
  8. jmp start
  9. .text "(-=code by erol=-)"
  10. start lda #$0a
  11. ldx #$b0
  12. sta lines+1
  13. stx pause+1
  14. jsr exit
  15. lda #$01
  16. sta $0286
  17. jsr $e544
  18. dex
  19. stx $d020
  20. stx $d021
  21. s0 lda $2b40,x
  22. sta $0400,x
  23. lda $2ba8,x
  24. sta $0468,x
  25. lda $2ca8,x
  26. sta $d800,x
  27. lda $2d10,x
  28. sta $d868,x
  29. inx
  30. bne s0
  31. jsr sc2set
  32. jsr swset
  33. ldx #$27
  34. s1 lda #$00
  35. sta $02a7,x
  36. sta $d968,x
  37. dex
  38. bpl s1
  39. jsr col
  40. stx $d01b
  41. lda #$00
  42. ldx #$00
  43. ldy #$00
  44. jsr $1000
  45. sei
  46. ldx #<irq
  47. ldy #>irq
  48. stx $0314
  49. sty $0315
  50. ldx #$00;47 ;$c1
  51. ldy #$90;fe ;$fe
  52. stx $0318
  53. sty $0319
  54. ldx #$01
  55. stx $d01a
  56. lda #$7f
  57. sta $dc0d
  58. lda #$1b
  59. dex
  60. sta $d011
  61. stx $d012
  62. cli
  63. jsr sprds
  64. jmp w
  65. group .byte $20,$20,$20,$20,$20,$20
  66. .byte $20,$20,$20,$13,$53,$15
  67. .byte $55,$03,$43,$03,$43,$05
  68. .byte $45,$13,$53,$13,$53,$20
  69. .byte $26,$66,$20,$14,$54,$08
  70. .byte $48,$05,$45,$20,$12,$52
  71. .byte $15,$55,$0c,$4c,$09,$0e
  72. .byte $4e,$07,$47,$20,$03,$43
  73. .byte $0f,$4f,$0d,$4d,$10,$50
  74. .byte $01,$41,$0e,$4e,$19,$59
  75. .byte $20,$20,$20,$20,$20,$20
  76. .byte $20,$20,$20,$20,$20,$20
  77. .byte $20,$20,$20,$20,$20,$20
  78. .byte $20,$20
  79. *= $3800
  80. w lda $02
  81. beq w
  82. lda #$00
  83. sta $02
  84. jsr $1003
  85. bit $1003
  86. bit $1003
  87. bit $1003
  88. lda $dc01
  89. cmp #$ef
  90. bne dt4
  91. dec dt4+1
  92. dt4 lda #$00
  93. beq dt5
  94. inc cnt5
  95. lda cnt5
  96. cmp #$03
  97. bne dt5
  98. lda #$00
  99. sta cnt5
  100. z1 ldx #$01
  101. lda col1,x
  102. sta $d020
  103. jsr col
  104. inc z1+1
  105. lda z1+1
  106. cmp #$0b
  107. bne dt5
  108. lda #$00
  109. sta $d015
  110. dec dt5+1
  111. dt5 lda #$00
  112. beq dt3
  113. lda #$01
  114. ldx #$0b
  115. sta dt1+1
  116. stx cp2+1
  117. ldx #$27
  118. lda #$00
  119. sta w1+1
  120. d1 sta $07e8,x
  121. sta $dbe8,x
  122. dex
  123. bpl d1
  124. lda d1+1
  125. sec
  126. sbc #$28
  127. bcs d2
  128. dec d1+2
  129. dec d1+5
  130. d2 sta d1+1
  131. sta d1+4
  132. lda d1+1
  133. cmp #$d8
  134. bne dt3
  135. lda #$00
  136. sta dt4+1
  137. sta dt5+1
  138. jmp linker
  139. dt3 lda #$00
  140. bne dt2
  141. inc cnt5
  142. lda cnt5
  143. pause cmp #$b0
  144. bne w1
  145. ldx #$01
  146. stx dt3+1
  147. dex
  148. stx cnt5
  149. dt2 lda #$00
  150. bne w1
  151. inc cnt5
  152. lda cnt5
  153. cmp #$05
  154. bne w1
  155. ldx #$00
  156. stx cnt5
  157. dex
  158. stx $d015
  159. lda #$07
  160. sta qun+1
  161. dt1 ldx #$00
  162. lda col1,x
  163. sta $d020
  164. jsr col
  165. inc dt1+1
  166. lda dt1+1
  167. cp2 cmp #$0a
  168. bne w1
  169. ldx #$01
  170. stx dt2+1
  171. stx w1+1
  172. lda #$0f
  173. jsr col
  174. lda #$1c
  175. sta cha+1
  176. lda #$1c
  177. sta $0568+$21
  178. lda #$5c
  179. sta $0568+$22
  180. lda #$9c
  181. sta $0568+$23
  182. lda #$dc
  183. sta $0568+$24
  184. w1 lda #$00
  185. beq w11
  186. jsr sc2roll
  187. jsr xlsin
  188. jsr show
  189. w11 lda $0fc0
  190. sta sprds+1
  191. inc w11+1
  192. bne w2
  193. lda #$c0
  194. sta w11+1
  195. w2 jmp w
  196. irq inc $d019
  197. inc $02
  198. lda #$3b
  199. sta $d011
  200. lda #$18
  201. sta $d018
  202. lda #$d4
  203. sta $d016
  204. lda #$00
  205. sta $d01b
  206. jsr sprds
  207. ldy #$08
  208. jsr yco
  209. jsr xco1
  210. lda #$1c
  211. ldx #<irq1
  212. ldy #>irq1
  213. jmp irx
  214. irq1 inc $d019
  215. ldy #$1e
  216. jsr yco
  217. jsr xco2
  218. lda #$31
  219. ldx #<irq2
  220. ldy #>irq2
  221. jmp irx
  222. irq2 inc $d019
  223. ldy #$34
  224. jsr yco
  225. jsr xco1
  226. lda #$48
  227. ldx #<irq3
  228. ldy #>irq3
  229. jmp irx
  230. irq3 inc $d019
  231. ldy #$4a
  232. jsr yco
  233. jsr xco2
  234. lda #$ff
  235. sta $d01b
  236. lda #$5e
  237. ldx #<irq4
  238. ldy #>irq4
  239. jmp irx
  240. irq4 inc $d019
  241. ldy #$60
  242. jsr yco
  243. jsr xco1
  244. lda #$74
  245. ldx #<irq5
  246. ldy #>irq5
  247. jmp irx
  248. irq5 inc $d019
  249. ldy #$76
  250. jsr yco
  251. jsr xco2
  252. lda #$7a
  253. a1 cmp $d012
  254. bne a1
  255. qun ldy #$09
  256. a2 dey
  257. bne a2
  258. lda #$1b
  259. sta $d011
  260. cha lda #$15
  261. sta $d018
  262. lda #$c4
  263. sta $d016
  264. lda #$82
  265. i4 cmp $d012
  266. bne i4
  267. lda $53
  268. sta $d016
  269. lda #$8a
  270. ldx #<irq6
  271. ldy #>irq6
  272. jmp irx
  273. irq6 inc $d019
  274. ldy #$8c
  275. jsr yco
  276. jsr xco1
  277. lda #$a0
  278. ldx #<irq7
  279. ldy #>irq7
  280. jmp irx
  281. irq7 inc $d019
  282. ldy #$a2
  283. jsr yco
  284. jsr xco2
  285. lda #$c3
  286. sta $d016
  287. lda #$b7
  288. ldx #<irq8
  289. ldy #>irq8
  290. jmp irx
  291. irq8 inc $d019
  292. ldy #$b8
  293. jsr yco
  294. jsr xco1
  295. lda #$cd
  296. ldx #<irq9
  297. ldy #>irq9
  298. jmp irx
  299. irq9 inc $d019
  300. ldy #$ce
  301. jsr yco
  302. jsr xco2
  303. lda $a9
  304. sta $d016
  305. lda #$e2
  306. ldx #<irq10
  307. ldy #>irq10
  308. jmp irx
  309. irq10 inc $d019
  310. ldy #$e4
  311. jsr yco
  312. jsr xco1
  313. lda #$f9
  314. ldx #<irqf
  315. ldy #>irqf
  316. irx sta $d012
  317. stx $0314
  318. sty $0315
  319. jmp $ea81
  320. irqf inc $d019
  321. lda #$10
  322. sta $d011
  323. lda #$00
  324. sta $d01b
  325. ldy #$fa
  326. jsr yco
  327. jsr xco2
  328. ldy #$0f
  329. i1 cpy $d012
  330. bne i1
  331. jsr yco
  332. jsr xco1
  333. jsr j2
  334. lda #$00
  335. ldx #<irq
  336. ldy #>irq
  337. jmp irx
  338. sta $d012
  339. stx $0314
  340. sty $0315
  341. jmp $ea81
  342. ;```````````````````````````````````````
  343. j2 lda c0c
  344. sec
  345. xsspeed sbc #$01
  346. bcs m1
  347. clc
  348. adc #$ff
  349. m1 sta c0c
  350. lda c0d
  351. sec
  352. sbc #$01
  353. bcs m2
  354. clc
  355. adc #$7f
  356. m2 sta c0d
  357. lda #$00
  358. sta c0b
  359. ldx c0c
  360. ldy c0d
  361. lda sinus2,x
  362. clc
  363. adc sinus1,y
  364. bcc m3
  365. inc c0b
  366. m3 sta c0a
  367. ldx #$00
  368. stx cm1
  369. stx cm2
  370. ldy #$00
  371. m0 lda data+$10,x
  372. clc
  373. adc c0b
  374. sta c09
  375. mx0 lda data+$08,x
  376. clc
  377. adc c0a
  378. sta c08
  379. bcc m4
  380. inc c09
  381. m4 lda c09
  382. cmp #$01
  383. bcc m7
  384. cmp #$02
  385. bne m5
  386. lda c08
  387. sec
  388. sbc #$57
  389. sta c08
  390. bcs m6
  391. dec c09
  392. m6 jsr m15
  393. beq m7
  394. m5 lda c08
  395. cmp #$58
  396. bcc m7
  397. dec c09
  398. lda c08
  399. sec
  400. sbc #$57
  401. sta c08
  402. m7 lda c09
  403. beq m8
  404. lda data,x
  405. clc
  406. adc cm1
  407. sta cm1
  408. m8 lda c08
  409. sta cx1,x
  410. mx2 lda data+$20,x
  411. clc
  412. adc c0b
  413. sta c09
  414. mx1 lda data+$18,x
  415. clc
  416. adc c0a
  417. sta c08
  418. bcc m9
  419. inc c09
  420. m9 lda c09
  421. cmp #$01
  422. bcc m12
  423. cmp #$02
  424. bne m10
  425. lda c08
  426. sec
  427. sbc #$57
  428. sta c08
  429. bcs m11
  430. dec c09
  431. m11 jsr m15
  432. beq m12
  433. m10 lda c08
  434. cmp #$58
  435. bcc m12
  436. dec c09
  437. lda c08
  438. sec
  439. sbc #$57
  440. sta c08
  441. m12 lda c09
  442. beq m13
  443. lda data,x
  444. clc
  445. adc cm2
  446. sta cm2
  447. m13 lda c08
  448. sta cx9,x
  449. inx
  450. cpx #$08
  451. beq m14
  452. jmp m0
  453. m15 dec c09
  454. lda c09
  455. m14 rts
  456. sprds lda #$36
  457. sta $07f8
  458. sta $07f9
  459. sta $07fa
  460. sta $07fb
  461. sta $07fc
  462. sta $07fd
  463. sta $07fe
  464. sta $07ff
  465. rts
  466. yco sty $d001
  467. sty $d003
  468. sty $d005
  469. sty $d007
  470. sty $d009
  471. sty $d00b
  472. sty $d00d
  473. sty $d00f
  474. rts
  475. xco1 lda cm1
  476. sta $d010
  477. lda cx1
  478. sta $d000
  479. lda cx2
  480. sta $d002
  481. lda cx3
  482. sta $d004
  483. lda cx4
  484. sta $d006
  485. lda cx5
  486. sta $d008
  487. lda cx6
  488. sta $d00a
  489. lda cx7
  490. sta $d00c
  491. lda cx8
  492. sta $d00e
  493. rts
  494. xco2 lda cm2
  495. sta $d010
  496. lda cx9
  497. sta $d000
  498. lda cx10
  499. sta $d002
  500. lda cx11
  501. sta $d004
  502. lda cx12
  503. sta $d006
  504. lda cx13
  505. sta $d008
  506. lda cx14
  507. sta $d00a
  508. lda cx15
  509. sta $d00c
  510. lda cx16
  511. sta $d00e
  512. rts
  513. col sta $d027
  514. sta $d028
  515. sta $d029
  516. sta $d02a
  517. sta $d02b
  518. sta $d02c
  519. sta $d02d
  520. sta $d02e
  521. rts
  522. sc27 sta $a9
  523. rts
  524. sc2roll lda $a9
  525. clc
  526. sc20 sbc #$02
  527. sta $a9
  528. cmp #$c0
  529. bcs sc27
  530. adc #$08
  531. sta $a9
  532. ldx #$00
  533. sc21 lda $0799,x
  534. sta $0798,x
  535. lda $07c1,x
  536. sta $07c0,x
  537. inx
  538. cpx #$27
  539. bne sc21
  540. dec $aa
  541. beq sc22
  542. lda $07be
  543. ora #$40
  544. sta $07bf
  545. ora #$80
  546. sta $07e7
  547. rts
  548. sc22 ldx #$02
  549. stx $aa
  550. ldy #$00
  551. lda ($a7),y
  552. bne sc23
  553. jmp sc2set2
  554. sc23 cmp sc2d2,y
  555. bne sc231
  556. ldx #$01
  557. stx $aa
  558. bne sc232
  559. sc231 iny
  560. cpy #18
  561. bne sc23
  562. sc232 ldy #$00
  563. sc232x cmp sc2d,y
  564. beq sc26
  565. iny
  566. cpy #$07
  567. bne sc232x
  568. sta $07bf
  569. ora #$80
  570. sta $07e7
  571. sc24 inc $a7
  572. bne sc25
  573. inc $a8
  574. sc25 rts
  575. sc26 sty sc20+1
  576. dec $aa
  577. jmp sc24
  578. sc2d .byte $80,$81,$82,$83,$84,$85
  579. .byte $86
  580. sc2d2 .byte $09,$1b,$1d,$1e,$20,$21
  581. .byte $22,$25,$27,$28,$29,$2c
  582. .byte $2e,$2f,$3a,$3b,$3c,$3e
  583. ;```````````````````````````````````````
  584. ;x sinus logo move by erol/tempest
  585. ;sinus $50-$ff/$80 bytes:centre logo+$14
  586. ;jsr xlsin $53 = $d016
  587. ;```````````````````````````````````````
  588. xlsin
  589. xl0 lda $0c00
  590. tax
  591. and #$07
  592. eor #$07
  593. sta $53
  594. txa
  595. lsr a
  596. lsr a
  597. lsr a
  598. tax
  599. ldy #$00
  600. xl1 lda group,x
  601. sta $0590,y
  602. ora #$80
  603. sta $05b8,y
  604. inx
  605. iny
  606. cpy #$28
  607. bne xl1
  608. inc xl0+1
  609. lda xl0+1
  610. and #$7f
  611. sta xl0+1
  612. rts
  613. ;```````````````````````````````````````
  614. ;2x2 show (jsr swset) erol/tempest
  615. ;```````````````````````````````````````
  616. show inc $b3
  617. lda $b3
  618. cmp #$05
  619. beq sw1
  620. rts
  621. sw1 ldy #$00
  622. sty $b3
  623. ldx #$00
  624. sw2 lda swdt
  625. sta $da80,x
  626. sta $da81,x
  627. sta $daa8,x
  628. sta $daa9,x
  629. sw4 lda $2e10,y
  630. sta $0680,x
  631. clc
  632. adc #$40
  633. sta $0681,x
  634. adc #$40
  635. sta $06a8,x
  636. adc #$40
  637. sta $06a9,x
  638. iny
  639. inx
  640. sec
  641. sbc #$c0
  642. cmp #$09
  643. beq sw
  644. cmp #$1b
  645. beq sw
  646. cmp #$1d
  647. beq sw
  648. cmp #$1e
  649. beq sw
  650. cmp #$22
  651. beq sw
  652. cmp #$27
  653. beq sw
  654. cmp #$28
  655. beq sw
  656. cmp #$29
  657. beq sw
  658. cmp #$2f
  659. beq sw
  660. inx
  661. sw cpy #$14
  662. bne sw2
  663. inc sw2+1
  664. bne sw7
  665. inc sw2+2
  666. sw7 lda sw2+1
  667. cmp #<swdt+$20
  668. beq sw3
  669. swx rts
  670. sw3 lda #<swdt
  671. sta sw2+1
  672. lda #>swdt
  673. sta sw2+2
  674. ldx #$4f
  675. lda #$20
  676. sww sta $0658,x
  677. dex
  678. bpl sww
  679. lda sw4+1
  680. clc
  681. adc #$14
  682. sta sw4+1
  683. bcc sw5
  684. inc sw4+2
  685. sw5 inc $b2
  686. lda $b2
  687. lines cmp #$0a
  688. bne swx
  689. jmp swset
  690. *= $2f00
  691. sc2set lda #$c3
  692. sta $a9
  693. sc2set2 lda #$00
  694. ldx #$09
  695. ldy #$02
  696. sta $a7
  697. stx $a8
  698. sty $aa
  699. rts
  700. swset lda #$00
  701. ldx #$10
  702. ldy #$2e
  703. sta $b2
  704. sta $b3
  705. stx sw4+1
  706. sty sw4+2
  707. rts
  708. exit jsr $fd15
  709. jsr $fda3
  710. jsr $ff5b
  711. jmp $e3bf
  712. linker sei
  713. jsr exit
  714. inc $d018
  715. lda #$0f
  716. sta $0286
  717. jsr $e544
  718. dex
  719. stx $d020
  720. stx $d021
  721. ldx #$27
  722. lnk2 lda ltext,x
  723. sta $07c0,x
  724. lda lnk,x
  725. sta $02d8,x
  726. dex
  727. bpl lnk2
  728. jmp $02d8
  729. lnk sei
  730. inc $01
  731. lnk0 ldy #$00
  732. lnk1 lda $3e00,y
  733. sta $07e6
  734. sta $0801,y
  735. iny
  736. bne lnk1
  737. inc $02e5
  738. inc $02df
  739. bne lnk0
  740. dec $01
  741. sty $0800
  742. cli
  743. jsr $a659
  744. stjmp jmp $a7ae
  745. ltext .byte $49,$0e,$14,$12,$0f,$20
  746. .byte $03,$0f,$04,$05,$20,$02
  747. .byte $19,$20,$45,$12,$0f,$0c
  748. .byte $20,$0f,$06,$20,$54,$05
  749. .byte $0d,$10,$05,$13,$54,$20
  750. .byte $09,$0e,$20,$27,$39,$37
  751. .byte $20,$28,$20,$29
  752. swdt .byte 0,0,9,2,8,10
  753. .byte 15,1,1,1,1,1,1,1
  754. .byte 1,1,1,1,1,1,1,1
  755. .byte 1,1,1,15
  756. .byte 10,8,2,9,0,0
  757. dat .byte $65,$00,$7c,$00,$c7,$4d
  758. .byte $2f,$c7
  759. cx1 = $02b0
  760. cx2 = $02b1
  761. cx3 = $02b2
  762. cx4 = $02b3
  763. cx5 = $02b4
  764. cx6 = $02b5
  765. cx7 = $02b6
  766. cx8 = $02b7
  767. cx9 = $02b8
  768. cx10 = $02b9
  769. cx11 = $02ba
  770. cx12 = $02bb
  771. cx13 = $02bc
  772. cx14 = $02bd
  773. cx15 = $02be
  774. cx16 = $02bf
  775. cm1 = $02c0
  776. cm2 = $02c1
  777. c08 = $02a8
  778. c09 = $02a9
  779. c0a = $02aa
  780. c0b = $02ab
  781. c0c = $02ac
  782. c0d = $02ad
  783. c0e = $02ae
  784. c0f = $02af
  785. cnt5 = $02c2
  786. sinus2 = $0c00
  787. sinus1 = $0d00
  788. data .byte $01,$02,$04,$08,$10,$20
  789. .byte $40,$80,$13,$3e,$69,$94
  790. .byte $bf,$ea,$15,$40,$00,$00
  791. .byte $00,$00,$00,$00,$01,$01
  792. .byte $00,$2b,$56,$81,$ac,$d7
  793. .byte $01,$2d,$00,$00,$00,$00
  794. .byte $00,$00,$01,$01
  795. col1 .byte $00,$0b,$0c,$0f,$07,$01
  796. .byte $07,$0f,$0c,$0b,$00
  797. ;```````````````````````````````````````
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement