EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2017-2-13 11:57:33 | 显示全部楼层 |阅读模式
  1. Contra (J) PPU写入程序! C3 }: R# q; r3 N0 ^/ h1 D' c: i
  2. 作者:FlameCyclone
    ( Z! L; Z% _9 {5 O# u4 g
  3. 时间:2017.2.12, v) ?# t% r( G2 u
  4. 6 a! {5 K- b& F; ?+ y3 Q2 T) u" L
  5. 按键跳转:
      m; m; x+ C2 B6 J/ K# d4 w
  6.         C1EF:95 F5 94 F1
    - R# r/ ?7 o- k$ z: k+ `$ v
  7.         C1EF:20 70 FB EA$ P. _' @# h! Z) B0 @

  8. $ h3 }0 s9 @  X" q! U
  9. 滚动偏移:
    / m" p4 d3 O( }$ ?* d0 |$ s) A2 o
  10.         F936:A5 FD 8D 05 20 A5 FC 8D 05 20. V- |9 ~3 L1 u/ E4 d" S
  11.         F936:20 C0 FB EA EA EA EA EA EA EA7 r+ d3 A6 e; Q

  12. $ w+ O# _3 _$ }" H
  13. 背景调色板:  z" f" Y7 ]' X( `, w
  14.         CF20:9D C0 074 j- r8 I7 E+ s  ~* e& ]0 s. u
  15.         CF20:20 A0 FB
    0 ]0 @0 W7 N4 C( k5 Z1 s! X
  16. - X$ }2 k2 O( @4 `2 A/ X4 B* k4 J
  17. PPU BANK号:
    6 U  P0 u4 S' o& R2 \
  18.         C8C9:9D F4 07
    ! z9 x, N5 q7 \% s0 U0 H; u8 M" E0 W
  19.         C8C9:20 B0 FB  o) u: Q- `8 I2 z3 ^
  20. ( G/ i: {# h! ~1 X- l4 X8 }
  21. 按键跳转:0 ^$ B% s+ r# d* c
  22. FB70:        95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 209 n3 K( C8 J9 ~5 m5 O' t
  23.         AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 20
    ( o# p" E6 X7 r5 M% R
  24.         21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF  l* ]0 w$ W, y, U" b
  25. 1 O0 Q$ h8 I' F8 P3 D. G
  26. 背景调色板:
    . n3 F3 E8 L* Y$ k! s
  27. FBA0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF
    ' ?2 X& u* ?( _- M

  28. 5 J( ~. l1 I& B" v
  29. PPU BANK号:8 _3 ?9 k8 t; U' |+ F
  30. FBB0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF
    ) p4 W1 C) M  y: S$ |3 k8 S9 s
  31. . G' n; f5 B; b- E0 a
  32. 滚动偏移:3 o7 |5 q8 ^7 ?0 a5 s" Y
  33. FBC0:        AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 60
    " z% V) s0 ]1 C2 \# J' C
  34.         A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF4 h" P5 \# E: n9 w/ }- s
  35. 7 f" e2 H3 Z! n8 b& g, l

  36. ; q. y# @7 k  F
  37. 切BANK后A000:* q- L# h  p6 \. ?5 U6 ?
  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 FF5 J+ d  O; g1 ]9 ~, u1 F

  39. ( B2 g$ x+ V$ [5 O6 J! i) T# O' I
  40. & g# D" U+ P' }) V0 Z3 t
  41. 6502 simulator:
    ( l' S* X1 _$ B9 u
  42. PPU写入程序:
    . _% s2 z: O  [# W* a4 A/ {' [
  43. .ORG $A000
    / s  I7 K3 t) d
  44. CSP = $80
    ( m: j; D$ E0 g+ T
  45. C0 = $81) [2 R' r' i8 D. f' f
  46. C1 = $82* C: d0 i( U3 e3 T5 w2 f, f) x
  47. C2 = $83
    $ x9 Q9 c2 Z. V# h7 U& B$ n1 U
  48. C3 = $84
    % y( W3 c8 m2 X6 k- G
  49. C4 = $85
    4 M. S: A8 U' y1 a) k: E
  50. C5 = $86
    9 r: m, \: W: B4 H5 S0 x
  51. C6 = $87
    3 J/ w; _0 e  D9 v7 C
  52. C7 = $88
    1 G) G% T! N5 _1 P, \
  53. C8 = $894 Z3 t5 U/ o. j
  54. C9 = $8A, j- f" ~1 U4 L( ~# l
  55. CA = $8B
      P/ g: d$ V: z# @  C# h6 v
  56. CB = $8C
    1 ~) i; O" G  @& y
  57. CC = $8D: Q8 L' {! N3 G/ W. Y) `2 G
  58. CD = $8E: M. ^, ?% W6 e) n/ u* z3 }. A
  59. CE = $8F
    + {+ e: s/ ~1 N. F
  60. CF = $90$ |4 r9 S- s, R0 p  K: M$ t$ o
  61. CG = $91. X, y1 L2 ?' d; |/ L% c  z
  62. CH = $92
    1 y' Q( q+ J5 e" H' j
  63. CI = $93) d3 I) a0 @1 w9 o9 V7 C
  64. CJ = $94! P; [8 u4 \" x, c3 s
  65. CK = $95
    5 }" P% T$ ?- V& q
  66. CL = $96
    & O. f" |# Z  J2 p* E, ]
  67. CM = $97
    ' H/ M; J5 d; _9 d
  68. CN = $98; f& W: m  `9 S) C7 g
  69. CO = $999 Z: t3 h: f7 r) H5 \  H% C* A
  70. CP = $9A
    # H2 N) [: S! }
  71. CQ = $9B) O% m' ]  r/ a3 _) q
  72. CR = $9C7 v; Y% h2 ?6 l6 s1 n
  73. CS = $9D2 Z9 W9 y$ U$ z4 G6 W8 W1 o5 j
  74. CT = $9E
    . j3 a$ `/ G. g
  75. CU = $9F. N) ~6 w4 ~! T
  76. CV = $A07 V. @& B* v6 }7 @8 }  B
  77. CW = $A1
    8 R% o4 ~/ e6 P0 x) d7 T
  78. CX = $A2: p; F) j3 z, q* Z" o9 O5 }8 A# J/ {
  79. CY = $A3
    0 H8 y/ ?) Z) [
  80. CZ = $A42 A% j& g" d# D" I* C
  81. CEND = $FF: H+ N1 r; ]# c* C
  82. 2 \3 Y9 U+ d1 O" \' u

  83. 6 }8 q' ]" }) ]1 |1 ~+ j( D+ j
  84. CMP_RE:% K/ S6 q0 }) D5 D
  85. LDA $FF# R  z- q: j7 u3 _5 K8 o4 r
  86. AND #$7F1 E/ M) l( R6 K* i, I- t6 |
  87. STA $20004 e+ k: S: C/ Y" t; T7 e, t& [
  88. LDA $2002/ o! H8 v3 l: ]7 ^2 m& M9 z3 J- i
  89. LDA $25' z% `5 l" Y( g1 L% J+ ^  ^4 ]
  90. CMP #$01
    ! u' w; {3 U( d/ q+ k
  91. BNE PROREG- @9 x5 v! Y+ [' o( ~3 Q
  92. LDA $F5,X9 h/ I8 w. R' \7 h! S& ^
  93. AND #$CF" Z% B+ R& Z. t1 z: A9 U, L9 s
  94. BEQ PROREG
      B; B  i; _0 |6 |
  95. JSR PPU_CMP
    $ t1 X( ^5 I$ a( W
  96. C_RE:' Y- y4 F  g) N1 w
  97. RTS
    # n9 C3 b- R* V! N/ S6 }
  98. PROREG:
    : U$ W6 D( l( B" c9 b
  99. PHA
    : j+ r3 p" D- f8 p
  100. TXA+ y- m) i  D* R. @3 l4 m. G
  101. PHA
    0 ?4 I8 Z) e! K
  102. TYA
    8 P% y- T/ |7 E+ U# B6 l% Q9 \$ X
  103. PHA7 Y7 |: i, V6 U) A
  104. LDA $25
    6 Y, |9 r5 Y! k: N/ R. R& n
  105. CMP #$01
    . V2 [& g: l1 b2 [$ l5 f# r
  106. BNE RE
    7 q2 q% v# c; B  p0 R5 N) |2 P8 _
  107. LDA $010A
    8 c. a2 G7 Z2 U! J7 X3 F1 x- H, f
  108. CMP #$00
    / d% ?  h  P/ r4 [. X
  109. BEQ P1
    ; Z+ T3 X# B2 X7 K3 |! f# O' u

  110. - c/ y* W" Z/ S" {: w
  111. RE:: e7 x5 M+ u. D8 z' I3 W; V4 K! V1 Q' G
  112. JMP PPUWRITE; I( d! M' c2 g1 ]2 ?+ A
  113. : b1 q9 p1 d1 b# N2 t4 x
  114. P1:                ; 条件判断
    / d, u6 t4 X" D6 O% v" B
  115. LDA $7FFF
    0 O- \) K7 ~" L+ ~/ t
  116. CMP #$FF1 K  O6 q6 g( p4 [
  117. BNE P1RP
    * G" y) t) m, ~  j4 `
  118. LDA $7FA0( I+ y) `9 C2 s- r- f
  119. CMP #$00
    5 o$ n6 L3 ?  u  l
  120. BNE P1CMP( C2 R. x' n+ g/ q8 E. r
  121. LDA #$FF: l% K, g2 M$ R. s; r
  122. STA $7FA05 w0 ?+ g! |" n4 U% ?
  123. JSR CLEANA/ N5 |8 i& \: |  ^7 a% o1 r; h, M
  124. JMP PPUWRITE
    7 J$ u# S+ R4 h; ]' |( }7 E
  125. P1CMP:) d6 R& X% H: e) D+ k* B: u) I& R! [
  126. LDA $7FFF6 M% j6 \0 S) I% C7 m
  127. CMP #$00
    ) q3 G3 a8 w) B
  128. BNE RE
    6 T% q$ D" B4 w3 G
  129. P1RP:: t3 u0 P$ t4 B
  130. LDA $2002% I0 s7 g& N+ Q3 r6 T) V
  131. LDA #$00
    ' c# c" |' Z; w9 r5 P6 r
  132. STA $20014 d/ W8 b) Z/ Z& H* o; U
  133. LDX #$006 X7 v5 C! t7 w! O# p$ R
  134. LDA #$FF3 Y4 J) T& K$ c5 v
  135. STA $7FFF
    3 G3 A0 n, p2 m3 ^& Q) J& V: f3 Z
  136. STA $7FA0
    ! a9 N) z" j, m3 n
  137. JSR COPYPPU& o5 P+ i+ c5 L3 B  Y1 m
  138. PIRP2:3 c2 Y$ Q* H5 C" `+ K5 {  O) c
  139. JSR CLEANA
    . Y) m) e& u, c) M1 w6 B0 `$ B; _7 U
  140. JMP PPUWRITE+ G( k+ U0 n8 V) w8 \

  141. ( s# N2 i8 s' |" e/ ?6 J
  142. COPYPPU:3 I+ ^$ [8 M' \- J0 T2 O4 _8 R) [
  143. LDA $FE
    : ^; x$ l0 k, g( N# x4 d
  144. STA $7F50
    ( H4 J' Q( m  S. `, U& Z  Q
  145. LDA #$08
    ) `  H# t2 r' g( ^
  146. STA $FE$ u- k4 j, E' |$ p# g+ L
  147. L0:1 O4 i& k! w7 G5 D0 s9 ?" R
  148. LDX #$00
    9 m/ l' E) b3 R5 W. ~
  149. COPY_07C0_07DF:
    " w; V& Q4 a& B! W3 X
  150. LDA $07C0,X% T5 A( p! f/ Q
  151. STA $7F00,X3 M  p4 e6 m2 M; u
  152. INX
    $ q( a. v6 A# ^. V' F* m3 I( A
  153. CPX #$401 g1 P/ T  d, @1 d5 L& Q
  154. BCC COPY_07C0_07DF
    ) n: [. ^; o+ h; Y' n  R6 c
  155. LDX #$005 |9 q' S2 V/ H" h" Z- E9 W
  156. PPU_07F4_07F7:
    ' J7 l1 T% o: i$ b3 a0 o
  157. LDA #$00% |- W- g; C& ~# B. p! z
  158. STA $07F4,X
    7 W6 I  e. Q7 ^) y
  159. INX- K: m& E' E) T9 I/ T% G
  160. CPX #$04# Q9 ~* @3 o$ v) T+ L
  161. BCC PPU_07F4_07F71 @! A9 M! H. Q
  162. LDX #$00  ?/ n0 y, v* v' r$ L" M
  163. COLOR:! n3 S7 ]/ [( ^: Z2 f/ p* H* U; U" F
  164. LDA COLOR_DATA,X* q( z" @5 \8 p$ u) H* P) y$ V6 o1 S
  165. STA $07C0,X6 n3 t- {0 }; T' L, g0 v. c1 ~
  166. INX
    ' m) T; A- f1 M
  167. CPX #$10
    5 o8 p3 v* t. o" |1 _4 h
  168. BCC COLOR
    / c# o* D9 M0 S, L

  169. 9 s, Z9 K3 m6 C% m7 b
  170. PPU_COLOR:
    0 H3 C/ ~! a* W1 f
  171. LDA #$3F
    0 w( g$ P, T6 l0 {, x) {5 l
  172. STA $2006
    ; H6 r1 w9 M0 p7 l2 f6 [6 X- P+ w( `
  173. LDA #$00
      G( f. w* C! k9 s& T( K/ }/ t
  174. STA $2006& V1 p: v: L" f4 U" f. ^
  175. LDX #$000 j2 W: |$ d3 S! c
  176. PPU_COLOR_W:
    ) Z6 N; T" v" \/ p1 X+ Y2 h* E6 [
  177. LDA COLOR_DATA,X9 z: ^, ]3 P( l  F; d- s( L9 {1 q
  178. STA $2007; }6 i  P% M& \: d: t; |; Z
  179. INX5 |+ W& N0 O7 }& D
  180. CPX #$10
    ' ?% p3 T7 y$ |( r+ ?5 s% x* I0 ~9 Z
  181. BCC PPU_COLOR_W
    & E1 E: n! ]8 K; t+ m

  182. ( k) P; D# ~- \+ m

  183. - V3 W0 s' T8 S' |* d8 b# _5 W
  184. LDX #$00# D7 [# E# X+ H+ p  A
  185. LDY #$00
    # S: O) J8 q& e+ A' s! }! R) x
  186. LDA $BD
    ; e, Y8 ~& k; Y, `
  187. PHA# h7 b, n4 W3 ?8 _9 O% y% V
  188. LDA $BC) H- s1 M2 F" N5 D
  189. PHA
    " Q0 ^4 `: W  _& p
  190. LDA $BB( B% f7 [% g( V' d- P
  191. PHA. b- r! T8 G6 X) ^  ^  G) d& v% L
  192. LDA $BA  p- W: I; z; x# W* S4 h/ f
  193. PHA% z- J- k5 l% O% A7 z- ~
  194. LDA $B9$ w6 `! @8 _8 f9 s+ k
  195. PHA4 z! i# U/ `% J- m! s3 x5 q& K3 U
  196. LDA $B81 I" p+ B4 }0 J, ?4 s, C* ^
  197. PHA
    8 y# _3 I, m  g2 V. K, r
  198. LDA #$00$ K8 d$ ?8 L0 Y( K7 S! _( E  f
  199. STA $B8
    9 J3 U' [+ V- S; ]- ?5 t! u
  200. STA $B9
    2 I. w8 l! N# T- f' ?/ W
  201. STA $BA8 t- b$ D  T/ P- _- y) P( \7 c' ]
  202. STA $BB
    9 {) ?) T  L6 Z
  203. STA $BC
    8 |# t# v% N8 F$ H
  204. STA $BD% u# f+ i1 Y+ J! a+ p
  205. LDA #$00) x3 f3 Q: y* G
  206. STA $BA
    ) s/ l- @( M9 J' l/ @7 e1 L7 f/ }
  207. LDA #$20
    4 X  i: Z2 y1 H4 n+ c8 D( I
  208. STA $BB
    2 ]( L4 L% ]- B
  209. LDA #$005 [9 C/ u( D. h! Y. U
  210. STA $BC
    % C. m/ x5 i. a; M% M1 ]- y( O* [3 B
  211. LDA #$60
    ) I( s  |# U7 J: w: F0 [. W
  212. STA $BD
    - M. `, T) |0 L6 u

  213. 8 ?8 O+ r8 i4 T% b/ c
  214. L1:                ; PPU复制
    ' i2 ?3 i! ?7 h, B0 ]- _- J+ H
  215. LDA $BB9 R' Y! g1 i8 O& b- w
  216. CMP #$28+ I7 K+ N( M6 M$ [( P  J; c
  217. BNE L2
    + Y) M. Y. O4 T$ u" S/ L1 H
  218. LDA $BA
    + l: S  S% j+ U7 S
  219. CMP #$00& }' b- z6 B/ S6 @& x, Q6 c
  220. BEQ PROADPLA
    ) O7 r: d3 e2 l6 L( c

  221. ) X# r$ E# s5 G- t8 T0 [
  222. L2:
    5 A5 G$ @- G: w' @# D5 \
  223. LDA $BB
    3 @. S1 ~' x" \5 J
  224. STA $2006& D4 T( @9 S- D/ ]+ e3 C
  225. LDA $BA( r1 ^+ ~. H8 l
  226. STA $2006
    8 s5 e$ E: j3 d% V$ G
  227. ( k1 L) J7 g3 h/ |# ^  R, Q
  228. L3:
      \9 v% ]3 K- m; z, u
  229. LDA $2007$ o& \" ~2 _3 V4 q, D
  230. LDA $20078 c6 R  t% O2 l3 K8 C3 a
  231. STA ($BC),Y
    9 _+ @& O4 i. A0 d2 y7 w, j
  232. " M+ f$ h6 u# U2 ~( ?; q/ f" G+ o
  233. L4:
    ' p1 Y. {6 {, _6 ]
  234. LDA #$00
    ! o! S4 i" H1 n  i* N& N
  235. STA $2000+ R0 o9 j$ O6 C  Y+ R
  236. INX# w3 r) o4 |# }4 |! m3 c, z
  237. INC $BA+ @0 y1 l  s9 Y% ?7 p5 g1 f) v
  238. INC $BC
    * q- T- Q0 P5 J9 s/ c
  239. CPX #$00- z; c! I3 K% h0 g) j  h6 q
  240. BNE L1: S+ ^" B: B; w" ~! D2 g. k7 X
  241. INC $BB7 {# V) d/ p- C7 j5 H; P- }4 I
  242. INC $BD& D! P4 L% G8 U% s0 v. C
  243. JMP L1( _/ V& X1 ~; k8 l
  244. 4 Z. ~0 U5 u- }! U4 o$ ~
  245. PROADPLA:                ;出栈
    ! B$ ]% k: G9 D# b  h3 E
  246. PLA
    : {1 r6 ~% p0 ^9 Q. I. V/ x; l
  247. STA $B83 p9 U$ v; y, A- o5 i# y+ y1 i
  248. PLA
    * t+ g, m3 a% s9 C1 O2 J! ^/ a" F1 H
  249. STA $B9
    ' n8 D5 |8 f4 h! |! }5 C% W, s6 I/ ^4 ]
  250. PLA" t- e2 Z2 |( r& P; @, b: S
  251. STA $BA
    8 U# {- U* y4 H9 [
  252. PLA4 X) Y8 ^, q* b% m
  253. STA $BB
    ) e( S; \0 Z1 T/ M  _! U0 h% m$ ]- ]
  254. PLA
    ) U( \8 w4 A0 H) |) b, i; y. T& U
  255. STA $BC
    . U8 ~. z0 O" K$ y1 K  ?# a
  256. PLA
    8 |2 b- H( X; ]/ v+ F0 O
  257. STA $BD
    * s+ }0 e9 o* |  u( W4 K! X' a2 ~
  258. CPRE:5 e7 j0 W* ]& V8 c$ K
  259. RTS
    : X8 J4 Y& V$ m5 z4 G
  260. 1 t3 ]4 _8 J6 @- i6 c: ^% B
  261. CLEANA:                ; PPU清空
    4 I9 l! e8 ^3 X* o, ^
  262. LDA $BD8 A( M) d1 b  {! c7 x. P
  263. PHA
    9 m8 o+ x& P% p( r: E: W8 a
  264. LDA $BC. O! f& y. M( x& w6 W( u2 q
  265. PHA
    * Q/ T( O- g' G, k% W, P
  266. LDA $BB7 l+ _  D  P. `0 z9 P& B0 O
  267. PHA0 Y* f7 k/ ~# b6 f! M' B4 @
  268. LDA $BA
    ; s) l+ ^+ b2 y4 j7 u
  269. PHA0 z+ ~  ]7 H; Q' Y7 T; H/ ]: `
  270. LDA $B9% ?, n3 k; F6 M
  271. PHA3 i$ @  w' s# v; q8 Q6 N% W
  272. LDA $B8: d  \5 \5 C, F. h
  273. PHA6 {# O9 f" I+ b9 `
  274. LDA #$007 U( G- c, K, E9 w% }" ~* N
  275. STA $B8' n" ^2 T, Y/ f+ v9 Y. X" f/ `
  276. STA $B96 z' \8 e7 u6 Y& W$ O
  277. STA $BA
    2 D7 i: K2 Q3 A2 ]+ u) Y6 ]8 j& |
  278. STA $BB" z: J' s( F) |" X/ {
  279. STA $BC( L) U' ]+ C* a3 M
  280. STA $BD" s: g( W4 g" [/ s. I
  281. STA $2001
    + K. {+ w$ |! L0 ^' e  _
  282. LDX #$00- X! N- t4 y3 ]: K5 ^6 }, p1 }
  283. LDY #$00
    6 [  n& Q0 {9 O7 j; [, S
  284. LDA #$00+ ^2 }1 s, T) K  r  _/ y' D4 }" }
  285. STA $BA" D8 N7 u& @& Q5 e3 v
  286. LDA #$20
    4 Y1 z& n! F0 G0 t, Q! a. Y: u7 n5 k
  287. STA $BB
    " X7 t6 Q7 Q5 n, d/ k  g. z
  288. $ }0 R) o+ @* g- W
  289. CL1:/ x" D6 }8 T" x7 k
  290. LDA $BB$ [% m; _3 Z9 r" G+ w# l0 {  ?
  291. CMP #$288 }7 c$ \  j  }% u- i+ O
  292. BNE CL2
    1 m& i/ N. w& {. w! d
  293. LDA $BA
    1 V2 N% b4 Q& a0 E1 n: ?+ g
  294. CMP #$00
    7 B- w6 }& U7 z1 |( R! \
  295. BEQ FREEWRIYE" R4 ?' w% F0 k1 }+ ]
  296. # Z, A7 y9 }- b" h
  297. CL2:& v5 U  t7 D1 }+ |
  298. LDA $BB; u# Z. d* D# C4 U5 R( P" c
  299. STA $2006" D+ c' w% g  O& D# |* d) d
  300. LDA $BA2 L9 G) k# A( f; r8 I1 R
  301. STA $2006! {3 ~# f0 D' \9 S* d  R

  302. 6 Q0 K% Y( Y' Z6 K2 d
  303. CL3:
    ) R+ q4 z  _0 ^! B  o) @
  304. LDA #$00
    ( b% {/ h6 U& T! [
  305. STA $20075 S# {; ?1 \' ]$ I! P4 X
  306. 9 N; h# }% O' k% X9 `$ t9 H5 t
  307. CL4:
    8 A/ j- F5 y& C0 J8 M- ^
  308. LDA #$00
    + L; u) N- |2 L
  309. STA $20007 j" c0 T* p! F9 Q
  310. INX/ m3 |  B$ Z6 q* C4 U
  311. INC $BA: }! U# w' T  B
  312. CPX #$00* W* \( Z* q& I
  313. BNE CL12 q# N. x- q* C0 \$ m+ ^
  314. INC $BB
    $ w3 {2 Q; |' Y) M
  315. JMP CL1
    % S, `' a& k$ V' y9 o4 A& U

  316. 9 ]' q# h. o  k2 q; e
  317. % L$ x" O2 h- g2 r5 x
  318. FREEWRIYE:
    ! z9 I: r7 a1 Y* ~6 ?0 |
  319. 8 F" Q/ p$ _2 j# r
  320. NOP
    2 m8 G& o' w1 M

  321. 8 X  I* `- _: d6 X( R* S5 x  [
  322. 7 @4 V9 H( a' T/ I

  323. ; a: b  @; t# c- H' ], p
  324. 8 t3 u5 A+ }1 f9 R  m+ o: `" t
  325. ) z1 o$ p! R  K; W* |3 {$ }% P
  326. CLEANF:                ; 恢复现场: n9 C- `9 q  a! C5 O  ?( r% }

  327. ! t/ _( K* V7 M) x
  328. PLA- s; e2 @' x. G) u* z% u
  329. STA $B8
    ; c) I/ U" p4 {3 Q
  330. PLA! {/ [$ R* a3 ?$ I
  331. STA $B9* q3 S: q1 r+ _9 L& e7 k
  332. PLA
    1 v! d+ q7 t: \# A  }
  333. STA $BA
    8 w' A; [5 }7 b3 g6 q
  334. PLA9 H1 _0 N* x( s" g$ m
  335. STA $BB' u9 S% A4 X& F6 [  E# n+ r
  336. PLA
    % A3 z& ^5 n1 J$ `
  337. STA $BC  Y( C1 y9 q) w( j4 [2 y! U8 G
  338. PLA
    ! M$ M0 [' a7 p; H, J: e* x+ l% |
  339. STA $BD
    ; t- e4 L. ^( a# s
  340. CLRF:
    : X( I6 |5 v2 {' J
  341. JSR FREE_PPU
    * j, d! ?7 R# v2 ]; a' W; T* }2 q
  342. RTS7 u4 z8 P' A- D* F3 l8 L

  343. 5 t1 |0 _+ v! Y' B9 @
  344. . |) c! ?4 W0 T- z- G5 ^& y
  345. PPUWRITE:    ;PPU写回
    " z: ?6 y! G& s$ \8 n- V0 m! q0 r
  346. PLA
    $ F$ ~+ `+ k, n
  347. TAY1 q+ C6 a! r# _  a! K, m  r- U! W# Y
  348. PLA
    ) }  z9 p* S- ^
  349. TAX
    % G( p' o1 r* ]7 N7 y, C  `! m
  350. PLA
    / u( [5 `) K. [1 R  m' q( {
  351. LDA $25
    - G) R* N" F+ b# @+ X: u0 A" i
  352. CMP #$00
    # ~( S9 M: n  w5 D: }
  353. BEQ WP15 m+ _$ p, b. W$ Z, y$ `8 t* T2 G
  354. LDA $25, E( s6 E6 v& \! }
  355. CMP #$01: Y6 w: i& O4 `0 B
  356. BNE WRE" g& S+ q0 R9 m
  357. LDA $F5,X) _. j* }& F7 d$ L# I4 Q( T8 n
  358. AND #$EF6 T3 ]- ?+ l2 J# c
  359. BEQ WRE
    2 |2 P- o6 v/ T( W
  360. LDA #$00
    & i+ r3 `) [$ Y- N2 Y& y
  361. STA $7FA0+ m$ U: H* v# l4 K" y

  362. 1 f, |6 A! U/ p+ s7 }+ A& u
  363. WRE:
    9 E% ~8 \+ O1 v) V
  364. RTS+ e  u( C5 S% g! A& b( l

  365. ( c: v' J0 q% k; ~
  366. WP1:
    4 Y6 J( Z$ Y4 z
  367. LDA $7FFF
    , x7 {% H; |! A4 F" V* p
  368. CMP #$FF
    6 o; X, r, S* G4 c% D
  369. BNE WRE
    % ^4 [8 r* C% i( G9 o* `' ^
  370. LDA #$00
    & S& |8 ^) M' M$ J2 T1 V. m; Q: f( n
  371. STA $20013 C# @% I/ g% k
  372. LDA $BD, p2 S: P  S4 d& C. o
  373. PHA# N+ B2 \+ M  ?
  374. LDA $BC
      H" ?2 l# x& Y4 \
  375. PHA4 x3 {" N! }- @- L6 ~- a
  376. LDA $BB
    $ W6 x& R) L( i/ ^
  377. PHA
    4 k( [! j) p9 S
  378. LDA $BA
    ! X+ A' N8 }% h$ j5 K/ P
  379. PHA5 }3 X+ R! ?+ D: g
  380. LDA $B9
      X8 m6 y( S: v2 W8 o
  381. PHA9 Y2 t8 p- ~& z: M
  382. LDA $B8; o2 p: v8 c" ?$ `- n: g/ j9 X
  383. PHA5 O4 y* _* ^; U0 u
  384. LDA #$00- X. w2 x$ o! w) R% ^) _2 @, c
  385. STA $B8+ u) l( T" Q9 K0 i/ q6 V
  386. STA $B9+ C/ d& H" H% A
  387. STA $BA
    ( [: j1 h. v& D  w& l
  388. STA $BB
    5 f- E3 b! c# b* h8 i
  389. STA $BC5 c2 v5 t8 }: s, k$ }
  390. STA $BD
    ; d5 n! x. g1 i$ ]
  391. LDA #$00+ a4 V" k6 I; V) S+ b
  392. STA $7FFF2 D! O7 R; B9 T

  393. 7 J  G" A# @% h/ c6 p7 X; i8 D
  394. WL0:7 D+ y% V  F- f' n6 d
  395. LDX #$00
    . E5 p% R% O% E8 ^/ I$ X3 [
  396. LDY #$00! }! t1 \  L. R# g, ]' h
  397. LDA #$00; v* w- \3 b1 ~- u7 C& |
  398. STA $BA9 j, q8 H) x1 Z8 t+ ?2 L
  399. LDA #$20) N9 i+ P% m" m
  400. STA $BB* B5 w% ^8 i$ l5 t
  401. LDA #$00
    9 f" F5 e7 T; @, v, r/ H  }9 L# }4 F0 U0 g
  402. STA $BC
    3 z: r6 q: b% b* D6 R
  403. LDA #$609 a  h& u- i3 S- r
  404. STA $BD
    & K* g. m0 n0 T& r) n2 H$ t
  405. 0 Y* S! L% u; G
  406. WL1:
    0 T9 Z5 Q) I+ V  ^' v
  407. LDA $BD
    7 `( K  l- d7 o  w, F2 s) g$ t1 P3 h
  408. CMP #$68
    / K6 n! B$ J! s7 ]3 r* T
  409. BNE WL2
    8 {' z) p6 S$ \" u. P6 O2 L
  410. LDA $BC
    + Q! I' E7 N0 N
  411. CMP #$00
    6 Y" q* S; @7 x" h# m
  412. BEQ WLR8 ~) _3 E2 b9 m4 U

  413. " A8 m. X; J$ j' L6 Y7 O  s2 I
  414. WL2:: ^' F1 c9 v$ X2 M: |9 Q9 `
  415. LDA $BD
    8 K( p( \1 w2 f7 b; s# v/ q" o
  416. STA $2006
    , q9 ^' ?$ r. ]- L2 Z0 X
  417. LDA $BC
    - Z: p- g7 J# ~" c. x# @
  418. STA $2006
    % `# a8 `  I! h; ^

  419. - P% _! ]( L+ p" ?
  420. WL3:
    ' B/ D- B. ~. {! Q
  421. LDA ($BC),Y
    $ G* V1 F3 B, s
  422. STA $2007
    5 b4 \1 C; C& i8 T/ R# j
  423. . X4 D7 J. ~. ]# K4 H; e+ Z/ _
  424. WL4:$ `3 e9 j& P$ @: O/ G
  425. LDA #$00
    " U$ I0 u- Q6 i/ ]3 q5 b4 J
  426. STA $20007 |( ?) r+ N% T9 T4 O6 @1 f6 Q3 h
  427. INX
    1 r/ A9 E5 V8 [& E& j- O, a2 p$ F
  428. INC $BA! w! o: `0 ~. ]7 l8 D3 u
  429. INC $BC
    : V; b# d  i' ^. n! e( n
  430. CPX #$00
    2 p6 [9 O# `  m, q! e3 _
  431. BNE WL1  |% S5 m! X, h% b  ]
  432. INC $BB
    % W+ V; T$ ?" o5 j7 K7 I
  433. INC $BD
    3 E. X9 f! \! o- e2 `% G
  434. JMP WL1
    - `. r; `% k: T! m2 y- P/ U3 x
  435. 6 d# I  M  {8 h6 ^/ E
  436. WLR:- x. T2 l* F9 _2 }1 D" @$ |( g# t
  437. LDX #$00
    % F7 Y9 Z! E6 v" t
  438. COPY_7F00_7F3F:
    8 N5 n7 h5 g8 _3 B$ d
  439. LDA $7F00,X+ l  m& G" I: c( {* r! x
  440. STA $07C0,X
    ( G9 ~9 a) _4 J) \
  441. INX; q$ b! C7 ~- f2 v% m+ m
  442. CPX #$405 q4 f8 m! M9 C+ k; j
  443. BCC COPY_7F00_7F3F% j; ^% A2 a* c0 \1 N- A  p
  444. . O5 N6 ?' i2 |7 g
  445. LDX #$00
    : P* s" I& _: K. ^
  446. LDA #$3F' j) M( }; s  l
  447. STA $2006
    0 P- ~' f5 d; C" a$ z' k+ G# t8 e
  448. LDA #$007 ]3 S, ?. ?2 X* v
  449. STA $2006) P% \; d) v" B$ J% j' d
  450. COPY_7F00_7F10:
    - M: ~3 k9 e3 V: g  Z8 U" Q) g
  451. LDA $7C0,X
    , v8 h8 U+ H  {, F2 h4 ^+ I8 d
  452. STA $2007
    , [- c0 W9 g5 @- G) b& L8 x
  453. INX
    3 _: W; _! w2 B
  454. CPX #$105 F5 K% v, @# R$ y) @" M1 B& I
  455. BCC COPY_7F00_7F10
    6 l" a/ y$ E- g5 R% r7 q

  456. ' W; z" \) y3 q8 S
  457. LDA $2002: I, U+ V# l& Z5 d
  458. LDA $FD' S# u! F  T( h$ ]; A
  459. STA $2005% ?% s0 N* L0 V) Q/ p6 H+ X) V. }
  460. LDA $FC
    5 H& |5 h6 Y( Q1 X! A
  461. STA $2005( I/ _; k9 O6 q
  462. 6 v5 S# @% o$ S9 Y0 ]8 o0 L" s
  463. LDA $7F50, h3 d7 ]2 O! \; i" h
  464. STA $FE( w* M# ]. P/ Z. Q$ l: o
  465. LDA #$00$ Q2 E1 |: I# j. D
  466. STA $2000
    " s" C1 y3 B1 N4 ^
  467. PLA, D, y) @! `# T* a1 J
  468. STA $B85 ]- R( ]" L5 w* ~; v" t: C. \& @
  469. PLA" K& e" a; Q$ w3 [7 x
  470. STA $B9
    - ?. G" `1 Z; K4 t, t' r! b% S
  471. PLA
    # y2 e4 C% A: }( I
  472. STA $BA. A  h5 r5 j8 l) s! @- t
  473. PLA: j2 q$ w( N; {  G# U
  474. STA $BB1 p: ?) l& f3 l% T+ O: u9 f
  475. PLA
    8 ?6 D0 l: K2 c* k' S
  476. STA $BC
    $ J* @$ u4 T$ O  Q' s
  477. PLA& N' H8 m# S- @! L- c
  478. STA $BD
    4 _8 h9 K9 @, y6 I# o" y+ B
  479. 7 p: s- [$ q; J/ Z% L! T
  480. RTS
    + h3 T* H- ?) f1 f# o+ [
  481. 8 I; i" k5 X# M8 _$ a
  482. PPU_CMP:9 w5 V- A3 S. E' H

  483. ( t' r; R9 ]! u  x
  484. 1 B, F- r: _) P/ L: t  F9 z
  485. PPURE:' j, v+ E$ b! j4 {9 u2 ?* n7 U
  486. RTS
    : }, ?# f! b# M
  487. 9 X- X/ f0 h+ h2 o- u5 N- u: X2 g
  488. ( e2 z# h1 Q( [' m+ X3 V
  489. FREE_PPU:
    9 e# Q& C3 ]# J9 w7 a

  490. 3 i' V2 f. H& b4 ~4 u0 I
  491. JSR TEXT01_PPU% w3 T& G2 Z. Q! W. c9 q- K# I  j* H
  492. JSR $CBC0
    : M8 L; G- P( H, i& G
  493. JSR P1_PPU# L+ S4 I! _: C/ S
  494. JSR P2_PPU
    5 f! n, y3 s5 w3 c8 W- A, H5 Q
  495. RTS& A8 y. W% w- {- L- ~6 W7 ]" x0 y, f8 R
  496. # O& N/ M, ^, y4 t
  497. TEXT01_ADDR:* d4 D: D1 C- K" E
  498. .BYTE $20,$42( [; W# ?+ X3 H5 v, Q
  499. TEXT01_DATA:
    ' E; b; \) Y1 I
  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
    - F8 f4 i) o  F) m) P+ @$ ~
  501. TEXT01_PPU
    # l) |  H$ T/ e8 [
  502. LDX #$00- _  z2 Y' ]9 S
  503. LDA TEXT01_ADDR
    7 x) |5 w- ^% Z
  504. STA $0703
    # D' K' j! E9 G  v3 P
  505. INX
    - ]; \5 h+ H3 l/ A4 A
  506. LDA TEXT01_ADDR,X
    9 J& `# M% g* k8 w* }5 h9 S
  507. STA $0704% m! s$ [, `! [. c0 F
  508. JSR PPU_PROCESS
    ( L+ o) N& Z3 b( ^2 k& k
  509. TEXT01_W:0 G/ M6 R( a3 R- E$ z: v
  510. LDA TEXT01_DATA,X
    8 P* F8 S  e; H6 \
  511. CMP #CEND
    ; ^  L% r; H% u, A$ Y! q% W
  512. BEQ TEXT01_START' p7 K7 L' Z# v( k7 k1 x$ P7 Q
  513. STA $0705,X
    ; K& Q( m4 g2 H% j9 D2 k
  514. INX- A4 ]+ R8 e- H1 V' [9 R9 N
  515. LDA #$00
    ! P. u8 ^- F5 A! @
  516. BEQ TEXT01_W
    + j, z8 X/ d6 F8 n' ~* c) s( L  K
  517. TEXT01_START:
    5 H, ~8 W  T4 m  e
  518. JSR PPU_START
    4 _  I/ z. s4 j+ y! S% N) H4 H
  519. RTS; g. E( Q# D1 m, z5 e

  520.   R8 h# L/ o$ O
  521. 4 h/ s+ V9 K" t# W
  522. COLOR_DATA:
    % d* J( L# E' s: M0 q
  523. .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28
    1 x) x4 t) ?, \# c) n0 L; n
  524. 0 P0 Q7 U6 M6 y& M4 p+ J. f
  525. P1_PPU:7 W. I$ T) o; `) B2 q2 U% F
  526. JSR PLAYER_01_PPU
    3 [1 f, F! f) W  E) E
  527. JSR $CBC0
    6 l0 r2 }" ?6 A! d' B
  528. JSR RELIFE_P1_PPU  A! C6 u; q; B9 y6 n
  529. JSR $CBC01 r9 t4 k: e$ o0 H' B: z: k4 U+ T& O
  530. JSR RELIFE_NUMBER_P1_PPU
    - d3 U/ E( \# Y) \& I8 ^  O% u; Q
  531. JSR $CBC0
    " Q& L# B  U/ X  H' d& V
  532. JSR WEAPON_P1_PPU
    # v) X# I& H; @7 n/ z$ ?. f7 |
  533. JSR $CBC0* `2 @2 ]" @5 d4 N5 s. Z  s
  534. JSR BULLETPPU_P1_PPU
    ' g. m% q; Z# ]. U) Y5 g5 X- o
  535. JSR $CBC02 P) Y3 ?# m0 p' C& M
  536. RTS3 h1 \2 ^9 O8 b1 s+ J! K

  537. 4 G; e: R7 s0 m& m  }
  538. P2_PPU:
    * R6 c* O' Z: `& h3 E# b
  539. JSR PLAYER_02_PPU; ]9 i& w1 n' a* B1 f8 x/ u) d; U0 Q
  540. JSR $CBC0
    3 ~8 f/ m: z& \* D! W
  541. JSR RELIFE_P2_PPU
    3 O- ^. c) s) W, R5 J. M& P9 L
  542. JSR $CBC0$ w' }- a% T1 t* Y+ g
  543. JSR RELIFE_NUMBER_P2_PPU
    1 j+ G8 G! l7 J+ V% |
  544. JSR $CBC0
    + o- O; H$ p9 f. q
  545. JSR WEAPON_P2_PPU" E1 Q) U8 D) d# m. E
  546. JSR $CBC0' L- _# I3 ]; [) z2 Z  s$ Y- A# S
  547. JSR BULLETPPU_P2_PPU
    6 V" l9 R8 y; f' N' ]4 q
  548. JSR $CBC0
    7 b& x2 w: S* T; v
  549. RTS8 \  X& Z- ^1 c! S' W$ E
  550. * T  n) R& u; y0 D

  551.   Q9 T2 o6 L9 D; j
  552. 7 f+ J" l- R% [2 ]9 i0 Z- k
  553. PLAYER_01_ADDR:$ ]% d9 F' @! X7 Q% A7 C' g: l
  554. .BYTE $20,$A3
    ! O7 t, G' O5 U0 A, P: Y
  555. PLAYER_01_DATA:. `  l) j1 s$ m7 n5 W5 [
  556. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND* N# u9 x& b' f2 \
  557. PLAYER_01_PPU:
    4 F9 c2 n) a0 ~) p( h# U
  558. LDX #$00" F& S. M9 B& G4 O# h5 \$ H! ~0 x
  559. LDA PLAYER_01_ADDR- |; @" P1 z2 Q1 l9 _3 R
  560. STA $0703& E7 v" r0 D2 K- q
  561. INX
    4 B4 u2 l& `) r1 H6 Z: ?" T+ [
  562. LDA PLAYER_01_ADDR,X
    9 [: ]# j2 N  ^5 V" d9 D" l$ H, y
  563. STA $07049 x$ q8 w: Y" n! `* J4 _7 B
  564. JSR PPU_PROCESS
    0 P( z7 M1 M9 N2 Y8 }4 B
  565. PLAYER_01_W:) _% p/ D5 l, @
  566. LDA PLAYER_01_DATA,X3 B6 O: ?3 `8 Y$ V6 F7 a: X+ h
  567. CMP #CEND
    , L9 \8 X/ s* c( b; {
  568. BEQ PLAYER_01_START7 {; u+ L* Z5 s* H
  569. STA $0705,X) q3 Q1 u2 j6 j' Z+ N2 _' z- j
  570. INX2 W/ {7 u3 A. Q* h! W( D2 p' ]6 T- I7 ?
  571. LDA #$00
    ' B/ }! \9 J& s
  572. BEQ PLAYER_01_W
    7 ^# v! W& s/ l# Y5 x
  573. PLAYER_01_START:
    2 w, N) p; x2 }+ V! q/ p2 m# h# P9 N
  574. JSR PPU_START
    + Y+ p1 u( k! X
  575. RTS
      F+ d+ G' \  T

  576. , Z- R' u9 J" B. U! V& ^5 h

  577. ' U8 ]" ]6 H- H& j9 p" m6 B% ]* }
  578. RELIFE_P1_ADDR:1 y7 S. `* i1 i; B+ _0 y% u: }
  579. .BYTE $20,$E3) }% P  s' ^6 H+ L/ U
  580. RELIFE_P1_DATA:
    & N, E3 s5 K) U6 f. |0 q1 D% ^: f
  581. .BYTE CR,CE,CL,CI,CF,CE,CEND
    8 N4 b0 X! M: ?
  582. RELIFE_P1_PPU:
    1 |$ U$ U# L$ w
  583. LDX #$00
    % A2 L* `$ j. [( N4 m
  584. LDA RELIFE_P1_ADDR( V/ J/ }: D# r' v* K& `
  585. STA $0703  E  k. \0 n8 Z" i& S
  586. INX
    4 w3 y) z' l  w: Y; d- K6 v
  587. LDA RELIFE_P1_ADDR,X
    6 M5 a# [& P1 w0 p
  588. STA $0704
    * v( o1 ?4 w" E
  589. JSR PPU_PROCESS6 U1 q& `" W& j0 v; J# b: a$ |+ _
  590. RELIFE_P1_W:# M! t' }/ A/ N- B+ j; l
  591. LDA RELIFE_P1_DATA,X
    & Q) q# Q) _! K5 I9 B) V3 Q$ a
  592. CMP #CEND
    ( R' t" B8 R4 S/ \4 Z
  593. BEQ RELIFE_P1_START
    & [  Q0 ^9 k  Z3 q! N5 c* B
  594. STA $0705,X8 j- E1 p2 K3 T3 H2 ]
  595. INX
    : M; B" K, m$ e- ^- r4 F% Z
  596. LDA #$00
    3 Y+ A8 b' n( ~' @
  597. BEQ RELIFE_P1_W
    0 q% o6 r, K* R3 w
  598. RELIFE_P1_START:6 Q# s3 V5 D8 X- [" x7 P/ L; Z
  599. JSR PPU_START
    # U5 `* ]9 E# S7 P% Z, e
  600. RTS
    4 ^7 g- ?! R& N9 H% y% W9 K

  601. 2 T  N, C  K- e# @
  602. 4 S9 c0 g! a; P% A5 ^# N- t
  603. RELIFE_NUMBER_P1_ADDR:
    ' t7 o7 [3 O; b# J4 k. s7 H+ M
  604. .BYTE $20,$EA
    3 a" U- i* `( ^" W- M5 O' C) k- W
  605. RELIFE_NUMBER_P1_PPU:
    9 C4 P2 s( L* I& |4 ~7 x
  606. LDX #$00
    : i. u; i! P- }# E0 ~5 h
  607. LDA RELIFE_NUMBER_P1_ADDR; ?1 M: e0 J/ A# ^7 Z
  608. STA $0703
    : W( c  y! f) k, s( j$ C
  609. INX' b' q8 {  p4 p9 F
  610. LDA RELIFE_NUMBER_P1_ADDR,X$ @; j0 T$ k+ q( n. S
  611. STA $0704! M" O1 |' I  Z/ N# z
  612. JSR PPU_PROCESS+ J! g3 l% w4 p# `$ J
  613. LDA $32
    5 G+ C! g+ I6 C  b( W+ Z
  614. JSR LIFETODEC) c7 h% I% u+ O: Q
  615. RELIFE_NUMBER_P1_W:
      l, F+ `+ |5 r
  616. LDA $7A03
    ' A* i( s; {' J: n7 B+ r% k
  617. STA $07059 F4 G/ z1 q) p$ f2 [4 ~; r
  618. INC $0705" D7 X9 O  e6 q/ I( m/ j5 ~
  619. LDA $7A04. ~  w; T$ T! W# z
  620. STA $0706$ q- N( G# O" i* Z( i+ _  N# |' Q/ d
  621. INC $0706( G9 u% L4 h& S6 r7 y& t1 G
  622. LDA $7A055 C9 P, Z0 W4 M6 e+ [) M' n
  623. STA $0707
    , H- n4 m( T# y9 t
  624. INC $0707  d! D  o3 @; G7 w  \6 S& u. r& L
  625. LDX #$03
    & B$ w" `* t: a. P; {' m* s
  626. RELIFE_NUMBER_P1_START:
    / W( P+ M9 A' n# P5 R& P2 c! ?
  627. JSR PPU_START2 |$ k8 o3 E5 J( K/ {; u# A
  628. RTS
    2 [" q9 |# M* S' q! f5 h* R
  629. + _) d1 d; A) a- ]5 a
  630. WEAPON_P1_ADDR:
    - b* R! {& F' {; P, O1 ~
  631. .BYTE $21,$23
    . N: g4 `; u% F+ F) n7 o% o
  632. WEAPON_P1_DATA:
    * X+ I8 q+ L4 X* O- v
  633. .BYTE CW,CE,CA,CP,CO,CN,CEND% L1 t/ X' }* E: f  H% r/ @) D
  634. WEAPON_P1_PPU:
    + f2 @. X5 C3 l
  635. LDX #$00
    . }3 t$ ~. }9 e+ ]: `- m
  636. LDA WEAPON_P1_ADDR
    5 L& ]4 T4 f5 f( u
  637. STA $07034 |) |7 I2 U0 O* z
  638. INX
    6 A/ J, R; V" L) U6 r% T
  639. LDA WEAPON_P1_ADDR,X
    - O# j4 W% q( ^! _. h& ]
  640. STA $0704
      `* R6 |" O; E  [  `& b' u
  641. JSR PPU_PROCESS% q: @4 W7 y2 x3 U% g
  642. WEAPON_P1_W:
    / U# c, e- ?8 W! c
  643. LDA WEAPON_P1_DATA,X3 l2 Y' _/ t( L% C7 F" ~" A
  644. CMP #CEND( ^6 I. }6 Z' q* \/ z
  645. BEQ WEAPON_P1_START9 A% |7 f& u, I7 d
  646. STA $0705,X0 V9 p) Y, S( c8 T& P, Z+ F% l
  647. INX  t. j4 P; Q, E7 ?# p# X$ a/ J5 B* H2 [
  648. LDA #$00
    + ]1 ^2 A, @( ^
  649. BEQ WEAPON_P1_W8 K' P% I% F; _- y
  650. WEAPON_P1_START:6 }7 k( R/ H1 J. o% m) J
  651. JSR PPU_START
    3 N% j+ P7 y& \, g% p7 x' n5 z2 a7 q
  652. RTS% z2 ^) m2 e  Q
  653. : `, O/ v+ I' L  x5 y6 [8 B- ~
  654. BULLET_P1_ADDR:5 W: Y1 f' o: u
  655. .BYTE $21,$2A8 r3 [/ d, C$ ?  _/ i
  656. BULLET_P1_DATA:- A1 u: ]* g$ s, g  r; A; P
  657. .BYTE $00,$01,$02,$03,$04
    * `; U, f: U" {/ q
  658. BULLET_P1_NAME:
    # U" P0 t+ |6 O4 T
  659. .BYTE CN,CM,CF,CS,CL# i/ Q5 m7 |; j7 n

  660. 3 n; b3 r% }* ^$ Q! Z
  661. BULLETPPU_P1_PPU:
    5 f: p8 u# H2 V& U% {/ E# a% ~
  662. LDX #$001 `- E- C, }8 \9 V$ r" V
  663. LDA BULLET_P1_ADDR& H. [; e% Y& Y
  664. STA $0703
    4 e$ V/ \) D# w$ y' z' S3 W8 V) f
  665. INX; u6 W+ e/ h( w3 q- v: V
  666. LDA BULLET_P1_ADDR,X) d8 [7 Y8 C& g
  667. STA $0704
    " h& c' o5 f* ?& j1 P  z2 f
  668. JSR PPU_PROCESS% J, q0 K9 F  Y1 D' X
  669. BULLET_P1_WRITE:/ s8 Q' c& n8 f$ u
  670. LDX #$009 e  V, f+ b  H3 Q" F  g% t+ c
  671. LDA $AA
    6 x- w2 R; x' T3 ?! M) W- j* [
  672. AND #$10) @( _: P! E9 s. }8 X& Y/ C
  673. BEQ C_BULLET_P1+ _5 d" A  d. d. j4 u7 B- ~8 ]! {
  674. LDA #CS
    ; Z5 s' C0 W% K' \3 [& `
  675. STA $0705
    . g6 X% X- B6 }4 H8 T: l* g
  676. BNE B_NAME_P1) p" b' Y0 N6 d$ D7 q
  677. C_BULLET_P1:* e# t, X$ m) }( ~1 T9 s6 M
  678. LDA #CC
    % A. ^/ J  _5 [5 ~. L2 z
  679. STA $0705
    / Q8 B  i& p; O6 r! @* g' H
  680. B_NAME_P1:
    7 k+ u5 I2 j( b- a& k4 j4 z8 \
  681. LDA $AA, D2 p: Y- }, l5 P
  682. AND #$0F3 w" O- {4 Q4 ?3 B  S3 ^' o/ D4 x
  683. CMP BULLET_P1_DATA,X( H  n, B1 Q1 f, V( D( l. B$ J6 S
  684. BNE B_NAME_P1_RECMP1 q2 K3 U' v( I& Q3 @
  685. LDA BULLET_P1_NAME,X- J' A7 C* X9 v% _
  686. STA $0706
    ; p7 M6 C0 F3 X6 [) T% u- Y- |; N$ M
  687. B_NAME_P1_RECMP
    ! K4 H4 o& P9 O9 L- V5 s1 V
  688. INX/ C5 A: w1 b' N: Q- B, Q
  689. CPX #$05
    4 Q3 y. G0 K) M' [1 O
  690. BCC B_NAME_P1/ a- l9 u4 b+ O
  691. LDX #$02
    * ?+ i0 r& \- U- K+ Q, q/ A* M4 g
  692. JSR PPU_START9 i6 W2 v, f) p& \" c3 Z1 l' l
  693. RTS/ e3 q2 e( `* F: k0 P
  694. : e" x7 F/ `/ U4 Q: T
  695. 4 R$ }$ H4 [; r( q5 J; E; P/ u" p
  696. PLAYER_02_ADDR:0 s% b$ W" w  w( V1 G! X
  697. .BYTE $20,$B3
    % h0 G5 e0 k' T# F5 O6 [
  698. PLAYER_02_DATA:" P2 M3 w) z6 t5 b
  699. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND
    ; c9 j% a' g" t* I9 }
  700. PLAYER_02_PPU:3 ]# Z6 q+ W0 k7 j
  701. LDX #$006 p. j2 Z+ |$ D3 B' f9 \) N
  702. LDA PLAYER_02_ADDR
    - X# i, K# q% h* V- |& M
  703. STA $0703
    ) ^) ]3 U/ {3 d2 F& C$ l
  704. INX
    ( ^$ F/ z: Z/ N7 S& J) \
  705. LDA PLAYER_02_ADDR,X  j  u- B, g0 g( |: l& i
  706. STA $0704
    , O0 |  I9 [9 G  b( ]- H
  707. JSR PPU_PROCESS
    ( Y! f$ g9 u. h: v
  708. PLAYER_02_W:; Y* u: ^  p3 }" K
  709. LDA PLAYER_02_DATA,X
    % |  l+ @. p2 x
  710. CMP #CEND/ `; i" v+ B/ A' H# e% Y. ?
  711. BEQ PLAYER_02_START
    & x& i4 n( k' R- @5 R
  712. STA $0705,X
    $ S; r7 L- r5 F# d( m7 L
  713. INX1 ~9 a% l' L$ ^4 b
  714. LDA #$00
      x' u/ c; b% {7 z! f  s7 s8 Q9 F
  715. BEQ PLAYER_02_W4 @3 q5 k/ W6 M0 h; C1 E, T
  716. PLAYER_02_START:  V$ a% H) z+ T/ D" ]; r6 o$ @) o6 `
  717. JSR PPU_START
    , b2 Z& m$ f0 U: ]$ U$ z  M
  718. RTS8 m$ @6 Z/ O; t( Z* y9 m) [
  719. 1 Z% l: C" B& O' r; m; A

  720. 4 i+ m+ C) k) [' O( G3 m0 `
  721. RELIFE_P2_ADDR:
    4 \# t/ t# I7 j7 j2 X7 }
  722. .BYTE $20,$F3# z3 }, ?4 u; M4 x/ t
  723. RELIFE_P2_DATA:
      ^  M* s, `9 u! l8 E
  724. .BYTE CR,CE,CL,CI,CF,CE,CEND
    $ r) A1 ?3 A/ n1 r( w5 g( F
  725. RELIFE_P2_PPU:; y# E/ i2 L0 G- x+ v
  726. LDX #$00
    3 S# w* X, J0 m* e; [
  727. LDA RELIFE_P2_ADDR" ~" [9 x8 ?/ \: F7 G9 K
  728. STA $0703
    6 Y5 @  R6 e! z6 |2 X# o2 Z& K
  729. INX
    $ b- c9 `' ~7 X5 h/ K
  730. LDA RELIFE_P2_ADDR,X
    , K' d& s. |8 h$ |; y7 d6 T5 {! ^' A* O
  731. STA $0704
    * ]' b- t+ P  M4 g  c% L  K0 Z
  732. JSR PPU_PROCESS' F4 u, d2 z4 T0 b* V
  733. RELIFE_P2_W:
    / u0 q( \' l1 x
  734. LDA RELIFE_P2_DATA,X
    9 b: }* Q# ?6 k& h
  735. CMP #CEND
    ; y$ z2 V. k0 j
  736. BEQ RELIFE_P2_START
    ; V3 Z; w) s. d/ C5 H2 e6 M0 x5 F
  737. STA $0705,X
    7 x% R& C: G: q) a7 S  k
  738. INX; Q- J) s6 y$ }* X
  739. LDA #$00
    6 G# o1 r" q: @1 v
  740. BEQ RELIFE_P2_W
    # y2 p, m9 j2 H; \! `% d6 d, S1 K
  741. RELIFE_P2_START:
    5 X/ l7 a3 I+ o% m& T2 M
  742. JSR PPU_START
    0 [2 j  U: x- S% m" ^$ X2 a
  743. RTS6 m' ]4 J: r1 J* f
  744. . ?8 ]! m+ W6 Q. ?+ R* n
  745. , m2 f& a/ ^3 @
  746. RELIFE_NUMBER_P2_ADDR:
    # _$ u9 N4 q; J0 W, E2 I
  747. .BYTE $20,$FA
    ; z0 ]+ j5 d( |8 {  d' N8 G! g% @
  748. RELIFE_NUMBER_P2_PPU:9 {! {/ D6 x- k! a* d! q
  749. LDX #$005 Q0 \  C& c3 L3 {
  750. LDA RELIFE_NUMBER_P2_ADDR4 `7 W1 g8 E5 n3 Y* g
  751. STA $07033 ?1 g$ n8 t  v
  752. INX' y0 U' e1 L/ T/ u& b4 H
  753. LDA RELIFE_NUMBER_P2_ADDR,X$ O% V+ w0 |+ v/ q( o0 [5 _
  754. STA $07048 a/ v% W0 Z; S8 o' e! v5 B: Z2 o
  755. JSR PPU_PROCESS
    % G5 ]0 z) ]8 v' l2 B" t# E
  756. LDA $33
    9 |1 Z7 M6 G( B
  757. JSR LIFETODEC3 B) a" J3 @- z, x6 B
  758. RELIFE_NUMBER_P2_W:: \1 i6 g3 Y( {# A9 a
  759. LDA $7A03  s: _$ Z! J4 w" q4 ?
  760. STA $0705  p, n: @/ a6 O: p
  761. INC $0705. Z) M8 C; C7 v" y0 f
  762. LDA $7A04
    1 ^2 d$ _# w4 N9 S4 v, J6 ?
  763. STA $0706  z- V4 j- D- Y  v, T
  764. INC $0706
    : U3 R; X% K- u2 }6 L% j3 c0 W
  765. LDA $7A05
    4 U7 }8 a( E. ^/ @% S$ U
  766. STA $0707+ i" h3 ]7 `1 i3 t; q, u8 B
  767. INC $07075 a* O# K' r# L' h. w$ m
  768. LDX #$03
    " O+ U0 f- V+ t
  769. RELIFE_NUMBER_P2_START:
    - J, v6 K# r+ X& {8 N. M5 Y
  770. JSR PPU_START
    7 L8 `2 V, h! G: f* f& E. J, \
  771. RTS( W- Q$ S; a# e6 t) }' e  u
  772. ' R, z  q: X6 @- \, @+ y. M
  773. WEAPON_P2_ADDR:# R8 f, X& Y( }7 l
  774. .BYTE $21,$33  r+ _. y5 w9 C, O: z3 b. h' U! f
  775. WEAPON_P2_DATA:
    2 S9 t1 l0 {2 p6 y/ U5 [) i; z8 w
  776. .BYTE CW,CE,CA,CP,CO,CN,CEND* k* O% Y; ?4 O/ n
  777. WEAPON_P2_PPU:" Q) @- W" S$ S& A
  778. LDX #$00
    + b3 S+ [% r; N: P1 j+ F
  779. LDA WEAPON_P2_ADDR0 k0 v; ]3 o- _$ u! p8 K& m
  780. STA $0703
    ' m2 ~$ u; X' d2 {3 o; K
  781. INX4 a; |6 `* O* c" N- ~0 A
  782. LDA WEAPON_P2_ADDR,X
    2 ~6 ]6 ~; m  r& J6 l3 x
  783. STA $0704
    9 ]* G; P0 S" K
  784. JSR PPU_PROCESS. k) W) K" ]0 m& a) H. @% ~: o
  785. WEAPON_P2_W:* u+ w# c9 V# a% D
  786. LDA WEAPON_P2_DATA,X
    - B2 d9 a. W) j4 L1 ~$ A
  787. CMP #CEND: r; Y; f4 b0 x0 T
  788. BEQ WEAPON_P2_START
      {/ F% s* O( _% D
  789. STA $0705,X
    + s1 u3 M* w2 N9 t
  790. INX
    2 y. m; O! {+ Q8 d( r
  791. LDA #$00- C. c( ~/ J6 a0 X0 y* n
  792. BEQ WEAPON_P2_W
    : t8 c% v' s& _5 z5 r$ J
  793. WEAPON_P2_START:0 y- P- i+ ~7 ^+ y
  794. JSR PPU_START9 t) k) r! U3 e+ _0 R3 f% B4 \
  795. RTS
    9 n$ m. e; P4 B5 A: S8 m

  796. - x! Y; c5 T0 B0 ]! c
  797. BULLET_P2_ADDR:
    $ q! [" Y; ?) W' U  m8 Y8 b7 Q( {
  798. .BYTE $21,$3A
    / o( |5 @8 v7 G+ U% N& Y
  799. BULLET_P2_DATA:% o4 ?9 I  u9 @( j4 l, z
  800. .BYTE $00,$01,$02,$03,$04
    ( s6 z( X, i! W1 p$ c" a! M4 A% u
  801. BULLET_P2_NAME:
    0 |3 {7 _3 ~  Q( j" ^0 l2 Q
  802. .BYTE CN,CM,CF,CS,CL
    1 K! M: M, [. X' q3 |

  803. ! u8 f6 M. r/ S, ~
  804. BULLETPPU_P2_PPU:5 [" g8 D; ]. I) A* `) [# F
  805. LDX #$008 l0 U/ `; e/ z/ P2 C; C
  806. LDA BULLET_P2_ADDR
    ( ~" i, R/ `. ]5 X  ~
  807. STA $0703
    3 T" ?9 v6 P, u% ]) A0 ?
  808. INX4 W) f' y1 r9 b5 b& `9 b5 |# `' y% b
  809. LDA BULLET_P2_ADDR,X) Y# e/ s+ d3 |- h( Q9 ?5 r
  810. STA $0704
    0 I4 j3 w. L! w
  811. JSR PPU_PROCESS9 R& q+ V0 s9 V+ k/ d8 r" W
  812. BULLET_P2_WRITE:
    / G  s; o! a! {
  813. LDX #$00# M! d  i5 ]. {3 W1 z
  814. LDA $AA+ a% M! s; H% O! I
  815. AND #$10% B8 q. p8 ]& A$ O, a  T
  816. BEQ C_BULLET_P2
    1 a( ?7 ?: U/ w1 ^9 r' s
  817. LDA #CS
    . ~6 X& n" D) M. S5 @
  818. STA $0705
    & b# K8 O+ v% G+ m
  819. BNE B_NAME_P2
    ' x) P  ]$ b9 B: F* X$ u  a9 F
  820. C_BULLET_P2:
    9 X) o, s3 d& y  X9 A" A- Z
  821. LDA #CC$ k# ~9 l# t; Q8 c! Y4 E
  822. STA $0705
    # J0 Y5 W$ m9 U& k+ g) N9 W$ _9 a- s
  823. B_NAME_P2:% c8 ^7 K9 q( @" o5 X
  824. LDA $AB
    9 u- Y+ K6 Y9 _( q# l
  825. AND #$0F" W$ C5 X' Y" {+ Y& K& U
  826. CMP BULLET_P2_DATA,X5 o& u. o& r9 w0 K
  827. BNE B_NAME_P2_RECMP1 u; L6 c2 R8 r# n9 M
  828. LDA BULLET_P2_NAME,X0 O* R; ~% a" Q' N+ w
  829. STA $0706
    9 w( C0 l7 x0 l4 f
  830. B_NAME_P2_RECMP
    , E: \3 e; k, {! p1 z0 l0 b
  831. INX& O' O' n6 z6 B7 b
  832. CPX #$05
    " B9 ^, R8 j1 l1 F" e
  833. BCC B_NAME_P2) {6 W+ M" z$ v% B* y3 x2 I0 X; I  _
  834. LDX #$02  Q+ m% _% y  |- t
  835. JSR PPU_START
    ( ~) {5 b1 W" I( z
  836. RTS
    - J/ f5 c8 J7 _2 \+ C9 h
  837. 3 ]. \+ @/ W6 |% L

  838. , D; X, y0 b9 [( V) G- o

  839. ! U1 H% a5 l4 O1 ?

  840. 9 m" E- H3 s" s
  841. 8 v1 w9 v; j& M3 L+ P
  842. 9 a( f  V' N  h; l( ^: c* e
  843. LIFETODEC:                ;十进制转换4 D5 K; {3 n: N" G7 b( n
  844. LIFEL1:        ;initialise
    4 z% L: G5 {( g: N9 N
  845. STA $7A00        ;$7A00=F3% x/ j; n* Y; w( \
  846. LDA #$00
    ( i9 V- ], e+ R; d3 h- X2 M
  847. STA $7A03        ;$7A03=00
    ) j+ y9 w( i5 x9 H8 N  `3 Q  Q
  848. STA $7A04        ;$7A04=00! ^) s  @* j: [2 A* W0 g) k" _& p6 s
  849. STA $7A05        ;$7A05=00
    8 Y+ u; U& d  U, H% I2 i
  850. LIFEL2:        ;copy data $7A00 to 6001$ K, J" Y2 W  }. `
  851. LDA $7A00
    / _* M! h8 h7 c8 T' y
  852. STA $7A01
      ^5 U! P1 t$ b# r
  853. $ w- Q8 I6 v4 r( b" k
  854. LIFEL3:         ;hundred
    7 a7 O6 g" `& t  S
  855. LDA $7A01$ l2 t/ [% `, ^# ]5 n8 [
  856. CMP #$644 `8 y- y+ V( S2 X* q- p5 d
  857. BCC LIFEL6                ;$7A01<100 goto L6
    8 x7 `, m: ?% k4 r4 n
  858. LIFEL4:5 d* u+ V4 u. i8 H
  859. LDA $7A01: y. `2 o6 y6 x; |: u
  860. SEC
    2 c7 N2 ~6 T4 s- X) O
  861. SBC #$64        ;$7A01=$7A01-100, q( ?1 I: y$ T/ X
  862. STA $7A01, [4 e8 s6 x7 d
  863. INC $7A03        ;hundred++
    / i# @" [% u' X. \* m9 o
  864. LIFEL5:! s/ _- N. \' y% ~6 l* F
  865. LDA $7A01
    # t7 |' {0 {7 D5 t% {
  866. CMP #$64
    / I! j1 z$ C6 B2 g
  867. BCS LIFEL4                ;$7A01>100 goto L4
    , n- g& i$ b' X. ~: |

  868. ) z" C$ C; r2 i& [( H
  869. LIFEL6:        ;decade
    9 b" w3 ?/ D& a' P" p9 Z+ L" e8 W% T
  870. LDA $7A01
    3 S2 \: ]! D, P6 h1 [9 d
  871. CMP #$0A
    5 \1 X; t5 W: j) L3 ?" j
  872. BCC LIFEL9                ;$7A01<10 goto L9( \2 h! X  [8 ~( S0 R5 C
  873. LIFEL7:       
      e7 o  H% g& Y2 S% g4 Z( h
  874. LDA $7A01
    - }5 a& Z9 O& x0 O
  875. SEC
    6 W3 b) B! l1 t/ W* n
  876. SBC #$0A
    7 n% G1 {+ b* f8 d; q. K
  877. STA $7A01        ;$7A01=$7A01-104 R$ I) A3 P6 }7 D$ }
  878. INC $7A04        ;decade++  ^9 b! \% K2 n+ u
  879. LIFEL8:
    + h! |3 ^- }! [6 N6 O% i
  880. LDA $7A01
    ) c$ c4 c. H* m# n4 }8 U
  881. CMP #$0A
    1 }9 T4 J/ |$ Z- I7 f: y4 U
  882. BCS LIFEL7                ;$7A01>10 goto L7
    + t' p$ n( H& e) @; ~! R0 K( [# k
  883. ;unit! R2 O8 j2 [7 D1 T9 ]
  884. LIFEL9:
    - O  d  w- i' l( U8 l& H; I: G
  885. LDA $7A01        ;$7A05=$7A01; b2 [: ?( w, b5 K/ W4 N
  886. STA $7A05        ;unit
    0 ^! a0 Z" }; y- G' E* \  i
  887. RTS        ;return- @/ B  X# J3 G/ m

  888. 6 `, F1 J6 ]6 C4 _! Q% [8 @8 W( h6 }( r

  889. 3 T( r. u4 e6 C8 a( ]  A1 u* w. ?

  890. - v) v/ v, }' F& a% c+ e5 L
  891. PPU_PROCESS: ;PPU地址处理程序
    6 G- j, S1 Z4 \+ q0 m( w
  892. LDX #$002 ~! n! v/ k/ `' }
  893. LDA $FF
    ) S+ O& ]; a1 q2 [' y
  894. AND #$018 n8 B5 L$ C) W3 k. t# v' Y$ C
  895. BNE PPU_2400_27C05 f$ A. \' H/ T1 q
  896. PPU_2000_23C0: ;命名表1, i4 h& M+ y% \
  897. LDA $0703
    * H  l6 M. b  y$ M
  898. AND #$FB
    8 [& G* ^( |7 S4 I! f2 e- |
  899. STA $0703+ R( o2 W% P3 ^' q
  900. RTS2 `0 G3 E- \+ n8 G
  901. PPU_2400_27C0: ;命名表2
    : }; c8 f9 s* n4 b) p
  902. LDA $0703) ~: b9 K% a4 y7 ]& V; V' z
  903. ORA #$04
    : a5 ^9 F/ Z# f) j
  904. STA $0703" ]$ ], Q4 T/ i- p: C- ]9 Z* o. K2 ?" H
  905. RTS8 c- \) S" e% o7 d
  906. 8 J4 ?2 Z8 G& a: i
  907. PPU_START:  ;PPU数据写入4 e7 @0 B. x; ^+ }8 x* N5 Y5 l4 c
  908. STA $21: z1 L7 j: m8 S& f# ^
  909. STX $0701
      ]' T8 V8 Y$ v# ~: N& l
  910. LDA #$00
    7 S# L2 Q7 X# T+ C
  911. STA $0705,X' l. |4 `2 ~" k$ I; D  @: r# [
  912. LDA #$01
    8 A5 U; n% y/ O! `/ l9 a
  913. STA $0700
    & H+ T# K4 |$ w. y* o
  914. STA $0702
      I' I& I, x* {' G& J/ v
  915. RTS
    ! k- b9 Y) S6 B8 G# R

  916. - s5 w- z2 S* l! g
  917. # J1 {, W0 v. d% l( w' a: n
  918. , D" h8 f- {7 _, M* W

  919. & r2 i1 r( E4 [$ C) N4 a

  920. " T; b4 I" A  m2 X0 m3 R! U. x
  921. 7 q3 u4 a: R: _( q$ O
复制代码

, s- U+ X  E8 i8 y! p5 y

本帖子中包含更多资源

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

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

签到天数: 2048 天

[LV.Master]伴坛终老

发表于 2017-2-13 17:25:19 | 显示全部楼层
这么好的教程竟然没有人支持!
) Q) H: L: p( o8 v* }

签到天数: 2532 天

[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-19 10:17 , Processed in 1.097656 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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