EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2017-2-13 11:57:33 | 显示全部楼层 |阅读模式
  1. Contra (J) PPU写入程序; s$ e1 I4 U) _3 ~% J' @% C
  2. 作者:FlameCyclone1 f' U" g2 v' m5 [
  3. 时间:2017.2.123 q/ }1 r! }" R: O% {. J) i

  4. 0 E( w1 j0 N: n  ?4 M8 C
  5. 按键跳转:
    % x$ R0 W: e+ T/ G* _
  6.         C1EF:95 F5 94 F1. S3 s$ d, Q" f4 D7 G% s# T
  7.         C1EF:20 70 FB EA- q8 Z8 q( X  V. N* |( Z
  8. # b: z9 _( v) j0 r$ K2 C* R0 e/ d. g* _
  9. 滚动偏移:
    " [3 ?. ?5 X4 J6 M# q# J7 A. J
  10.         F936:A5 FD 8D 05 20 A5 FC 8D 05 20
    , D) Y0 e+ h9 t$ z* X1 C! r5 l
  11.         F936:20 C0 FB EA EA EA EA EA EA EA
    3 m$ b; W9 s9 d- P: H4 T6 a1 M* M% L
  12. 4 N) P# {( T( G/ d: y% g
  13. 背景调色板:6 V4 G) {% d' L6 x$ y& ]
  14.         CF20:9D C0 076 Z* T' S/ n: M1 x9 B
  15.         CF20:20 A0 FB
    2 \$ l$ Q. z/ w5 T5 [* b2 V! V
  16. 7 c# N" F1 e1 C5 ^, e) S- G
  17. PPU BANK号:
    1 x, [& k; c3 x0 x  a
  18.         C8C9:9D F4 07, z* y$ H1 H. A( H0 A7 R5 f. E- t# ]" U
  19.         C8C9:20 B0 FB
    / W% v# K0 j+ d

  20. 2 j# h# d2 `1 a$ M) t$ D6 f; v8 P
  21. 按键跳转:
    0 l$ z/ I9 F8 p& n3 R5 i
  22. FB70:        95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 20
    9 H; E3 g  N% g
  23.         AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 20
    - ~) L/ B7 w; ^1 m
  24.         21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF
    , z( m# s& E% ]1 i1 ~! D
  25. . L# H3 z& L( N6 r  [3 l
  26. 背景调色板:. y# B! e6 u- u) l0 e5 K+ w% ^2 R6 ^
  27. FBA0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF1 a* h* g. N& ?9 q: `( Z' ?
  28. ! R4 }! P' y. a  t
  29. PPU BANK号:0 d$ H2 G- \9 K- A  Z1 r+ Y
  30. FBB0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF
    , [8 U* M0 K) N2 t
  31. : O2 L$ i$ }3 W  M1 y" q
  32. 滚动偏移:
    / u! `1 p$ N- _# N  D5 W) b
  33. FBC0:        AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 603 h7 Q7 h) Y9 a0 [$ a
  34.         A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF
    0 M$ }& y, d$ e; a6 y
  35. $ Z7 B0 _( U& C* [

  36. ' e2 x/ O/ X, K3 C- E- Z. Y
  37. 切BANK后A000:
    2 L# ^8 l, Y- _" Q. ?9 P0 F
  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% p# l# N( k: x( X1 G, A
  39. ' F0 A! A6 c! \
  40. ) X( V+ e/ Y) n0 q. `  s6 w
  41. 6502 simulator:# y9 c# j( e5 b, l+ x+ u) t
  42. PPU写入程序:
    8 A# e' M0 }' E$ @; Q: j; }
  43. .ORG $A0004 i4 C' J, _1 J' i' x; K
  44. CSP = $802 X7 e3 p: _- r# U* O- k
  45. C0 = $81
    8 D- T" n7 ~" C, `1 l1 i( s. U
  46. C1 = $82
    % T+ R- L9 P+ Q6 ?3 U
  47. C2 = $83* w! u$ b  ?7 X2 \9 v6 K
  48. C3 = $84* K' p7 i; v& @- B6 D& F
  49. C4 = $850 P% j+ O% L  z! u
  50. C5 = $86, S1 ^; l5 G' t# O8 W; |
  51. C6 = $875 y# l4 I  X, t6 i/ b& L
  52. C7 = $88
    + r3 `" l! l; c' M& o, R( N
  53. C8 = $89! O- ]& f& g: `# H. o
  54. C9 = $8A
    + J" D8 }( Y4 r8 s& E, B% S
  55. CA = $8B
    7 J6 r. w; r3 i; w
  56. CB = $8C
    , X; }* M7 L8 g" c. _8 K! W' ]  ?  X
  57. CC = $8D2 }* ^5 r. e+ f
  58. CD = $8E# J  h2 i" s) O8 z) ~
  59. CE = $8F
    & _$ S) s! [' `. U  Q
  60. CF = $90
    & p4 v2 N( N: b9 z0 R
  61. CG = $91
    * V6 j# `2 n1 ~/ M' E7 N1 X
  62. CH = $92+ T4 k; B: v( T) B
  63. CI = $933 R3 l7 [/ T+ H! m: \
  64. CJ = $94( ?  H& Q: W: ?' g; H1 s: T# n
  65. CK = $95. i! K8 @4 L5 d' Q. n$ S" \8 d
  66. CL = $96
    ) L) q" `, m  L; E( J/ H+ E
  67. CM = $97
    % E- r! T: [( V8 z: B& m
  68. CN = $98  q+ e& L1 c0 D$ O: Z; e# c* r# V
  69. CO = $99
    + o* ^: @& i0 U! |8 w
  70. CP = $9A( N% H& h' J# H! R; Y4 B: x2 f9 N
  71. CQ = $9B, C  S2 h9 f  V' ~
  72. CR = $9C/ Z2 I( D4 Y1 t( S! o$ r- g! H
  73. CS = $9D2 ?, p9 l. O. H% |$ @' E  _3 S
  74. CT = $9E5 F6 J! Q% Z8 b- I
  75. CU = $9F
    + o: h7 [$ C, a8 `
  76. CV = $A0% e7 C- S" P7 D: R
  77. CW = $A1
    8 t. \* U( E' S0 E% H9 i0 ?  O
  78. CX = $A2
    7 x! [2 G: i$ d1 s  n* V  Z
  79. CY = $A34 h5 u0 B) K3 i6 n' T
  80. CZ = $A4* e) X& l, {9 l: a
  81. CEND = $FF
    # m8 ?( N' y3 g$ q  ^* |8 c
  82. 1 {8 P& A+ I* K* {9 ?: A. h3 S

  83. 3 C: z/ S; @5 I8 i5 P
  84. CMP_RE:
    * p! p8 e. @' R8 ]# l; U
  85. LDA $FF8 Z; c( c+ s1 ^( F+ ^3 e, `3 \
  86. AND #$7F$ Q' ^+ C8 C7 o  j1 P
  87. STA $20009 e/ |! g: m- ^: d7 O
  88. LDA $2002
    - c- T2 `+ C5 ]
  89. LDA $25
    % L; I+ d: S! w- T+ W1 Y
  90. CMP #$01( q2 z# _4 _6 b2 G0 L
  91. BNE PROREG+ v7 _3 F9 B4 Y' I# b  P
  92. LDA $F5,X
    $ `! V9 z& w  a* ]/ M2 T8 G
  93. AND #$CF
    : K) R9 L7 q0 p3 f, ^6 R0 |. f7 H
  94. BEQ PROREG
    6 R/ u$ W  Q1 t
  95. JSR PPU_CMP
    ( m7 O6 `  N/ p) N# g
  96. C_RE:
      o: Y- V" m9 R$ \" ^  b4 ~
  97. RTS
    6 V+ s% S: F0 G& D8 U
  98. PROREG:
    , a8 f4 \: ]  A( i6 Y+ S$ u
  99. PHA2 \1 I( T; y; F3 d
  100. TXA
    / K' m. E8 q. |7 j
  101. PHA5 y( p8 {' d: i
  102. TYA! S. _6 u% \/ G" H2 Y: l
  103. PHA) t# r; q, k8 e
  104. LDA $25
    2 P, E8 S2 C4 W# X
  105. CMP #$01
    : z, x, ?/ |$ w4 \0 k4 w
  106. BNE RE
    4 E3 W7 s$ S; o% p# V
  107. LDA $010A4 N0 Y& \; |/ _
  108. CMP #$00
    $ v* Y3 ?# T2 H
  109. BEQ P1
    . n% B  M/ u) X8 _. C9 m) s$ C
  110.   K) O0 T9 j& [  U
  111. RE:
    " o/ w# o2 f3 V) U
  112. JMP PPUWRITE9 Z6 ?6 ?3 w7 P6 O' }
  113. 8 z# s: g  T: _. n, n
  114. P1:                ; 条件判断
    0 Y3 S% t6 }2 D" p3 v. M
  115. LDA $7FFF% h" N6 P0 j; P4 P" l
  116. CMP #$FF% I: H) {4 ~1 W6 z; h4 T$ n5 ~: g6 r
  117. BNE P1RP
    ( e. f/ M0 \6 ?. b/ s# p6 G! s
  118. LDA $7FA08 m8 R5 `: G2 B; L- s( f
  119. CMP #$00. p+ c, b8 f) a) V, e* l
  120. BNE P1CMP1 H+ O0 }$ D: O/ B' h
  121. LDA #$FF/ x/ ]5 A) K) j
  122. STA $7FA0
    ) b( p) M. Z& O5 z
  123. JSR CLEANA
    % R: x* E' i+ @) o
  124. JMP PPUWRITE  K  H$ U! ?3 F3 [0 f) O  s
  125. P1CMP:
    2 A: n% [4 D1 s' \9 Q
  126. LDA $7FFF
    , R! `4 h  }" v2 O
  127. CMP #$00
    2 `! z7 [( ?4 z/ g: U
  128. BNE RE6 @  P4 b# V( X9 q' g
  129. P1RP:! x# ?8 N# ^9 P, `/ Q
  130. LDA $2002
    7 X% L1 H1 S/ N( l( j* v
  131. LDA #$00! Z7 ]' \% _( Q( V! ~
  132. STA $2001
    4 `9 a" I7 ]- |; P* D( a1 @
  133. LDX #$00. K" [0 O2 ?& P1 b) g5 o) a
  134. LDA #$FF
    0 G! T3 K- ^1 ^2 i9 h
  135. STA $7FFF. _. q1 x* c* C2 a9 ]
  136. STA $7FA0( E- n& V7 n1 e8 a" o, Q+ W
  137. JSR COPYPPU
    $ Z/ N7 Z% h' ^
  138. PIRP2:
      x( I' V2 r5 f0 i+ N0 e0 U0 J; C7 V
  139. JSR CLEANA5 N; r! Y% O9 j" ]4 [* I
  140. JMP PPUWRITE: O" b0 ]6 H9 J
  141. ) Z6 j- L$ J4 z9 a8 }- E
  142. COPYPPU:) u) Z! H: u/ ]4 n0 h; O+ H$ \
  143. LDA $FE% {8 O2 j) j; P! g9 r& S8 j4 j
  144. STA $7F50
    / \" t, M- E- }; z2 J. x/ k
  145. LDA #$08
    . c& P2 {! P* Z' n% k9 U6 S; e
  146. STA $FE! X9 w) ~7 A4 }- x9 G( Z" T
  147. L0:6 D9 p6 d! Q% c. k
  148. LDX #$00
    # D' g- O4 h  M5 k  E8 B8 r
  149. COPY_07C0_07DF:
    1 c" {: ]; o1 A. J( f5 g: \
  150. LDA $07C0,X
    % ?4 j; z$ d) F- M9 x! \* C  E
  151. STA $7F00,X
    3 f5 L. ^" @8 q2 E: q
  152. INX. F' e5 p" p9 }0 N- W' _9 f
  153. CPX #$406 k9 ]+ w: y2 x2 i$ n
  154. BCC COPY_07C0_07DF
    3 O! A# I' M- t- o' X
  155. LDX #$00
    ( O. P8 C0 ?& r" ^. j
  156. PPU_07F4_07F7:
    / I$ _% b8 D* j! }/ l, O* Y5 u8 t
  157. LDA #$00
    , J  L0 T5 l- V9 y9 \: O
  158. STA $07F4,X
    4 Q/ v( n6 q' F; r, f
  159. INX# p* z3 H/ C4 e: @( V
  160. CPX #$04
    1 \9 g! E! q3 B: \  a, |
  161. BCC PPU_07F4_07F7' \6 E% d2 n; x
  162. LDX #$003 O6 d  r  `* M) P) t3 z  W
  163. COLOR:6 C! A) j4 L$ ]4 H
  164. LDA COLOR_DATA,X9 q1 T6 I/ s' ~$ d1 d5 ^
  165. STA $07C0,X: k. W0 |- Y% ?8 @% [0 Y
  166. INX
    9 `# h+ U- N( l( n8 K- A/ a( E
  167. CPX #$10# T0 ?1 n& ?, s( Y: ]) T
  168. BCC COLOR
    4 m' l) H$ E1 M6 u2 r

  169. % ]$ p4 y6 B9 d" v7 p* m' b, M7 L: G" G
  170. PPU_COLOR:
    8 f" A' N  ?0 [' `8 t6 n
  171. LDA #$3F( b" l4 K0 f" W$ @
  172. STA $2006
    : m  x* z" ?& d: f7 A' X) f1 N
  173. LDA #$00
    : H- A: V: p4 j1 k# Q
  174. STA $20062 o) X2 ?& y  _9 B6 |
  175. LDX #$00
    ) v1 O* H5 Y5 Z. D  M7 C( R. d
  176. PPU_COLOR_W:+ k4 v& m9 o% Q
  177. LDA COLOR_DATA,X
    . ~, m& O9 ~4 M
  178. STA $2007
    " x, x5 c1 \! F" H
  179. INX
    $ [7 v5 i' r" q# r# f
  180. CPX #$10
    ' ?( h9 j" i7 m" R
  181. BCC PPU_COLOR_W
    , G8 C! R! n9 J# `+ O& i2 z

  182. ! Q$ ^. K- m; w5 B2 a: P/ Y
  183. - _) ^6 D) Q* W" g; ^
  184. LDX #$006 X# H: N, P5 U* }
  185. LDY #$00) ^! ~( ~2 J1 R: C$ L. y% Q
  186. LDA $BD
      P: ?5 y( g: i9 H, t
  187. PHA
    ' q/ n! g7 b* p6 C. z, L7 t
  188. LDA $BC& I( k. ~% b+ ]! J4 M) t  s0 F
  189. PHA7 [4 l. L2 d" z; z8 R# y+ O
  190. LDA $BB% W5 ~* F8 |" X* V! B9 S
  191. PHA9 O9 s' z7 M9 {; o/ S- }! Z( X' X% m2 q
  192. LDA $BA
    0 ]4 R* d& D9 E; q, t  R2 u" e
  193. PHA/ ^; B! l& E3 m2 Z3 [. N! g
  194. LDA $B90 d1 R' l9 p: ^  t1 @% u
  195. PHA! P5 o: Y: q; N) x6 f3 y9 w! j) i
  196. LDA $B8
    " h1 B2 c; k6 a7 s# Y, b, m- O
  197. PHA* c2 c6 m0 P5 r1 c
  198. LDA #$00
    , w$ R/ L0 H0 Z; m
  199. STA $B8( W' u8 G9 {5 Q0 e
  200. STA $B9$ D/ H6 H2 X4 h- r
  201. STA $BA4 Z/ a: I/ F3 x6 u% }
  202. STA $BB! r! Q& x2 ]" H/ D+ e! l
  203. STA $BC4 L/ D( K8 P9 s5 n5 S' b. K$ Q
  204. STA $BD
    . B  U6 b2 b: h% K  ~% }$ Z( {0 S
  205. LDA #$00
    4 g, o# ~& ^4 z+ b1 A& [
  206. STA $BA1 v4 E$ F/ r9 @6 S% ?" l
  207. LDA #$20
    " j  R; F* Q- P2 {) o
  208. STA $BB
    ! @* d' B) r0 e8 k7 B
  209. LDA #$00, ]) O; @+ Z' m* M4 l& h
  210. STA $BC
    8 h( c; U0 K$ R8 A# R
  211. LDA #$60
    8 `  R6 X" K/ [' o1 m
  212. STA $BD# R) b7 {6 h5 L; R5 U

  213. " w+ ~8 e( F# u
  214. L1:                ; PPU复制
    , ~1 c9 P  r7 x# r
  215. LDA $BB
    & p: E& G. X+ u1 {, V$ B: |
  216. CMP #$287 H3 J4 g+ q) M$ r5 }+ u8 O+ c! a  a
  217. BNE L2
    2 u: r! Q" M$ o, E( @
  218. LDA $BA; O  y+ Z) u0 n/ A( {
  219. CMP #$00
    9 x9 y# D# r8 v! g% i
  220. BEQ PROADPLA
    ( U+ _  g! {0 N5 |
  221. + I1 g  E) \2 U$ `. x. Q' O
  222. L2:
    ( U" }( T- L  C) B' c6 C" f6 r7 _
  223. LDA $BB
    5 y9 D. r: V% R% m8 P6 ~
  224. STA $2006) `: k+ X6 V& n: X# H3 x+ M; k
  225. LDA $BA3 j. {& F$ x0 E( o+ \
  226. STA $20062 U0 b, H+ p1 r9 n# i2 k

  227. - h7 K1 ?. g# Y
  228. L3:( U( F: p2 m/ v5 B& s. [
  229. LDA $2007. N% m, M6 B% L/ y. \
  230. LDA $2007
    % X' Y! A# {% [. N( w9 V# u
  231. STA ($BC),Y5 t0 ?# O( |& K, P0 o

  232. , f/ x6 o. K  l+ s/ w* G5 R
  233. L4:1 a( G' a- e. i7 [8 J
  234. LDA #$00
    8 K4 M( `+ {+ B4 Q, I9 b
  235. STA $20002 a  a4 u0 F/ x
  236. INX0 g% b& r6 R6 _
  237. INC $BA. P( F' J2 l' o! t
  238. INC $BC
    2 O5 O, q, v2 {9 P; w6 K, A+ y) j' \" x% H
  239. CPX #$00" l5 p3 P7 X, h6 o# ?/ y
  240. BNE L1
    + f% A' w5 z3 `9 [
  241. INC $BB
    . s8 o7 L8 n! W
  242. INC $BD3 t' U/ ^: T6 ~) p8 ]
  243. JMP L1
    2 p+ L8 l( |" m
  244. 1 t; R. v6 k, ?4 n* ~) J" j4 N
  245. PROADPLA:                ;出栈3 Z0 E2 x8 J- Q: T' Q# e4 W
  246. PLA
    1 m6 V) I7 U5 N+ ^) b+ |8 x/ L# l
  247. STA $B8/ r7 C2 Y5 I2 Y( @4 Y/ {) u& e6 Z0 }4 [
  248. PLA4 J/ C) m5 N+ p; `9 {  ~
  249. STA $B9
    . n# J6 W4 X. m
  250. PLA4 \" D6 X9 v6 v( h# y. T
  251. STA $BA
    7 Z% K& C9 I7 Q6 D
  252. PLA
    ; T7 L, w/ l" |+ |" [
  253. STA $BB
    # o/ B- i% e& }; @! X9 f( Z4 T9 J
  254. PLA
    ! u0 U/ g/ A; n# ]' y, m$ X) P0 h- h
  255. STA $BC, R7 s& R7 O: O4 h. ^5 y3 R1 v
  256. PLA
    & \# p6 G, }/ G
  257. STA $BD
    2 H0 ]' Z% Z4 Z9 Q+ y( H
  258. CPRE:& P. J; ]/ t0 l
  259. RTS
      W# ^4 U# ~1 X

  260. + D9 E7 e7 k: H( \' p( w' t8 h+ K- D
  261. CLEANA:                ; PPU清空9 v" }4 a: ]; `4 ?7 ]* p
  262. LDA $BD2 w% G! e' f. S% Z
  263. PHA
    6 ~1 q/ @5 }. f) R/ c- G( k" C/ ?4 {
  264. LDA $BC$ b/ I1 t7 o8 i3 J; o/ H. L
  265. PHA
    6 [" ?8 C4 b( f+ d( B  t
  266. LDA $BB
    & R4 }. S: c# P& B% W0 i3 D# l! L
  267. PHA" f/ d# P/ ~. F5 g
  268. LDA $BA
    3 G" B6 U, x2 k7 s
  269. PHA+ X# T' v: d8 T" Q$ x
  270. LDA $B9: u  g8 T. U/ X2 n" D$ y2 H
  271. PHA' d  a  o$ v7 c$ ^6 _8 ^
  272. LDA $B8
    $ Z! R: |: U& U# [! L. |. d
  273. PHA
    8 O9 W) P" o# T3 i0 V
  274. LDA #$00# P, E5 J2 ~# C7 v8 V9 j
  275. STA $B8
    - }$ L+ d/ F5 l5 Z$ v# t
  276. STA $B9
    0 H1 F7 ~, x# z9 p! R. {1 L& |/ A
  277. STA $BA
    3 d* m5 m0 M5 L+ i* F' q' f
  278. STA $BB- @. T" a2 f2 _& J5 ?
  279. STA $BC
    ) Q0 d9 v2 i2 X  y5 K0 L& _
  280. STA $BD
    ) J8 M- |5 x  p: K5 h7 _
  281. STA $2001
    # m" [/ h" C$ x8 N, p( y/ b% k6 S+ ?! e
  282. LDX #$00
    ) v: D' l: e& D  w
  283. LDY #$00
    0 n3 F4 r& b0 \8 D
  284. LDA #$005 |0 ]3 V8 I' _6 g: E* N: f
  285. STA $BA
    3 M, z7 p* S. F5 H9 c
  286. LDA #$20  g# S2 H. y, \( v
  287. STA $BB* b" F% f& n$ d- U: w$ Y3 h) z5 O
  288. / c# J4 \* d1 {8 t6 v7 E* g
  289. CL1:
    * x2 N; p4 d( W# ?' g# A# |. N
  290. LDA $BB% d6 ^) ^7 }/ w) z8 H
  291. CMP #$28" v  n. U4 Y3 R
  292. BNE CL2  I$ B1 r. x0 }2 x0 f
  293. LDA $BA7 B5 {' _* T& F' G2 s5 G0 y- P
  294. CMP #$00
    % D8 d6 E2 e/ P* B9 P3 N- |
  295. BEQ FREEWRIYE
    + e- _; X' a2 i
  296. ( C2 o# N6 J; x7 n7 F4 V. J. [
  297. CL2:6 d0 z2 Y  J5 h) x
  298. LDA $BB# D9 C4 g1 R/ ]8 E, O# t7 ^
  299. STA $20061 N, [- H6 z2 r8 d: j' P9 l' v: r. t4 S
  300. LDA $BA! n, n$ [6 o4 r4 {
  301. STA $2006$ V4 n$ @8 U9 R6 C9 k
  302. ! \0 ?' _5 b: F' I) f+ D8 a
  303. CL3:. P4 v3 V8 z! \* k
  304. LDA #$009 q" g9 h3 I5 ?: [
  305. STA $2007
    . @& A. U- p0 P; q* r- ]+ P/ w# q1 \& F$ b
  306. * J5 d, r2 a# h6 m4 b8 U# n2 j
  307. CL4:5 f( Q5 o/ B3 \5 t7 V; ~( U4 P4 l
  308. LDA #$00
    ; z2 E# b* l9 ?" ~/ y% Y
  309. STA $20009 q; h: G" R3 z5 M& c! W% a+ ~
  310. INX$ u3 O0 R% ]% ?
  311. INC $BA
      P- |/ j+ E7 F& G- p7 k$ F$ c
  312. CPX #$008 r0 Q) a) K9 t; `! B, i* d8 C
  313. BNE CL19 G& S0 M. v) i" e  h! p4 o0 Y6 d
  314. INC $BB
    4 {. h) m0 G  x8 j  N
  315. JMP CL1 7 I% y5 A: y* e4 a) V% T$ E
  316. 5 d, W5 u& [3 c) R' j
  317. 4 m% q4 P6 w% W4 ?- P
  318. FREEWRIYE:+ u* I; K. _; z% l  D( q

  319. 9 U; A) h* B' p. R5 b# s" K' d5 G
  320. NOP& B* w/ e/ B# z% E

  321. 2 \3 m+ c  M& k, {" ^

  322. " \4 f7 G( ~6 n: C6 y$ @# ^
  323. . e( }4 _, b; k4 M8 Q
  324. ' N" g3 U% \3 T2 Z# U6 V
  325. + W8 b- P1 O  R& z8 J( m
  326. CLEANF:                ; 恢复现场) z- R' l' D4 V& f* X

  327. 4 d0 \/ F2 ?" |7 s$ V7 C
  328. PLA
    ; y5 c. O9 Q, T, X, w; b- f. c6 D
  329. STA $B8
    + X' u5 n8 n$ u: O3 c( @
  330. PLA5 [- `6 m' Z% V$ N3 W4 N. Y
  331. STA $B9
    1 k% r5 T( g4 l) s" w9 x
  332. PLA( f# t" |8 r( o& [2 W
  333. STA $BA
    " T6 U- L0 ~8 m0 s0 i
  334. PLA: \* S5 u5 v, w6 L
  335. STA $BB  v) r2 p8 s- o; i% M: u* s9 K
  336. PLA
    " f! L$ P2 x  q8 w6 `0 Y
  337. STA $BC
    ' O" e3 M6 [6 p  W( A7 g7 I! H
  338. PLA
    : ~5 _) o: h, Z# e5 |+ B8 h& r
  339. STA $BD1 S) s2 O1 c) a. S1 M
  340. CLRF:- v4 w; @4 q/ w# p+ z7 S
  341. JSR FREE_PPU
    1 `( k. y( l+ g$ l9 Y, [2 B( z
  342. RTS5 W" b: ~# [+ j2 j7 x; d3 s
  343. ' V2 Y3 T, D- z6 n7 l  e9 k

  344. ! I2 A7 m+ [+ r. `
  345. PPUWRITE:    ;PPU写回
    ( {/ i- D+ C# U8 _5 x
  346. PLA
    . d6 m/ X. q; `+ T% v% P4 |% V: I
  347. TAY
    + C+ S. D% U/ G# }4 a
  348. PLA& ]" ?+ p9 G; R" ]
  349. TAX
    ; M8 ^; C* C9 q$ d% F
  350. PLA
    . B; m5 P$ G/ A4 E0 g. f
  351. LDA $25
    % b5 D$ p8 j0 J( ^
  352. CMP #$00
    4 w9 E3 s0 ]# {; `# M
  353. BEQ WP1
    ) O- i/ |' V3 a, F" ]' {
  354. LDA $25
    2 C, |& d7 K, U: t
  355. CMP #$01
    + j! ]" B$ G2 ]0 U
  356. BNE WRE
    2 U5 A' N% g9 b* M# K1 N1 H1 J5 A
  357. LDA $F5,X3 f  ]9 q; j+ d
  358. AND #$EF; t- E/ [$ P3 t% ]7 Y
  359. BEQ WRE! \. V6 M1 g1 K1 x
  360. LDA #$00
    . @6 o  x* J0 O& A: c3 j- Y/ I( J1 W
  361. STA $7FA05 Q: R9 U: d! E  G& X, T( q& a# h

  362. 1 K0 q: Q5 `! t0 `' s
  363. WRE:% W$ @; g  J  \9 a( a4 D+ {
  364. RTS$ O7 S' U) N: N7 X9 @/ [6 y) i6 \- i
  365. % u9 _9 `5 |9 W( I/ |5 D
  366. WP1:8 U/ j( e& B, ~$ k3 ^
  367. LDA $7FFF9 k! o; e6 l$ h9 K& X4 Y: _
  368. CMP #$FF
    9 t0 {5 y: m1 [5 G, H
  369. BNE WRE
    , ?% I. h8 }* I
  370. LDA #$00: B) r2 I. f  c+ U; c. K5 O) R
  371. STA $2001
    4 q2 |3 B/ i/ C3 B: z: I0 X/ s
  372. LDA $BD: R1 Z% P2 g3 f
  373. PHA
    + l, q8 w8 }9 g
  374. LDA $BC, Q( J( O# g2 b3 I
  375. PHA
    7 T7 m8 Y/ \# w/ u$ ]
  376. LDA $BB
    # k& _# @# t- o- T" t4 ^
  377. PHA
    % D: j; {2 h3 X2 }! v
  378. LDA $BA
    # y; ~$ X( v5 T+ M7 b
  379. PHA& e5 J) A: q& }2 \2 n* X+ p% n
  380. LDA $B9
    7 r8 |. H. o7 I# b# r0 l
  381. PHA
    0 I% z8 E: i& G0 K3 Z4 e! f) i
  382. LDA $B81 @/ W  {. D- j5 |- d: z$ ]! w
  383. PHA3 S( j1 t. e; n; i
  384. LDA #$00
    ) Y4 U2 z2 {$ c+ k
  385. STA $B8' v: X0 z2 U1 D7 A, c
  386. STA $B9; T7 \: I4 C* l/ ^: w
  387. STA $BA
    ) x- I7 J7 G5 @) |" n0 A* y
  388. STA $BB
    & t7 `. V4 _! i8 r3 Z% `
  389. STA $BC
    1 [. q( L: D- P  o
  390. STA $BD
    . M$ V8 N3 D# a2 g3 B* S
  391. LDA #$000 c# J6 b/ @5 \( u/ ]4 D
  392. STA $7FFF
    $ u' j7 X# N) o3 }
  393. : \% z- _9 E: M6 N7 x! j% m, y: L* ]
  394. WL0:1 x  _' o! E( v4 B! J0 B) k
  395. LDX #$00# d6 K% P. q6 V! e
  396. LDY #$00
    / e' n- ?1 _) y0 i; q! a1 M
  397. LDA #$00  n3 a" O& [, _( K3 F! {9 H
  398. STA $BA* E! s! T5 Y& S1 ~
  399. LDA #$20& s3 D8 X. t1 y/ b- ]) P
  400. STA $BB  t8 M* z4 l) G" c" A, l0 n) ~
  401. LDA #$005 y. {6 h' B1 U
  402. STA $BC
    ( P/ w0 h  \* t, P8 A
  403. LDA #$60
    1 i) k9 J" A; x" O
  404. STA $BD
    + u& b2 }- ^5 C$ _+ P; @/ `' B
  405. 7 k* c* u  ^8 d, s8 I! k9 J
  406. WL1:! t* k* w6 x# M
  407. LDA $BD) t$ z; m6 `5 O
  408. CMP #$68
    ) t& n3 b) G. a' @% o/ ^" ]
  409. BNE WL2
      M. X9 H3 z, }# r; H7 U
  410. LDA $BC
    ( V' B  Z' @; z0 X& [9 w$ k
  411. CMP #$00
    7 V% D( u7 Z$ f/ f) b' D
  412. BEQ WLR- `3 K0 ]. `* T1 G
  413. 1 R' T" B) U0 b! y- G8 t
  414. WL2:
    $ M2 a5 h* C9 ~( v. I2 y
  415. LDA $BD
    / h$ B6 A3 G: d  v$ X; U: G
  416. STA $2006
    7 p& o0 j3 p$ Q- \6 z- }' @
  417. LDA $BC
    4 [$ {) r* K1 u8 L) f1 K. U( ^* |/ D
  418. STA $2006' x5 g4 U0 U; ]( J: H0 t
  419.   V5 k8 M, i% r! p$ E& r2 R
  420. WL3:
    * q5 p( H/ m- i  }, |' d; Y- M8 k4 V
  421. LDA ($BC),Y
    6 \  w8 n/ P( Y, L. o8 f
  422. STA $2007
    7 h2 d: C) O; Y! q' C

  423. " z2 q8 u' R1 B4 y6 v
  424. WL4:
    . i6 O3 q; H8 {# R
  425. LDA #$00% Q+ G; {1 j) U- a  }
  426. STA $2000
    0 Z% l0 f, ~' ?; P$ J% a
  427. INX
    7 k2 Y3 O& d7 y. e( Q8 u
  428. INC $BA3 g" O* `1 B2 X7 |+ _* V
  429. INC $BC2 |) P! }8 ]3 n7 K2 W3 J6 D9 z8 \
  430. CPX #$00" q- N* l& h7 a/ J+ W& ~$ S
  431. BNE WL1
    9 J: T$ `* p5 z& W1 e
  432. INC $BB
    - X% i, U; Q7 ?4 x$ {: M, @
  433. INC $BD& B# U" `, f) h/ P7 }& ]
  434. JMP WL1
    ) I/ v( g, y4 \4 T' O% h5 x
  435. 1 b9 T) m( X; j% K# Y' {3 r9 s6 p. V
  436. WLR:
    0 \8 X) S0 n8 V, o4 z
  437. LDX #$00
    7 s- _8 w, e% @$ s) F
  438. COPY_7F00_7F3F:8 U+ k: P7 ]. L% D( F" S
  439. LDA $7F00,X% t- M0 I6 b+ d* s5 \* e
  440. STA $07C0,X& P+ V) ?- ^1 `
  441. INX
    2 j3 h& l! ?, y" \( Z5 e
  442. CPX #$40
    ) F/ P# C* S8 S# y/ b
  443. BCC COPY_7F00_7F3F/ }/ j' h5 f( P# P  ?# x: J& b. ^

  444. $ ^- g- }! s, {2 y; b
  445. LDX #$00
    4 X3 g+ t4 D- A* _: a: Y' }
  446. LDA #$3F# A7 j9 x$ b0 g4 ^. t2 p2 o7 e+ y
  447. STA $2006
    : m: ]5 D: c5 G+ r/ ]0 J# z9 d
  448. LDA #$00
    0 C0 Z% ^9 t8 U; e
  449. STA $2006
    1 G+ p* k* _2 A) @8 j# u3 D
  450. COPY_7F00_7F10:
    ( t) g  L" m  y% Q
  451. LDA $7C0,X( z0 k: N. ~+ ~1 F6 m3 g- O
  452. STA $2007/ \' A8 F) }5 x" f2 t0 j
  453. INX0 l( t" r, c5 U. `' w1 m3 S/ n
  454. CPX #$10
    3 d3 k3 O' {& T0 X9 D7 p
  455. BCC COPY_7F00_7F10
    . F) G3 M/ H' w8 G& n

  456. # m+ p( u8 A3 I5 Q& L
  457. LDA $2002& X8 P8 c1 N. T; [
  458. LDA $FD) l) Q2 g7 W/ p& X; g
  459. STA $2005
    5 x* R$ U$ {9 ^3 Z- Q0 b0 m: f( Y% a
  460. LDA $FC8 i4 m2 I0 n: m/ x0 P
  461. STA $2005/ g9 E& w( J. s* n% L/ S

  462. : ]( w* ^6 x# K0 |0 I7 T1 h7 ~
  463. LDA $7F50# K. \2 O6 y" Q
  464. STA $FE
      t9 P1 {! O0 ], C. M
  465. LDA #$00
    0 |- F  J4 K6 S5 n. e+ w2 }
  466. STA $2000
    0 L2 @9 p& o8 c
  467. PLA( v+ t3 F1 j. e  K
  468. STA $B8
    $ E: [- f$ q" X1 i8 p8 ?" s  h2 |+ U
  469. PLA6 J) g9 [1 Z  E' Q! _7 A# L- y
  470. STA $B9
    4 p$ _* X+ ?" x! ^7 ?& H
  471. PLA: j/ D9 ^6 m  M. C. |2 `$ j' [
  472. STA $BA
    ' v4 I6 E! x, o$ ^! `
  473. PLA
    6 A/ S& ~& s2 i1 x& |
  474. STA $BB
    & M# r. @1 f, }7 ^4 ^( Z
  475. PLA( I' M7 S7 Z3 E' w+ p3 }4 }
  476. STA $BC6 I6 E: a0 T0 G* W; e6 J
  477. PLA
    4 O9 ?- u, \8 k# R3 J3 X2 k
  478. STA $BD
    & G4 y" O7 e2 T9 o, P" g
  479. 6 T3 y& E) t3 c% c- d4 l# k: U
  480. RTS
    / q. \' X0 b' D# W) p% c
  481. 3 l" d$ Y8 V8 h" a0 D7 u- L
  482. PPU_CMP:
    ; i0 s( P7 u" C) ~' L( n' Z, _

  483. 2 \2 K( D# L+ @) q$ O

  484. 7 Y9 g8 \: N* c1 P; l8 b/ \8 K
  485. PPURE:. W7 I; o& ]( F" z, _5 i" h! D
  486. RTS" Y* K7 H" J# j! @0 D

  487. ) y$ V" O% [7 L, k" f7 v" \

  488. - |3 R" b2 f! c1 z1 Y9 w- J
  489. FREE_PPU:
    ) z, m9 F& b6 \& B2 R

  490. + V0 J3 Z; A. N4 X- p- \
  491. JSR TEXT01_PPU
      ]2 x5 l2 c$ y: N% K, }, R( Y
  492. JSR $CBC0
    " R$ {6 X+ _& K' I6 P3 v7 T
  493. JSR P1_PPU
    ' e" w- f8 @, h- b7 J# S
  494. JSR P2_PPU
    + d! s% A/ ]0 ~$ X* |) f
  495. RTS8 f! g5 D( C5 M* F5 z* D
  496. + d, N& d) ~) i0 x
  497. TEXT01_ADDR:
    % J7 J0 Q5 |4 x) K6 d
  498. .BYTE $20,$42
    & r$ h' l& _8 @7 R' w& M  p
  499. TEXT01_DATA:2 ~$ j2 [' Y& b& o
  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+ c$ y; a- K( Z% n* y
  501. TEXT01_PPU
    , J: U: d  C" r3 `+ J; b; N5 ]
  502. LDX #$00  z$ ~+ T8 ]: w$ e
  503. LDA TEXT01_ADDR% S9 P6 D( t, ~# m+ \5 @: A' A
  504. STA $0703
    7 w$ R* ^( v% L3 q& @+ z
  505. INX
    3 b) B6 b( \" ~1 ]; c) P
  506. LDA TEXT01_ADDR,X4 E9 @' x6 \, s: }" d7 f& E2 _3 m
  507. STA $0704' W; q$ h& z0 O: N9 C
  508. JSR PPU_PROCESS; F) I2 I9 ?+ V
  509. TEXT01_W:
    ( H7 K9 _3 {" a7 k1 I
  510. LDA TEXT01_DATA,X9 q; Z3 K% l, z8 i2 Y* i
  511. CMP #CEND
    # D9 _2 Q+ p6 e& b3 K  W& O
  512. BEQ TEXT01_START7 A9 [' t9 M8 N$ Z& |# y
  513. STA $0705,X$ G3 n/ k8 m: z
  514. INX- i  x' L7 ^" D; d
  515. LDA #$00
    $ G" z+ S2 c, b# v# F
  516. BEQ TEXT01_W( |0 s( K6 ^# H  P: w! U( r% a
  517. TEXT01_START:
    8 P( ?" J( Z# C- l
  518. JSR PPU_START
    3 L6 M3 O0 K6 Z4 B. e* z
  519. RTS0 f2 Z( [, l  [6 I

  520. 5 s1 E8 G+ ~* d0 F, H) j
  521. ( {1 k- e' V2 A+ x
  522. COLOR_DATA:; N& h. t$ _2 |8 P, ?, X) A/ h
  523. .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28: R: d  O9 }3 q
  524. ; J' B! s; ]7 n9 i
  525. P1_PPU:
    3 Q( U- d. U! z$ w9 B- p& c& m/ i
  526. JSR PLAYER_01_PPU
    2 F% {! [* j, ]+ @
  527. JSR $CBC0" S1 R2 h: ~& A8 G, C3 \7 ]! ?
  528. JSR RELIFE_P1_PPU
    . m. d* Y& g+ V$ x. t& {
  529. JSR $CBC01 [. @! ?  F( z1 o! `: y
  530. JSR RELIFE_NUMBER_P1_PPU) d+ T' c* C, `2 P/ o
  531. JSR $CBC00 R9 b6 M9 R# P$ n: c4 k; b& X2 `
  532. JSR WEAPON_P1_PPU6 z& \' L" a5 \' }
  533. JSR $CBC0
    1 m& E$ A; z/ _/ E0 Y% p
  534. JSR BULLETPPU_P1_PPU
    $ j% f1 s6 N. b. @
  535. JSR $CBC0. I% R" P5 b5 ?, u# a
  536. RTS
    # o) n; V7 j: Q- F
  537. 6 u& ]- W) o8 ]3 z+ |2 u! d
  538. P2_PPU:& g, c+ p9 r% @; @. n; a' x% m1 |
  539. JSR PLAYER_02_PPU
    + ~# @3 p1 i9 B7 P2 b4 K5 H
  540. JSR $CBC0) @* ^- @" D4 ?% k5 B7 l! ~& W  p
  541. JSR RELIFE_P2_PPU
      T$ D. h' x) U
  542. JSR $CBC0
    & U* m8 w. y7 b% m5 V
  543. JSR RELIFE_NUMBER_P2_PPU$ d( ~0 Q9 a" `( v
  544. JSR $CBC0# n2 M% T7 G; }) O: w
  545. JSR WEAPON_P2_PPU
    6 I9 f+ e1 k2 ~, G. a
  546. JSR $CBC0
    $ M. R+ `$ i/ `( D: f& m, p3 E7 \
  547. JSR BULLETPPU_P2_PPU
    8 Q- O( U% ^: `, q
  548. JSR $CBC03 l0 o/ X5 r# A( C  ?4 g
  549. RTS  F. q3 l  i; }- Q7 l' y
  550. ! e% r+ r$ j. t1 t

  551. 9 _# I4 h; t; X1 X) c
  552. : _! i9 C5 _2 z! @3 {
  553. PLAYER_01_ADDR:
    8 R3 x+ J# P% \/ W: a& O
  554. .BYTE $20,$A3
    6 x; I" D* o2 e8 R8 n
  555. PLAYER_01_DATA:
    9 D/ |( Y/ |, `0 P6 F
  556. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND
    - d; Z7 }; q: j) \' o" ~
  557. PLAYER_01_PPU:
    2 Q, z  f! w4 p1 Z
  558. LDX #$00
    1 m. J9 r0 n3 P- v  J3 r5 Q1 Y6 H
  559. LDA PLAYER_01_ADDR5 F! c8 P3 k3 R0 V
  560. STA $0703
    & a6 a) H$ K* O% e5 {
  561. INX
    , G$ U# Y: P  P: N
  562. LDA PLAYER_01_ADDR,X1 \& R2 K7 B- E  B* E! v
  563. STA $0704
      N; ]7 W) r# ]2 W
  564. JSR PPU_PROCESS
    6 g8 N1 O$ F9 N, Y! T5 |
  565. PLAYER_01_W:; j  E; W$ c4 Z6 i  L5 v" M
  566. LDA PLAYER_01_DATA,X
    1 s" e  x4 J3 e
  567. CMP #CEND; z1 ]2 H4 |* D
  568. BEQ PLAYER_01_START! S; a2 V/ v3 y9 {* Y" O. B
  569. STA $0705,X
    7 y) Q& P& }# U2 C2 f6 X' x
  570. INX
    : c0 t: D9 g0 j5 A
  571. LDA #$00' t/ h) }) q5 _
  572. BEQ PLAYER_01_W3 z3 f7 c: k3 V7 Z* F
  573. PLAYER_01_START:5 \, X& W7 C; H; m, f  Z  T! R# C
  574. JSR PPU_START
    ) O5 d% d3 T# f0 W7 j7 T0 z+ p
  575. RTS
    9 K( }: Z& |. j, w7 w$ `# z
  576. 2 A9 g* `$ F' a2 u. i$ |# B9 P9 T0 O

  577. ) T$ H& r% }+ _( M' D, G
  578. RELIFE_P1_ADDR:
    ' R) B6 P1 f- ?) {9 p
  579. .BYTE $20,$E3
    ) C& C( I( J2 J  D# K7 O
  580. RELIFE_P1_DATA:( c- \# S2 E$ C
  581. .BYTE CR,CE,CL,CI,CF,CE,CEND
    2 s% a0 ]' _3 g. {9 @0 o
  582. RELIFE_P1_PPU:3 a$ z9 t, C; g1 D0 Z) g
  583. LDX #$00. g6 J0 K3 G: t4 Z' J
  584. LDA RELIFE_P1_ADDR
    2 v& G& K* W: K. m
  585. STA $0703( u+ a# m, l& M( Y
  586. INX. H3 G: F+ r! S4 A) t
  587. LDA RELIFE_P1_ADDR,X$ X6 A6 v! P2 I
  588. STA $0704" a7 g; o, V5 n3 i' m7 n4 k
  589. JSR PPU_PROCESS
    ! ]# u' x; P6 A. I- {  P4 Q  b6 U( H
  590. RELIFE_P1_W:- O' h1 i# {- O$ X
  591. LDA RELIFE_P1_DATA,X
    ; h2 a; E5 T, g. b& U, g2 z$ ?5 @( O
  592. CMP #CEND
    2 m, e, K) p) y1 m% I/ @, b2 Q- R
  593. BEQ RELIFE_P1_START
    4 |. P/ H, C+ X/ R7 l# R$ F- R- V
  594. STA $0705,X; d5 F; h5 o$ w0 g2 t& P" }4 q) o
  595. INX
    2 V$ K1 W. i" _& Z! K9 ~
  596. LDA #$00( Z8 }5 a% S4 ~0 \8 z8 q
  597. BEQ RELIFE_P1_W; j$ X4 Q* ]+ |; k. `: L- Q+ g
  598. RELIFE_P1_START:$ z  ]6 ~  t- h, b
  599. JSR PPU_START5 Z  E& S4 c9 w. f& F) B
  600. RTS- X- E2 o, b- d4 b6 T7 P( b3 ~' f
  601. + @7 B) ~- ]6 |1 Y
  602. 9 {7 v$ a6 m' s4 z2 f4 x# q
  603. RELIFE_NUMBER_P1_ADDR:$ I5 M7 R0 Y$ J( H8 [7 k
  604. .BYTE $20,$EA7 O! p' F3 g% y
  605. RELIFE_NUMBER_P1_PPU:
    5 h, F9 X* r' z, i/ }
  606. LDX #$00
    2 s4 j% J! b4 ?; S4 i6 \& w
  607. LDA RELIFE_NUMBER_P1_ADDR
    - Y1 {0 _; \! C% Y; D# A
  608. STA $0703* g4 R' \: A  X/ R0 o* D# h
  609. INX
    . V* k/ P; A, U8 q
  610. LDA RELIFE_NUMBER_P1_ADDR,X; ?  M1 X, G& N) l' F9 h
  611. STA $0704' q) O. K9 M) T- K+ o" K
  612. JSR PPU_PROCESS4 y2 E) X) W0 ~9 M
  613. LDA $32
    9 G1 D& _1 J! o, O+ t1 J
  614. JSR LIFETODEC5 N" B. k1 d' C1 h2 D0 G
  615. RELIFE_NUMBER_P1_W:* E6 k$ O+ R# @3 {5 J! ~. u
  616. LDA $7A03
    . ^, ^/ D9 w9 u# z
  617. STA $0705" ?8 H& P, [/ Z, U; T
  618. INC $07052 w9 {& U7 E4 m1 I
  619. LDA $7A04
    ; A/ J2 d" B4 m; B2 `; f
  620. STA $07068 |, f/ Y  P* G, F- n0 n8 p
  621. INC $0706
    5 B( z6 D7 F5 V$ x
  622. LDA $7A05$ \4 V% ^: C2 d- P
  623. STA $0707: D+ O3 w) M6 V0 H
  624. INC $0707
    & Q9 F3 X2 p9 h3 W; C" `: v
  625. LDX #$03
    2 h0 p- n( w5 ~0 |
  626. RELIFE_NUMBER_P1_START:: `0 \5 N  U. V# F+ W- L+ M( U
  627. JSR PPU_START
    4 _" P8 k" {, l3 K1 Q
  628. RTS
    ) O) A7 b) J+ V
  629. 9 ?, C& C' ?4 a
  630. WEAPON_P1_ADDR:2 |% @" Z7 Q6 c6 l: L6 U
  631. .BYTE $21,$23* |% w8 t/ B6 m3 V8 C
  632. WEAPON_P1_DATA:
    1 K( F2 b, I. Z  O
  633. .BYTE CW,CE,CA,CP,CO,CN,CEND) d( ?) W1 a% I$ O# y
  634. WEAPON_P1_PPU:
    0 U, n9 Y6 o6 x/ F& h
  635. LDX #$00' R6 D( Z6 y5 H% V4 P* _, B
  636. LDA WEAPON_P1_ADDR
    6 L0 F) K" q' [# ]- h. \% C! d" d
  637. STA $07038 I, v, u4 k3 Z8 _8 I
  638. INX- L5 M* y- T7 ]/ j
  639. LDA WEAPON_P1_ADDR,X* n8 s' j! _# [" e& ?$ a
  640. STA $0704
    7 b4 W( e* H* l! F5 a7 @
  641. JSR PPU_PROCESS' i7 K* `* v2 k5 A/ \
  642. WEAPON_P1_W:
    3 e4 A# a5 u$ v2 d
  643. LDA WEAPON_P1_DATA,X4 ?/ I/ l2 b8 }: O( h
  644. CMP #CEND
    4 Q: t4 l/ L% ]) l3 G
  645. BEQ WEAPON_P1_START
    & @" X) X' g( c$ q/ }
  646. STA $0705,X
    % ?* Y4 S0 b6 d+ w5 V, g
  647. INX  K- x& v- a% N- ~/ y& R: v
  648. LDA #$00
      p5 u$ N! x) z, \
  649. BEQ WEAPON_P1_W) s9 ^! v. a) [+ d$ A5 ]
  650. WEAPON_P1_START:) N) B, r3 \# B# ~( H
  651. JSR PPU_START. _# b- M# S! D$ [" u
  652. RTS
    6 S+ e  [! i" r% B) x) f) W
  653. 0 g! h( h: p0 |% G- `8 \
  654. BULLET_P1_ADDR:
    ( k. n5 f, q5 [0 m0 A2 l
  655. .BYTE $21,$2A
    9 S/ a: w* C8 x$ Z# R# Y/ y$ A- h9 P
  656. BULLET_P1_DATA:) I0 G  ^# ~, `7 e% ^
  657. .BYTE $00,$01,$02,$03,$04
    % X4 C! N% T3 w! a" c
  658. BULLET_P1_NAME:
    , y  Z" F: H: E
  659. .BYTE CN,CM,CF,CS,CL) ~4 u: k9 I4 l

  660. / O" f' v2 P+ S6 i, D0 }
  661. BULLETPPU_P1_PPU:
    % l% @# A. P% l
  662. LDX #$00
    4 @  {# I( q) R. D
  663. LDA BULLET_P1_ADDR/ q+ F/ W9 o% ^" G8 l5 W
  664. STA $0703
    . e+ w2 N. @1 |
  665. INX& ~; v  K+ J$ ~" }3 [  n) T% w
  666. LDA BULLET_P1_ADDR,X2 K% ^" T2 e1 p" d# o2 h& s
  667. STA $0704( @9 F" N0 I; H( \+ K# p* ^9 x
  668. JSR PPU_PROCESS
    $ X  ^0 |' h6 e6 ^0 p9 ?
  669. BULLET_P1_WRITE:
    $ m# `: Q- G1 q4 U6 l. b7 F3 P4 `8 h
  670. LDX #$00$ o- _; A$ i$ n) B$ |' J* l
  671. LDA $AA& B% M4 h* |3 w0 ^
  672. AND #$10, D$ r6 \3 Q4 d3 \, C/ f! v
  673. BEQ C_BULLET_P1
    ! @& L: _3 h" |) k* V: U3 P
  674. LDA #CS: r3 Z8 I6 d( j6 l8 W1 Q$ V
  675. STA $0705
    : |4 N5 ]0 E. [% b, B" x: k
  676. BNE B_NAME_P1- @. h2 D) i5 h5 K
  677. C_BULLET_P1:
    / s3 y4 n! U: F! s/ O$ R+ |
  678. LDA #CC
    ! Q$ F- h$ Z& a- e
  679. STA $0705
    / p/ c  X4 T+ t4 N% S- u+ }
  680. B_NAME_P1:9 _$ o8 l, q4 S% U+ l
  681. LDA $AA
    ( j, n3 K) A* L$ i0 P( y
  682. AND #$0F
    . G$ b7 H2 c4 ?1 t+ C7 g
  683. CMP BULLET_P1_DATA,X
    ! k& k! e4 y- K$ w
  684. BNE B_NAME_P1_RECMP
    ( [* S' _$ _" K# y
  685. LDA BULLET_P1_NAME,X) H4 h6 A  E5 i+ X( i
  686. STA $0706. i/ }5 L% W1 v% p9 H
  687. B_NAME_P1_RECMP; b; U3 v) |# w( e
  688. INX
    + _7 _, Z& K; V* y. k
  689. CPX #$05! h! T  R( o( j# u1 d6 q( z3 E+ U
  690. BCC B_NAME_P1
    * m: W1 p0 Q; W6 B
  691. LDX #$027 B( q6 n  e4 x( Z  k
  692. JSR PPU_START+ o& t- C) f3 ]/ \: i7 C" k
  693. RTS; L/ }1 o9 l- Y! }& a8 K
  694. ; t" E: m, V" s8 d* p5 w
  695. 9 Z. H( r) m% T; m- c" T* M
  696. PLAYER_02_ADDR:, X7 E7 g( K' a, i2 U# g3 @
  697. .BYTE $20,$B3) P3 s* E( K$ ]# E* o7 V
  698. PLAYER_02_DATA:
    + W( X  o" }4 h  ?6 R: H
  699. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND8 f0 N3 B) h6 _  g$ U
  700. PLAYER_02_PPU:: |8 w8 ~2 a% ^
  701. LDX #$00
    - B9 k8 g3 A! p# P6 @7 F7 W
  702. LDA PLAYER_02_ADDR
    9 Y9 a9 T, X! H/ e; \2 d7 k
  703. STA $0703' Q0 U) J) r. F% b% N! @" ?- w) q
  704. INX
    # d/ m$ k; o: [% Z0 s
  705. LDA PLAYER_02_ADDR,X& t1 L1 K: }. r+ y! t' v
  706. STA $0704
    4 l( _3 a. \+ C
  707. JSR PPU_PROCESS
    ) {- z: K( [. k/ i; ~. V' u
  708. PLAYER_02_W:5 o( J3 r4 x. u- ?- j( T4 V+ X
  709. LDA PLAYER_02_DATA,X
    ) u# W' L) ^2 I3 O
  710. CMP #CEND/ Y/ l) Q1 J; D5 w) [
  711. BEQ PLAYER_02_START; d! g- G7 \8 p3 K% o/ \) n9 h8 {6 v
  712. STA $0705,X
    / O4 A$ G3 G8 d
  713. INX
    : t, M* E2 D# H! {; D( Y
  714. LDA #$00) z, u; s5 u( N7 F- a+ d7 Y
  715. BEQ PLAYER_02_W! a5 B" W% a5 W7 S
  716. PLAYER_02_START:
    $ L9 R7 G$ i  t
  717. JSR PPU_START
    ! L. l1 Q3 X. u1 A$ U: ^
  718. RTS
    * D4 `* H& b; ]7 \

  719. 2 ]' A; f4 R1 `1 C, n  n( T3 I

  720. # V& d) w. I5 r$ t9 ^3 Y
  721. RELIFE_P2_ADDR:2 B' a% L8 c1 x, _# p
  722. .BYTE $20,$F3
    6 |! _; f: F$ w& k1 G
  723. RELIFE_P2_DATA:7 s' a2 F" j* y, L7 e) K
  724. .BYTE CR,CE,CL,CI,CF,CE,CEND' t5 C* h7 D8 S' h* @% o! G
  725. RELIFE_P2_PPU:" A+ h! M3 O- O
  726. LDX #$00
    7 M  o4 c* J2 i1 W
  727. LDA RELIFE_P2_ADDR
    / {4 P" v* E5 A) l5 b' k
  728. STA $0703
    # I* ^# ~3 U, U  C
  729. INX
    ' f" Z* I3 H% a0 u
  730. LDA RELIFE_P2_ADDR,X3 ~2 O- u: m: p8 J2 u7 x: p. O
  731. STA $0704, C! P/ K3 o' ^+ o$ ]
  732. JSR PPU_PROCESS
    , r: ^  Y! W0 z1 n/ C
  733. RELIFE_P2_W:% N9 ^+ c* Q+ B
  734. LDA RELIFE_P2_DATA,X
    6 A/ ?  E" Q! f/ h
  735. CMP #CEND
    8 G2 _, Y8 L4 L7 Z! V1 h
  736. BEQ RELIFE_P2_START3 q" K$ S3 e# D
  737. STA $0705,X
    0 [( J5 j+ o2 }$ x2 F1 i
  738. INX
    % c4 |, z8 J; B, _
  739. LDA #$00# H, L* {/ G, _
  740. BEQ RELIFE_P2_W& i( M0 V9 N; N) [
  741. RELIFE_P2_START:
    " O- ^! M2 |' K' ]
  742. JSR PPU_START
    9 z# X) ]: c: x0 n
  743. RTS
    ( e7 b- l' o2 N; J/ Q% Q
  744. - {1 o6 T/ V, d

  745. % ^  W3 c- V0 y6 w
  746. RELIFE_NUMBER_P2_ADDR:
    ; y) U; j- g8 d) V$ m* S
  747. .BYTE $20,$FA
    ( q7 S9 ^4 H2 b- C" B3 Y" A7 B% |
  748. RELIFE_NUMBER_P2_PPU:" P2 x+ C; y- n  W  ~! e
  749. LDX #$009 t3 o9 p# a7 S; ^! B
  750. LDA RELIFE_NUMBER_P2_ADDR
    * ~9 a' l# H$ j3 u2 R2 U# k
  751. STA $0703
    ( }0 R  o# S3 y, E: W
  752. INX
    * D, M. J! p. n
  753. LDA RELIFE_NUMBER_P2_ADDR,X
    ! U0 W) `3 v* F: |
  754. STA $0704$ _- `5 t. @- j: J( a. c
  755. JSR PPU_PROCESS6 M$ u2 C8 D1 u
  756. LDA $33
    8 @/ k! N/ `4 `$ |% |
  757. JSR LIFETODEC- h! l; ]1 Q; a1 W4 ~. D$ j7 Q
  758. RELIFE_NUMBER_P2_W:# G0 k$ X0 j4 d" \7 H+ t: [
  759. LDA $7A03
    & K8 o+ C5 S2 ]) o- ~5 B
  760. STA $0705
    # s+ B9 @* a, w( w2 p
  761. INC $0705. N0 |) o) \, n' w% Z1 P+ A2 @
  762. LDA $7A048 Z) x, H* S" U, V- O
  763. STA $0706
    9 `" v% V1 I" S/ y. y* `" N
  764. INC $0706
    . s7 G. A0 ?6 s1 s$ q
  765. LDA $7A05( d# X: E4 _/ y  z' S
  766. STA $0707
    9 _+ E4 v% N* S6 h" v
  767. INC $0707
    - `( Z' C( W9 X6 o6 H: O
  768. LDX #$03
    6 P' Z3 R: w3 l+ i
  769. RELIFE_NUMBER_P2_START:
    6 R; O9 k( }; {9 ~1 M9 c
  770. JSR PPU_START
    + N% h# X$ ~! z% r* ~7 G
  771. RTS8 i1 i: n/ v- o+ m$ B; R" f
  772. ( l: L; E" k0 E0 Q
  773. WEAPON_P2_ADDR:/ r4 y& Y! O, Z' w( {. O
  774. .BYTE $21,$33
    / ?2 |3 ~! c0 o. n
  775. WEAPON_P2_DATA:
    6 T# {' r" J$ x& k
  776. .BYTE CW,CE,CA,CP,CO,CN,CEND
    9 P" V& P2 m# A9 W* X
  777. WEAPON_P2_PPU:: t# k3 d, c+ S+ ]3 Q$ B
  778. LDX #$00+ `  `2 B9 u' b1 @
  779. LDA WEAPON_P2_ADDR
    ( L0 P6 z9 S* |+ E& S& l& ~
  780. STA $0703
    : u. e3 u* B; S1 L# X  ~
  781. INX
    + n4 y# h+ P2 U7 d. Y  t
  782. LDA WEAPON_P2_ADDR,X
    ! [$ A7 U) m- R; z
  783. STA $0704
    . m+ t% B2 v, x9 y3 R
  784. JSR PPU_PROCESS
    * y+ p7 ^/ g! P, D8 w5 l# b8 |# `
  785. WEAPON_P2_W:9 N$ w: u7 _6 r% P1 H
  786. LDA WEAPON_P2_DATA,X
      T8 A, p. s' M! e8 y
  787. CMP #CEND' J$ F6 W% S3 n
  788. BEQ WEAPON_P2_START
    - O8 j/ Y" C" p; x
  789. STA $0705,X
    . g3 {7 c, ~( ~: R; i! ~" P
  790. INX9 [3 S( W7 |$ D7 ]
  791. LDA #$00, ], i% Q- _. c3 c
  792. BEQ WEAPON_P2_W$ m8 a9 a$ E# ]5 ~6 _
  793. WEAPON_P2_START:
    6 O7 X5 \6 M4 e+ u' X8 z8 Q, f, |
  794. JSR PPU_START
    # S* A9 ?( H8 r! F% R+ A
  795. RTS  n3 k5 ~+ h! B  W! G

  796. ( y! G4 x+ H/ h# a% y
  797. BULLET_P2_ADDR:
    8 \# ]) F3 F& w& g& p+ G3 K
  798. .BYTE $21,$3A' |' ~1 ^, v/ N) L  V: n0 X6 s3 q9 W" J
  799. BULLET_P2_DATA:
    : G) o& M* {1 Q6 {& ]
  800. .BYTE $00,$01,$02,$03,$04$ y! A4 L  w. B  ^" a1 X
  801. BULLET_P2_NAME:! b3 R, Z' a9 I  G& [9 z' n
  802. .BYTE CN,CM,CF,CS,CL
    7 t  l/ ^6 X" v
  803. ! P  v3 D5 v; M
  804. BULLETPPU_P2_PPU:
    1 G& Z1 B' I6 R: f# f8 `# @
  805. LDX #$00
    ) |2 {4 N7 q! _# }( `' b
  806. LDA BULLET_P2_ADDR* g% l  ?/ }6 ]7 K+ `
  807. STA $0703
    5 a4 u8 O/ ?/ F" w
  808. INX4 W- g* j) [, @+ p
  809. LDA BULLET_P2_ADDR,X
    / J( ^# o7 [! L- d% `! M( S1 o
  810. STA $07040 X5 K- I# ~  K9 f9 Y1 ]
  811. JSR PPU_PROCESS- N& k: |9 V' ?1 u; \
  812. BULLET_P2_WRITE:
    ! Y8 o# ?7 X  e) t7 j
  813. LDX #$005 _7 c' ~' v( ^' y8 \8 a) M7 g. X: |
  814. LDA $AA
    0 h* B5 G9 N; p9 z
  815. AND #$10
    4 Z. s, d5 X1 z# `$ }
  816. BEQ C_BULLET_P2
    # o) w1 w* I& x1 {4 b- ]' y# I* d' |
  817. LDA #CS$ d& B3 u/ |8 Z  I6 @
  818. STA $07056 p/ |$ g8 Q+ K1 ~8 m
  819. BNE B_NAME_P2
    ! d9 x9 y8 H% q" R. X2 [
  820. C_BULLET_P2:; R4 R7 O6 f5 n# Q0 C
  821. LDA #CC
    8 L) r" D" N+ X9 t
  822. STA $0705
    - I$ R" |+ Q- S' r, P. {
  823. B_NAME_P2:
    ( T3 Q) V7 M8 a% M% ?" T
  824. LDA $AB: n1 E5 O7 E5 ]3 e: d9 S. _* q
  825. AND #$0F
    ( x$ H  a" D3 a& v
  826. CMP BULLET_P2_DATA,X% I1 {& ?, H: H; b
  827. BNE B_NAME_P2_RECMP
    , F9 b% a- c( T
  828. LDA BULLET_P2_NAME,X
    - ~/ |4 X( }' Z
  829. STA $0706
    1 }3 \4 M8 n: O3 [9 o2 O0 q( D
  830. B_NAME_P2_RECMP3 H7 R  C6 Y& ~$ i0 |
  831. INX: d2 x9 y: u9 \' e% x
  832. CPX #$05
    # b9 t, G  d! \  P2 A8 u9 P
  833. BCC B_NAME_P2
    9 J$ o) @3 i7 _. A0 W0 S3 x* }2 L
  834. LDX #$02
    6 d" x7 y4 F( t7 ?* y* a. E
  835. JSR PPU_START
    4 [" u! |) U& k% ]2 O
  836. RTS" j+ @6 Q, Q& L) l; F5 K
  837. * h; V1 W) m" o
  838. 4 M- v1 T9 ~' n
  839. / Q( [1 X% N' ^

  840. 7 [* ]2 M5 N7 {. F6 l0 B
  841. 3 Z5 `) y6 l3 v9 D# B. w- N7 C

  842. 7 G/ Q% d) o, }9 x7 @& E! W1 j
  843. LIFETODEC:                ;十进制转换0 [; _5 \% X4 d, x8 h
  844. LIFEL1:        ;initialise
    , K1 i' Q. a7 k* D. v
  845. STA $7A00        ;$7A00=F3
    ( [7 `, O% X2 Y) o
  846. LDA #$00
    ; n* ~: @/ a5 B4 a% {0 O1 ~
  847. STA $7A03        ;$7A03=00
    ) U8 D4 }4 E" N
  848. STA $7A04        ;$7A04=00
    $ C% ~& K& n- L  o( R
  849. STA $7A05        ;$7A05=002 J9 ~2 q: S2 u" n
  850. LIFEL2:        ;copy data $7A00 to 60016 N- l# ?- T$ J0 H
  851. LDA $7A001 {6 `7 {. ?/ N
  852. STA $7A01' X: l' ]7 B  }8 Y0 ^7 L; M
  853. . p4 r6 m: I, N0 U
  854. LIFEL3:         ;hundred! R: j3 ]  c+ {# v) p; `# w# w) h" V+ L
  855. LDA $7A01
    0 ~- e6 d8 w6 m# @
  856. CMP #$64
    8 {6 L9 o* l7 Z
  857. BCC LIFEL6                ;$7A01<100 goto L65 M& R5 g% c. x
  858. LIFEL4:8 k4 C1 x* X! {3 T9 b, l7 |/ O* u
  859. LDA $7A018 s& x: W) |5 O
  860. SEC
    6 H) z: L) j+ U, A. b8 A* r
  861. SBC #$64        ;$7A01=$7A01-100! p5 b7 n( F1 M% ~
  862. STA $7A01- t  f% u8 E& ]8 y) e0 L$ }* S1 B% }
  863. INC $7A03        ;hundred++- a# s9 U& H& y% l/ y
  864. LIFEL5:$ k, _% b$ V! r0 A
  865. LDA $7A01% P+ ~9 K1 v- v( V3 C. J: T
  866. CMP #$64; A" u% p$ t6 I2 w% u, V, r* T3 ~- ?% T
  867. BCS LIFEL4                ;$7A01>100 goto L4& N- _7 l6 u7 e6 _; s2 X- e& ~

  868. / l4 e7 x9 i1 T% u
  869. LIFEL6:        ;decade
    6 o: Y5 `' g( B' x8 |) d5 v; d
  870. LDA $7A01) X5 C6 p" n9 f* M
  871. CMP #$0A  ?5 f" ?* Q' [" G' a: C1 A) I+ b
  872. BCC LIFEL9                ;$7A01<10 goto L9
    ; e% A* R' N$ r5 g
  873. LIFEL7:       
    , \5 ^3 ^% C" K- m2 O% a
  874. LDA $7A01
    9 v" x: z$ U( i4 Y$ _1 Q& ~
  875. SEC
    ! _: B9 A, b' P' C& `
  876. SBC #$0A* B& H: }5 h9 P4 @& f% ^* e) {3 Y5 J$ s
  877. STA $7A01        ;$7A01=$7A01-10
    7 u; \8 {3 v$ {4 L, C
  878. INC $7A04        ;decade++
    5 U) O. E! h/ L$ s$ V; t$ Q5 Q
  879. LIFEL8:5 u1 |9 f1 |2 A7 D
  880. LDA $7A015 X. I8 m- u, u) Y/ E
  881. CMP #$0A
    5 H0 T5 ]8 I* g/ V  a. I
  882. BCS LIFEL7                ;$7A01>10 goto L7
    . r7 l/ G. n- [" m" [7 V
  883. ;unit* b0 n' I0 V$ Z* a( G& f
  884. LIFEL9:0 H- f5 H& O" P+ |6 T
  885. LDA $7A01        ;$7A05=$7A01
    ! Z- y1 u3 B1 _1 N
  886. STA $7A05        ;unit+ \6 r7 S1 p% @3 c2 u0 Q0 f$ Y
  887. RTS        ;return9 n0 E! x# C' t. c4 P

  888. ( O8 P/ c. w/ t6 y

  889.   _7 M% }0 x9 D
  890. 9 k8 l& D! L; g" M  d0 q
  891. PPU_PROCESS: ;PPU地址处理程序2 N0 Y# m, d' ^" j6 [# n4 Q/ h
  892. LDX #$001 ~) s; Y/ A/ W, A0 s" E& ~
  893. LDA $FF$ C: Y8 k0 L) L" k( [- @2 }
  894. AND #$01
    ) {6 I0 C, S' R
  895. BNE PPU_2400_27C0
    % A2 ?9 L9 H6 r; f5 u" {
  896. PPU_2000_23C0: ;命名表1
    3 a" n. |. O. f
  897. LDA $07031 b" R' ^1 Z- U$ x2 z
  898. AND #$FB+ z9 r& x3 p& y% N8 N
  899. STA $0703
    / M/ Y/ A7 b; [
  900. RTS
    * r3 H; [! g8 l8 D) ~/ e2 J
  901. PPU_2400_27C0: ;命名表2
    / \# e% K" [5 Q  n- K- v
  902. LDA $07039 v4 h1 W' A6 {( g$ T
  903. ORA #$04
    / h7 F5 u  `  T! C- j
  904. STA $0703
    , S! g0 G) t3 T! }' _
  905. RTS/ O$ @% |% [* [$ g' L7 r

  906. 5 \0 I3 Q) j6 O+ ]: _4 K! ]4 L/ O' V
  907. PPU_START:  ;PPU数据写入8 _- ~- r6 L2 x  w1 X: I
  908. STA $21) A; _- {9 b0 j) T
  909. STX $0701
    0 S' C) z0 c$ J9 P
  910. LDA #$007 I% V3 q7 ^: [& J# `6 _3 h
  911. STA $0705,X
    1 u& c! W0 D+ q. G
  912. LDA #$01
    5 k2 y' p  [) x4 D% d
  913. STA $0700
    3 g# n% L9 T( q8 K8 D+ h
  914. STA $0702' o* i# V* ~) R3 P/ F: }6 ^
  915. RTS/ @# R2 w2 [* ~% b, x
  916. 4 g% v* F3 d, \' s
  917. ! A. E! O8 L8 E' X1 c' `: @! w, W
  918. ' d0 K$ n& J* b& U
  919. " E" X9 F* T! H4 _/ t. b4 q
  920. ( E9 U5 j7 M& n# N  m

  921. - S. a; b, m$ L% F4 L* c9 q" y+ q
复制代码
- ^8 ]" K; q+ b8 [4 G  a. z! l

本帖子中包含更多资源

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

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

签到天数: 2099 天

[LV.Master]伴坛终老

发表于 2017-2-13 17:25:19 | 显示全部楼层
这么好的教程竟然没有人支持!8 q" C- C! g  \, t6 M, M* o: @

签到天数: 2540 天

[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, 2025-1-21 12:16 , Processed in 1.058593 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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