EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2017-2-13 11:57:33 | 显示全部楼层 |阅读模式
  1. Contra (J) PPU写入程序5 h) Z6 v0 \+ e; G, g5 y
  2. 作者:FlameCyclone
    7 O: d3 ?* p/ [% M9 z
  3. 时间:2017.2.12" q# `1 z! P4 Y+ B  P' Q2 q
  4. 7 U8 T7 H0 k) m' l; x( Q+ L/ Q
  5. 按键跳转:$ E0 A& @: {" G
  6.         C1EF:95 F5 94 F1
    4 e& v% Q* M1 X( j
  7.         C1EF:20 70 FB EA
    4 w3 M% {) M& U$ u% }/ |- V
  8. 3 ^, i% w3 ^" N  u+ Q3 W5 G7 R
  9. 滚动偏移:# g* d- g+ u  u. u
  10.         F936:A5 FD 8D 05 20 A5 FC 8D 05 20) \2 [/ J$ g7 Y2 l, ?
  11.         F936:20 C0 FB EA EA EA EA EA EA EA
    4 D2 j- ?) e8 c3 K
  12. 8 P/ m% j4 Y# G) l
  13. 背景调色板:
    * h. K: U9 q+ g3 W* o
  14.         CF20:9D C0 07
    3 u3 h# }" \% P/ y1 q
  15.         CF20:20 A0 FB; K# j$ a# W; P7 K" D$ [

  16. ; b+ g5 ]: F. L; o
  17. PPU BANK号:+ H0 j  d8 B# W2 z1 o
  18.         C8C9:9D F4 07
    ( e5 y6 e0 H1 H. U3 g6 n) e
  19.         C8C9:20 B0 FB* p4 C7 ?, ?! E: j6 ]# a/ y
  20. ) [; A4 B: l- L7 n/ j
  21. 按键跳转:
    # N1 @/ E3 I1 T6 ]0 d+ |
  22. FB70:        95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 20, ?0 ]1 }/ {4 P0 s! N- [
  23.         AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 206 [' _# `6 [  x( A* G
  24.         21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF6 D- ?! w1 I# @) p
  25. 3 g6 T0 B5 t5 d4 }+ Z8 u. D5 M" x
  26. 背景调色板:: Q: s) {3 P" r; s4 P
  27. FBA0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF
    7 |8 C: U; d4 i
  28. + D+ A1 V5 T  w  f3 t  N- G% |
  29. PPU BANK号:
    5 h. s  Z( m6 [
  30. FBB0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF& Z5 F9 q4 \9 @

  31. 3 j( j% n$ C: R1 {' @$ I' C' c
  32. 滚动偏移:
    + q/ h5 q: h. r1 l. ~1 l: }
  33. FBC0:        AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 60
    ' c9 @. w' U. t9 N8 E% J4 M; O
  34.         A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF
    $ _: o, e' Z( E4 ^" P* Z
  35. 5 T; X6 }+ f: C7 O

  36. " [9 W5 C* [5 D+ H- f
  37. 切BANK后A000:
    6 c. ~( F+ H$ y) u, b! D
  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# [( v0 @* e* R" O7 X, r/ _% c

  39. % O, f! _$ J0 P8 I

  40. + k, K0 C2 ~/ y0 t, ]& C& ^
  41. 6502 simulator:( j8 P7 J; n  |7 Z5 V- m& \
  42. PPU写入程序:
    & b' ^7 Y% k1 G
  43. .ORG $A000) C5 p+ ~8 c6 B6 @
  44. CSP = $80
    % J0 I  o  W' T2 ]/ v% `4 A
  45. C0 = $81
    0 n( J4 X5 C0 Q. y( i+ V1 ^
  46. C1 = $82; q8 n/ r' X3 h- x3 x$ j+ l6 A
  47. C2 = $83: f% U  R) [. n* a+ X- @
  48. C3 = $84
    ' u' \9 O1 W% Z9 A8 f( x
  49. C4 = $857 n7 U9 R6 z$ E  [  K
  50. C5 = $860 L% \! k5 t- k# r) T
  51. C6 = $87' O4 M" O0 ]# j% Q& o
  52. C7 = $889 Y! }) M3 r" D( G7 ~# |
  53. C8 = $89. u/ j8 y( y6 _( Z: T* S, ~+ f
  54. C9 = $8A" F/ ~0 _( P1 W, M( Z' e! T, i" R
  55. CA = $8B
    5 g# y$ r; m; V8 `2 S1 w
  56. CB = $8C$ V: Z8 h: R" I/ j) |; t) H
  57. CC = $8D) B' T* r3 \  ^6 B
  58. CD = $8E
    6 J( \2 X  F; `6 G, I
  59. CE = $8F' G5 _* |, Z" _7 }
  60. CF = $908 ~% P5 _! o4 k& ?
  61. CG = $91
    7 d% E) Y& i- h2 z$ z
  62. CH = $928 X4 f, ]) O6 l6 b5 r
  63. CI = $93
    + D7 g4 ~3 G3 f$ _' [
  64. CJ = $94
    6 t% c2 m& E: V+ `+ m
  65. CK = $95
    0 \1 R/ C( b! O$ g: k6 e
  66. CL = $96
    . Z" q9 L6 M: C  E. u3 w; Q! |8 O# [
  67. CM = $979 `7 n2 {/ a% U9 ^) d2 m! x& c  s
  68. CN = $986 e% h, h0 y9 A( V0 t9 Y7 a
  69. CO = $99( B* B( @8 U) \, J4 B5 B' h
  70. CP = $9A
    : ^/ {4 M" f& a& S( k: I
  71. CQ = $9B
    / f) N3 t0 g# O: Y
  72. CR = $9C
    ( z( q/ Z& D) E3 N- r2 K
  73. CS = $9D. y4 S+ F7 j5 U" ?
  74. CT = $9E, H  y9 l& |$ g* a5 ]
  75. CU = $9F" }. o. X% d4 ^7 ]+ B
  76. CV = $A0
    / |7 O" [& h" o
  77. CW = $A1
    1 @2 d9 q* S7 ^" e6 H8 }! ^
  78. CX = $A2* f- x% y9 x* q" U9 f" H' j
  79. CY = $A35 g/ x9 B- ~$ r: i7 w7 q  ?# J
  80. CZ = $A4% r. c) @- Q2 p# ?
  81. CEND = $FF
    - q! b+ K7 D- S
  82. ( l: n; T, u( C" W

  83. - D, ~8 A5 O5 c9 N( L1 ]
  84. CMP_RE:4 M6 q  K; D" W$ b) R9 T
  85. LDA $FF
    3 p5 N" `( Y. _% {) Z; V) p
  86. AND #$7F- z9 w5 S* B% h# M  G3 y, z; p' o
  87. STA $20005 \' \! ]. o7 Z8 `( N, _
  88. LDA $2002' M# L  e- ^6 w5 @$ P! {: B
  89. LDA $25- K8 o5 I+ B; G: b! A4 \
  90. CMP #$01
    " n' G" Y/ }1 v7 y4 g
  91. BNE PROREG
    ! o# Q$ O3 Q6 c" {
  92. LDA $F5,X8 A, n: \: Y/ E" a( j6 S+ u) r- c
  93. AND #$CF5 i/ g. x. A( O8 r3 U7 ?# E7 _$ C
  94. BEQ PROREG/ F* t" Q# x: X4 C8 A6 p
  95. JSR PPU_CMP
    8 Y7 ~1 @( q& K
  96. C_RE:
    # {5 \* D; y" b& B) @1 ]
  97. RTS* O! b, D4 v6 T9 f' w% F: D% G. Y
  98. PROREG:
    . L& o) B5 z; u/ T- [# _: K
  99. PHA
    . {. U& q, D5 C/ V+ P* d& K
  100. TXA
    ( D9 {! w% }, Z: Z7 F
  101. PHA
    ! z) \9 U. ^/ m% U5 J0 L
  102. TYA- @6 p2 Z2 `! Q. ~( N/ V; \
  103. PHA
    ; l  |# [! D; X3 J' ^, I
  104. LDA $25
    ( J1 m4 g( q8 F
  105. CMP #$01
    + F7 y' {) r8 n0 n3 d2 V9 f& ^
  106. BNE RE
    7 O8 E% j' y) W* M" ~1 X
  107. LDA $010A
    6 E" K, Z( X9 T+ X$ ]  e7 Q4 A
  108. CMP #$00  V- Z# \0 a# |  m" e
  109. BEQ P1* e& {: T+ r# j: J. R+ [0 h
  110. 5 o5 u7 O3 A5 @7 V0 O
  111. RE:
    7 S, z. J' g) O3 A1 m* Z
  112. JMP PPUWRITE3 a/ S( A. R" E+ q7 Z6 `$ T- Q. z
  113. 0 I- D+ a3 w- Q5 G/ l  t
  114. P1:                ; 条件判断
    ; ^# r9 M+ H$ [0 U% f
  115. LDA $7FFF
    & T8 L7 B/ r# N5 ~( B" W
  116. CMP #$FF: x0 Z' Q& C5 U: C3 ~7 i" o
  117. BNE P1RP4 T/ B5 ~) c# _: `; d3 Z' m
  118. LDA $7FA0
    / J: _) W. T. F1 v4 f$ ~
  119. CMP #$00! Q& ?: o& P( V8 G
  120. BNE P1CMP
    3 M2 v" m: c' u- Z# _+ ]
  121. LDA #$FF
    0 }! O* ]5 Q6 |+ }  w
  122. STA $7FA03 g, S4 o% `/ {1 p5 `$ }
  123. JSR CLEANA- x3 Y, q7 U0 N6 B( O1 p
  124. JMP PPUWRITE- K0 W6 ?# ~" U; K5 v, F7 p3 k
  125. P1CMP:. f, B3 h2 _0 _7 o3 R' G8 O8 r
  126. LDA $7FFF# e" I7 I4 y7 S2 o2 X
  127. CMP #$00( ~& ]6 q) ^; e. c) V
  128. BNE RE
    ' D% B  w3 K" a. o% x' J& X
  129. P1RP:1 b: k: a' l  T5 x0 E
  130. LDA $20024 M5 Q2 ^; b: s. v
  131. LDA #$00
    ) T0 Q. ?9 `  @/ l2 w- F1 k
  132. STA $2001" @( |/ }* D* d4 t: V9 r; A0 N1 p
  133. LDX #$00  U7 v) R6 t% z
  134. LDA #$FF0 _5 Z% G- U; N
  135. STA $7FFF/ B2 {0 M' f% b+ e  |. n
  136. STA $7FA0
    ! \" N* G+ Q+ P) h$ p
  137. JSR COPYPPU3 T% I6 _9 p/ h! _6 a- q
  138. PIRP2:
    # k; L7 f" f" i9 w3 R+ N" W% N/ P
  139. JSR CLEANA
    3 b1 Q/ N' M0 U- Z' Z% c# M
  140. JMP PPUWRITE
    1 @5 I$ S, l8 w* @9 J) y3 `4 D+ l! z
  141. 0 \7 q1 t0 M$ a1 y" P2 p6 |
  142. COPYPPU:5 W* l& Q3 P& g
  143. LDA $FE
    5 H2 ^, |5 G2 X
  144. STA $7F50
    , E. L- [8 p% Q8 n/ r0 A: j$ b
  145. LDA #$08
    1 m: ?) F4 V& a, a& ~3 p% a  o9 G
  146. STA $FE
    ) J0 Z7 p  ^7 Q5 J1 l
  147. L0:- k5 S7 I; B+ m; ?* T
  148. LDX #$00
    0 ]0 e) X) |0 o1 _; r. f
  149. COPY_07C0_07DF:6 e( o% c" ]; l
  150. LDA $07C0,X  {) D2 S; x: l# V% c
  151. STA $7F00,X- q& P4 D! R( j, D
  152. INX
    4 k, B% e) E8 R1 i
  153. CPX #$40- l( G6 e2 ]; B5 S
  154. BCC COPY_07C0_07DF
    . T1 m) D% j% y( q7 i: u" m! q
  155. LDX #$00
    " R$ D- n. x9 l$ t: J* O
  156. PPU_07F4_07F7:) ^/ q1 z! n* U6 ]# L8 \& j- J
  157. LDA #$005 `9 J+ D& Q, a+ J( b
  158. STA $07F4,X9 l8 i1 X' G! G5 e6 U0 Z5 H7 @& {
  159. INX( C8 z# M! _/ q: j" d3 L6 X1 n- q
  160. CPX #$04
    " Q+ R! F' w3 s6 y; C5 o% Z, d
  161. BCC PPU_07F4_07F7
    9 ]6 [( o* D; t% w' K% A* d
  162. LDX #$00
    # w4 b4 ?- u. |0 Q
  163. COLOR:; V3 f& P& \. V. X1 q& `9 S3 ]
  164. LDA COLOR_DATA,X8 r% u; }; u9 k& q% r
  165. STA $07C0,X" b4 I5 Y3 Q; g; V; P/ m
  166. INX' w" g/ Q. {3 w3 s, C
  167. CPX #$10
    3 w! m$ g# t0 U) _* _
  168. BCC COLOR
    ' d; g" X3 V5 \. ~
  169. . _; r$ }, n0 ?9 F; p1 `% X( p
  170. PPU_COLOR:, s/ h* `: O4 v$ \0 F  C  S
  171. LDA #$3F3 I& e, b- l, \" s
  172. STA $20066 i1 l# m" Q, H0 I
  173. LDA #$00
    / z6 q0 i' Q& I  B
  174. STA $2006% e! y, `5 ^  x$ }$ e- |
  175. LDX #$00
    ; M$ w3 L" k+ b  t. D
  176. PPU_COLOR_W:* h' k3 H, V4 X' k: O. ^% w3 H
  177. LDA COLOR_DATA,X
    6 ^7 U# t6 ]7 p8 O, y- U& n- _' t2 g, e
  178. STA $2007
    ) \. W( g0 t6 Y4 Z/ S4 V: `
  179. INX
    6 j% R$ I' T9 _( Y
  180. CPX #$10
    2 j' Z( k7 O" o2 @/ s) O
  181. BCC PPU_COLOR_W
    , W  o0 a* O* H" K8 h8 J) R

  182. 7 w" K- K4 q& F5 m: _4 W- |' N

  183. 3 t+ K% \/ W. n6 w' D- j" B1 {
  184. LDX #$005 d3 F- {# i' v! H$ Z( N( A3 l
  185. LDY #$00; J1 r+ W" _8 ?* z+ S
  186. LDA $BD3 _! H* \! m. H5 w- \. j
  187. PHA5 w% ]4 U3 m# p; w5 d  s% V
  188. LDA $BC- Q9 z' R9 X; O
  189. PHA; e4 a; ]. @. J+ ~* }% F
  190. LDA $BB) j' R- M: s* S
  191. PHA/ N% r& f( Y# l
  192. LDA $BA6 C( u5 \! O: J1 Y+ M+ I
  193. PHA
    ; d+ q8 }$ ~3 ~, _/ s, v, h% E
  194. LDA $B9
    # K/ B6 \) X( d0 M3 N
  195. PHA
    5 D9 n3 S& l3 `  F( X8 K* c. v6 f; p
  196. LDA $B8
    5 H% T) m, w0 E$ Q
  197. PHA
    + S0 y7 J. ^8 ~1 E- B, Q! H
  198. LDA #$00
    4 _! V. k0 s6 f8 C" Z+ v6 N- @
  199. STA $B8
    & L% N& P- q( W; D6 j- j( d1 j- Z, D
  200. STA $B98 L1 u: H( z2 s" y/ r
  201. STA $BA* V( H6 M+ Q# o7 K  [6 ]! A
  202. STA $BB
    & v% a7 Z- m7 D* l, {* ~
  203. STA $BC; l: }/ p3 B& Y9 z
  204. STA $BD
    1 y2 k5 Y* c2 H, b- I
  205. LDA #$00
    ! K9 k4 R/ a. h( L9 g0 }  N0 O
  206. STA $BA
    8 l, q3 Y1 c" g
  207. LDA #$20
    9 c8 |! F/ o" O. B2 m' Y
  208. STA $BB# [# g5 }1 s3 V/ }$ A5 [8 X
  209. LDA #$00
    # }4 y  C$ Z) I+ z5 q5 q0 \
  210. STA $BC
    : d( J5 Q  u- Y" q9 F
  211. LDA #$60
    . F4 ^, f% Q. J  }! @
  212. STA $BD6 j" \6 K4 |7 u5 j2 B1 J

  213. 2 T) b( ?& G6 j  s' ^
  214. L1:                ; PPU复制
    $ ~$ W1 I& w- V% A  B0 V& K
  215. LDA $BB* X+ B0 K) q' ?
  216. CMP #$28
    1 K+ D: @; d; D
  217. BNE L2# L, L# K: F6 W( Q
  218. LDA $BA$ G1 @/ \  Z5 N* m
  219. CMP #$00
    $ X9 G8 V1 O* z4 s, O- f
  220. BEQ PROADPLA
    8 l$ F+ e- Q7 D  D- p
  221. 1 B. n; l2 Z# L' }% ~
  222. L2:1 W5 N1 h* Y) R# ?) t
  223. LDA $BB
    0 i5 D& t- U5 G& m0 G
  224. STA $2006
    & ]) q2 b  h/ R: c4 X, u# d) c
  225. LDA $BA
    3 d/ L7 D/ R' e; i& W6 P' l$ v( ]' Z
  226. STA $2006
    3 {8 V! r: Y( X- c8 e1 }
  227. $ v1 Q1 A1 O& d" J
  228. L3:
    ; ?& H' i* `0 w3 {' j4 F
  229. LDA $20070 t. k) ^4 o2 v' h5 A  a1 M
  230. LDA $2007
    * X* Q, J$ _6 m& r, {1 N
  231. STA ($BC),Y
    ) p3 D' B2 t7 S
  232. * I7 K: I% l  t% k! s/ p
  233. L4:6 U9 j0 f" r7 X" y  ^0 v
  234. LDA #$00
    7 @5 K: m3 k' r% G  R3 f! l
  235. STA $2000# ?& c" O4 V. t) F
  236. INX- O# Y- m# q9 G( G
  237. INC $BA
    , A5 S: R. \' Z7 Z' m, y9 f+ f" q
  238. INC $BC
      T! R8 S& P' h; Q3 `
  239. CPX #$00/ v% W% k+ p$ ~8 S% _" d; \
  240. BNE L1* J1 x( R# F/ @0 I5 }
  241. INC $BB* T8 G8 h! p: X, X  U
  242. INC $BD
    3 n4 c! m* m8 P; u
  243. JMP L1
    & G) K7 M" X: P, G& w& L. e
  244. 7 @' M* G/ e! M9 S2 [3 B0 n
  245. PROADPLA:                ;出栈
    ) K* j5 b$ C& G) O4 A4 y
  246. PLA
    0 q/ H! A$ a+ W8 K* ?( y* t
  247. STA $B88 ~$ a% W) b0 ~3 E( o
  248. PLA
    / q$ E3 B- n7 }7 K3 D9 M9 {
  249. STA $B9
    ( x4 S/ [9 h# j
  250. PLA
    . Z$ u9 n6 y0 p" v2 w
  251. STA $BA; X3 G$ ^9 ^* m5 X: j: s
  252. PLA: s' k5 t2 O" k8 H9 X
  253. STA $BB( k# J; T3 y7 H
  254. PLA
    6 W/ |3 T# }& {  Y/ t' v  x
  255. STA $BC% v8 L! @3 J: t( |( e0 L
  256. PLA4 v8 i% U0 n( E! B; g6 g
  257. STA $BD6 U7 B: s* Q) L; Z' c1 I
  258. CPRE:- ?5 p$ A. {: a0 [
  259. RTS5 |; ~$ e$ F1 e

  260. $ e1 y) I2 J" X- t
  261. CLEANA:                ; PPU清空
    1 ], {: }3 p' \$ i0 J" H/ t* C
  262. LDA $BD( Z$ E) T2 J' b9 O, a
  263. PHA- }: a( c! ?. s1 w
  264. LDA $BC
    2 z4 @2 p- ^+ E" M3 g8 j
  265. PHA
    4 N6 h0 \8 f6 t  O0 B% r
  266. LDA $BB
    $ p/ I, p( q- Q: K9 J, j6 l, R, O! }
  267. PHA" r# E# q6 f1 a/ _1 Q! v/ M
  268. LDA $BA
    . }: D0 m& D" F  ]1 P7 a* b( Q
  269. PHA1 p2 ^! X; z" u4 X2 }. [
  270. LDA $B9
    % T& ~4 a- p+ Q! j: H8 Q" n
  271. PHA( }" W6 ^7 C$ h0 c$ k4 D  Q% l
  272. LDA $B8
    : L# y, Y+ L$ c" R" J5 B- X$ ?
  273. PHA$ D  d6 \! _8 ^5 L7 J
  274. LDA #$00
    , L) p0 y: J6 W2 D
  275. STA $B8' D+ ?/ x0 @" |, T$ _
  276. STA $B9& X. R- d& u0 g
  277. STA $BA2 F: k, H' u; d4 t4 n
  278. STA $BB
    ! O0 |" F, c' ]
  279. STA $BC0 w9 L' u4 N  A6 \7 [( n5 L
  280. STA $BD
    ) G2 ]5 S3 b1 M, n* ?9 n) y
  281. STA $2001- K3 q$ \: n, t& z2 D
  282. LDX #$008 V* q7 Q9 B. F3 [4 ]- E
  283. LDY #$00
    / `* d) U1 S( @" t" |0 [
  284. LDA #$001 F$ @5 i! m  a$ F
  285. STA $BA& i' e5 I+ Y- W: c2 u5 R% s
  286. LDA #$20, o/ I: a; n: ~/ L5 J) k& V
  287. STA $BB
    # o5 R% ]8 s0 m$ r

  288. - Q* C3 }/ \! @( ~
  289. CL1:
    ) Y" i/ A! N  d, I1 r9 [2 G
  290. LDA $BB) n% v/ ]/ v9 A9 C- L: |
  291. CMP #$28: _+ u1 S7 p. {
  292. BNE CL2
      Z! r6 i' h: D1 i3 F/ Z1 \2 S
  293. LDA $BA
      t4 N2 Z* V" A8 b. K, V1 |, i! C
  294. CMP #$00
    * ]( c/ ^" o! [3 z6 v; d4 w% q
  295. BEQ FREEWRIYE* o( q  V& y: ^1 w1 u

  296. 0 ?! ^- Q6 M# X* s
  297. CL2:
    1 o4 o8 C4 Z6 @% [4 N. U, k7 o9 P1 d
  298. LDA $BB
    + c& W4 X% p) \  ^
  299. STA $2006  b6 r2 _1 v9 K+ m
  300. LDA $BA* Q: K4 _. I9 n2 L* O2 G3 R6 j
  301. STA $2006
    9 f7 ~3 R1 o' ^& R% `7 K2 N
  302. : J9 t4 Q: Q+ d/ k
  303. CL3:
    6 u* Q; V9 O& s
  304. LDA #$00$ T7 E( z. x6 m- w8 e2 R! T- x
  305. STA $2007
    ' c! t7 S4 r& r4 W( y9 A

  306. ( |4 a" J8 j/ J; \' x
  307. CL4:
    ' Z: |( {2 @+ ?
  308. LDA #$00
    - l7 k. L. F1 {2 Z" D% n/ I7 B
  309. STA $2000
    . e+ p( I1 M$ |- f" C
  310. INX( f, a$ v4 I8 R
  311. INC $BA+ Q+ d8 |0 ^( p/ R# `' ~$ J
  312. CPX #$00/ x$ O( H) N$ w7 f. G( {8 x" c- m
  313. BNE CL1
    $ c1 k$ r% M: J; z8 F
  314. INC $BB6 G- {$ p" f% I7 N; e! r
  315. JMP CL1 % g( V+ K, c' Z' T1 `4 \/ L- w
  316. 0 b- m6 {# \1 T, I& Q$ T

  317. # z% u- I6 d7 q, Q; g8 T4 b
  318. FREEWRIYE:) z1 y( e  t& D6 F, @$ r9 O

  319. 0 ^" J( B3 x) _# X; i& C
  320. NOP, k2 D, {; x) G. w, t' y

  321. . z4 Z5 B+ U+ x7 g6 o1 g
  322. ( C1 u6 I$ @0 @5 ^* j9 [/ [

  323. / ~+ }! A* {. M5 h. ]

  324. ! h- e1 u- r6 O3 Q: h

  325. 1 O) p2 k8 k0 l( S4 i5 g
  326. CLEANF:                ; 恢复现场
    + V2 H9 N2 K- W; P4 v
  327. : ]+ c7 a$ w9 q) e
  328. PLA: ]! H1 U9 I  o
  329. STA $B86 }! ^3 @- o$ x6 w* d' x
  330. PLA
    , G2 C+ k8 ?& P5 f  M$ R9 X
  331. STA $B93 `" x1 o% X) C) w3 t
  332. PLA
      W0 k' r, G6 _9 T
  333. STA $BA
    & ]: d& q2 M" H3 O) O; O+ k
  334. PLA
    $ ~( w1 |7 Z9 Y# {2 O8 C+ G
  335. STA $BB3 }1 D. ^3 |/ ^
  336. PLA
    5 @- s8 w& r6 j! q
  337. STA $BC5 K2 P2 k/ [( v; Y" t
  338. PLA7 Z6 o# Q# G9 i0 d4 _
  339. STA $BD
    9 z% i! r8 K0 `4 z! t
  340. CLRF:' t% `. @- D" Z
  341. JSR FREE_PPU
    4 W, I; `" p7 }0 E% ~
  342. RTS. O3 P8 Q, E" i8 c8 ~3 R
  343. 9 Q6 ~% s0 l6 b8 n& o6 x( V
  344. - @  ?# G* Y& }" c
  345. PPUWRITE:    ;PPU写回
    3 k6 D& Y, Y+ E
  346. PLA' f! H  Z8 w  ?1 Q* o
  347. TAY. k; l, Q1 d4 d
  348. PLA
    2 {( s/ ~1 g7 [3 c. F" J: [
  349. TAX
    / t& i3 t" X: w. O8 v; x
  350. PLA
    2 \( m7 `4 U7 k: t! X+ @. M
  351. LDA $25
    3 y, B$ t0 w' g4 m& g2 j4 y* G' d
  352. CMP #$00
    4 D  U' [2 d9 Y3 V1 b9 T
  353. BEQ WP1
    3 [; q- x5 c" M3 T8 J: X
  354. LDA $25
    % T2 g3 h( W1 X; b9 Z- D
  355. CMP #$01, |! V, h5 |$ e5 b5 l, H/ Y
  356. BNE WRE
    % f; O# w. P  A: X/ M2 ]9 V
  357. LDA $F5,X
    ) }) c% c; p1 Q$ N$ v: F
  358. AND #$EF/ D) N: |" m/ y5 c
  359. BEQ WRE
    ! J3 p% o# `/ ~% `0 a5 R
  360. LDA #$00
    4 q6 t* Y( S( p( V* z
  361. STA $7FA0
    # Y6 {' F; H3 s9 @( S, h; w/ h
  362. + {( {+ O+ J# S' G, J" \' [
  363. WRE:* O% ~$ \" e. S3 I, k2 p) H& f- T
  364. RTS" e9 W, h2 ~7 C# _' |# T5 x

  365. 7 Q: ]$ R6 w4 N$ o; e7 }& _
  366. WP1:2 k( G' U* p9 @) j/ k% j. E* ]' [& r
  367. LDA $7FFF. m& W0 ~: Q& p0 f
  368. CMP #$FF2 f; |. ~. Q! z! g
  369. BNE WRE
    ) x3 P. |& J3 L
  370. LDA #$00
    + }9 f* l+ ^  K+ v  Y
  371. STA $2001
    ' D, n* o- A  N! j# U! x! U
  372. LDA $BD/ F1 m$ j+ j3 n# F
  373. PHA, R5 x8 t& J! Y0 [. T
  374. LDA $BC
      `6 f1 _# Z' i8 g- k. l
  375. PHA
    2 R9 J4 m! |4 [) \) T
  376. LDA $BB2 W+ g+ J7 @% D
  377. PHA% H3 n: C! s' _: W
  378. LDA $BA$ v4 z3 q' [, i/ n0 ?1 X! a( l
  379. PHA0 z7 L6 ?. f1 m
  380. LDA $B9+ e8 j' M9 y7 F; w- r
  381. PHA6 h; \* A' j0 s5 i5 W- w
  382. LDA $B87 n* k. `' ?& z' H1 T2 O0 a
  383. PHA
    $ S' Z" Z6 ~! r
  384. LDA #$00/ @0 |8 I1 i7 P( Q5 {8 z
  385. STA $B8
    . s" I& _& N- C4 Q0 C& P7 z
  386. STA $B9
    ; H* {5 r1 ^- C8 s) m+ J5 @
  387. STA $BA
    % N/ Z  `2 H8 _% K
  388. STA $BB4 w/ A( b* f) w9 D& R% m. B
  389. STA $BC
    4 `" ~6 |" K6 N4 t
  390. STA $BD" L) M# ?5 H1 `* O# J! q4 e% g" ^/ K
  391. LDA #$00
    0 a$ a& t- _" h
  392. STA $7FFF  Z! C* R! o( _7 S# }2 D1 \

  393. . U1 q; _, O! n+ n
  394. WL0:# {; m; O! ]9 ^* V( H. W
  395. LDX #$00* ^/ h% p, H( e. V
  396. LDY #$00
    * t/ Q- e' d& j( c2 A' t4 M8 F# L
  397. LDA #$00
    $ ~3 D3 S1 V! ?: k$ j
  398. STA $BA& x6 v  u; a2 T1 l
  399. LDA #$204 m1 W) p6 Z3 f* x6 k- k
  400. STA $BB. x5 x9 q, D$ I3 m$ z+ j1 y
  401. LDA #$00
    9 @  B9 R9 O3 _1 S
  402. STA $BC0 a2 ~! Y/ P& t3 f( W; C' m& U" o
  403. LDA #$603 c  I! u6 \$ r% P# U. A( P
  404. STA $BD
    - I( [3 O+ G6 X+ |$ o- K" S: D0 j2 K4 A

  405. ! Y+ e' l- W6 y, Y4 I( u! b$ q
  406. WL1:
    9 `. h8 p3 S5 N7 A) B
  407. LDA $BD& h+ b4 n1 s7 m  N% h* n
  408. CMP #$68
    / A' A/ a4 |: x' d! o% k5 c2 E7 W
  409. BNE WL2
    % b$ E  z0 ~  k# J' K( X% y
  410. LDA $BC
    3 K9 r) G2 i1 N/ x8 Z1 [, p
  411. CMP #$00
    7 d* u( i3 H) V7 X3 V
  412. BEQ WLR
    ) |; t/ l5 o/ v8 F6 Y& T
  413. 9 F$ X3 m5 x* X7 c
  414. WL2:
    9 D& k; V: k. P- R: K4 L! k
  415. LDA $BD
    $ ~& h: W$ O0 n1 \5 ]- l
  416. STA $2006' s3 s$ {8 @+ }* w7 t; R( L
  417. LDA $BC
    9 F- o: ]$ T/ T7 r1 u; W0 B6 L) p7 a
  418. STA $2006
    9 {2 r" {/ `( R& ?  Y3 n' a: ?
  419. - @, d; o+ d3 {/ _8 w: k4 ?) @: W0 {
  420. WL3:
    ' L- Q! N) D; l- K
  421. LDA ($BC),Y; E( v+ I) c5 Y+ e$ ?7 M6 M
  422. STA $2007
    + I& J0 f) S! \3 J2 I/ G
  423. - p) A. V# @6 o; Q& W' k2 |
  424. WL4:( j9 u) o0 i9 l, ~' E( s0 p
  425. LDA #$00
    & j5 e0 C; h9 n
  426. STA $2000
    6 ]7 A1 J. C  z* F4 Z- H9 r8 _
  427. INX' J: N) e7 X8 G- z1 {- d( k( S
  428. INC $BA
    $ n5 {  X; ]& p# Q7 A
  429. INC $BC0 n' q  d1 q2 C: r; U
  430. CPX #$00# C8 {# P: ]) V# H
  431. BNE WL12 L: ^$ t3 S0 [( A4 [% X
  432. INC $BB+ O% s; |2 g5 z9 C# H) j2 m; {& G
  433. INC $BD! E3 T& f# t( J4 z+ P: m1 f
  434. JMP WL1
    ( S+ S: K0 X3 N8 U

  435. / |2 i: o2 m  _0 b5 z2 S5 r. C  @
  436. WLR:
    0 J" s6 Y3 y' f  P. H
  437. LDX #$00
    ; L, t. F5 q& A
  438. COPY_7F00_7F3F:& _* E; ?4 `/ r, k
  439. LDA $7F00,X
    # @7 }$ c+ K3 {
  440. STA $07C0,X( W% u+ W+ h0 X! |0 ?
  441. INX& r0 D, V" q) C7 S$ `
  442. CPX #$405 A  H9 K1 t4 o- B$ v  v4 o' K7 K
  443. BCC COPY_7F00_7F3F+ I& H, `2 `- u, @) X

  444. 6 ^# l  e! k9 O
  445. LDX #$006 T' q0 @' K+ w& |6 ]
  446. LDA #$3F
    ! @% O' c5 X  @( O/ M- s
  447. STA $2006# j2 ]% M* g8 T, @! W+ M
  448. LDA #$00
    ; b# l& ?" F+ ]4 g) j3 |1 G- V
  449. STA $2006
    % y& D+ h" N- V* O2 T
  450. COPY_7F00_7F10:( q' }4 B1 q9 _3 U2 r+ d- |# G  P
  451. LDA $7C0,X; n1 f1 t- X6 t, y
  452. STA $2007
    . E5 [$ \9 |0 A& x% ^% I2 j
  453. INX+ Z  M0 j7 m+ m
  454. CPX #$10) F% ?5 g0 A- p0 z8 o
  455. BCC COPY_7F00_7F10" D- g8 z' P! ^+ G- |
  456. 0 y/ I) j4 F/ ]1 r
  457. LDA $2002
    0 `* p- Q8 n9 d8 q; l8 R; w5 v
  458. LDA $FD9 D% w* w% M# N/ C2 o8 [
  459. STA $2005
    ' m( ]  z* H5 \& }3 u; e
  460. LDA $FC
    ! c. }. n3 i( N9 `& a8 _* H
  461. STA $2005
    $ w8 }7 \4 Z( `. ?" D

  462.   `( @1 k0 |* L* ]$ v$ c1 m: F
  463. LDA $7F50
    . r* X0 t5 t- |! n* R" C
  464. STA $FE4 T5 L7 I. G  l6 }% {
  465. LDA #$00! y3 c" I' A! ]* n3 W  j; O. l& R* h
  466. STA $2000
    : J6 s2 S: d3 Q& q) Z* }' B7 V
  467. PLA
      U# q' q3 O; }4 u: ]
  468. STA $B8% N* Y2 S* E3 j/ A
  469. PLA% f7 w& D$ Y5 \. R8 w- {7 v
  470. STA $B9- ]3 }4 p9 ~# t7 t
  471. PLA$ w) P- d) ?0 _2 m2 P
  472. STA $BA+ j" P+ p1 W. V8 \: R
  473. PLA
    ) E6 V9 [3 Z9 N/ b& `# r) y
  474. STA $BB
    ; F# x. s; H! f* r
  475. PLA
    / K% M2 }/ d0 g1 B& _0 o
  476. STA $BC
    0 i0 |7 z* o0 ^/ w
  477. PLA
    $ q# a! r2 {6 R4 ^" U6 H! l
  478. STA $BD
    ( W5 c! C1 i; y( b+ W; Z4 F& I

  479. 4 e9 O6 F7 N/ z$ W$ G2 Y
  480. RTS/ }2 M. ?' q; @$ L: y
  481. * O% O! Z4 `1 ^
  482. PPU_CMP:( `$ a/ q1 I2 Z2 R; ?- n
  483. # C% j9 i7 M$ W

  484. 0 h1 k/ V( {: v9 k; }
  485. PPURE:* ~5 L0 T# V6 q) P
  486. RTS
    - e2 r8 B: b+ R' u1 }+ X1 A, X, r% h) ~

  487. % c, u4 `  u5 X, m9 o1 [

  488. # i( Y4 u! s$ V6 l
  489. FREE_PPU:* Y0 ]+ `: ^0 j' @

  490. 2 {# Y5 B2 Q: M1 s) x  w
  491. JSR TEXT01_PPU5 s0 k9 L0 ^5 M* s3 ^9 W
  492. JSR $CBC0
    * C, o) [# H. D+ ^% i
  493. JSR P1_PPU/ N2 y% z5 f0 F; ^2 Z% m
  494. JSR P2_PPU
    3 _( g( t) R0 Z6 o; N  `# h, I
  495. RTS2 O6 j  B) q- [# [3 Q1 R3 b6 w+ h

  496. ; @1 H9 {7 L1 ^* i
  497. TEXT01_ADDR:9 t8 p9 N/ W! K& t1 C
  498. .BYTE $20,$421 U* p1 J0 B' q3 A3 z$ F
  499. TEXT01_DATA:
    + v4 A& G! b! [6 z9 p. `
  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; i7 F0 c9 \% ^2 o3 G- Y, I. I1 f# {
  501. TEXT01_PPU
    ; g* [! O: o7 j% Y0 K
  502. LDX #$00
    2 c" n! }# C. }) {1 u2 }3 Y
  503. LDA TEXT01_ADDR
    5 `8 V& p  @  m+ K* O7 X
  504. STA $0703
      G6 [- h6 p! c2 T  E
  505. INX
    $ {- V5 t1 N, g9 Y$ d
  506. LDA TEXT01_ADDR,X
    " l& k0 ?* K/ I# h
  507. STA $0704! K0 g3 H. t, R& L( Z; F5 a
  508. JSR PPU_PROCESS
    ( Z3 ]- W! F- Z6 k
  509. TEXT01_W:/ a+ [+ P# _3 k" l
  510. LDA TEXT01_DATA,X% w& a5 R/ S# r9 @( {$ i
  511. CMP #CEND
    % v. x! h1 A. F8 E3 c6 U+ }
  512. BEQ TEXT01_START, I' M( S: Y, L! k
  513. STA $0705,X
    $ f/ N8 |( I/ q
  514. INX
    * v9 h. \& _9 c) }  t3 d! a
  515. LDA #$00
    & V, y& C& @6 V
  516. BEQ TEXT01_W- M$ w! Z4 s& a2 B& s
  517. TEXT01_START:0 N! ]7 B( R& }0 t6 C3 z* i
  518. JSR PPU_START  z9 v( k% V/ ~1 H4 T* S' a
  519. RTS
    ' B" V' f- n' J9 w% v' \+ G2 R& A: T

  520. 9 C3 a  ?, p% a2 f' J

  521. % E) A  j/ X9 p+ Z% k  ]
  522. COLOR_DATA:1 u/ @$ \) |- W! b- r* `' s
  523. .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28
      u, W5 s+ R  I7 b! [7 X# P

  524. . L4 e% c! M. ~" p1 q0 _' @
  525. P1_PPU:
    ( ]" p0 K% S1 V
  526. JSR PLAYER_01_PPU' v+ V: a) ]3 D& s2 ]
  527. JSR $CBC0: F, }) y( [& x0 C+ |2 r* H& R. o5 Q
  528. JSR RELIFE_P1_PPU+ q1 G3 o8 u8 i/ [
  529. JSR $CBC0* p4 S3 w/ _# q9 S% b; p  W7 b; b, w' N
  530. JSR RELIFE_NUMBER_P1_PPU
    * [5 N, |2 U- d8 r+ x7 V
  531. JSR $CBC03 }9 j( M5 P9 Z$ [! E# a  S
  532. JSR WEAPON_P1_PPU
    6 _% V; ?3 Z" K7 M  @9 P6 ]+ I
  533. JSR $CBC0
    ) \% u( ?( Y2 u& h7 v4 d
  534. JSR BULLETPPU_P1_PPU, {. y' I1 m$ o  K- _
  535. JSR $CBC02 t% F' P$ [' j7 P* p9 C" e0 k) J
  536. RTS
    " ?; j: H  B5 ?: D# _
  537. % P. G3 s) k* x* _; Q6 P
  538. P2_PPU:0 p* z: _2 r( B% u! Z: e6 R0 _
  539. JSR PLAYER_02_PPU% J) s5 y; T) Z9 j% m6 t& j
  540. JSR $CBC0
    / b- k6 S0 x+ u
  541. JSR RELIFE_P2_PPU4 S- e. N# P0 H
  542. JSR $CBC02 b, n/ E0 L) J8 U  V$ Q3 H
  543. JSR RELIFE_NUMBER_P2_PPU7 Y' N7 ]3 i; |3 E& |
  544. JSR $CBC0
    3 ]  d' p  l, a7 \; B0 x
  545. JSR WEAPON_P2_PPU* o( o- I0 m! `& P- R9 J& y& i
  546. JSR $CBC0
    & C% W( H' ?* R, z) S4 L
  547. JSR BULLETPPU_P2_PPU
    9 c. O% |1 I: h# L
  548. JSR $CBC0% w" Z- [( G: c9 `" p
  549. RTS4 p% [0 ~6 o- q5 D7 p

  550. ' ]* x/ X- L2 M# O# Y

  551. 8 q# w& e, I. h( r+ }- e3 B1 y# M
  552. . v( p; `# g. R6 F
  553. PLAYER_01_ADDR:, e  c9 m3 S5 D! d/ V/ O! a" ^
  554. .BYTE $20,$A3
    5 f9 }" X7 |- ?: l
  555. PLAYER_01_DATA:; \% W) M; b5 E% U
  556. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND8 r/ i7 j( t* o
  557. PLAYER_01_PPU:$ K: `& R; R! ~) @5 j
  558. LDX #$00
    . V7 v! X+ v* f; w3 o) h# E
  559. LDA PLAYER_01_ADDR: R1 K  O! r- |
  560. STA $0703
    7 O) B5 A  M3 S, {% `# I# S
  561. INX0 Y- M4 Z# ~( m# a
  562. LDA PLAYER_01_ADDR,X! m6 i: g9 x" `6 a
  563. STA $0704
    9 {9 o4 b) H  a% x
  564. JSR PPU_PROCESS* U1 w1 c$ g/ c* n; o
  565. PLAYER_01_W:& B  q: k7 ]$ k8 B- z! S% F% |* G4 T
  566. LDA PLAYER_01_DATA,X& `/ G. f7 w) l" Z/ [+ ~
  567. CMP #CEND1 Y1 w8 r) f0 t+ c9 q" ]
  568. BEQ PLAYER_01_START( @- t* u% M/ C# i
  569. STA $0705,X
    : Q9 K0 \9 {2 \# B, O
  570. INX+ r( @2 g* B+ V2 p" e9 \) v
  571. LDA #$00( u/ S( ^! ]1 U( Q, s
  572. BEQ PLAYER_01_W+ x+ J9 H2 |/ M! p8 X2 v
  573. PLAYER_01_START:* m7 M7 U% A! U/ f% V: p3 G
  574. JSR PPU_START
    ) D. P/ e  w; g$ o
  575. RTS. Q  _/ @8 b  }( }

  576. 0 f2 G* P& L; i: F% g

  577. ) S+ Z5 J6 I. R
  578. RELIFE_P1_ADDR:
    + F/ @# ]- `7 s/ k' p9 S
  579. .BYTE $20,$E3$ c" x3 n7 P. y" p
  580. RELIFE_P1_DATA:
    0 v$ K0 u5 S8 P# O' q+ ?
  581. .BYTE CR,CE,CL,CI,CF,CE,CEND7 S6 n7 ?, B) f3 T5 ?
  582. RELIFE_P1_PPU:
    ' R7 N2 I0 z% m
  583. LDX #$002 X, M2 m8 O% l5 u" m8 m
  584. LDA RELIFE_P1_ADDR
    + V' j. v2 _+ Q+ j
  585. STA $0703
    # I- W6 I0 S1 H$ i$ I
  586. INX
    ' y  K' I; R9 U7 ^2 C4 |. G
  587. LDA RELIFE_P1_ADDR,X
    9 N  A- L, |6 S  m' l
  588. STA $0704
    " S' V% b/ p* I( f/ @, u9 t1 Y
  589. JSR PPU_PROCESS' L# ^1 e! f: H) e, q  B& v
  590. RELIFE_P1_W:; |# @" N+ k; j6 J
  591. LDA RELIFE_P1_DATA,X4 v0 S  {* z3 p" p: A4 H+ r# _
  592. CMP #CEND! g- l0 i4 c) F+ e2 B% D4 G
  593. BEQ RELIFE_P1_START
    - {4 i0 i+ t% Z
  594. STA $0705,X. P" c: X: y2 |4 J/ Z. |
  595. INX
    7 O6 T; e! k" Y4 j# j% ^
  596. LDA #$00# L: m0 N1 [# I: K
  597. BEQ RELIFE_P1_W
    % s& \5 l/ h& Y+ }
  598. RELIFE_P1_START:0 i. ~( L) Y: a0 ~1 H0 Z- A8 @
  599. JSR PPU_START
    ) j) i1 i  S* F+ i8 Y1 _
  600. RTS
    7 ^" W( ]! Q) I2 _/ L
  601. / \% P- b0 y% r! q; L) K
  602. 8 Z. ?; N  L: A$ L" f/ |2 I6 ~; O
  603. RELIFE_NUMBER_P1_ADDR:3 M7 i4 G+ Q1 H* E3 v
  604. .BYTE $20,$EA
    ! B! b  B4 x" W- q
  605. RELIFE_NUMBER_P1_PPU:) I) [. o1 Q$ C9 ~
  606. LDX #$00# B' \# |, }7 [8 A) V3 ]7 s4 s
  607. LDA RELIFE_NUMBER_P1_ADDR! c' p2 e3 t1 b7 ^& F, S# n2 t
  608. STA $0703
    . l) Y2 M" J; E. [8 m: K5 Y) c7 v
  609. INX
    , Z8 v9 e+ l, Q6 o
  610. LDA RELIFE_NUMBER_P1_ADDR,X. R2 P1 m1 H0 N' t( q$ Z" Q
  611. STA $07041 Y. ^4 y# i0 A/ g- m; Z6 {
  612. JSR PPU_PROCESS
    # R6 [' B3 @& R3 j; y
  613. LDA $32- ~% l  u" s, i
  614. JSR LIFETODEC
    % e! }' F5 v. v% G& V
  615. RELIFE_NUMBER_P1_W:" v% g8 _1 p: S0 B
  616. LDA $7A03: ^: w: n9 D8 R6 d3 ^. Z, X
  617. STA $07058 t' J) Z4 B, [' M! \5 o
  618. INC $0705) Y9 a3 J. a$ \
  619. LDA $7A04
    " [4 w+ A2 q( i3 M
  620. STA $0706
    $ C% j4 Z6 \$ p7 |% V2 {+ w: q
  621. INC $07069 t# }& R& }6 G: U# X" J
  622. LDA $7A05
      j  k: |7 [4 u  i% j( [
  623. STA $0707
    3 ~2 |5 r; l- [
  624. INC $0707
    ' o! e. e, Q$ b. e* ]
  625. LDX #$03
    3 F5 _$ [  A" K% n% q8 Q  P
  626. RELIFE_NUMBER_P1_START:
    * l9 r. G1 |2 u: L
  627. JSR PPU_START
    % s4 W; U% A2 B* D8 p$ V
  628. RTS
    2 c. T+ \  c$ [- ?" c4 g8 |7 T
  629. 1 Q% o. ]8 r" x* m* \4 ]' Q) c
  630. WEAPON_P1_ADDR:
    & w3 c, G# k* Y3 o6 d) r
  631. .BYTE $21,$23/ w$ w$ H+ a1 D# Q* F* e3 e
  632. WEAPON_P1_DATA:# Q0 P9 T. h; [
  633. .BYTE CW,CE,CA,CP,CO,CN,CEND% ^$ r1 w6 C" l: z. G* o1 {0 B" {" ?
  634. WEAPON_P1_PPU:  ?+ D" x+ ], C. f  _6 W
  635. LDX #$00
    9 e+ ^/ P2 T8 E2 j& t  Z! C
  636. LDA WEAPON_P1_ADDR1 n* W& s( k7 a# a
  637. STA $0703
    # A7 r' k, I" v+ \
  638. INX
    3 Y, e% g9 b. q8 \
  639. LDA WEAPON_P1_ADDR,X
      y% D8 ]( B: p7 S! n
  640. STA $07041 E6 `" ~) h, Y' r* |. P- I
  641. JSR PPU_PROCESS
    $ O9 D' S& V; U( d
  642. WEAPON_P1_W:
    / g1 u) s* w2 ?" Q9 L: N4 d/ z
  643. LDA WEAPON_P1_DATA,X
    2 J# N  O9 Z$ G1 Z. U8 T1 W( T
  644. CMP #CEND
    2 U& l+ K2 y5 n5 C) U" o
  645. BEQ WEAPON_P1_START; B% \6 H; }! T5 q
  646. STA $0705,X5 E' `5 w, s9 P  D' ~. Z; a3 ^; w
  647. INX& T+ G8 T$ T- X
  648. LDA #$00+ z& d2 `3 G' r6 L* }) B+ Q
  649. BEQ WEAPON_P1_W
    9 U1 E! g3 Z9 {- D! r6 D3 s
  650. WEAPON_P1_START:
    $ F9 k' t+ J, n" [# v* z
  651. JSR PPU_START" S' F( T, q% k/ h" Q; O! o! z, K! H
  652. RTS' B+ Z, y5 B/ K0 r& F) @) x  C
  653. + O2 L7 X6 K8 U( N0 S* b' M4 o
  654. BULLET_P1_ADDR:5 z7 A( z) L1 x3 ], j
  655. .BYTE $21,$2A
    # k8 v2 J: }# n$ ~2 S! E1 l% w- `
  656. BULLET_P1_DATA:7 f0 O; m& I$ D4 l
  657. .BYTE $00,$01,$02,$03,$04
    " f% l1 S7 `8 {# X: M/ t8 b$ j
  658. BULLET_P1_NAME:: \3 t* t# p/ ?1 ^7 C% V7 V
  659. .BYTE CN,CM,CF,CS,CL
    + o9 j2 l& _# n0 G

  660. 1 E8 a! e- s: k2 |' @5 W% k6 L& o
  661. BULLETPPU_P1_PPU:5 P" U) C4 n9 B* Z& p
  662. LDX #$00: o" E: A% T, w5 i0 x0 [/ E
  663. LDA BULLET_P1_ADDR1 H! \* v  b/ o
  664. STA $0703( g6 b4 B4 @) \9 [9 |
  665. INX
    1 I. }. [) @2 j, y- I* W
  666. LDA BULLET_P1_ADDR,X
    1 h" X& i' A9 ^+ I& Q
  667. STA $0704& q+ L( K) }# R! u6 [$ [  l3 M# B
  668. JSR PPU_PROCESS5 q1 h1 W- o9 w
  669. BULLET_P1_WRITE:' _3 k, ^- q* U! a
  670. LDX #$00
    " r- X" {1 L0 m$ e, h! i/ {
  671. LDA $AA! m. d( s: P  b: h% ~8 L
  672. AND #$10' g/ z  ~( t" `8 {
  673. BEQ C_BULLET_P1
    6 b# T2 M4 a1 d- q: x
  674. LDA #CS4 G: P; V+ i* s9 f% X6 `, s; v
  675. STA $0705
    # }, S: c8 N1 c) Z$ N  C
  676. BNE B_NAME_P1
    2 k" t5 ^$ G( K# i+ N
  677. C_BULLET_P1:% w, Z8 e! x1 M: m; @$ ?# M& n
  678. LDA #CC
    . n. P: \' n0 r9 ^
  679. STA $0705% {8 d& ^+ J; a
  680. B_NAME_P1:% ?% m# n1 S8 v* W2 w# a
  681. LDA $AA
    6 g( b% q; G) v  O$ f* V
  682. AND #$0F
    , b9 S- X" U- N& ]: h/ K: x/ S4 J
  683. CMP BULLET_P1_DATA,X
    0 j" Y7 A9 @, B" i. a. x
  684. BNE B_NAME_P1_RECMP+ {% q9 ^) m. y% ]' n" S7 F
  685. LDA BULLET_P1_NAME,X) F. h1 G5 X( m9 ^6 r
  686. STA $0706! m/ [& g9 `. O8 V* d, x
  687. B_NAME_P1_RECMP  \+ @2 P- ~! Q( W* Z
  688. INX
    2 K. h: z1 u* o# F' A- t9 N. N
  689. CPX #$05  R8 j% z8 V! D7 W: S
  690. BCC B_NAME_P1
    ) ^/ E# A9 q" X4 u
  691. LDX #$02
    9 {  Y% i) o0 A
  692. JSR PPU_START5 z) a1 E% }( {5 {2 K  a
  693. RTS
    6 Y5 S3 c+ p) S( }

  694. ! p& ?9 n* d/ f2 T$ s
  695. 4 X+ ]$ c' I9 Z& E2 V
  696. PLAYER_02_ADDR:  z  J+ b3 K4 c& k2 v; N
  697. .BYTE $20,$B3
    , O3 B; T& ^, D
  698. PLAYER_02_DATA:
    3 N/ \4 S) O  k' l3 t/ a( U
  699. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND8 Q+ ~6 f1 Z9 _2 A
  700. PLAYER_02_PPU:
      Z1 G3 y4 b5 I* Z
  701. LDX #$00
    / k% E! s* m/ Q- D) U5 N
  702. LDA PLAYER_02_ADDR) _$ n: U0 W' B7 K6 L
  703. STA $0703
    $ H; `6 W: C; v  L% |
  704. INX
    ; {0 R7 U6 z5 m6 T5 h$ N& z
  705. LDA PLAYER_02_ADDR,X
    , V; l. G6 E7 V6 Y6 j' a' G
  706. STA $0704; ^! Y( p/ N( D" s# ^
  707. JSR PPU_PROCESS0 l; t) @4 S$ F2 I9 j
  708. PLAYER_02_W:- t& g; d$ ?+ C, `/ @/ P( Y- S
  709. LDA PLAYER_02_DATA,X
    $ r' N: [" ~( v
  710. CMP #CEND) c" D* s$ Z# ^% L( F
  711. BEQ PLAYER_02_START
    # N0 y# x, Y& @4 j! L$ u$ a9 K
  712. STA $0705,X
    7 v7 u3 L2 ]5 g5 r
  713. INX
    ( Q2 h# _+ f8 J/ Q2 Q4 G. \
  714. LDA #$00- {- |5 D% O; v3 s
  715. BEQ PLAYER_02_W' Y; s1 P+ s; ?5 [8 s
  716. PLAYER_02_START:$ s! n) `% H4 F
  717. JSR PPU_START
    . O) D) ?7 Z5 A' a  ]- S
  718. RTS" K# t9 I# L0 P5 a" i& L8 m/ E+ D

  719. . c# Q( \/ d- t$ Z
  720. $ h6 t; k, E( K8 d  J
  721. RELIFE_P2_ADDR:
    # g* Y, X( {& Z! ]/ v* c" [2 g$ h
  722. .BYTE $20,$F3% N. N+ D8 _7 M! L) [
  723. RELIFE_P2_DATA:
    4 N/ F2 X( V6 w
  724. .BYTE CR,CE,CL,CI,CF,CE,CEND2 c* a0 m4 j! A( [+ y) R
  725. RELIFE_P2_PPU:
    / ]3 _0 e' R6 e2 v5 T5 t) I1 ^
  726. LDX #$00
    1 }" `  F0 H/ T1 b+ \, [# k# Z
  727. LDA RELIFE_P2_ADDR
    4 z4 @$ j4 S, P1 J1 d7 S  E# \" t
  728. STA $07036 w1 A0 r' o$ T  T
  729. INX
    1 q; g# d5 {- d5 g
  730. LDA RELIFE_P2_ADDR,X* c% p! x; b( Q3 v& r7 `6 V2 ]
  731. STA $0704
    ; P/ p1 Y0 ?# N
  732. JSR PPU_PROCESS, b- F4 D& X# Y, g: Y- U
  733. RELIFE_P2_W:6 Q2 s  t2 o: }+ {
  734. LDA RELIFE_P2_DATA,X# x+ m- ?9 `) a. y. r% x
  735. CMP #CEND4 @- I/ L; D( {& l) c/ x
  736. BEQ RELIFE_P2_START& E# N; e- X+ i. ^' D0 G) `
  737. STA $0705,X
    6 ^& E* Q0 j# g5 t8 X
  738. INX* F/ f: L- T) j. i( Y
  739. LDA #$00: P( M& H/ c/ q& S  a# ?0 I
  740. BEQ RELIFE_P2_W
    9 F  @  Z, F! d, e
  741. RELIFE_P2_START:
    2 T+ m* c, i$ c6 s
  742. JSR PPU_START& r; g% n) _9 k; h  z. t
  743. RTS' c" T# D2 @- e. B1 i! m' O( d
  744. 5 r% g: e9 ]) l, h& a' t0 r
  745. . Z5 C3 @# k% U* S4 J0 ]
  746. RELIFE_NUMBER_P2_ADDR:  d6 q: I- P/ \- `" q' `( F
  747. .BYTE $20,$FA' Q- t) h. p4 E0 ]+ @, M
  748. RELIFE_NUMBER_P2_PPU:
    ( ]% X6 L( K+ Z$ w4 V" Q& A3 R8 m( g7 K
  749. LDX #$004 Q3 k" ~0 p- F
  750. LDA RELIFE_NUMBER_P2_ADDR/ a2 Z9 `% }% K$ F% c
  751. STA $0703% c( S" u# a# H" w6 {
  752. INX
    / ~8 g5 P6 R& t, d/ A2 W
  753. LDA RELIFE_NUMBER_P2_ADDR,X0 y, V9 w, H& z6 D
  754. STA $07049 X; |4 k. k7 C5 Y) i) S# j
  755. JSR PPU_PROCESS) u  L% S& d) t( G5 H- X5 W7 B
  756. LDA $33
    ! m( c6 |4 N5 g. X
  757. JSR LIFETODEC
    * j/ |! ?$ b+ J2 s. q2 p
  758. RELIFE_NUMBER_P2_W:
    % b3 W4 R1 K6 s" h3 s
  759. LDA $7A03
      i+ y. r% S9 ~  B1 R8 i1 g
  760. STA $0705
    " c7 D. |" V* a( U" U& m" |% T# p
  761. INC $0705
    4 e, L! \" E$ \5 Z) F
  762. LDA $7A04$ [! k& K5 e2 z: H" m
  763. STA $0706+ I7 }( X2 A, t9 `# z3 I$ d" z
  764. INC $0706, K4 m$ R: x' ]- C' H
  765. LDA $7A05
    4 ^& @# H, n  {, ]$ t
  766. STA $0707
    ; k" ~" w4 r6 H& s8 h: P1 L9 j- W
  767. INC $0707! g2 U% s& h/ v5 M/ M. z- V
  768. LDX #$037 \1 s0 ~$ \2 y+ @
  769. RELIFE_NUMBER_P2_START:
    + P# ^7 _" w1 E( ^
  770. JSR PPU_START. W0 i1 {! F/ Z4 [9 a
  771. RTS
    9 Q2 u" V/ K! u) M( ?+ w: c  T6 Q

  772. 0 g; p2 c) o- O& F: `+ }
  773. WEAPON_P2_ADDR:
    : S7 C; @- N- |# K% c) d
  774. .BYTE $21,$33
    7 O3 S& m4 E# K( M
  775. WEAPON_P2_DATA:# i- _8 L4 z2 b) D! D+ o
  776. .BYTE CW,CE,CA,CP,CO,CN,CEND
    , c* k6 {5 f  c2 K& w0 m
  777. WEAPON_P2_PPU:3 ?4 v( D9 M2 j
  778. LDX #$002 n1 p4 g' s9 x, A: L0 ]
  779. LDA WEAPON_P2_ADDR
    # {% L% L9 l9 z: X) i9 |
  780. STA $0703% R* _& k7 @+ I: e7 t  K5 S$ t
  781. INX
    + P  u+ @. {1 k& D# c7 C
  782. LDA WEAPON_P2_ADDR,X. w% |6 W) H6 n
  783. STA $0704. Q3 @& s6 ^. Q8 b) T
  784. JSR PPU_PROCESS! R( P- C+ f3 T! W) R' i
  785. WEAPON_P2_W:( P- I. E# }( U1 D4 t2 x" K
  786. LDA WEAPON_P2_DATA,X
    ( M% y. `. M6 V( V5 B& ]
  787. CMP #CEND
    : i* I/ `' C- h% b) [+ I- B5 C
  788. BEQ WEAPON_P2_START
    + G7 R# A+ O$ s5 h# K- m
  789. STA $0705,X
    4 ?; C+ w- l& L, N$ G6 h8 m! Q
  790. INX$ q& ?5 P) O4 u8 v* m
  791. LDA #$00* a% E' o5 ]9 y* y% {
  792. BEQ WEAPON_P2_W
    ) @' z- z* k4 Z2 V, V; l) L
  793. WEAPON_P2_START:
    , Q, z1 V* @) H$ R+ x0 o3 q1 O
  794. JSR PPU_START
    ' H3 [7 w& G7 D4 p* i6 n
  795. RTS
    % y! j3 {% j+ U* R

  796. % ]* E, O- ~: F, l+ f  H+ l
  797. BULLET_P2_ADDR:, i& \, q8 y' g+ q
  798. .BYTE $21,$3A3 ~- Y! D. T2 n, \; R
  799. BULLET_P2_DATA:" `6 R/ Y7 O) o" |- R$ q" J* }
  800. .BYTE $00,$01,$02,$03,$04' \$ j* X9 W$ A) e5 S  ?2 p6 b
  801. BULLET_P2_NAME:3 O$ w0 Q/ D6 b/ R5 f
  802. .BYTE CN,CM,CF,CS,CL( H/ ?- p. ?* V5 _

  803. # k: o; P# Y" A2 z, Q  E7 ^
  804. BULLETPPU_P2_PPU:5 r, J! E/ _9 a( a' Z
  805. LDX #$00$ v. K- O8 e4 q% [5 Z( D1 K
  806. LDA BULLET_P2_ADDR( W, }% a4 B) ^+ M- }
  807. STA $0703! w4 {* ], c2 G) J1 Z) l$ _4 i
  808. INX
    % ?) |+ T, i9 }+ q8 j
  809. LDA BULLET_P2_ADDR,X
    0 l& ~5 z5 `! S, g, |% }/ u
  810. STA $0704
    5 d. p$ ?4 T* K* @5 |) [- g
  811. JSR PPU_PROCESS, a- J. f( z7 f0 }4 W/ Q. c- Q' y
  812. BULLET_P2_WRITE:
    * X) x# j8 L- M9 I% t0 }
  813. LDX #$00
    : g0 L7 {+ g1 w1 K: N8 E, j9 E9 L
  814. LDA $AA5 ?1 b) A  Q: f- i+ i
  815. AND #$103 Q/ ~( W' J2 p$ k, u9 x
  816. BEQ C_BULLET_P2
    0 K3 m+ \5 j# ^- q& _0 ^: e: w
  817. LDA #CS  l" K1 \8 ^: P$ p) t: {+ i
  818. STA $0705+ V$ L0 l; n$ ~+ O0 }; `
  819. BNE B_NAME_P2
    $ z: }0 q. ~+ B6 F3 a) M% p
  820. C_BULLET_P2:9 f5 a" ]% w: U0 ^
  821. LDA #CC" c& S1 k! `5 E# i5 R3 v! K
  822. STA $0705
    ! D# q( d1 f9 m" Z  S
  823. B_NAME_P2:
    1 a  ^$ w7 F+ A
  824. LDA $AB
    ) X$ U+ f- X* I3 X' f3 @
  825. AND #$0F! M) f+ T" [8 q3 N9 p  _" H8 O
  826. CMP BULLET_P2_DATA,X3 a# j" T1 z! h
  827. BNE B_NAME_P2_RECMP
    0 _* _6 l3 H* Q3 b: D8 P+ |' `
  828. LDA BULLET_P2_NAME,X
    ! W; U& [7 i# s1 |( \1 H* o% d4 ^
  829. STA $0706
    ( z" I3 U' j- i2 R0 c
  830. B_NAME_P2_RECMP1 `& B/ a2 C( u
  831. INX
    ) W  u7 c* C) [( l0 `' `
  832. CPX #$05
    * `( h) I* v  v* T, P2 X# s
  833. BCC B_NAME_P2
    : ^1 w; J* n+ w5 u! Y0 A
  834. LDX #$023 G/ G# f3 o1 I$ W# Z& K( D; i
  835. JSR PPU_START
    7 ]. R4 `! x$ I5 |7 E' A. D! D( o
  836. RTS
    7 s, F% V5 O8 C/ B) o; V9 d

  837. : v  O/ m! a: s8 N
  838. 6 h' c2 z! ]8 Z# m0 _9 h+ \
  839. ) u+ i" a) M5 [' h0 [

  840. , L3 D0 ?1 D  z! T8 p, r, G/ v

  841. 9 ^" P, k$ C; r  X, }, H1 X+ k0 ^
  842. - a+ E" R# f1 N
  843. LIFETODEC:                ;十进制转换
    , x; ]( O, ~* ^2 J7 b% j7 J
  844. LIFEL1:        ;initialise
    7 c  ~3 w6 P  \  s& \- j) {8 |: r
  845. STA $7A00        ;$7A00=F30 b' C( e: P" f4 F
  846. LDA #$00  Y4 ^/ w$ }. B' ?' Q4 A
  847. STA $7A03        ;$7A03=007 b8 [9 H4 ^# B8 b! M% C
  848. STA $7A04        ;$7A04=006 v: h- ?) \0 U7 w  s
  849. STA $7A05        ;$7A05=00
    & `6 h8 ]+ s6 Y' n8 O& S/ }; j4 i1 z. M
  850. LIFEL2:        ;copy data $7A00 to 60011 l+ O% I5 c" X2 K9 I
  851. LDA $7A00
    6 I* }3 R2 O- n# Y" v5 |' u& u
  852. STA $7A01: `' ^6 a; a1 L+ _

  853. & F! L2 N7 I6 {/ v- ?
  854. LIFEL3:         ;hundred
    # v) x9 i5 ^) l
  855. LDA $7A01
    5 O# K* b1 b0 {7 o. ?
  856. CMP #$64/ Z2 r+ M, U% O
  857. BCC LIFEL6                ;$7A01<100 goto L6
    / s( B) G8 O: n% h6 x
  858. LIFEL4:& @9 H' a4 M, G0 g1 d! R
  859. LDA $7A01! t1 b( Q7 {3 U
  860. SEC) U( V  S5 {1 f* M
  861. SBC #$64        ;$7A01=$7A01-1008 _3 J/ q/ X- i3 V# V2 n* |* Z
  862. STA $7A01
    # L' m# k' }7 _9 j+ d8 ^
  863. INC $7A03        ;hundred++
    $ O& m8 i- {; r% O/ ^9 B4 h
  864. LIFEL5:
    " N' T& ?5 F5 f$ ]3 `+ \
  865. LDA $7A01
    2 s" l; `, Y0 e: t
  866. CMP #$64
    ( _" N4 l) P2 }4 |
  867. BCS LIFEL4                ;$7A01>100 goto L4
    7 K4 {% h6 A* r$ M

  868. 0 v) W/ `/ i5 l% h" X: S
  869. LIFEL6:        ;decade0 j; j- @; V% g- a3 L
  870. LDA $7A01
    6 k( z- ^: P. C9 P- E- y: X! K
  871. CMP #$0A+ h3 N/ ^6 N$ ]: H
  872. BCC LIFEL9                ;$7A01<10 goto L9
    & h' V6 Q+ _7 X; m+ y" p- R
  873. LIFEL7:       
    . A$ ^% g/ W, k3 H$ m" x# Z
  874. LDA $7A010 D% R$ X1 l: ~& m
  875. SEC& w- b, T) W+ ]' b, q# `
  876. SBC #$0A3 P# Q0 B0 h- h* Q2 v" s/ k. y
  877. STA $7A01        ;$7A01=$7A01-10" X1 |. E' k$ K2 o
  878. INC $7A04        ;decade++) r1 Y( ^8 B( j# p9 b
  879. LIFEL8:% N/ u! a0 J! g3 r6 _# d
  880. LDA $7A01
    ) W7 v: \& B' `
  881. CMP #$0A
    3 U+ W/ R9 c( [# d
  882. BCS LIFEL7                ;$7A01>10 goto L70 M( P8 ^" g0 e- n4 ~
  883. ;unit1 [3 ^# B7 h% N* _8 G
  884. LIFEL9:
    ! `& s7 A! f$ U/ d: ?' _# L& _* S
  885. LDA $7A01        ;$7A05=$7A01
    2 @4 a, S; s: N( B( a. k) S9 ?2 B
  886. STA $7A05        ;unit
    0 L; o! c8 g& h) N$ }9 {" p
  887. RTS        ;return
    # Q7 I1 U' H( h' O0 i. l. p- @! j
  888. : d8 t1 e& _( B5 i- x0 h4 B+ ?( B

  889. , }: s& K% b% h& d9 c1 N2 d, i

  890. , s9 |, I- X( ^4 A) y) A. |+ ]
  891. PPU_PROCESS: ;PPU地址处理程序
    % v5 |% ]) X0 e  F$ U& j
  892. LDX #$00
    & W8 V3 b$ a& q& j* g+ v$ K
  893. LDA $FF! w( Q; Z2 f, v: e0 f: `, v
  894. AND #$018 k* T) l( h; [/ t8 K  c
  895. BNE PPU_2400_27C02 \/ B5 n3 t: F9 C3 M
  896. PPU_2000_23C0: ;命名表1& q: ]0 @4 e5 b1 j; e
  897. LDA $0703- L( d8 \- n& f# _$ F6 a
  898. AND #$FB
    3 f! i0 z/ U& a7 B, q% m7 d. t
  899. STA $0703
    % W$ N, Z. k0 T9 m+ R
  900. RTS3 F& g" }& X& l2 m1 X
  901. PPU_2400_27C0: ;命名表25 Z0 ]4 ]4 P; p6 F
  902. LDA $0703
    ) y' Q1 E% @, I8 ?- h
  903. ORA #$04
    0 o9 k- v' A9 T6 B) |7 M
  904. STA $0703& j2 L. i4 g4 u, Y1 X
  905. RTS% K# {' ^* h$ u  I, U! d
  906. % |9 }0 U5 s2 K6 k/ t# l
  907. PPU_START:  ;PPU数据写入& U- x) U1 ~* g, `* P% H& a4 R
  908. STA $219 U: ^! Q: u9 b/ ]7 {. p6 }
  909. STX $0701" b/ o3 T: w: M
  910. LDA #$003 c# J4 h' o" F. _3 |4 p, B+ u9 J
  911. STA $0705,X
    * x6 I- p; v! U1 f5 |4 N) M
  912. LDA #$01
    ( d9 B8 ^' q3 o9 }. e2 s: E
  913. STA $0700) G- @- R" s" n6 l
  914. STA $0702
    ' T" ~, e) U2 f4 n. t; L
  915. RTS
    1 V' u5 E3 s7 p( s
  916. ! F3 x' N* R/ d$ _9 U) V: @
  917. 4 q% m9 B% Y) G8 y

  918. ; _8 ^, Q; B" O/ ?
  919. 7 l9 n% o# L- s1 @: \; W7 }

  920. - Q2 M8 k/ T$ m7 x; B: T
  921. ( h$ o8 ^) q% k8 Y
复制代码

' |8 A: ?/ I# Y; `/ }) `6 i

本帖子中包含更多资源

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

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

签到天数: 2047 天

[LV.Master]伴坛终老

发表于 2017-2-13 17:25:19 | 显示全部楼层
这么好的教程竟然没有人支持!
9 k' b' W+ }& Y4 p' z* Z

签到天数: 2531 天

[LV.Master]伴坛终老

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

签到天数: 25 天

[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-11-16 05:41 , Processed in 1.080078 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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