EMU618社区

 找回密码
 立即注册
搜索
查看: 648|回复: 4

[原创HACK教程] [退隐作][最后的教程]

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2017-2-13 11:57:33 | 显示全部楼层 |阅读模式
  1. Contra (J) PPU写入程序
    0 ]1 v2 W$ W9 N" m
  2. 作者:FlameCyclone
    # W2 |) h5 n* X5 M7 V' T# i
  3. 时间:2017.2.12, ]# g, B  E; K! Y

  4. ! ]% _9 z# U& e* I0 u  I
  5. 按键跳转:4 A1 q2 J7 m( {* q
  6.         C1EF:95 F5 94 F1
    1 X) M+ w) M* x: g) \$ i
  7.         C1EF:20 70 FB EA
    ! F0 I/ T; ]; ~4 u+ J. H$ E7 o7 X

  8. % O9 p1 ?% u' u2 `/ C/ G
  9. 滚动偏移:9 @& ~' P; s  p0 g/ q
  10.         F936:A5 FD 8D 05 20 A5 FC 8D 05 20
    5 @, Z8 U' f, j) ^" k
  11.         F936:20 C0 FB EA EA EA EA EA EA EA
    - s# O6 I. _: m# V
  12. & I+ n  `9 d" v% e0 F2 v
  13. 背景调色板:
    7 S* G& d1 C: z- D+ P
  14.         CF20:9D C0 07/ I& }% v. `. a; j
  15.         CF20:20 A0 FB
    $ ]8 n. U6 Z: h6 b& q# U
  16. " K! r) C1 B0 Q* p4 }
  17. PPU BANK号:
    % X0 [# o2 Z/ J8 s
  18.         C8C9:9D F4 07. p8 M8 ?+ c2 p7 j! B3 T, X5 e: l
  19.         C8C9:20 B0 FB
    3 e1 n& ?" b) R- e& n/ b$ g& q
  20. 5 d9 Z9 Y7 h' e0 M% `
  21. 按键跳转:
    : {# b5 @4 _9 i' A8 ^/ p, H8 I% R4 r
  22. FB70:        95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 203 W  a3 b. @" a8 N  V; D8 k" v4 `
  23.         AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 20
    7 N8 f* D. x$ j& K/ k
  24.         21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF
    / N) p- B- b- X5 [  Y

  25. . Y% m* N/ K. K+ D
  26. 背景调色板:
    * [3 M, x, l$ H, \1 E. c% H
  27. FBA0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF& h5 x/ Z7 z$ y9 L, w$ P' O. u
  28. - }+ j. i  P$ y% p: K
  29. PPU BANK号:4 q* a6 u$ r: E6 o8 [  N2 \+ ?; `& D% H
  30. FBB0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF* k* r9 B! t+ B, V3 j
  31. ! @. K8 u5 {+ E) g" I# G5 K
  32. 滚动偏移:6 _, g* z7 i$ @
  33. FBC0:        AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 60
    0 K! e  J2 H; k# v
  34.         A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF; H5 z5 W$ x. `: |; c! x, R% ~
  35. 1 b' u( Q/ S* I6 _8 R

  36. 4 s& A- a6 k) t- H& t
  37. 切BANK后A000:
    7 f/ V1 [. [, ]2 }: y
  38. A5 FF 29 7F 8D 00 20 AD 02 20 A5 25 C9 01 D0 0A B5 F5 29 CF F0 04 20 8C A2 60 48 8A 48 98 48 A5 25 C9 01 D0 07 AD 0A 01 C9 00 F0 03 4C AC A1 AD FF 7F C9 FF D0 19 AD A0 7F C9 00 D0 0B A9 FF 8D A0 7F 20 3A A1 4C AC A1 AD FF 7F C9 00 D0 DD AD 02 20 A9 00 8D 01 20 A2 00 A9 FF 8D FF 7F 8D A0 7F 20 6A A0 20 3A A1 4C AC A1 A5 FE 8D 50 7F A9 08 85 FE A2 00 BD C0 07 9D 00 7F E8 E0 40 90 F5 A2 00 A9 00 9D F4 07 E8 E0 04 90 F6 A2 00 BD 2A A1 9D C0 07 E8 E0 10 90 F5 A9 3F 8D 06 20 A9 00 8D 06 20 A2 00 BD 2A A1 8D 07 20 E8 E0 10 90 F5 A2 00 A0 00 A5 BD 48 A5 BC 48 A5 BB 48 A5 BA 48 A5 B9 48 A5 B8 48 A9 00 85 B8 85 B9 85 BA 85 BB 85 BC 85 BD A9 00 85 BA A9 20 85 BB A9 00 85 BC A9 60 85 BD A5 BB C9 28 D0 06 A5 BA C9 00 F0 27 A5 BB 8D 06 20 A5 BA 8D 06 20 AD 07 20 AD 07 20 91 BC A9 00 8D 00 20 E8 E6 BA E6 BC E0 00 D0 D4 E6 BB E6 BD 4C E4 A0 68 85 B8 68 85 B9 68 85 BA 68 85 BB 68 85 BC 68 85 BD 60 0F 28 28 28 0F 28 28 28 0F 28 28 28 0F 28 28 28 A5 BD 48 A5 BC 48 A5 BB 48 A5 BA 48 A5 B9 48 A5 B8 48 A9 00 85 B8 85 B9 85 BA 85 BB 85 BC 85 BD 8D 01 20 A2 00 A0 00 A9 00 85 BA A9 20 85 BB A5 BB C9 28 D0 06 A5 BA C9 00 F0 20 A5 BB 8D 06 20 A5 BA 8D 06 20 A9 00 8D 07 20 A9 00 8D 00 20 E8 E6 BA E0 00 D0 D9 E6 BB 4C 69 A1 EA 68 85 B8 68 85 B9 68 85 BA 68 85 BB 68 85 BC 68 85 BD 20 8D A2 60 68 A8 68 AA 68 A5 25 C9 00 F0 12 A5 25 C9 01 D0 0B B5 F5 29 EF F0 05 A9 00 8D A0 7F 60 AD FF 7F C9 FF D0 F8 A9 00 8D 01 20 A5 BD 48 A5 BC 48 A5 BB 48 A5 BA 48 A5 B9 48 A5 B8 48 A9 00 85 B8 85 B9 85 BA 85 BB 85 BC 85 BD A9 00 8D FF 7F A2 00 A0 00 A9 00 85 BA A9 20 85 BB A9 00 85 BC A9 60 85 BD A5 BD C9 68 D0 06 A5 BC C9 00 F0 24 A5 BD 8D 06 20 A5 BC 8D 06 20 B1 BC 8D 07 20 A9 00 8D 00 20 E8 E6 BA E6 BC E0 00 D0 D7 E6 BB E6 BD 4C 0E A2 A2 00 BD 00 7F 9D C0 07 E8 E0 40 90 F5 A2 00 A9 3F 8D 06 20 A9 00 8D 06 20 BD C0 07 8D 07 20 E8 E0 10 90 F5 AD 02 20 A5 FD 8D 05 20 A5 FC 8D 05 20 AD 50 7F 85 FE A9 00 8D 00 20 68 85 B8 68 85 B9 68 85 BA 68 85 BB 68 85 BC 68 85 BD 60 60 20 B9 A2 20 C0 CB 20 DE A2 20 FD A2 60 20 42 92 8B 8D 95 80 8C A3 80 90 96 8B 97 8F 8D A3 8D 96 99 98 8F 80 93 98 80 83 81 82 88 FF A2 00 AD 9A A2 8D 03 07 E8 BD 9A A2 8D 04 07 20 91 A5 BD 9C A2 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 28 A3 20 C0 CB 20 56 A3 20 C0 CB 20 7D A3 20 C0 CB 20 BE A3 20 C0 CB 20 EF A3 20 C0 CB 60 20 3B A4 20 C0 CB 20 69 A4 20 C0 CB 20 90 A4 20 C0 CB 20 D1 A4 20 C0 CB 20 02 A5 20 C0 CB 60 20 A3 9A 96 8B A3 8F 9C 80 81 82 FF A2 00 AD 1C A3 8D 03 07 E8 BD 1C A3 8D 04 07 20 91 A5 BD 1E A3 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 E3 9C 8F 96 93 90 8F FF A2 00 AD 4D A3 8D 03 07 E8 BD 4D A3 8D 04 07 20 91 A5 BD 4F A3 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 EA A2 00 AD 7B A3 8D 03 07 E8 BD 7B A3 8D 04 07 20 91 A5 A5 32 20 42 A5 AD 03 7A 8D 05 07 EE 05 07 AD 04 7A 8D 06 07 EE 06 07 AD 05 7A 8D 07 07 EE 07 07 A2 03 20 AB A5 60 21 23 A1 8F 8B 9A 99 98 FF A2 00 AD B5 A3 8D 03 07 E8 BD B5 A3 8D 04 07 20 91 A5 BD B7 A3 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 21 2A 00 01 02 03 04 98 97 90 9D 96 A2 00 AD E3 A3 8D 03 07 E8 BD E3 A3 8D 04 07 20 91 A5 A2 00 A5 AA 29 10 F0 07 A9 9D 8D 05 07 D0 05 A9 8D 8D 05 07 A5 AA 29 0F DD E5 A3 D0 06 BD EA A3 8D 06 07 E8 E0 05 90 EC A2 02 20 AB A5 60 20 B3 9A 96 8B A3 8F 9C 80 81 83 FF A2 00 AD 2F A4 8D 03 07 E8 BD 2F A4 8D 04 07 20 91 A5 BD 31 A4 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 F3 9C 8F 96 93 90 8F FF A2 00 AD 60 A4 8D 03 07 E8 BD 60 A4 8D 04 07 20 91 A5 BD 62 A4 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 FA A2 00 AD 8E A4 8D 03 07 E8 BD 8E A4 8D 04 07 20 91 A5 A5 33 20 42 A5 AD 03 7A 8D 05 07 EE 05 07 AD 04 7A 8D 06 07 EE 06 07 AD 05 7A 8D 07 07 EE 07 07 A2 03 20 AB A5 60 21 33 A1 8F 8B 9A 99 98 FF A2 00 AD C8 A4 8D 03 07 E8 BD C8 A4 8D 04 07 20 91 A5 BD CA A4 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 21 3A 00 01 02 03 04 98 97 90 9D 96 A2 00 AD F6 A4 8D 03 07 E8 BD F6 A4 8D 04 07 20 91 A5 A2 00 A5 AA 29 10 F0 07 A9 9D 8D 05 07 D0 05 A9 8D 8D 05 07 A5 AB 29 0F DD F8 A4 D0 06 BD FD A4 8D 06 07 E8 E0 05 90 EC A2 02 20 AB A5 60 8D 00 7A A9 00 8D 03 7A 8D 04 7A 8D 05 7A AD 00 7A 8D 01 7A AD 01 7A C9 64 90 13 AD 01 7A 38 E9 64 8D 01 7A EE 03 7A AD 01 7A C9 64 B0 ED AD 01 7A C9 0A 90 13 AD 01 7A 38 E9 0A 8D 01 7A EE 04 7A AD 01 7A C9 0A B0 ED AD 01 7A 8D 05 7A 60 A2 00 A5 FF 29 01 D0 09 AD 03 07 29 FB 8D 03 07 60 AD 03 07 09 04 8D 03 07 60 85 21 8E 01 07 A9 00 9D 05 07 A9 01 8D 00 07 8D 02 07 60 FF FF
    / a3 x9 L" C; D2 f( `# z" l% ]

  39. + [5 t' s3 R& l9 U' n9 f8 n

  40. + Y- W5 T6 q( u6 G
  41. 6502 simulator:
    % S' Y( a6 p& I6 S) F
  42. PPU写入程序:
    5 z9 P. K, d% L2 a- n
  43. .ORG $A000
    1 {! O( u- [1 F0 A- t* n
  44. CSP = $805 }3 _" _, ~: H; p
  45. C0 = $819 R6 B( E' r' m9 l% R0 W( P
  46. C1 = $82
    + G9 S2 ~, J- Y7 n1 h" R/ U- J! ^+ a
  47. C2 = $83, T( b9 L3 M; J- N1 I( U% E* H
  48. C3 = $84
    * x, S5 Y% i5 R% `
  49. C4 = $85
    7 x- r( V$ A  r% a# b# A
  50. C5 = $86  t9 T5 x! n% r) T" G
  51. C6 = $87
    * f# s: i/ E, u* @* Y2 d, ^" \9 H
  52. C7 = $88
    2 K2 U) r; l! p  B2 V: Q
  53. C8 = $898 A( ?* i7 `- A9 d9 l+ H5 v! S8 {' B
  54. C9 = $8A1 U. r1 ?" c  u
  55. CA = $8B
    2 j2 q' K! o0 U) S7 N
  56. CB = $8C, a' L6 K$ `0 Q2 D; p1 A) c
  57. CC = $8D+ @( |+ W% c9 Y8 R
  58. CD = $8E
    9 l+ n8 @& `/ p$ g1 c" r
  59. CE = $8F9 A/ `5 z* m  z, M
  60. CF = $90
    4 e) K  ]" W6 o! v$ M! b
  61. CG = $91$ g2 R& n5 [" P4 i! g: e  U
  62. CH = $92
    1 F6 \- v0 Y1 M" y
  63. CI = $93
    - S9 q/ f! A, T1 X4 D! `4 n, L. C. X4 j
  64. CJ = $94
    / j: a+ T) z* j, S$ l) s. P8 ?
  65. CK = $95
    " \0 n; F4 P3 y1 U# R0 O6 k
  66. CL = $96
    / S/ `" S2 |. i8 Y0 v- K- @  t' {
  67. CM = $97
    , l+ M# k6 A4 K0 s; l
  68. CN = $98! C% M5 @/ @7 |5 F# ~4 v7 `
  69. CO = $99
    7 X8 p# D8 \6 x0 T8 f
  70. CP = $9A: s. x0 v$ C/ F/ J
  71. CQ = $9B
    5 `1 x' x' K0 E5 `' k
  72. CR = $9C
    9 v2 C: e& ^! K7 y8 S6 o
  73. CS = $9D
    & T4 I0 E) r" g; Q% t
  74. CT = $9E# Z% i3 x* Y; ]& w5 j9 x! L5 A, ]
  75. CU = $9F
    1 B: L( U% c& Z
  76. CV = $A0
    $ g3 o! u6 i. h9 \5 {& r  s
  77. CW = $A1
    * }2 C( y$ L2 x5 }
  78. CX = $A2
    4 i8 Q( b# d1 Y6 \+ ]$ \8 i" C2 a
  79. CY = $A3  U8 E: l/ y+ F! c5 b: N8 j
  80. CZ = $A4
    ) P& S2 P1 G! E/ [) z$ g6 Y. \
  81. CEND = $FF5 Q! y1 I' D9 k# K
  82. 4 i! Z3 Z. r. y4 k7 U

  83. . T% d: }( s9 ?# H2 M
  84. CMP_RE:. G- v8 M5 W1 ?: M
  85. LDA $FF
    ' j" x. ~! i0 Q! h1 b5 ^
  86. AND #$7F
    $ z, Q* O: r$ V7 h- Y
  87. STA $20004 N- N+ [. T& d: k
  88. LDA $2002
    8 T% A" b2 e( [
  89. LDA $25
    + y3 U) z2 ]. r3 U: a! B
  90. CMP #$01
    , v* w# F1 F# P" h  L' ^. S
  91. BNE PROREG
    4 }3 y& E: D8 u3 }$ l3 y8 p; \1 b
  92. LDA $F5,X
    0 ?  r- J  m, U! d- {
  93. AND #$CF
    : `. ~, I* S# B, b
  94. BEQ PROREG
    ; o. E' Q9 B9 @5 D, I
  95. JSR PPU_CMP
    ( q$ D' c1 l: a0 N
  96. C_RE:% V$ v4 v/ l  K" Q! j7 K% F$ T
  97. RTS
    1 d  r. P# q' T2 V
  98. PROREG:
    ' Y! _/ R9 V% {+ I
  99. PHA
    : d; r* O. k4 o; e
  100. TXA/ b, ~, s" n; s8 d+ S! n, C
  101. PHA: |, |# V0 ~8 w; Y$ a
  102. TYA
    2 o1 y- p5 Q/ h( \3 q
  103. PHA/ D7 Q9 D+ p: j4 \5 v0 d) H' O
  104. LDA $25
    7 L7 _. k; Y( v' l' M  `
  105. CMP #$01
    9 k8 U( V% J1 k) |; i
  106. BNE RE, }' @1 ^1 q# }# J
  107. LDA $010A
    7 L* {% u- u# I$ [# }
  108. CMP #$00: |6 h. o) S/ W$ b
  109. BEQ P1* b0 d6 J* X. d) A2 G' S

  110. 4 e$ P0 p( `% a* s
  111. RE:
    1 q( ~9 m' U9 b7 \
  112. JMP PPUWRITE$ H+ k) x$ M5 v

  113. 2 ?5 b* c' T0 k" ?  N
  114. P1:                ; 条件判断
    6 R3 U$ W! z7 C  l
  115. LDA $7FFF6 x# i5 W" h& l, {5 c  M$ s+ C
  116. CMP #$FF8 w+ y0 j0 Z: L; x
  117. BNE P1RP
    4 z  }% F+ W# n$ a/ S. \
  118. LDA $7FA0
    0 L! ~" I& c$ ?6 N; R4 h4 y' @
  119. CMP #$00
    , g0 ^9 ^9 ~, }- [& U2 B9 H* m$ K
  120. BNE P1CMP  ^5 C% R: V- e* `; O( }1 s
  121. LDA #$FF
    9 r% t: e/ C( u
  122. STA $7FA0
    . l, m9 ~$ G/ f! ]- q
  123. JSR CLEANA+ y* h1 L2 p6 A, d1 M. j9 L
  124. JMP PPUWRITE; Z, B, v5 }& ^( Y
  125. P1CMP:& _# C+ K1 D% [' Q
  126. LDA $7FFF$ M! I- W( ?9 y) C: H' W/ t8 g
  127. CMP #$00
    # f7 M/ l" C8 P. p: p3 Q- d
  128. BNE RE
    " l' q3 Y7 _" n. \& e- x" F9 W
  129. P1RP:
    + j7 D, l% E* I" c
  130. LDA $2002+ U& B# S$ s5 q# N+ L" r& F
  131. LDA #$00
    . J3 f4 a0 n9 M, M$ c. \8 e
  132. STA $20017 t5 s, s. q: a9 a$ f3 j6 t
  133. LDX #$004 ^- P# Q/ C' y( }
  134. LDA #$FF
    8 [' q7 s) w/ e
  135. STA $7FFF3 r  {- ^, R3 i2 n/ z9 i$ ^$ }+ Y
  136. STA $7FA0
    ' `( a7 l" {9 m% F  [- v/ W
  137. JSR COPYPPU
    0 q5 }- M7 o+ S/ j
  138. PIRP2:
    1 A7 U3 x8 ~3 b* z
  139. JSR CLEANA; v( z' N7 h: c4 h- I, x: _
  140. JMP PPUWRITE
    & v2 ^, P" _1 }7 ^8 q- @9 L
  141. ; m( O* n2 t& N" k5 _3 C3 l
  142. COPYPPU:* X! S- {- q1 ^
  143. LDA $FE9 i" |  N. C% s! n
  144. STA $7F50! i% ]3 W) D6 {6 s3 L( F
  145. LDA #$08
    ' G( b  R5 y- ?% s: L. U
  146. STA $FE
      e' ?1 _2 u2 u, E( D% D
  147. L0:
      N: Y7 T4 J1 n* J
  148. LDX #$00
    4 P! w1 W& A* r/ ]) g  X7 M
  149. COPY_07C0_07DF:% E* H% c& K' Y6 J9 w9 ^
  150. LDA $07C0,X4 I/ w; z' O" r& k- f& z8 _
  151. STA $7F00,X
    . F+ N/ D3 H: |* ]' m: d
  152. INX: P$ ?( n: R5 A7 d$ j
  153. CPX #$40/ m1 T, Q! a3 R% X  V6 |' e  j+ o% u
  154. BCC COPY_07C0_07DF
    / n" Z9 @2 |) z9 S, c8 \/ c$ B
  155. LDX #$00! ^( Y$ p3 b9 q& x
  156. PPU_07F4_07F7:- P: M# g; A/ ]$ R. F
  157. LDA #$00
    $ |. U" Q" B- D# A6 [! L' _: D" v
  158. STA $07F4,X
    ; n5 W9 J9 X1 H- T' F! g( c
  159. INX
    0 [3 H7 O7 b$ X; k' c6 R
  160. CPX #$04
    4 G$ `3 Q1 G' v* U# R  Q/ {" g; |7 [
  161. BCC PPU_07F4_07F7
    / E+ y& a3 q# S: N
  162. LDX #$00  t# {6 D) O0 Y- O+ M. ^  b
  163. COLOR:: n" o- ^$ J: Z  ~
  164. LDA COLOR_DATA,X
    ) Q: |4 C1 X0 h8 u& C2 d" S1 `
  165. STA $07C0,X
    / p: p, o0 A9 P' q
  166. INX( ^( K$ \! B6 V0 T! a$ R6 s' \
  167. CPX #$10- J) p# X$ j6 L0 l! a: v3 [* e+ W2 Q
  168. BCC COLOR
    $ l$ B7 {- S, u3 T! A  }
  169. ' F1 ~9 S7 R/ ]8 M; ~" ^& |9 v
  170. PPU_COLOR:$ o7 a. b. d! r. i8 Y; z5 r( `+ B
  171. LDA #$3F0 e  ?: j: h# g/ p
  172. STA $20062 f. a, y) j; L: ?( H: I3 f
  173. LDA #$00
    1 p% P8 G; x& J( o. S! }
  174. STA $2006
    % l" G7 G/ V% l+ |+ z9 C
  175. LDX #$001 Q( M+ ]$ Y; h7 l
  176. PPU_COLOR_W:6 P" W1 L' O6 B! J7 U6 o4 [0 m
  177. LDA COLOR_DATA,X
    1 |# z6 C7 f& v3 N
  178. STA $20078 s4 x* t; U" ~5 t6 Q8 a, g4 I
  179. INX* W2 e; i; X8 h* \  d# \! s) }
  180. CPX #$103 Y# ^' ?/ t2 y
  181. BCC PPU_COLOR_W
    " x  K9 r+ B4 w, G' H! R5 \* d& v2 `
  182. 9 Z- e: u. \( o! J7 F0 a, s: H

  183. / ~, {1 }7 Y7 m4 V& U7 X4 y" b
  184. LDX #$00. ~0 B% |' m( P1 F6 M- J
  185. LDY #$00
    ' J0 L2 R0 u/ o0 _6 X' R' ?8 \
  186. LDA $BD) \+ W( g# N# W3 j; h2 D
  187. PHA
    3 w! b5 Z1 C/ ^5 t
  188. LDA $BC" N7 f3 }( i8 ^; B) p; i
  189. PHA9 F8 Q6 R4 J1 n
  190. LDA $BB
    - K1 e+ X- a. x$ I! R* U6 d6 s$ E
  191. PHA
    7 p% {1 d% `1 W! d6 [
  192. LDA $BA
    9 o' t+ ?5 E; N- I
  193. PHA
    & E) Z  R' @. |
  194. LDA $B9) J+ H- D' ~1 F1 `$ X1 \$ e
  195. PHA
    6 i2 o! @9 B6 Z0 b) Q" G
  196. LDA $B8; M3 f. b- F4 P8 |0 S
  197. PHA  c% c1 f# E: L/ @6 `% A/ i5 @
  198. LDA #$002 n# \: Q  f+ z2 Z
  199. STA $B8
    1 I6 F( M( Z* |1 j+ C7 p* m# H# @) l
  200. STA $B9
    ; f+ W, Y, ?. M/ F6 k
  201. STA $BA' Y9 R; C3 V; V- [: }* {9 j) w
  202. STA $BB
    ' w! e- q( L  D% q3 j3 v  S
  203. STA $BC
    # I. e6 T- M. J/ P; T7 b# }
  204. STA $BD- F0 A% K: S  Y7 N! s
  205. LDA #$00# r& o: O2 @5 c# Q' }$ m. E, q8 N* u
  206. STA $BA
    6 j+ [. X8 n! Q- P- S
  207. LDA #$20
    5 V% l' D# o% B: y; W' b
  208. STA $BB
    7 ^# Y. s1 J3 |  ]1 V
  209. LDA #$00# S* B8 I) h6 a& F% _1 J4 }
  210. STA $BC
    5 ]  `, h! m8 D. r3 q
  211. LDA #$60" q$ C8 V. Y" ~
  212. STA $BD
    + f6 X' e0 U; U0 e, P
  213. 6 Z, I1 q7 U- i, E+ `: e, T+ _7 o
  214. L1:                ; PPU复制
    2 G4 M4 D9 g  a" \8 R. K. Z
  215. LDA $BB5 H/ j* F: a9 L, H% u8 n
  216. CMP #$28, u7 Q$ o- A  o) Y0 Q3 K' u' ?, {
  217. BNE L2+ t: u/ X/ m9 v' z( t( |
  218. LDA $BA
    ( [$ u% P: Y' C) h, t% m1 ]9 {. C, ]: n
  219. CMP #$001 f% D; r! g+ V4 N+ P
  220. BEQ PROADPLA# W* g* [! e- G3 ?. S  g% f

  221. ; \- @  p& Q: W4 C( Q+ Q: x
  222. L2:: j$ c  {- W( y) }$ W4 x
  223. LDA $BB
    ' Z& c' ^) ]0 \3 I8 }* J9 e
  224. STA $2006) h  E' r% Q9 Z$ J, f
  225. LDA $BA
    * R$ J& V( v3 \* K
  226. STA $20060 g$ `5 }" ^# B2 j2 z
  227. $ g* j, i1 `) d$ t' r- @' }2 y( }5 W9 u
  228. L3:
    1 A, m7 X3 A5 `$ e
  229. LDA $2007
    ! u; l- l% e) n" _% K
  230. LDA $2007
    ! m! y: D; Y! R" m/ c
  231. STA ($BC),Y
    + I7 H6 z: {1 F- U
  232. , B+ m/ ^6 t& F" A% @" }! F% R
  233. L4:& J+ _7 ?* z  L( c  m% Z
  234. LDA #$00
    / `& v/ D/ I+ _% G( D
  235. STA $2000
    ( M9 M8 d6 ]1 f  O
  236. INX! x  I5 O/ ?0 g8 c8 B( c3 t
  237. INC $BA
    * B. o* e$ ]5 D' e8 x& E6 Y. m
  238. INC $BC2 u0 c/ p5 D9 F9 R/ O7 b
  239. CPX #$008 e8 K( i, ]4 g2 V2 P5 u) ?# b
  240. BNE L15 c: v0 b, v/ f7 G+ L& {7 E: D& V9 o8 |
  241. INC $BB
    * p) F" [$ a, D$ x3 i3 }3 e
  242. INC $BD
    ' a' }1 F6 U; A7 K& @( }
  243. JMP L1
    " t. U1 G% A2 j$ ^+ W5 V* A
  244. 9 _, |# f  J: O  g$ U# G% _
  245. PROADPLA:                ;出栈9 [/ c9 Q9 ]: T  {/ Z! T
  246. PLA
    2 N- X' P. e) v! I6 s
  247. STA $B88 C* ]9 L: m$ @( p' J7 _: h
  248. PLA
    3 z* J6 ^& F# t+ V% R
  249. STA $B94 r  q' j+ H# R. S( W/ F
  250. PLA7 {( b. t& m7 C
  251. STA $BA
    , O4 R3 @" _  ^) l" g% h- i
  252. PLA
    ( ~3 w- ]+ r$ V* j3 f) `
  253. STA $BB6 g6 R3 t! L6 i3 m' U
  254. PLA
    $ n2 y- L6 M0 R3 d# U% h
  255. STA $BC
    7 d* t2 Y0 S! i! ~$ O4 x: e
  256. PLA
    4 ^7 `5 j5 W, y1 k( J* [  w
  257. STA $BD
    $ c: F' a$ [  W) ?/ V
  258. CPRE:
    $ X8 d$ P# f/ w1 I5 O
  259. RTS
    ) [$ L( a5 e( s! K
  260. 7 ?- i2 B2 k% ^4 ]) n$ I) \
  261. CLEANA:                ; PPU清空2 T2 _/ t( O* Y  ?
  262. LDA $BD+ q, S1 l- ]. D1 q
  263. PHA# Z9 g* Z" p7 N' b* ~
  264. LDA $BC/ ~: T) c2 H  y
  265. PHA7 k+ u4 ?# C2 a. h5 Y6 R& j
  266. LDA $BB
    1 i  c, m3 _' `  V
  267. PHA4 J* i( Z/ p1 v8 `3 b0 _
  268. LDA $BA+ h3 u4 e5 h0 `8 e
  269. PHA
    & X1 Y% h& T  \8 ^$ o# f2 u
  270. LDA $B9. W7 u5 K3 e$ \, n" y, H4 z
  271. PHA
    - a0 p9 R+ L- o% z8 W: h% i
  272. LDA $B86 x9 ~- [. W" p
  273. PHA  ~. ?* e+ c1 a' E7 h1 H- B* j
  274. LDA #$00
    / W$ f% J: Y- s- M, O! O
  275. STA $B8
    " F- o5 A1 j+ C1 S
  276. STA $B9; C9 [8 Z4 S3 y" X, P
  277. STA $BA, ~4 Q' G0 B: M/ x% N; \( S1 G
  278. STA $BB) `' O! j# _. Y) p, t
  279. STA $BC5 x7 {! Q) e, Q: t
  280. STA $BD, Q" s# H1 y. y) ?
  281. STA $20010 S, _; \, U( I4 F$ c% j
  282. LDX #$00
    8 t1 p: c$ u/ {3 M- U
  283. LDY #$00" Y+ I9 k4 y5 y, B" G
  284. LDA #$008 i4 K$ n3 \# V3 t$ x& f6 `/ |  W
  285. STA $BA
    4 m, Z3 I# v$ d+ @! K
  286. LDA #$20/ p) n1 u- y7 V# ?
  287. STA $BB
    - B: X# R# R( i: R  ^2 \. p
  288. ; F2 J6 u# d/ N4 K3 g1 m/ {. \
  289. CL1:1 Q$ @. r: w# l5 f" t) W
  290. LDA $BB" ~% `( ~1 [$ [+ A' O
  291. CMP #$28
    + Q& T' o7 d3 {# v* a# P4 M
  292. BNE CL2
    6 Q) C" L2 h5 U) M
  293. LDA $BA
    / `/ o3 D8 c# W, ~7 W
  294. CMP #$00
    3 {3 r2 K3 I9 Y
  295. BEQ FREEWRIYE
    6 O6 T  F( `4 J9 \8 a3 ]
  296. : u. y' z( w# N1 D* l
  297. CL2:1 M1 G1 Z1 s7 k8 A* a
  298. LDA $BB
    8 D, W. f+ d: l3 u# d
  299. STA $2006
    / \( C2 u! `3 D
  300. LDA $BA
      g9 a! p3 k7 {& I- E7 a9 b
  301. STA $20065 T, \0 B1 S4 h- h/ v
  302. * n  T$ Q% m/ z: d
  303. CL3:
    & j9 G9 g7 ^( q1 T7 F* |5 K" K
  304. LDA #$00
    / T* r) D/ g* H
  305. STA $2007
    ! n# z0 Z( [5 @1 ?

  306. 3 i* X/ f! w8 Q) L3 m
  307. CL4:" c3 Q5 M' P# K
  308. LDA #$00
    6 v6 c" d8 A3 r7 N
  309. STA $2000' m# e& A8 T9 k
  310. INX+ O( I) H- C$ h3 V7 e0 |5 z* u
  311. INC $BA
    1 C1 {1 [: r$ f/ J
  312. CPX #$00$ O0 ~' F' H' j& W( {, \( p8 s
  313. BNE CL1
    7 F+ x' w+ g/ _5 `* R
  314. INC $BB
    / i6 G3 m5 u  D
  315. JMP CL1
    $ o1 x' w8 Y: N# a4 P

  316. * `% }3 Q# B5 R9 y, h) r6 S8 a) N

  317. 3 F9 n, I/ l: h9 |. [: {% z' D
  318. FREEWRIYE:) ?7 O: Q7 A, M$ `

  319. * W6 M# S! h2 d- ^  j; x
  320. NOP
    + i# T7 o8 F& N4 p

  321. " G! f/ G5 X* W2 G/ i9 v
  322. : v" u2 k% D1 M) V
  323. % m- Y) N; G1 _5 m) A/ L& q

  324. 0 u7 |5 B8 C& z8 g2 H

  325. & Z) J- f6 G+ X- i  [7 w* z
  326. CLEANF:                ; 恢复现场1 {0 x# q) p" j3 A/ L8 |! ?5 Q
  327. - J; O  Y8 Q! ^/ r% l
  328. PLA
    # Z8 `4 `( w9 X8 `
  329. STA $B8
    * i4 l/ Y3 v/ T
  330. PLA1 U/ U, L% @, \# u
  331. STA $B9
    ! ]& V, l3 ^$ C$ @
  332. PLA' r) h& A4 [; I. M6 K
  333. STA $BA
    5 b, T4 J) x0 u: z
  334. PLA. E; S1 @' K8 W" F' A! y" Y1 s
  335. STA $BB, ], `! [7 {5 b+ @
  336. PLA7 b% N% u0 d- _8 r1 U% ^
  337. STA $BC
    . \% A4 w- p5 M5 q8 R9 x1 {
  338. PLA
    3 J4 r# G& T. a2 F
  339. STA $BD' L$ {! y4 E, c5 {) u, {3 i
  340. CLRF:
    9 o: y9 E3 C& D2 G
  341. JSR FREE_PPU
    5 \; k3 C- k: C+ g# D
  342. RTS) n0 ]5 ]9 I0 C, ~4 D

  343. 3 A7 z( V$ u- H$ y( r  M" c& r
  344. 4 b4 C3 A, }8 s
  345. PPUWRITE:    ;PPU写回+ H: X6 _2 S7 z
  346. PLA
    3 {4 T8 [. C3 U
  347. TAY
    - z2 O: _0 A2 x% C$ K. W
  348. PLA+ k5 n+ r* I3 D1 o) l. `
  349. TAX0 ~9 Y- c7 E! ~2 T8 ~8 k& L2 |
  350. PLA5 s; x& T" Y4 g" e) c8 T' ~" `! z
  351. LDA $25
    ( P/ a8 B5 [# H
  352. CMP #$00
    ) G: `9 S1 m9 C; E$ l! ?5 v
  353. BEQ WP1
    ) B2 |2 a. j$ F& B+ t
  354. LDA $25
    & t! a  x, ~& ]) c* a
  355. CMP #$01
    " }  \/ D- w, g) h' g" I/ x
  356. BNE WRE
      N7 W$ g- R8 e% M5 a' K* r3 j6 r
  357. LDA $F5,X3 I2 N( B' c9 l$ H
  358. AND #$EF- n. F# a% o) r5 r2 s
  359. BEQ WRE
    8 Y6 Y2 n8 u5 I3 }0 `0 B
  360. LDA #$007 U; _/ }" Y& I: d7 k
  361. STA $7FA0
    9 r7 r. {( r2 B" X" e; s( ?$ y& D
  362. % O- C% d6 o- Y$ N$ w' J
  363. WRE:; [$ r( {5 X* R, z3 j7 m
  364. RTS( }4 W; \9 j2 \# E
  365.   p- b6 z+ H% |( w* @- T2 H) x) w2 w3 ?
  366. WP1:
    - H1 @* I" j6 ~, Z* N
  367. LDA $7FFF" h, g! D. \) B
  368. CMP #$FF
    / ^5 n0 |7 O8 p9 C/ v
  369. BNE WRE! ]# e. ^: A8 G7 k2 k
  370. LDA #$00
    ' D: Y8 U/ M$ m8 G* W" l4 x
  371. STA $2001, O$ h2 X5 R8 y8 [. l1 F% N7 L* \
  372. LDA $BD7 v% J# X- A$ V6 x) t- ?5 y- z) |4 {
  373. PHA- g$ j/ M. q7 h
  374. LDA $BC+ z8 o( o2 L& ~) [* C6 u
  375. PHA4 u# D) J2 b4 c( A  ~% P
  376. LDA $BB
    * z& O: X8 `$ c+ Y
  377. PHA, f3 b9 _4 v. X. k+ C8 e5 ?* e
  378. LDA $BA- L" F2 M' \' V  a6 w" x/ q# i
  379. PHA# n4 k7 q1 J6 x/ S% q5 K+ V
  380. LDA $B9, H& W9 s4 _4 M* r' F
  381. PHA
    ' i' N  S* _7 ]0 b" j0 {0 `
  382. LDA $B8
    ! p0 l; e/ k% u' o  ?' e
  383. PHA( H) Y8 J7 `4 s) M
  384. LDA #$00, @% a! F2 t% b0 ^$ G
  385. STA $B8
    4 s. l. y( c1 V5 v$ D# L, ^7 V# V
  386. STA $B9' v/ M2 t; b$ [" F) h- k
  387. STA $BA7 Z. z3 I( {  a) ^9 P
  388. STA $BB& v% F% E, Z, T8 g' }# h+ U. O
  389. STA $BC0 f2 S6 q8 }' D
  390. STA $BD, e' b1 Z5 N( c# U7 }& c/ f$ d. e
  391. LDA #$00
    ; ^) F: _7 ]$ Q9 A: z/ _3 K
  392. STA $7FFF; z* U, |# h0 e$ j+ I

  393. 1 `1 S6 z) x, w
  394. WL0:
    9 F: V. G2 B2 h6 r# i3 X# f
  395. LDX #$00' v3 k$ h; q) C3 K
  396. LDY #$00
    ; }- @! N1 d' ?9 S& S, I3 o9 i
  397. LDA #$00
    : `, o9 i0 W5 `" R- ]
  398. STA $BA
      S% t7 [6 t3 `+ x2 ^
  399. LDA #$20
    * J% L3 e! j4 B
  400. STA $BB
    " Q9 k& Z: Z) Y3 r* ]" \* P2 X
  401. LDA #$00( L' d6 w8 F3 d5 N+ T
  402. STA $BC& I- z7 x9 \: w; _2 t- Y8 c4 E
  403. LDA #$60
    " H5 w7 ]0 z/ E" J. K. y4 V( M
  404. STA $BD
    , ?5 w: U& \' C( Z/ F6 u- z
  405. 4 r/ h* ?2 r8 k. T9 k
  406. WL1:# Y7 O  F: m! h
  407. LDA $BD/ F  P4 [& J1 Y5 y3 H
  408. CMP #$68
    & R2 Q$ i& B, `! m
  409. BNE WL2, g4 J& }/ W6 b! f# ^
  410. LDA $BC
    ! x* |7 k0 f3 G8 s3 y9 l: s
  411. CMP #$00
    , z( x/ N( ]3 U
  412. BEQ WLR
    6 C; E- ~$ q# y- N

  413. 5 w0 o6 q' J/ T! p& j  F% K
  414. WL2:4 L& ^4 i# q& c6 F
  415. LDA $BD; v, `4 {# Q0 W! M- \. @5 K
  416. STA $2006
    , m, i6 `2 n$ W3 @% ^5 _/ y
  417. LDA $BC* p- j8 l4 Y$ ]9 e
  418. STA $2006% ^# s  [0 Y  j' z1 K
  419. / O( \( y/ K4 \  c8 m/ ?
  420. WL3:
    : [- T' \! g0 v- }# F2 [3 B
  421. LDA ($BC),Y& ?% S, s6 U+ d' `4 ^* S
  422. STA $2007$ `; X' M: E+ N" @, j7 g
  423. ' A& E; p3 v& K' t
  424. WL4:1 g$ O4 ?; H: f1 A, Z( T/ c2 _
  425. LDA #$00
    % g1 \4 U$ _. y7 x$ c
  426. STA $2000( u/ \) b+ }: ?+ E) k' ~: @% x2 |
  427. INX
    3 F  J, Z0 E! k
  428. INC $BA: p, a' r5 i- I$ p
  429. INC $BC
      `4 F8 Y, t$ \! }
  430. CPX #$00* F1 z7 V( F+ ~# L
  431. BNE WL1
    : F& {4 j  C2 p7 `1 _
  432. INC $BB
    ' \; L  k. E, I9 G6 Q9 Y* Q
  433. INC $BD0 Z# }  X0 Q; {% a$ |! M
  434. JMP WL1
    / u5 B, `: ^3 }2 N- O! T
  435. * w1 a1 k' p* N/ Y. p
  436. WLR:
    ! O5 u4 k7 B1 N; F4 m
  437. LDX #$00
    7 H5 }4 o3 t  h- F, {; C
  438. COPY_7F00_7F3F:8 L/ H: O. M) d% V% L+ H/ M
  439. LDA $7F00,X$ s7 p7 T( ^6 G
  440. STA $07C0,X
    7 k7 |: _4 U  A0 J4 N' r
  441. INX
    # `7 u4 t: l  P1 _: g8 M9 ^, _
  442. CPX #$400 G* s( C& H' k" D' s  l# t
  443. BCC COPY_7F00_7F3F
    & E7 M! Q1 d' R4 O

  444. ! S7 p  t( o- W1 b0 ?! C/ d0 r. L
  445. LDX #$00
    + ]5 R1 z  q  f. [4 @. p! ]
  446. LDA #$3F- u) A, ^7 l: o) W
  447. STA $2006
    9 D# ]+ e1 m' r
  448. LDA #$00
    : A+ j1 j, W* W% g7 N
  449. STA $2006
    * |% j' ]% A$ x. z
  450. COPY_7F00_7F10:* l; J) Z  [+ c0 d! ]
  451. LDA $7C0,X
    , k! F$ M$ V( t9 y1 E7 g
  452. STA $2007) _" w" P0 A' n  g3 [7 D6 T
  453. INX- p/ Y: J8 \; \, e- [; P( }9 A
  454. CPX #$10. m& B' Z" P" ]/ D5 m5 [0 `6 p. ?  j
  455. BCC COPY_7F00_7F10; _4 J- O5 d2 {# k2 |

  456. 8 M- H+ `7 Z- `' n# {- o9 G
  457. LDA $2002! n* @/ h6 u: a! J
  458. LDA $FD  y- a: O+ c. F( m
  459. STA $2005
    3 @  V# ^. @$ N  _0 G- a+ g1 O
  460. LDA $FC
    6 z! |5 Q8 Q5 i7 a1 p$ r! G- m
  461. STA $2005, R8 S5 Z$ w1 X; k; Z

  462. % ~. ~5 }. J0 b4 `
  463. LDA $7F501 D5 U. g6 e' K6 j3 d
  464. STA $FE
    # l" b1 N8 C5 k" I
  465. LDA #$00, }) C/ F" K1 `0 {; L! t! @
  466. STA $2000
    & t& a, M: K4 b
  467. PLA: [' N1 o5 ?; n: ~$ w
  468. STA $B8
    : w+ n0 |( B/ k. s
  469. PLA
    ! h% Q. ~' i' N6 w  [% F
  470. STA $B9# |7 h9 K; c) o
  471. PLA
    ! b  o9 ?$ @" G: y
  472. STA $BA
    % S! s! z7 w7 X& t* E! o
  473. PLA
    - i7 R% M/ ]# W; \
  474. STA $BB
    & O+ ^- {4 z) p, w3 h" W. V: x
  475. PLA+ d% \7 l: x: U, ~$ h. h
  476. STA $BC
    , C( P+ n. g9 \. \/ E  c
  477. PLA* J+ k8 U1 ?3 g# N- b( U8 Q5 k0 m3 h
  478. STA $BD
    3 L3 w4 K/ P. Y7 |4 i
  479. : H. o2 }1 k" [, j
  480. RTS  g; z  g! X( J& a6 x  ^6 H
  481. 6 F* B( c" l. [0 l9 }/ @) L+ D8 N
  482. PPU_CMP:
    2 d$ u$ ?$ a& m* }  o2 I" V
  483. 1 n' r  f) t7 I3 t  B1 j
  484. % N: `6 ^# ]' V+ u: }/ l4 c. k
  485. PPURE:
    ) b& I$ N5 h( s& ~2 \
  486. RTS; L# Y( \8 F" b' t. k
  487. , W& z. o. U; F1 C) c' J

  488. 9 h; u* E* v6 H; w% P; S, Q  M
  489. FREE_PPU:2 p5 y+ S5 [7 @
  490. 7 j3 t& ]( t1 X5 v
  491. JSR TEXT01_PPU
    0 G+ w0 e5 {9 x) V8 t. x
  492. JSR $CBC0; s) Y$ \; U$ C/ b4 p
  493. JSR P1_PPU
    6 G) m% `+ e- u, p6 h. G/ {
  494. JSR P2_PPU- G) r1 c9 v# u2 o
  495. RTS; I) C; B5 L0 i! H1 k' K) |

  496.   o( l4 ]& C* D" ~; J
  497. TEXT01_ADDR:
    9 e2 a7 U. x5 o& `
  498. .BYTE $20,$42
    2 k+ Q3 g1 U' a8 f6 H- R- Z! D
  499. TEXT01_DATA:' |! ^9 @9 x" s$ e% D( _
  500. .BYTE CH,CA,CC,CK,CSP,CB,CY,CSP,CF,CL,CA,CM,CE,CC,CY,CC,CL,CO,CN,CE,CSP,CI,CN,CSP,C2,C0,C1,C7,CEND: R8 T0 K* v3 A; S9 a
  501. TEXT01_PPU
    7 C1 q$ U7 j& R% C6 m; N
  502. LDX #$00% O0 f( k9 V4 E# q! w, u
  503. LDA TEXT01_ADDR
    $ _3 ~) o* c1 g, t
  504. STA $0703
    ' L4 s6 @2 l' `3 y
  505. INX
    5 y  I  o% D* f/ E2 t
  506. LDA TEXT01_ADDR,X
    8 \- t% l  L- |) E+ ]+ c3 S( ]+ P
  507. STA $0704
      `$ L( s7 W2 `- J$ C3 w  n" ?
  508. JSR PPU_PROCESS& x# G5 y1 j. O, N& l* u
  509. TEXT01_W:6 o5 @& e2 C5 p, ~3 g+ ~6 |
  510. LDA TEXT01_DATA,X; \2 ^* j: o, A; l
  511. CMP #CEND
    5 y# W" O9 \! D& r
  512. BEQ TEXT01_START" p( z1 Z) w8 G0 V8 G1 D
  513. STA $0705,X
    ' c2 v, d7 P2 d0 @
  514. INX5 b+ |( \( B; Q
  515. LDA #$00
    / r- t. ^, ^* ]0 L1 b" r
  516. BEQ TEXT01_W
    2 `$ i0 l6 [7 f- k0 k
  517. TEXT01_START:* n; m' O( c9 c2 M" K
  518. JSR PPU_START
    2 p6 d% h7 a& D; g- ~& N- c
  519. RTS
    3 j8 T7 ?) s& k  k2 U0 |3 ~
  520. 6 W$ |5 P# S; \# E) y1 w# L9 ?/ l

  521. 1 K/ n1 I+ B4 t1 l. J8 D' p. t
  522. COLOR_DATA:# G" ~$ w( [7 Z
  523. .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28
    9 |8 m& R9 M( s6 P% x2 p

  524. * ]- J/ }( K% n; l, ]7 I7 D
  525. P1_PPU:6 w. F: x* f! e. [* ^  @! t
  526. JSR PLAYER_01_PPU
    . v% P* @$ a& l( G
  527. JSR $CBC0$ Q' ~$ m# p7 Q9 k
  528. JSR RELIFE_P1_PPU! b$ b' J+ j1 R, |5 I9 c
  529. JSR $CBC0
    0 k) Q# s+ w, ~, K  J
  530. JSR RELIFE_NUMBER_P1_PPU
    - ?6 e# Q) I2 z
  531. JSR $CBC0
    # y# S5 O+ Z( V; i8 L! o
  532. JSR WEAPON_P1_PPU
    " |# E& I. M9 k0 I1 h& _
  533. JSR $CBC0
    4 `2 I% y7 F( y/ Y3 W; m" m
  534. JSR BULLETPPU_P1_PPU9 _( p) m# M) w% }" S7 `
  535. JSR $CBC0+ M  D" _( A6 D; C8 ~$ A' z3 g
  536. RTS
    / j* p! Q  b: @0 B# _9 B$ j
  537. 9 j9 |7 U$ x2 Z' ^- ^
  538. P2_PPU:+ y! j9 |+ u( P- l
  539. JSR PLAYER_02_PPU8 z$ J& H+ e, m8 g
  540. JSR $CBC0! l# ?$ z) b( j' M2 u7 S
  541. JSR RELIFE_P2_PPU
    : b$ u/ C3 \% I6 r1 H- T
  542. JSR $CBC0
    . {& `4 I/ p# A2 P9 G
  543. JSR RELIFE_NUMBER_P2_PPU
      {' J, F- \) P/ ~% E0 Q
  544. JSR $CBC0
    3 V7 v' l* i1 ~9 y
  545. JSR WEAPON_P2_PPU9 N3 K2 Q% O& t' z
  546. JSR $CBC08 g/ M% Q! U9 Z8 u! Y( d+ x
  547. JSR BULLETPPU_P2_PPU
    ; p. E. {# B! Q3 w
  548. JSR $CBC04 r+ v) F# ]2 E4 O6 k! n
  549. RTS7 Y5 l- G2 D, Y" E
  550. ) M# S- a7 m/ ?! X4 u* C# Q

  551. $ J* N5 g1 o( |- x: R! f
  552.   q- P9 {* S5 X
  553. PLAYER_01_ADDR:
    5 n/ a% v' s5 t3 Z2 b+ T( Q
  554. .BYTE $20,$A31 n7 A4 O: F2 Q- i# q
  555. PLAYER_01_DATA:
    4 k* n0 d  y* G
  556. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND
    0 ^& l. U' e5 L) v$ h; E. Z
  557. PLAYER_01_PPU:
    $ \% R/ u2 d/ B0 b; @- Q7 b
  558. LDX #$00
    1 O, A6 ]! u# ~/ x9 }
  559. LDA PLAYER_01_ADDR
    6 }1 |, t! L' j  Q- ^2 H  I& Z
  560. STA $0703  ?! Y* A& T9 ^$ ~0 @" D0 S5 T
  561. INX( ]) R$ O2 e- P1 I! h: t# \
  562. LDA PLAYER_01_ADDR,X
    $ O( G! }8 a* V
  563. STA $0704
    ) t# w3 X* J' i8 t+ C
  564. JSR PPU_PROCESS, V. Y! Y2 O/ ?2 C$ M8 ^
  565. PLAYER_01_W:
    " p2 Y% `+ f8 w5 ^( u4 c
  566. LDA PLAYER_01_DATA,X
    $ O. y! ^, |0 C7 \( X; w1 D& [
  567. CMP #CEND+ G9 O! ], K, C. b* Z0 Y
  568. BEQ PLAYER_01_START+ u3 i* Q4 y' Q/ I$ S( T4 u  _
  569. STA $0705,X
    3 f3 V2 i8 J/ K4 U' `- X
  570. INX( ~$ n* @! s$ i' K
  571. LDA #$00
    , V! x- r. p: C: d7 e7 j
  572. BEQ PLAYER_01_W
    9 ~; i: \4 o5 G$ X4 k- i
  573. PLAYER_01_START:
    5 `+ x  K1 X% u; O2 }- r  w5 `
  574. JSR PPU_START, `9 R3 M7 i  C+ X* g
  575. RTS
    . b6 v0 ]# u! x
  576. 6 q9 d; d" j; A; A& A' j5 r

  577. 6 |2 ~5 v+ O3 Z" [( q% [3 I
  578. RELIFE_P1_ADDR:4 ?: W" x" Q: F' {
  579. .BYTE $20,$E3# K& D' L9 |. r( ?
  580. RELIFE_P1_DATA:' ]' X; a! [3 w( U3 k0 L0 r# v
  581. .BYTE CR,CE,CL,CI,CF,CE,CEND2 [& T: F4 S$ f8 T
  582. RELIFE_P1_PPU:3 T  h" V/ d2 ]& o- S+ G! p( ^
  583. LDX #$00$ p% ^8 p5 o, g* Q) y
  584. LDA RELIFE_P1_ADDR
    " w2 R! a- H7 m+ ^6 c- D: l
  585. STA $0703
    $ Y# u( @3 {4 N$ T& Q
  586. INX! k0 ~' b+ x1 q
  587. LDA RELIFE_P1_ADDR,X
    , |8 x8 S' E$ [+ N
  588. STA $0704
    5 Q0 a* R4 S* M6 Z
  589. JSR PPU_PROCESS! r2 m6 `9 l& s& V  A
  590. RELIFE_P1_W:9 b( k* a; w% X: @/ G7 D$ p
  591. LDA RELIFE_P1_DATA,X" l$ O# Y. t1 E% c1 F# m
  592. CMP #CEND; a; l5 p- \. c8 X$ e% u$ e$ [0 C
  593. BEQ RELIFE_P1_START
    1 U0 a# K3 r) M2 N9 P# Z
  594. STA $0705,X
    * I( r! C7 O; K8 v  b4 Z, \# U/ a
  595. INX7 R& W( M1 h; S, `* J+ p+ ?% V
  596. LDA #$00
    9 h% p, l  Y) t0 n, c  g. ?9 b
  597. BEQ RELIFE_P1_W
    2 d: V# @/ ]' B- _6 b4 s
  598. RELIFE_P1_START:
    ' B, O: T8 p  U1 R6 B' I
  599. JSR PPU_START
    9 l+ i& n3 S6 ^2 [, `
  600. RTS
    " l# N! O  a  j' R4 M0 I4 p# K

  601. ! Z9 E' i: [' d

  602. 2 K; Y/ Y$ Z/ K
  603. RELIFE_NUMBER_P1_ADDR:# F% M! ?. S$ I9 V
  604. .BYTE $20,$EA
    3 Z; V+ z4 d# m! ~7 J* J
  605. RELIFE_NUMBER_P1_PPU:
    # G. K# d. r# P/ p- }
  606. LDX #$00
    - S0 C  K0 L7 C, V, k- M" f5 W
  607. LDA RELIFE_NUMBER_P1_ADDR
      F# ~+ x& |# \( p$ \
  608. STA $0703; ~  x: n0 ~/ j! @$ u1 l4 T: s- l
  609. INX' Z. @* N8 b7 |8 \. f
  610. LDA RELIFE_NUMBER_P1_ADDR,X+ ?. V* q3 H: ^* F. M
  611. STA $0704+ T2 {& P3 v" C
  612. JSR PPU_PROCESS
    - S- y& l& u% J* m: R
  613. LDA $32. ?( X$ B9 W# U7 T  U3 Z
  614. JSR LIFETODEC
    % c$ i1 f4 T/ \, l# |, \, ~! n
  615. RELIFE_NUMBER_P1_W:
    " K2 @- Q5 A5 d( \& M
  616. LDA $7A03  {+ \! \) A* e& R+ {2 b1 L' ?
  617. STA $07055 g9 o4 Y( b9 ?$ w2 q) p$ i3 z
  618. INC $07058 j: q, F  N& Y
  619. LDA $7A046 g* S. ~9 T& z
  620. STA $0706
    8 Z7 v) M! s4 ^
  621. INC $0706
    * A' q/ z$ a& R( w; |- ?2 G
  622. LDA $7A05
    7 G8 x9 x+ F$ }3 k0 U2 o, I
  623. STA $07070 K: ~0 d" k( s2 w, \1 m2 a7 }
  624. INC $0707
    ; W5 _% ]0 v. M, w
  625. LDX #$03! R8 J( ?1 m; y& Z3 d' @. U
  626. RELIFE_NUMBER_P1_START:
    6 i& X- q" D" \( t. ?
  627. JSR PPU_START8 n! N& u* G6 ^$ M& Y/ M/ J/ Q
  628. RTS
      X# g+ @8 @, s9 N

  629. ! f% ]5 w- l- B+ t1 {( J" q  m
  630. WEAPON_P1_ADDR:
    ; X2 Y9 ?* [6 d9 G6 c$ {8 P
  631. .BYTE $21,$23
    ! F: b. C- A7 t3 a: O0 l
  632. WEAPON_P1_DATA:
    , C) X9 p; H* s8 S  J( J3 b
  633. .BYTE CW,CE,CA,CP,CO,CN,CEND
    3 H; H% W; ?0 B4 ~
  634. WEAPON_P1_PPU:% e! s: t9 i( }2 |6 Y
  635. LDX #$00
    . v; t" a% I% e8 ~9 p3 Q
  636. LDA WEAPON_P1_ADDR$ h6 M" L( i" B& ~( j9 V) ^
  637. STA $0703
    - D" y/ `" i' J5 N
  638. INX7 h7 b, M: k7 z, C& I+ L- p6 e
  639. LDA WEAPON_P1_ADDR,X$ _2 @" j% G7 E6 Y# Q
  640. STA $0704; U7 O9 S2 X! Q& [% ^! R9 o, L: n
  641. JSR PPU_PROCESS+ o1 y/ F) q, i; e
  642. WEAPON_P1_W:% q  ?* e6 C( F  s' H6 @+ c& ~$ ?
  643. LDA WEAPON_P1_DATA,X' R2 U/ f. J# b  R
  644. CMP #CEND" c# E$ Y; M' E: ?$ X7 `
  645. BEQ WEAPON_P1_START
    4 P; K$ }& U8 Z
  646. STA $0705,X
    $ @& \3 A4 N* m6 ?( H
  647. INX
    , \" y8 n, T" i9 @
  648. LDA #$00  r0 U, Q2 m2 J- o0 p- [* F7 o% J* N! g
  649. BEQ WEAPON_P1_W( g! d4 y1 r- A+ e
  650. WEAPON_P1_START:
    2 d. ~4 W8 b& o( T
  651. JSR PPU_START
    2 f) z1 a9 d1 C1 L
  652. RTS6 L4 k8 Z+ M/ Q+ P$ H+ e

  653. $ B# u1 v3 v8 p4 `8 h) y& G# z
  654. BULLET_P1_ADDR:! Y  [: n+ |% R% J  r4 r
  655. .BYTE $21,$2A
    6 b- [0 c) s& J( Q8 V: T
  656. BULLET_P1_DATA:
    * e" D! ?% e4 N9 d2 H
  657. .BYTE $00,$01,$02,$03,$044 `2 M* ?1 ?% F- @" k7 V8 M
  658. BULLET_P1_NAME:: j2 O- E- A! k) h& Q3 ?: n
  659. .BYTE CN,CM,CF,CS,CL' b% Z7 y4 O7 k- r% W9 T9 F- W6 h
  660. ; U: T" ^  j% \" f
  661. BULLETPPU_P1_PPU:6 O" y: s" A5 n% i' {: y
  662. LDX #$00" i4 R& c# d) h& c' \' D
  663. LDA BULLET_P1_ADDR
    3 [" T2 J) W& W/ Q* X8 X
  664. STA $0703+ y# g! O: j! U/ B1 {3 g
  665. INX
    ; k7 n. m7 A) Z" z3 q
  666. LDA BULLET_P1_ADDR,X* F4 X2 w/ f, L: ?5 p
  667. STA $0704
    * M7 X0 P) Q3 z5 l7 E. U9 L; |
  668. JSR PPU_PROCESS
    9 i5 u) A: M2 v
  669. BULLET_P1_WRITE:
    ) a( Y, b+ Y# F2 j
  670. LDX #$00
    0 E7 J! a$ Z: F2 a) H2 L; \
  671. LDA $AA
    9 Z- F/ K2 F/ {- b3 R8 v! G
  672. AND #$10
      l$ Y! ]3 R" ]) J
  673. BEQ C_BULLET_P1
      q& x, S6 H& w: I7 T
  674. LDA #CS
    ' x! I) g/ x) J
  675. STA $0705  Q6 C. a( [0 p  j0 o. R4 i
  676. BNE B_NAME_P1
    ' ]$ }6 W/ n# Y, i
  677. C_BULLET_P1:$ F4 A# S, u# V8 k2 N/ x
  678. LDA #CC
    5 r  d* X6 u* V; G1 h) }
  679. STA $0705
    ) X; I+ b5 r% K. Q
  680. B_NAME_P1:
    ( A) |# F5 t- A' g6 }+ K
  681. LDA $AA
    / Q" U  o. Z/ f! U- a! P: V
  682. AND #$0F; K  U  l0 ?* i9 l/ w* @
  683. CMP BULLET_P1_DATA,X
    + W: g" t2 m2 J5 x/ J
  684. BNE B_NAME_P1_RECMP9 Y* l  p3 }6 l, Z- M
  685. LDA BULLET_P1_NAME,X
    7 \7 f+ V  Y7 N+ y6 J
  686. STA $0706
    ) Y% s, H1 Z+ j" i2 @9 R
  687. B_NAME_P1_RECMP2 f" {9 q3 a5 F* F$ H
  688. INX5 k+ {7 m# z2 ^- _! o6 }+ W6 D
  689. CPX #$05. W# p2 s# \+ a$ Y7 O: h
  690. BCC B_NAME_P1# ~  z- M7 K- X; N
  691. LDX #$024 w$ D( `, v* ~5 h' ]" A" ^
  692. JSR PPU_START+ x/ F8 m8 I, M3 x  X+ q' k, M
  693. RTS) D+ Z' u; F9 g- ~
  694. 4 M+ @, D# n0 i8 J. R9 m# w: X

  695. % ~$ n& p. l5 u# P0 ?; O- ?, ?
  696. PLAYER_02_ADDR:) p9 b! T9 Q0 v- h* D
  697. .BYTE $20,$B3
    * w9 x8 ]% p6 E0 p, W5 u+ M
  698. PLAYER_02_DATA:3 H+ c7 _) d( p! j: m
  699. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND
    6 x" q1 h9 W) v4 D& \
  700. PLAYER_02_PPU:
    + W9 t$ @$ w8 h- e# N* b
  701. LDX #$00
    % |& G3 C0 ?$ x, M# _& C
  702. LDA PLAYER_02_ADDR, t% ?2 e% d! r2 {2 G
  703. STA $0703, _2 |' Y! ^' v3 g$ a
  704. INX! y% X& _6 G. `- c9 u
  705. LDA PLAYER_02_ADDR,X
    3 Y2 |4 e6 O9 t. q
  706. STA $07049 ^& J* D( L' g6 Z7 ^; a
  707. JSR PPU_PROCESS
    . ^- A% g  D) @/ m0 V0 F! P
  708. PLAYER_02_W:
    ' M  G5 |0 K- q
  709. LDA PLAYER_02_DATA,X/ q6 r3 B; [1 h- \  ?
  710. CMP #CEND" {( u5 `; G" E
  711. BEQ PLAYER_02_START
      @3 e4 [% m. ^
  712. STA $0705,X7 j2 Y; ^3 z$ V
  713. INX
    - _/ _$ m, h' a/ }
  714. LDA #$006 Y" e6 F# C' I1 m" U
  715. BEQ PLAYER_02_W6 S' E8 |2 V9 ?/ Q3 O+ ^
  716. PLAYER_02_START:
    ( ^$ i( b/ z6 f0 J. b+ e
  717. JSR PPU_START
    - E! B% u9 ]4 W9 g" w
  718. RTS' P" {0 y, [, `) z
  719. " J6 n4 P/ A7 t  e$ c0 b; m& Q) R% v0 ^

  720. # v8 a" s% T; I# L. P! e
  721. RELIFE_P2_ADDR:
    - c0 j& m+ }# o0 Z/ Z( j" H" G
  722. .BYTE $20,$F3
    4 P* g8 ]0 A+ K. I' b3 ~  ~2 B
  723. RELIFE_P2_DATA:
    / G" r0 i7 F5 T1 Y& P, t
  724. .BYTE CR,CE,CL,CI,CF,CE,CEND
    # \# H/ [9 t# S" B1 w3 k
  725. RELIFE_P2_PPU:4 C9 Q9 Y- ]5 z
  726. LDX #$00: \- N4 h" c' c" n0 ?3 ]% Z& V  @5 D; q
  727. LDA RELIFE_P2_ADDR
    ; ^+ y  h/ E# |1 v( E
  728. STA $0703
    * W1 @  u% S( H9 O7 F3 G+ @
  729. INX0 Z# S: \0 l( c- d: g, h0 j2 s
  730. LDA RELIFE_P2_ADDR,X  C: ?' }0 O' H7 E
  731. STA $0704
    ' n' O" ]" n  x4 }- l4 I  Y
  732. JSR PPU_PROCESS4 k! L! o+ J0 B
  733. RELIFE_P2_W:
    7 m8 F. u5 Q" a$ r) i  c
  734. LDA RELIFE_P2_DATA,X0 h) C. q; ]- n) i
  735. CMP #CEND
    ' X! j" j: \: n4 C# F6 H$ B4 ]& H
  736. BEQ RELIFE_P2_START
    , y% U% P; m- W4 u+ T
  737. STA $0705,X3 t3 L& m( Y' Z' \# J8 t
  738. INX
    7 m& a  Y; K+ [) S7 F
  739. LDA #$00
    4 ]1 c/ \: c) Q3 N' c  y9 R
  740. BEQ RELIFE_P2_W
    " u! ~1 j2 a8 [4 a3 Y
  741. RELIFE_P2_START:
    1 m8 ?0 K- K( s5 I2 J' T
  742. JSR PPU_START
    & e/ q7 c$ t1 h( g0 G
  743. RTS: v+ O9 n3 l$ i- J" c5 y" F0 F0 {

  744. . d2 G5 j3 d  b( |/ j# m

  745. ' L2 \) R2 k# T9 X, b' k
  746. RELIFE_NUMBER_P2_ADDR:1 u( @9 v4 J# K3 F' \# L1 F
  747. .BYTE $20,$FA
    # @1 T5 P8 Q- k" m* s' V
  748. RELIFE_NUMBER_P2_PPU:
    5 B: V9 o* d- K6 q( Q
  749. LDX #$00
    2 d# n7 V( F' x: x* F. L& d! M" c5 A
  750. LDA RELIFE_NUMBER_P2_ADDR
    # q& _- W$ F5 Y/ S
  751. STA $0703, }2 q9 ?3 q9 c+ r8 q8 M# a$ U
  752. INX
    ( P" ~$ n4 S* X" H& F6 b
  753. LDA RELIFE_NUMBER_P2_ADDR,X8 A7 g  F4 U; M
  754. STA $0704
    5 S$ Y- x) Q( A* v% U' `
  755. JSR PPU_PROCESS
      e5 d1 v+ x% I3 ^
  756. LDA $33  Z/ e* s% \8 r+ c1 r4 q
  757. JSR LIFETODEC
    5 T8 @' f/ r; Q( S. L. j3 g2 a
  758. RELIFE_NUMBER_P2_W:
    9 |9 r' Z3 g) J2 B) r7 ~+ n- }
  759. LDA $7A03$ z& z' [! X' X4 C6 M3 S( V
  760. STA $0705: r8 _" i/ G/ ]( f# ^6 |& C: }4 V
  761. INC $0705" M; D" W3 f+ x
  762. LDA $7A04
    9 X) X' L) S. _& }* N5 ?% W3 N
  763. STA $0706+ E7 n* f" W1 B! ^, }( I: o7 R
  764. INC $0706
    % a* {6 [, b" N3 u
  765. LDA $7A05
    0 A0 R1 i4 l0 S8 U& @
  766. STA $0707( V" g* X0 R( A4 W+ y. b: A
  767. INC $0707, C" T8 E$ W# e/ K" [9 H) N0 i, \
  768. LDX #$03/ P6 O$ l& ]$ ~* @& }
  769. RELIFE_NUMBER_P2_START:) P* H8 ~/ h, D# e( l
  770. JSR PPU_START4 N9 Q/ h" Z% u( e
  771. RTS
    5 f) s% g3 H% ^$ A

  772. - S0 N" z/ p$ }! k  o
  773. WEAPON_P2_ADDR:1 \) a& i' a9 z/ I( `2 w
  774. .BYTE $21,$33
    9 \/ T. c- L' A$ A* h' _; d
  775. WEAPON_P2_DATA:
    2 e7 {8 c* D7 b
  776. .BYTE CW,CE,CA,CP,CO,CN,CEND
      v3 T- u" k$ `
  777. WEAPON_P2_PPU:* ?: y* i; `. t& F6 |, e3 d
  778. LDX #$00: c4 ?  x( I, X  ]0 L
  779. LDA WEAPON_P2_ADDR* S  I( l& w+ f6 j* Z6 P- f7 J
  780. STA $07035 H( B5 ]+ h! G; D3 X
  781. INX
    # H& g4 D5 E  d+ Q
  782. LDA WEAPON_P2_ADDR,X( R+ T; t) z- }8 h8 V
  783. STA $0704% }( l5 U$ a4 A
  784. JSR PPU_PROCESS! ]& W: m" q2 S
  785. WEAPON_P2_W:8 n3 k( L  S) j9 L6 u, d3 m
  786. LDA WEAPON_P2_DATA,X/ h6 Y/ g8 T0 W8 l
  787. CMP #CEND9 z# D( R7 M5 X5 A) M
  788. BEQ WEAPON_P2_START
    ) F& ~3 R% A5 {- F( P5 n$ o( V
  789. STA $0705,X! p% d$ G! i2 _+ V# i5 Z
  790. INX
    . t$ Q0 P) t6 e; N$ N" i
  791. LDA #$003 j8 k8 }9 C, w; S" \
  792. BEQ WEAPON_P2_W1 P" D# k0 }: \+ z
  793. WEAPON_P2_START:
    4 v' @& ]% A& H% s7 O$ [' a+ ?9 R
  794. JSR PPU_START8 A6 }  L+ y1 W
  795. RTS7 D4 r* O' c6 p' K
  796. & Z7 Q6 f  |) w3 K6 h& ^
  797. BULLET_P2_ADDR:
      W5 y# e3 m. U3 e  v* V% J
  798. .BYTE $21,$3A8 U+ e! D  P' T- D  D$ ]5 K" F& h
  799. BULLET_P2_DATA:4 K8 U0 x! @: }! L$ l4 O
  800. .BYTE $00,$01,$02,$03,$04
    2 E! z. L9 g6 I5 \2 ?7 h% ~
  801. BULLET_P2_NAME:# x9 X* I* W+ j& r
  802. .BYTE CN,CM,CF,CS,CL
    ) H8 E) k/ s# Z, x& U6 J
  803. , C: Q9 F. r$ f1 E! o$ t8 u
  804. BULLETPPU_P2_PPU:
    6 w8 _, _- u1 S
  805. LDX #$00
    0 _) k& H/ W, v% m9 U
  806. LDA BULLET_P2_ADDR1 Y9 Y, d6 N% a6 L5 u! T& @
  807. STA $0703* F* G4 d+ D2 c. b# u6 K4 _
  808. INX; ]3 V& s+ A- e' X
  809. LDA BULLET_P2_ADDR,X: s4 o, D  \% W" n
  810. STA $0704
    0 f, u, {4 Y6 X5 O, }  R, j
  811. JSR PPU_PROCESS1 H* I% c) C  Y# c0 T
  812. BULLET_P2_WRITE:
    % c+ V: u; @' v8 t$ k
  813. LDX #$00; R8 I# L5 h2 a$ g8 k/ _
  814. LDA $AA; |( _' O. g9 }5 Z/ s: l$ F
  815. AND #$10& z. r9 B1 M$ S9 t0 ?* a
  816. BEQ C_BULLET_P26 h' \8 N+ g* h
  817. LDA #CS
    $ v3 g  _* u) G! r) R/ G5 B& }4 B
  818. STA $0705
    + G: \; Q! h; D3 |
  819. BNE B_NAME_P2
    2 n1 Z# [( O; b) _4 b. y% u
  820. C_BULLET_P2:
    ) U) k) T# j. Y/ y3 \
  821. LDA #CC
    * I# p1 U$ }# X/ r
  822. STA $0705
    - ^- M5 T. I! u5 n/ F
  823. B_NAME_P2:
    * Q7 }7 g9 s. T
  824. LDA $AB
    5 T* @+ G# b/ Q1 O6 M/ \
  825. AND #$0F
    ' Q: F' k7 X4 s8 U( a' W
  826. CMP BULLET_P2_DATA,X+ X6 M  k4 G" w. [9 {, a. [
  827. BNE B_NAME_P2_RECMP' A$ I3 H: ]$ o' |- H5 }# }
  828. LDA BULLET_P2_NAME,X
    ; K5 a$ \' w. n8 n! v3 j
  829. STA $0706
    , _' ]9 t1 h2 S9 Z) c
  830. B_NAME_P2_RECMP+ B$ b: O; ?  [5 D0 F  `
  831. INX
    $ }+ S7 Q4 x+ s2 R: j
  832. CPX #$05
    0 i) o. o: Y9 T) b. r. v3 L- |% @
  833. BCC B_NAME_P2
      R; Y. S7 s& h4 L7 ^. A" o
  834. LDX #$021 M5 g5 K' n' u: V2 z+ v
  835. JSR PPU_START
    + h) L* T+ U& S+ y$ I
  836. RTS" S( v0 P) ]4 U
  837. ( |2 H# H6 J3 l% e

  838. 3 X: s: U$ y$ X( s2 m* L
  839. & O# p. A) z; u; T( E5 m
  840. 9 w1 y' e/ w3 V$ V# F3 E9 |

  841. ' Y1 Z8 a4 H4 G( B( s0 i" i- y$ d

  842. 0 c; K5 I' e% V1 i+ F  o- h4 E
  843. LIFETODEC:                ;十进制转换8 O% U1 \9 Z7 Q3 p/ P9 }
  844. LIFEL1:        ;initialise: T. c. I4 `4 s; t) E- j
  845. STA $7A00        ;$7A00=F3& Q- Q6 [5 C' b
  846. LDA #$00
      S  p" U. ^1 S; q; a$ L
  847. STA $7A03        ;$7A03=00. A9 A' ^+ e$ T
  848. STA $7A04        ;$7A04=00" f' T5 N4 E* l; ~9 _9 W
  849. STA $7A05        ;$7A05=00; n# M! `; K6 R& D- w5 E2 y, h) R
  850. LIFEL2:        ;copy data $7A00 to 6001
    8 n/ E, H, \4 F! I/ \; O
  851. LDA $7A00  s$ A& K2 @0 K4 o% b
  852. STA $7A01# P& N5 A$ b+ g3 g

  853. 7 C/ w$ v+ R3 k
  854. LIFEL3:         ;hundred
    5 v% w4 a' t4 J8 @
  855. LDA $7A012 c# L# H( L1 W6 z
  856. CMP #$64
    - z6 f; q; [  `1 K$ H1 |( A
  857. BCC LIFEL6                ;$7A01<100 goto L6
    4 e2 R: [  m3 o3 ~% [4 K. [
  858. LIFEL4:7 q5 M4 f, {5 Z- n* l* I
  859. LDA $7A011 q7 n! s: }, M+ j, Y
  860. SEC
    ! Y3 K* E( A4 `3 @0 b2 w
  861. SBC #$64        ;$7A01=$7A01-1001 Q$ k; D% @; |7 e1 s! ?8 i
  862. STA $7A01+ x, w$ s6 \/ V7 e
  863. INC $7A03        ;hundred++
    5 C$ f* v* }. V$ ~/ K
  864. LIFEL5:0 P% n# S, |; [% z% }: \
  865. LDA $7A01+ }5 a! x% u9 @
  866. CMP #$64  ]" r5 Z# W! J  Y8 |/ q. K, n
  867. BCS LIFEL4                ;$7A01>100 goto L4/ F* H1 ^) A) |/ g) G) a' M( F

  868. 4 ^# o5 q0 {% M  c2 H" d" C2 S
  869. LIFEL6:        ;decade
    0 a  R  d4 T$ ]9 r) V$ P
  870. LDA $7A01
    # o4 Y+ o: _3 e3 X
  871. CMP #$0A; y! d' s$ W1 Q$ A0 r+ j
  872. BCC LIFEL9                ;$7A01<10 goto L9+ n2 m& g; f. j' g5 `7 N# p" {
  873. LIFEL7:       
    9 i) t& b) F- x# n$ t
  874. LDA $7A01* H* ?$ i) H5 x0 c4 H/ T
  875. SEC
      z* w: W5 V+ a$ C; K
  876. SBC #$0A* f. l! _' q, d! g
  877. STA $7A01        ;$7A01=$7A01-10
    - l! ?( W& _4 D% h
  878. INC $7A04        ;decade++: V( d7 I& X- S
  879. LIFEL8:7 R& z+ e0 r2 F+ s, ~: F. V
  880. LDA $7A01
    - J( d" X1 e- q" v* H
  881. CMP #$0A  S; \4 W3 n' L6 U3 r3 m* G
  882. BCS LIFEL7                ;$7A01>10 goto L74 m" T1 G- [  j' A# b+ i3 e! R
  883. ;unit
    ; t# h/ j* q0 I, f0 ?9 @
  884. LIFEL9:1 e+ K4 y4 ^. Q* M1 t. K0 ?% ^$ t6 G) l
  885. LDA $7A01        ;$7A05=$7A01
    4 s$ d5 \+ D# n- h
  886. STA $7A05        ;unit& Q+ R7 F( u  `  C( P! b6 H
  887. RTS        ;return/ h& I9 ]5 F& v

  888. # g/ ]' X4 x; R: V; l( C  t: {$ Z2 J
  889. 9 o$ f) v8 U; a- Z  ^# W0 ?" r
  890. 9 [) a4 Z0 O1 F0 Q9 r$ Z% v
  891. PPU_PROCESS: ;PPU地址处理程序) B; O7 W' X. F  E
  892. LDX #$00
    & A/ J$ B" x+ b$ A% l3 |
  893. LDA $FF
    9 c$ ]( n# Z8 L; f" N* v
  894. AND #$01
    7 v+ `2 J/ \* L! ]3 x. R& Z# V7 F: H
  895. BNE PPU_2400_27C0
    # `+ {) g, u& Y8 @7 F! c
  896. PPU_2000_23C0: ;命名表1
    : u) M' U4 Z/ M8 n9 Z
  897. LDA $0703
    , v: o+ y8 k0 I
  898. AND #$FB
    " e" l6 L( X+ s' d
  899. STA $07039 Q3 o$ B& {/ l, m' A- M
  900. RTS
    / b; _, }5 q3 q
  901. PPU_2400_27C0: ;命名表2
    2 \! ~& Q+ \6 q
  902. LDA $0703; n3 f7 S4 @9 y4 o6 L
  903. ORA #$04
    + w  k+ E4 ?3 m+ x) o9 g6 D
  904. STA $0703
    , m% }- l% F# S3 P4 r! X
  905. RTS
    % [8 B, m6 P% I7 A# `

  906. & `# s, M. J+ c- W1 O
  907. PPU_START:  ;PPU数据写入
    + D4 Y! i3 l+ C5 M) i) s
  908. STA $21
    $ o$ I# D* O" I
  909. STX $0701
    - K" b& Y7 l* b
  910. LDA #$00; k3 o$ w! T& `
  911. STA $0705,X" f1 V5 t0 z( E3 A5 I* K0 e
  912. LDA #$01
    * J2 ^4 H0 L& _5 O- d4 @- U& Z4 M* g
  913. STA $07004 U  s: T* d& a4 `1 D. y! a
  914. STA $0702
    & z! }% e0 l: s# {" U
  915. RTS
      b( z- Y  m. l
  916. . Q" u- t* Q) Y' e# Z: G1 ]! N( x
  917. * _) B2 E* _: J
  918. ; p+ i+ H# I, q9 Z/ B

  919. / O/ R, a1 m* `: Z4 H; i

  920. 4 T" v9 x! O) b7 u
  921. 1 c6 V4 W2 s) R- x# V, a
复制代码

0 i% |7 M9 J4 j* ]  `/ L0 B

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
[发帖际遇]: yandagui 被钱袋砸中进医院,看病花了 3 个 柠檬. 幸运榜 / 衰神榜

签到天数: 2077 天

[LV.Master]伴坛终老

发表于 2017-2-13 17:25:19 | 显示全部楼层
这么好的教程竟然没有人支持!3 D6 b+ T$ z+ ]/ X! a6 N- L) e

签到天数: 2537 天

[LV.Master]伴坛终老

发表于 2017-2-13 19:24:13 | 显示全部楼层
怎么就退隐了呢?我还一直期待楼主能出SFC相关的教程呢。
[发帖际遇]: zsyf花14 个 柠檬买彩票,血本无归T_T. 幸运榜 / 衰神榜

签到天数: 26 天

[LV.4]偶尔看看III

发表于 2017-2-16 20:23:33 | 显示全部楼层
没事时有时间时还是欢迎发表教程,谢谢楼主贡献

签到天数: 2060 天

[LV.Master]伴坛终老

发表于 2017-2-16 22:58:37 | 显示全部楼层
看不懂啊。。。。。
[发帖际遇]: liujunbtx 发帖时在路边捡到 1 个 柠檬,偷偷放进了口袋. 幸运榜 / 衰神榜
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|国治模拟精品屋 ( 沪ICP备15012945号-1 )

GMT+8, 2024-12-21 04:16 , Processed in 1.062500 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表