EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2017-2-13 11:57:33 | 显示全部楼层 |阅读模式
  1. Contra (J) PPU写入程序
    4 [. g4 l% O5 x, K
  2. 作者:FlameCyclone
    8 A# N0 ^! ?8 b2 y
  3. 时间:2017.2.12
    4 K/ N/ v9 N7 z9 o
  4. ( X! G- I* ]  l  i) b2 G7 O2 a; p
  5. 按键跳转:5 L+ L' V+ T+ s
  6.         C1EF:95 F5 94 F1! \9 Y" G$ H. |0 V2 C+ t" Q- F5 g4 B
  7.         C1EF:20 70 FB EA
    7 Y: v6 V4 x( {3 v, L( o5 c( F

  8. $ v- h. M' H! z9 ?
  9. 滚动偏移:
    ) H* y. X( E" ?. ~! N: k
  10.         F936:A5 FD 8D 05 20 A5 FC 8D 05 20
    ) j: d3 C3 u0 R/ e3 G2 v/ _6 S% z7 ]1 D
  11.         F936:20 C0 FB EA EA EA EA EA EA EA
    ! a& R3 Q3 a# M" Y- U# v

  12. ' c& S+ h4 s" N6 b) N- j
  13. 背景调色板:
    ( [6 m+ D! f, ?, w, }0 B# r! z
  14.         CF20:9D C0 07/ J$ @, r2 N+ S4 V9 d9 X% b( O" u) S
  15.         CF20:20 A0 FB
    ! e" n5 `5 ~3 t9 k, x! O

  16. # s+ v- q1 m* ]( T( E  d9 }0 `
  17. PPU BANK号:; g1 U/ {9 |0 _$ k! t# ~" F
  18.         C8C9:9D F4 07! O3 y' |# L& J+ p1 k: a
  19.         C8C9:20 B0 FB1 D3 a& R. F9 r( b, M
  20. + N) v: `2 [1 F. ?
  21. 按键跳转:. T5 A% n9 }5 E3 K& ?
  22. FB70:        95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 20% ~5 Z+ |6 T  z) z7 L
  23.         AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 20$ P7 [+ Y2 }# l, \/ A3 a* D1 R
  24.         21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF
    " g& F) i/ F5 t  F1 m" t# t$ U! U0 X
  25. $ C, _% I" `5 d/ U3 ]/ A
  26. 背景调色板:
    & z! ^( V1 {$ W. D9 d
  27. FBA0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF
    0 D  o" K4 q1 F% m' D
  28. 6 t3 g( x& Y* S) X; W. T
  29. PPU BANK号:
    7 f- B8 `3 h; N
  30. FBB0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF0 n% g4 a! i( y9 U. d; L

  31. 1 U$ K6 O3 \, H6 K8 {# A' y0 I. R
  32. 滚动偏移:' V9 l/ L. G9 M9 W% b8 y) j
  33. FBC0:        AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 604 E/ [$ [3 C9 y  ]- I3 e
  34.         A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF
    9 y: G3 f. v$ f. [1 K
  35. , Y5 A  o$ i# f3 \
  36. # t; h2 B) r/ M4 Q) [
  37. 切BANK后A000:4 [& R0 m. k9 |
  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& r# l& _5 y* ]0 W1 n: i2 H! Q
  39. ' p  i' r6 V1 L# e# B4 q

  40. " q' ^9 C+ L0 L; A6 @4 e
  41. 6502 simulator:
    4 O, x$ I7 l! G2 ^
  42. PPU写入程序:- a0 r( ^# Y2 L; F
  43. .ORG $A000
    & R2 r. M2 `( F! Y
  44. CSP = $80) c# H9 R, ?6 S! j" y% ^& J3 u
  45. C0 = $81  e) a7 H  ?! Q% t+ ~
  46. C1 = $826 Y4 B& W7 ]4 g6 z; f1 C
  47. C2 = $83# X3 ?: k, g  O, G1 ?, I
  48. C3 = $847 i( |" a' y9 w. E
  49. C4 = $85$ \; D, l6 Z& F1 ]: E
  50. C5 = $86& ]; U  S8 H) V' b$ m$ Q
  51. C6 = $87; e$ j$ |. e2 k( h- i
  52. C7 = $88
      H8 P1 m( e/ n6 M/ K: V; N
  53. C8 = $89( V" S; A+ d" Y
  54. C9 = $8A1 J9 C. G2 N# m1 E7 x
  55. CA = $8B1 W8 @2 v, h! w/ d9 F7 \
  56. CB = $8C
    : L: ]+ f* H1 s2 Y- j: _
  57. CC = $8D
    ; E- r9 D+ V2 [( ?% p
  58. CD = $8E, [) F* ~% K, G( e: d
  59. CE = $8F6 u5 }! f. u6 V( x+ q* m
  60. CF = $90
    ! Z1 b2 [) _8 M% _- U. z
  61. CG = $91
    - s+ \, R6 S! b+ b7 H; x' Q; [
  62. CH = $92
    6 S( ^; d1 u0 ^" R- k
  63. CI = $93
    ' u; u: L( ]8 A/ \/ C5 }
  64. CJ = $94% A# V& U6 I( n: y# Z8 x0 Q) _! f
  65. CK = $956 r- K) }+ ^4 p4 Z7 Y; l
  66. CL = $96
    $ d/ }1 U5 k4 H& y0 J0 F
  67. CM = $97
    . ~$ M. r" L4 m& o
  68. CN = $98( j: U9 B9 N8 @( {2 w6 u& i+ Q8 l
  69. CO = $99
    # h4 l" q; J9 r- `
  70. CP = $9A: Z* l5 L- y: Y- y, w) a+ U  M
  71. CQ = $9B
      ~! Q5 V" D5 t0 ?1 W
  72. CR = $9C! h1 d1 |4 l$ e. S4 u
  73. CS = $9D
    1 Z: I/ w( ]0 K
  74. CT = $9E  W% y" ^; f7 C9 d0 j
  75. CU = $9F, [3 H( ?, \) @# Q4 ]' P
  76. CV = $A0
    - |( w$ I6 s8 ]" {+ w
  77. CW = $A1
    ; @" N. m7 n: m7 o) t5 {5 V$ m
  78. CX = $A2- [4 F' E8 s$ F# }
  79. CY = $A3
    ' [( U- F5 y7 _! b- r& f5 ]! Y
  80. CZ = $A4
    6 m7 F1 c7 @: L/ E
  81. CEND = $FF! l" ^+ V, {6 `
  82. ( b0 M  y; a% y+ q  J
  83. ! J; |* i1 G) W6 }2 Q
  84. CMP_RE:
    1 E/ U3 t% T( D2 K* x+ \# L
  85. LDA $FF4 ~2 a: I3 X  _
  86. AND #$7F+ F, R$ M: \' t, I2 e
  87. STA $2000
    : h. O, D# N/ t
  88. LDA $2002, a: q# ~( \0 h4 J
  89. LDA $251 d  l5 \: C/ _) `" f
  90. CMP #$01
    * S* B0 y- P9 P! V8 A
  91. BNE PROREG
    5 B. R7 m$ l# n9 d; t. @
  92. LDA $F5,X* w2 }. O2 E& j
  93. AND #$CF
    # V! S, [: G2 ^; b, W  x
  94. BEQ PROREG
    - `4 E) t7 D( C- \* u2 W
  95. JSR PPU_CMP
    ; d8 _/ ~( [  L/ S- O
  96. C_RE:
    , x3 U$ }3 B) {" T" [6 y/ r, G1 _4 m
  97. RTS$ l5 F/ k3 O: ^5 [) D8 {6 M3 K+ l
  98. PROREG:" l( b/ p/ g$ q
  99. PHA5 I) ]2 d; w4 B
  100. TXA2 U  Q- o' H1 V6 Y; i" Z) N: q7 @  C8 l
  101. PHA; u- W7 Z: `  E! ?* p
  102. TYA
    " _0 p) L" j; v$ l
  103. PHA3 k! w) T: }+ {. ]: l
  104. LDA $25
    : ^9 Z% s, ~( K  V& D' [8 }% R
  105. CMP #$013 o$ V! H7 s) k1 J% X% [
  106. BNE RE
    6 w' J( V" v7 N) j
  107. LDA $010A
    # n( O0 t' Q, d" D7 y2 v
  108. CMP #$00
    " b+ M5 ~7 j; x- H9 a* c; K
  109. BEQ P1
    $ h5 ^6 ~& W! g- d) I4 X
  110. ; N# e6 q5 E7 r( c; `/ d" a
  111. RE:$ {- A* `* k$ x. V( V( s
  112. JMP PPUWRITE6 V8 J; h$ \2 ^  h# o7 c

  113.   ?# b  S7 t8 M& s/ [
  114. P1:                ; 条件判断3 B8 d6 K, m  [  [6 [
  115. LDA $7FFF2 x/ w% j6 x; u. J
  116. CMP #$FF# I: z! A$ R- A) D; ]/ G5 Z
  117. BNE P1RP
    6 l0 e8 t1 k, N) q! b8 _2 A
  118. LDA $7FA0
    ' E' V& m! h# m/ _& F; q
  119. CMP #$00
    , j! ^; e( y  J+ ^  k9 {
  120. BNE P1CMP
    ' m4 y* m: v- @
  121. LDA #$FF
    4 c9 u6 F8 {( n& a# t% `; `
  122. STA $7FA0
    ) G/ B* B+ }5 b2 P, `2 O
  123. JSR CLEANA/ B4 i/ |0 Q, J0 B( U. \: R2 g
  124. JMP PPUWRITE
    : C! Q/ O' d$ }" Z
  125. P1CMP:
    ; y" o+ l* l7 g1 P+ g3 z' Y
  126. LDA $7FFF
    / y& f; h, T5 W. F4 _6 n6 G
  127. CMP #$00
    6 X+ U  m- u+ g+ J: Y
  128. BNE RE. e/ k$ O$ ]( K9 U
  129. P1RP:( Q7 m, o* }# \0 W9 b2 x" m0 k( U
  130. LDA $2002; B! d$ Q  t: q6 O
  131. LDA #$00
    7 h- x4 u0 f4 [) ^5 m8 s
  132. STA $20015 p# x4 {0 L0 s3 K! L6 T
  133. LDX #$00, }- l' Q; K: t9 r0 A$ k
  134. LDA #$FF7 s$ x7 \0 o7 d9 f9 r, q  Y
  135. STA $7FFF9 N( A& E1 c  d/ o1 C6 n: k
  136. STA $7FA0
    ) Y) x' M, t, R5 F4 F
  137. JSR COPYPPU' r/ a* ]( I: Z  G
  138. PIRP2:
    : R! _3 ?; ?0 U' [$ U2 p2 E
  139. JSR CLEANA
    8 Q+ w6 j% x4 \% x% f3 S" O! M
  140. JMP PPUWRITE
    / N5 x+ L  T: l- e0 z8 _) F" G
  141. / P: c( n, P0 \
  142. COPYPPU:# J) G9 @+ i! f2 p
  143. LDA $FE
    4 c& K% ~" f0 L8 m# l9 _
  144. STA $7F50
    1 ~9 Z: i# ~. ^; n' O  X4 |  u  T! t' B
  145. LDA #$08
    : Q. i6 g4 k$ Y. j% }
  146. STA $FE& C2 e3 e2 m# p, `/ C+ y! J
  147. L0:1 \" W5 L/ ~/ f& |! [- m
  148. LDX #$009 @' ?4 A% `4 ?( ?6 l% P7 ]; a
  149. COPY_07C0_07DF:) I8 b) C  r8 Y8 h# S: ^
  150. LDA $07C0,X
    / A/ g* U, O( Q" g. A+ v# t
  151. STA $7F00,X7 R2 |9 V6 s6 S& x0 b; U, M) o7 e( {
  152. INX
    # H; E9 h( G- O  c0 t& S# x; Q
  153. CPX #$40
    4 L! D; j& ^  g' `% ]5 ]; _
  154. BCC COPY_07C0_07DF. k$ n/ z4 p% s, R  n
  155. LDX #$00
    9 m* H6 I. g4 Y
  156. PPU_07F4_07F7:, X3 d+ t& H  k( p
  157. LDA #$00( H- V2 q+ e# E& b* V1 A) u
  158. STA $07F4,X9 w  |% a5 |  Z! z
  159. INX* A8 `( r) l3 A* h4 ?. Z
  160. CPX #$045 J9 [3 v6 X; \
  161. BCC PPU_07F4_07F7
    + `! g0 h8 ]2 H  M1 e: l
  162. LDX #$00
    + V5 m  `' B  h" d, V
  163. COLOR:5 n. ]1 V1 v% i
  164. LDA COLOR_DATA,X
    2 R$ m, U. J. I$ U! c% q/ m/ {- r
  165. STA $07C0,X" v  ]1 N+ Q5 M% X. a' H. c1 c
  166. INX, l( C( a. {8 ^0 p0 Q
  167. CPX #$102 X* d% f: A7 `/ n
  168. BCC COLOR
    + N& U1 Q4 z0 h% c% z: U1 ~/ Y
  169. " |: C0 p* P5 g' c/ d" |8 b) d
  170. PPU_COLOR:/ H! s, V' E* y& e% S+ N6 P
  171. LDA #$3F2 g- ?+ N- s! b5 g
  172. STA $2006
    ! `( w7 I3 @1 w" j
  173. LDA #$00
    ) l/ A9 C1 b. y' P. f7 }' S$ |: P
  174. STA $2006
    5 V7 \! i* l/ i
  175. LDX #$00
    - w( _: d7 v  R2 z# s: f
  176. PPU_COLOR_W:. _- \) W0 C/ J5 c) }
  177. LDA COLOR_DATA,X
    : I6 I# ^0 I  n/ P, `
  178. STA $2007
    ) W( t0 R. ~! X7 E4 }8 R
  179. INX
    " ]# i2 M; u1 @1 O/ o; Y
  180. CPX #$10& o$ x) O+ g  x: h2 m3 u, H5 u( c- L. z
  181. BCC PPU_COLOR_W; ]0 t& y9 `. T# t# B8 X3 x% q
  182. + w5 g3 X  n2 o7 H
  183. 3 P! \! x% x/ e" |1 K& ^
  184. LDX #$004 m" g- @9 e( @  G* p! g( U
  185. LDY #$00
    ! F+ U$ z, o4 `4 _9 \
  186. LDA $BD& z: h& p5 f% d# x
  187. PHA8 ~8 _7 k: c3 p' F
  188. LDA $BC
    1 p+ Y* s+ W' s/ v. K
  189. PHA% K- h+ W' _* C
  190. LDA $BB
    4 Y# W5 Z& L: j5 w5 ]+ ]
  191. PHA3 r+ ~8 M6 `+ g2 I1 @
  192. LDA $BA% ], u9 R+ ^6 k" S
  193. PHA9 ?6 Z/ j  E: s' l5 F0 Z
  194. LDA $B9: _# S7 h; V$ u  n5 U
  195. PHA; K! G# o7 B9 U" v. d1 r
  196. LDA $B85 V6 {8 z4 E6 k! f1 _, o$ [
  197. PHA# P( B2 t" ]: P5 z# D" X
  198. LDA #$005 n( t$ x" x) U+ `) H
  199. STA $B8  K' Q: ?6 J$ @: D  Z
  200. STA $B9% t0 p7 @! a  X
  201. STA $BA8 M9 ~9 s$ |/ c: x! B+ y
  202. STA $BB
    1 j6 G. c& d  Q( j# k; f
  203. STA $BC
    % V/ y" Y9 z% q. X  V  h4 v
  204. STA $BD
    , f% @# B2 Z6 U6 F
  205. LDA #$00
    ' p9 R- `; U1 ^" [% c! r+ b
  206. STA $BA" [' D& h8 R3 R6 g2 @  j6 p
  207. LDA #$20
    8 ]! l  `8 m+ V
  208. STA $BB
    : X5 Z* b$ Y& V' p/ ~$ Z4 c8 f
  209. LDA #$00+ c2 {4 H! z1 c6 N0 n6 r
  210. STA $BC
    ) p! s5 M3 R( x( j
  211. LDA #$60
    4 Y* B( T" n+ s* t7 K
  212. STA $BD
    6 m3 R* f. V: u4 \9 c- a) @

  213. 9 m, b& ~! f8 u6 l" `3 [) H6 `
  214. L1:                ; PPU复制
      V  m' p: h  S2 }( d9 a4 v: c! i
  215. LDA $BB
    : C+ @% F2 J; w: g9 X- V
  216. CMP #$28: @! s7 O# G) }2 P% j
  217. BNE L20 _. R% b+ g8 [
  218. LDA $BA
    4 D) Y4 [& S) I
  219. CMP #$00
    ) J" D9 C. D5 a! [  }0 V) w9 l
  220. BEQ PROADPLA* ?& f: r# z, k) q/ F' q

  221. 5 V* O- h! ~5 ?
  222. L2:2 ~% p8 P1 X- i& |2 ?0 p- f
  223. LDA $BB4 S6 G! O6 E* ]5 Z7 X/ D5 H
  224. STA $2006
    2 @/ b  G. f0 {3 z# H
  225. LDA $BA
    % |/ d( j( j( k  l. s$ o* e7 Y
  226. STA $2006, \$ ?0 ]7 w9 ^0 f+ h$ d
  227. / d0 ?9 N5 J& `: N+ V/ p( `4 G6 m
  228. L3:' w  D3 O$ Z' Y
  229. LDA $2007; m# \- _% B: h8 p: V  b1 b  D
  230. LDA $2007
    * [0 Z9 N9 _7 u) A  \* a, w3 ]5 @
  231. STA ($BC),Y
    1 ]* o+ Z, H, p
  232. / N# k) z( n6 T4 j1 h
  233. L4:  w6 `, J2 m% u, y
  234. LDA #$007 h. c' x5 B6 Q3 a; @& f& n0 g5 }
  235. STA $2000  d( y& f* ?9 w% I" `/ P+ T6 ]# E
  236. INX
    # i% c  \9 L& a7 d. [/ I6 J
  237. INC $BA
    1 O1 d* z/ X5 ?2 x
  238. INC $BC- m0 r6 d. d4 f( ?% g; a
  239. CPX #$00
    ) H& k* H2 Z0 K' f; k
  240. BNE L1- I$ _5 ]# I; A5 L9 f0 D/ [
  241. INC $BB
    2 J, ~3 D' g0 t& T5 h7 G" {) u' d! }- {
  242. INC $BD
    4 u7 o+ c7 U- ]1 U; ]4 [2 |
  243. JMP L1
    % W# J  v8 H% Z
  244. 1 G. t( b. h1 V! p6 _9 Q: F, n8 }/ c
  245. PROADPLA:                ;出栈2 c6 O; j: x4 o3 b) _6 V  z
  246. PLA
    . f, Y+ a# q& |7 F# a
  247. STA $B8
    ( P. c! ~* L5 Z8 `7 x
  248. PLA
    : `( _, B) U) o; G
  249. STA $B9
    ' F8 g/ X2 |' X/ Q% A
  250. PLA4 g% ~  v& c, n8 l$ p! @
  251. STA $BA
    $ X8 c3 M4 K! L0 p
  252. PLA
    3 q2 S* }. c! f# y" F
  253. STA $BB
    " S% T/ ^1 p  Z; Z. O
  254. PLA
    - m( D# a) ]; s) L
  255. STA $BC
    . y+ I/ W; M6 f# n+ m$ r+ \7 l
  256. PLA. p9 Q# |% Q6 O" D8 N
  257. STA $BD
    8 l5 c% H1 ]+ `" [
  258. CPRE:
    0 P: O8 @9 B1 _6 i# ]) e
  259. RTS  {5 R6 Y1 T' ^1 \1 e! t  v. U9 R

  260. 7 I  }1 i; V3 Y
  261. CLEANA:                ; PPU清空% K4 b; i$ a$ w$ Q) X. Y
  262. LDA $BD- X2 K# H2 V' m/ B7 o: |- z$ G' G! O
  263. PHA9 @. g6 }/ A$ D+ p. T7 R; ]7 Z
  264. LDA $BC, E/ o: j) g% u. I# W
  265. PHA
    6 M9 j; A  N4 q3 D+ e' Y
  266. LDA $BB
    - P0 c) ~: j! B: v4 {+ [; `! @
  267. PHA
    0 Y4 p/ t6 N7 F- U9 q
  268. LDA $BA
    $ f7 e' `* o7 D) R; g
  269. PHA
    , a8 o" d" X* g. W+ @( b
  270. LDA $B90 ~  F9 g1 u0 o: K' {
  271. PHA
    8 t+ U& Y  u% ~% L
  272. LDA $B8
    3 q0 ]  o3 G- H& k% j* m8 w
  273. PHA
    , K+ Z  I5 g" I) u" v+ T1 }1 i
  274. LDA #$00
    3 L; w7 ?& C* R- N/ [: J
  275. STA $B86 k' W1 N3 u( e& O
  276. STA $B9
    % o9 W0 @' q* A4 {+ C
  277. STA $BA
    1 e* V: p7 S4 E* q
  278. STA $BB; T7 I8 Z  M0 j, l) o# K
  279. STA $BC
    2 `! i  B$ L% p: ^- R0 r% S
  280. STA $BD) {/ g( d: M* u) }4 n
  281. STA $2001; g& p; H) M  h
  282. LDX #$00
    % ?. T& }6 H5 X" y
  283. LDY #$005 f( r" W: F8 i: X' N
  284. LDA #$00
    + [# ^) q  v5 {% F1 l2 P# N/ S
  285. STA $BA
    $ w8 L( q6 f9 U! l+ D7 ]" \
  286. LDA #$20
    ' `+ ^" I  L2 {# P$ S
  287. STA $BB
    ' E! ]( [0 P8 s2 I6 t# Q  d

  288. $ k/ D# ]9 ^9 U3 J2 _3 Q! V
  289. CL1:
    % |3 H$ a, ^, j, I( _4 T9 x
  290. LDA $BB
    5 y( a4 u0 e( X8 K: ?( h7 j
  291. CMP #$28
    3 W$ C" p' a; ?" w, G% B) W
  292. BNE CL23 k4 s  }% b" @
  293. LDA $BA
    1 p$ w0 s* L* q) j
  294. CMP #$00
    7 f! l" h, @5 C$ j* v
  295. BEQ FREEWRIYE% J# H" b' D# w" N! u, `' \: A0 z  s
  296. 5 m/ p; A7 k- m  F
  297. CL2:5 I, [) Y+ J* b' I
  298. LDA $BB! c5 r8 O& Q) F% J
  299. STA $20062 f9 V. v! s* x( T$ t% p8 `" {
  300. LDA $BA; }# t8 f" [3 D; q* W3 J5 `- [/ C3 {
  301. STA $2006
    ; ^& b- \- I: }! Q

  302. ' j" k& ^9 p' ^( ]& `) \' s; G5 F
  303. CL3:
    2 L. h2 r% c# y/ z8 P3 I
  304. LDA #$00
    & k+ H6 }* \* o( @" d2 ^( z/ _
  305. STA $20076 y3 [: R3 }& P  J5 y( {! ?/ u

  306. 2 |9 \: S7 y0 e
  307. CL4:
    + z& S9 M- L4 B
  308. LDA #$00: A3 C2 @2 a4 e1 q
  309. STA $2000! u% X3 F( Q6 K
  310. INX
    % X1 Q4 u) F$ i* k$ M0 V
  311. INC $BA
    " k/ W* N0 P4 V/ k* V
  312. CPX #$00
    - E, q, B+ c* J- y2 C& l$ P, N
  313. BNE CL1
    0 v7 O2 x+ K- E( n& v' e7 W
  314. INC $BB; U# q3 o% z, O; e; V
  315. JMP CL1 6 ]: m* ~+ V) U9 g

  316. 4 F2 g- i8 f8 Z8 e
  317. , ?. `/ I3 h; N8 W
  318. FREEWRIYE:
    . y5 Q7 \3 A2 ^
  319. 9 J4 g+ G6 e' b  q$ d
  320. NOP6 H1 T7 s9 k  }$ g7 z

  321. ) J0 m: N( o7 B

  322. 8 M  `; o/ B* _8 x& P' S: L7 |

  323. ' v% @  m; ?3 v% Q
  324. + N7 T" }3 ?' p' G
  325. 3 m: `* M' c5 S: L6 p2 n. i; B
  326. CLEANF:                ; 恢复现场, Q" j! o% x8 `2 ~7 I
  327. $ {. Z9 M3 V- y9 {
  328. PLA+ b. [4 q6 d5 M; A
  329. STA $B8
    + Z( r9 c" O  \  b
  330. PLA' _! r8 d) H) R! x
  331. STA $B9
    $ k* o( X) j5 R$ t/ B. U9 ~' _
  332. PLA: l1 q( i! @6 h0 e( e5 g
  333. STA $BA+ F/ F5 r7 h/ ]* n- P3 E3 [
  334. PLA7 B$ K9 Y: y/ v* D
  335. STA $BB5 h! a( T% F7 K8 E4 S5 \1 h
  336. PLA4 Z0 T- k$ d% B* o+ w
  337. STA $BC
    # ]. |7 \2 B1 }3 P. N3 e; P6 r! b
  338. PLA
    ; K8 I6 o' r# S7 {" _3 S; M
  339. STA $BD/ L9 n& N& g. E2 Q; p
  340. CLRF:
    ; c' A( S9 \. f) E/ X
  341. JSR FREE_PPU9 S7 P, R* }' X6 x9 b
  342. RTS; A& V0 \$ Z8 h  M4 k/ i8 W, ~

  343. $ [# O, f8 I# i# k! ?5 g7 o

  344. 0 R# t# D1 v  n2 c; q
  345. PPUWRITE:    ;PPU写回- R  J" z5 F: z. [
  346. PLA9 o- @+ [  Z6 y2 f: x9 |
  347. TAY
    7 j4 ?0 ^# U/ I' A
  348. PLA9 d8 W" i& d8 s: ~0 |2 X+ ?  p$ Y  G
  349. TAX
    . m* b* E3 _1 F
  350. PLA3 A+ ]: u& C* G8 U* C
  351. LDA $25
    ; L* ?7 ]( X# P6 C. n. W9 Q. G
  352. CMP #$00  _* m7 i& G% |, j: X; {/ B
  353. BEQ WP1
    * X; e! k# C( l
  354. LDA $25
    # \/ Y' T4 Z) a
  355. CMP #$01
    + ^" i. B/ M) t5 e) T* o
  356. BNE WRE
    7 I+ Q7 Z! D* a( x% n
  357. LDA $F5,X
    $ A7 M. C1 q9 S% D. U' W0 H
  358. AND #$EF% h" q6 n" J- ^( F9 \2 _6 q& v
  359. BEQ WRE
    1 v  ^# C* u% h/ y" W! q3 h# n6 t
  360. LDA #$00
    # T3 o3 V- u, i8 l9 C8 {7 M: P/ H
  361. STA $7FA0
    ! i( p' j6 S) J! G9 V

  362. ( z+ ]( ?* T$ H
  363. WRE:+ \" e+ x. ?. K7 y6 D, G$ G
  364. RTS# p( W* ~- b6 s8 u

  365. 8 y$ ]" D5 Z. p4 B9 m8 ]
  366. WP1:7 Z; ?9 L0 Z) `: ^1 H& [% M4 \
  367. LDA $7FFF
    + |0 {; ?# m) h( m9 g2 y) b
  368. CMP #$FF
    ) Y! a0 X1 }6 ]2 Q
  369. BNE WRE
    , ^; |6 O+ o* Z2 H+ ?
  370. LDA #$00
    , a$ x- I. x( o' X3 b
  371. STA $2001* e7 O9 ]) X3 K( _9 c3 n& m  c  a
  372. LDA $BD0 `. t3 X2 r% p1 e& p, t
  373. PHA
    " r. O7 U6 v( `
  374. LDA $BC
    9 C& n0 A9 V6 O: _
  375. PHA
    8 Z2 z( A! @: m% _
  376. LDA $BB/ @; d1 x8 A! z4 q* g5 \; P" D
  377. PHA
    ( c, S# @8 c8 S+ p0 ~2 d0 q. w/ t
  378. LDA $BA
    ( l  S+ j- C* H1 R6 {/ T! c
  379. PHA2 L9 r' J* W- N& f8 a' }
  380. LDA $B9. o& m! t2 m) _" Y' J7 D4 g
  381. PHA
    2 ?/ ^2 t3 u! t# T
  382. LDA $B8
    - N& C) ?7 w+ m% _- A
  383. PHA
    1 D( Z1 L7 Q% _4 K0 I: p
  384. LDA #$00
    0 `: A* ?1 @* [: U# h9 @
  385. STA $B8$ E% f) c* t9 ~& }
  386. STA $B9, X! @. c* U9 K- `
  387. STA $BA
    ) s" H- t* y% `$ ]
  388. STA $BB
    4 q  b' z, z. x( V9 h4 x
  389. STA $BC
    # s% \9 c9 i4 v3 m. M5 ?4 t
  390. STA $BD
    # g0 Y3 o$ w8 N$ A0 ]% Q5 Z
  391. LDA #$00. S7 ~  {$ @; P! G( ^; C- |' }
  392. STA $7FFF
    2 Q0 f: ]" F2 N+ @- K1 b  }/ V. `
  393. # G4 Y2 J) f( z  r6 O
  394. WL0:1 s' K7 x3 C! h' v% d  a% k
  395. LDX #$00. v5 C: U: ]6 @* _" b) T
  396. LDY #$00/ v; \* y- w8 i9 E
  397. LDA #$00; Y0 m  s# x' m( t8 Z/ K( {
  398. STA $BA
    - T: A" B2 |1 U" U$ j
  399. LDA #$204 b7 a4 Z7 W) f( k; U
  400. STA $BB
    7 Y; Z& K" {2 g
  401. LDA #$00. @" m& S' P1 @& W4 e  ~( O' U- ~
  402. STA $BC! k9 j. r) h9 k! C8 B& W
  403. LDA #$602 j: ~9 j2 @% H9 D
  404. STA $BD. h" Z& _) H, v0 i8 u; L4 I2 I
  405. - D! j! e$ U2 _' j' o! D% n8 T& e
  406. WL1:. j8 M5 `* Y6 }) w0 g) n
  407. LDA $BD; x( B9 j8 g  p" o! h
  408. CMP #$68
    - {$ v: Y& h9 a4 J6 X" h
  409. BNE WL2
    9 Z- P9 m" y4 H  J* k2 G3 ~
  410. LDA $BC
    9 J' o4 H- g# M2 [( S- j% ~
  411. CMP #$00
    5 e" ?- n! x+ O
  412. BEQ WLR) e$ L/ C+ L8 C1 }

  413. 2 j0 F0 k0 [2 s# o
  414. WL2:" t7 x& ~( g6 y% g; `% q
  415. LDA $BD* ]4 m. |. j4 }# z  K7 ]9 V- i: `
  416. STA $2006+ N2 E0 t  T0 {( b& n6 G9 V- D
  417. LDA $BC+ [) I; P. ~* G, O9 f% R9 i
  418. STA $2006
    & f" Z$ r- f3 k* w1 s* f

  419. . ~" a+ k$ t  l' u
  420. WL3:
    ! S: N5 l9 I6 {) x/ s  h
  421. LDA ($BC),Y8 N$ q# n9 C7 G) ^& Q1 a% A" F! N! l
  422. STA $2007$ l+ J$ _* _8 N1 u

  423. 9 U: \, A3 z# n3 y
  424. WL4:
    - L2 ^* K( r9 B7 r7 \) C
  425. LDA #$00( E# i" n) P  D! i  t
  426. STA $2000
    ! }$ n  b$ O" S0 D3 A2 x
  427. INX
    / A: ]6 M0 c2 ]0 V3 S& o
  428. INC $BA
    , F" k  C! w9 k: y0 r
  429. INC $BC
    ( y. G! s% C6 e9 n. D2 G
  430. CPX #$00
    * B9 _2 C) m) s# R" a9 ]
  431. BNE WL11 \/ y* t1 c. k! n
  432. INC $BB* l# y- I9 s* f0 f- d9 c0 j: v
  433. INC $BD
    * F( T- `0 T! V- A5 m/ X
  434. JMP WL1
    - ~/ z% Z' U! J/ l7 G1 U

  435. 4 x0 v) q. ], o+ H0 e/ c9 V' T
  436. WLR:
    / ?, S- J$ I9 P( p- [5 L7 n
  437. LDX #$00% g8 ?; n. }, O( o4 i" N2 B
  438. COPY_7F00_7F3F:
    : Q# a* Q# @# y  J9 h0 Q3 g( S1 h
  439. LDA $7F00,X
    7 S- t- m- t; z, o; H* S
  440. STA $07C0,X, b. G; _' B- r7 ]( o
  441. INX9 n3 V3 S9 d3 V
  442. CPX #$40
    : P* ]9 r3 X. T, d( c! X
  443. BCC COPY_7F00_7F3F
    2 y! m& W0 S0 `9 t; L# p5 q. h

  444. , f; H; V/ O3 _) `
  445. LDX #$00
    ( k- L" Q! Y( A. q+ S6 }
  446. LDA #$3F8 R/ _" ]7 d! H1 _' a2 q5 n6 H
  447. STA $20068 \4 c! i; G9 \8 P7 ]3 h
  448. LDA #$00
    # I6 _( @. y& k& z8 i" E& e/ q
  449. STA $2006
    . B" h/ \% W/ X- Q. B
  450. COPY_7F00_7F10:* j7 |) j8 |5 W1 I8 [. S
  451. LDA $7C0,X
    7 P+ m9 p' i- ~5 V, f7 e* T
  452. STA $2007* O, R0 G, x- P# k1 E& z9 r
  453. INX
    " S: T3 P% J3 O0 F6 E% t5 I
  454. CPX #$10* M2 P) L% S% K% @$ U
  455. BCC COPY_7F00_7F10; {) T/ G& Z7 ]' T7 l2 C* _
  456. - a: ]& Z5 H/ e) t6 b! d
  457. LDA $2002. C- m- y5 c/ B, |& m( {2 R
  458. LDA $FD& l" @2 ~4 _- v/ M# r4 n3 O
  459. STA $2005  e/ i' J& I; K6 g9 Y) h7 s1 p3 w9 u
  460. LDA $FC' x7 y8 V; B* Y5 K# s
  461. STA $2005$ j' T/ Y- u" N" ?/ Z

  462. * g/ R0 r) G( c) f1 m' h
  463. LDA $7F50
    ( I$ R2 w# W* U8 W
  464. STA $FE
    : q. e9 |% m: @6 m9 @3 A/ o
  465. LDA #$00* Q- f: V/ l8 J( I* F* P9 k
  466. STA $2000
    2 d0 J7 R, G, j6 B! Z  Y% X1 o
  467. PLA
    5 E% _% j5 }! j; i  p1 l% }6 {
  468. STA $B8
    7 f& U( S- l/ o/ b
  469. PLA, ~: g  y3 ?" y# r6 n5 R* |
  470. STA $B9
    * }' V/ ^. F4 Z% C0 U) a- x0 f
  471. PLA; A7 ^9 N$ Y! b  {/ q  @  n3 f
  472. STA $BA0 E! j( W$ d4 K; {9 c
  473. PLA
    7 h5 x( g+ u- I5 l; `* M
  474. STA $BB
    5 C, p& n6 j( u0 p3 X6 C
  475. PLA
    ; t! g9 R5 [6 `2 n' u) w
  476. STA $BC0 R0 O! W5 f- A  G, T, c# S6 k
  477. PLA: s( C6 v- d  j  ~
  478. STA $BD
    6 g( k. e8 I) U2 y' X2 n  L1 B; j- ^

  479. ( z6 l& Y% O* f- r2 N! J( g/ M
  480. RTS
    9 A! J# V! V4 B1 }) B4 X- a
  481. & r+ Y" W; z/ X) s5 x9 `
  482. PPU_CMP:0 q. s+ g. ~' I
  483. / N: \+ |4 F5 O2 ^( ]
  484. 4 H! n; d; W6 k" [% K
  485. PPURE:
    . |- O2 K3 L  [; n+ e
  486. RTS7 s& G% x1 O/ u5 R% r

  487. # @) V8 R) L9 D2 g8 {$ v
  488. ! D8 l1 y: ?6 N3 s5 V
  489. FREE_PPU:
    & y' A, U3 W' F. U; B% d- H% l0 F# K8 P

  490. ( b& c# r; |8 @) V, d
  491. JSR TEXT01_PPU2 `! L; m4 r. z/ o  E  E# w
  492. JSR $CBC0
    # Z5 \( f- H0 m7 b: x3 ^8 S- Q
  493. JSR P1_PPU8 K3 a- Y% e! s
  494. JSR P2_PPU
    1 G/ m: S" M0 [; R) k5 v
  495. RTS) ^7 s# z& I" ]' O: H

  496. 4 H1 Q( A3 X$ U9 S2 ~7 H& Y
  497. TEXT01_ADDR:: c. S! H% {2 `! u' t
  498. .BYTE $20,$423 F3 s0 P; a/ Y
  499. TEXT01_DATA:
    4 ~4 P4 L2 x8 ?* X4 X
  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
    . ]7 B' \  H. A& Z/ i/ D
  501. TEXT01_PPU# T+ _% d9 x) _6 w# O7 h# \) ]
  502. LDX #$00
    & g2 ]8 G$ _# j+ e0 N* v( j9 G
  503. LDA TEXT01_ADDR
    # E9 Y5 @6 S8 i1 }4 m/ a$ i
  504. STA $07030 p* T% Q  G, C5 c0 Y
  505. INX- b8 K( g6 J- ]& s+ F. P
  506. LDA TEXT01_ADDR,X4 [* V8 p4 w  F3 L5 G+ I& X2 j
  507. STA $0704
    / o; k& I; }* G
  508. JSR PPU_PROCESS% n5 f, J& ]  ?. q' r/ L
  509. TEXT01_W:) z0 a7 R" v! X% x2 B: v9 I) M
  510. LDA TEXT01_DATA,X
    ' Y. L" L* H5 c) t  _
  511. CMP #CEND+ h* }& ?/ G$ P1 Y5 Q
  512. BEQ TEXT01_START6 b5 V% N4 @1 g0 Q9 w
  513. STA $0705,X% ?  p1 a/ ^. c1 g! B) N
  514. INX, P* G3 h+ ~, `9 ^7 d
  515. LDA #$00* _% r/ q% {% y2 y6 u- B) l% c* a
  516. BEQ TEXT01_W' _- p6 f! |: ^
  517. TEXT01_START:
    / q( }. Z1 ?9 c0 n9 p/ E
  518. JSR PPU_START( c: [, `$ z1 g. q  N+ M( t
  519. RTS
    - X8 m0 s, \: u& V) {; S) o- Z6 D
  520. ! Z! H& c+ n/ g5 p

  521. + C; I- |# V5 P
  522. COLOR_DATA:3 ]. B' ~8 B3 M) I9 |2 a$ G
  523. .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28
    2 ]2 @7 `  t4 }0 U3 x- h

  524. * m+ p5 U/ E4 `) i# V0 H8 Y: x0 N
  525. P1_PPU:
    / j1 s3 A2 Y; }& v; d) Z, j1 e
  526. JSR PLAYER_01_PPU0 a* N; @/ n1 D$ O) [
  527. JSR $CBC0
    ! [* J; k5 [  A+ i
  528. JSR RELIFE_P1_PPU8 S/ w% a8 {7 ]; p
  529. JSR $CBC0
    6 I4 m) g6 i! M0 q- q* T9 B: h
  530. JSR RELIFE_NUMBER_P1_PPU
    1 f5 B) T* d% ]: k- w5 U: j1 G
  531. JSR $CBC0* s+ ^1 |. ?$ v  k/ K* W
  532. JSR WEAPON_P1_PPU
    0 v4 ~1 b2 o/ [. S: G& a' g
  533. JSR $CBC00 t$ r$ R1 n0 c+ M; ~
  534. JSR BULLETPPU_P1_PPU
    : ], ]: q( S% y
  535. JSR $CBC0
    7 J" f: ~8 p2 \) s! D. j
  536. RTS
    0 s5 ?" a9 ^+ H; \
  537. * J4 p! j, h. i$ U/ m6 R
  538. P2_PPU:8 N3 `; a) A9 {7 d+ l: [
  539. JSR PLAYER_02_PPU
    + T. W% `; t+ m' `+ u0 Q
  540. JSR $CBC0
    ' Q) P+ O; o3 V, v" ~
  541. JSR RELIFE_P2_PPU6 p% w  T9 S; Q, S
  542. JSR $CBC0+ I- y2 g: a9 c8 A
  543. JSR RELIFE_NUMBER_P2_PPU' a0 z2 D9 Y. m. A3 C& g0 g
  544. JSR $CBC00 Q5 S2 |" Q% F# W
  545. JSR WEAPON_P2_PPU* [. M( n! G: L- N/ J
  546. JSR $CBC0* n3 Y4 [( D8 {3 D" m/ N
  547. JSR BULLETPPU_P2_PPU- y. u6 d+ m9 j! ?' R
  548. JSR $CBC0
    # }* B  ~3 V; b. t* x0 h% S. F
  549. RTS
    : d0 c/ v% X# H- {4 ]  x
  550. 7 ~8 Y9 C* G1 f) V1 L( W1 D4 K

  551. 1 ^( s: k/ ~9 S

  552. / D; m$ G9 t  @0 ?
  553. PLAYER_01_ADDR:
    / x2 u: G6 {* B9 p! `! x
  554. .BYTE $20,$A3
    7 z7 Z6 F- {. B
  555. PLAYER_01_DATA:* C6 x+ C1 b5 _! |
  556. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND
    & |  a0 ?% p2 f2 j2 Z' ]
  557. PLAYER_01_PPU:
    ! B* Q7 M5 O# c% B" r8 h2 _0 k
  558. LDX #$00
    $ F  r: ]* F( L1 R0 A
  559. LDA PLAYER_01_ADDR8 P* j0 r/ Y- ^* a
  560. STA $0703
    $ r; `1 o2 }. k9 z( Q
  561. INX4 z' n3 }" n, C- I' i
  562. LDA PLAYER_01_ADDR,X
    & c5 X$ w* V$ T7 T
  563. STA $0704! `& Y+ }4 w- h
  564. JSR PPU_PROCESS0 Y2 ]. r. o; e1 k  ?" ~
  565. PLAYER_01_W:
    9 w3 t; L8 k: B  \1 Q. w0 A
  566. LDA PLAYER_01_DATA,X  b( x) R6 t% `
  567. CMP #CEND
    ( G3 \# j. s0 n2 I* P# B
  568. BEQ PLAYER_01_START! S( H/ b; L" z( ~: L% [+ ?' @
  569. STA $0705,X
    . n5 V; T2 F8 K4 ]$ ^! w" p
  570. INX
    # {8 V6 E2 [' v5 D" L* Y
  571. LDA #$00: b: R. w/ r3 B+ u
  572. BEQ PLAYER_01_W
    / M# _2 Q1 h8 Q; V" Y8 {
  573. PLAYER_01_START:
    3 F% K) w+ C1 i6 c) u
  574. JSR PPU_START
    4 E5 l2 Q1 I/ Y. A; r- O
  575. RTS1 ?3 d4 Z( E( K3 T6 O: M/ _. s

  576. " p/ Z3 i) k1 w6 C) @9 h- s

  577. ( G' q8 w! e: A) h: v
  578. RELIFE_P1_ADDR:
    , ^0 v2 k1 r8 d% S. ~! ^/ S: b8 b
  579. .BYTE $20,$E3
    4 A9 {$ l6 V; o! G0 e+ [
  580. RELIFE_P1_DATA:
    5 Z5 e6 J5 e/ \  c( i
  581. .BYTE CR,CE,CL,CI,CF,CE,CEND* |& m. ~" k* h* M
  582. RELIFE_P1_PPU:
    5 N& O, }7 u! b6 u" Q
  583. LDX #$00% W7 n, }: ~2 y" f7 u- y
  584. LDA RELIFE_P1_ADDR
    1 g- z/ s) b5 C$ X1 p
  585. STA $0703- H% p' X" r$ G( L0 b$ o, t, x
  586. INX. }! }- r4 B& f3 s4 C
  587. LDA RELIFE_P1_ADDR,X$ N" ~8 U! x1 L' I4 N; M# q
  588. STA $0704
    , Q7 Q' A* ?" G
  589. JSR PPU_PROCESS
    ! o/ m7 e; T2 x. c- f# h
  590. RELIFE_P1_W:4 o: L8 }! {( {. J6 S% Y- U+ Z
  591. LDA RELIFE_P1_DATA,X. R, {  L4 o, j& g! @0 h
  592. CMP #CEND
    : }- ?% ^) l* P8 n) \% X8 D
  593. BEQ RELIFE_P1_START
    : K8 p" U5 Z+ r; V3 v( X
  594. STA $0705,X
    9 m, @/ _0 U( r! j( ?+ m
  595. INX
    & T; G3 |2 r& B2 U' \4 p; Z
  596. LDA #$00# f# U+ A9 N3 s
  597. BEQ RELIFE_P1_W! n/ U9 C1 ?! A" s* K0 [& P8 r
  598. RELIFE_P1_START:
      x: m$ O' x+ u0 A  S/ g( r
  599. JSR PPU_START  y( t  n$ I4 p- o
  600. RTS$ v/ }3 {$ `% b+ c
  601. # J4 a8 K2 [8 M6 n( `

  602. 0 A6 {& j8 i$ h: d, z
  603. RELIFE_NUMBER_P1_ADDR:3 F7 G; c$ G9 a2 g4 w5 m
  604. .BYTE $20,$EA0 u7 Z5 L+ e/ j) T. g) I2 r
  605. RELIFE_NUMBER_P1_PPU:
    . |$ @4 L8 O4 N9 n
  606. LDX #$002 Y- }# D* Q1 [5 U9 }$ G1 y7 A& K# p
  607. LDA RELIFE_NUMBER_P1_ADDR
    & i; h, i) k' q
  608. STA $0703
    0 n# @2 ^. G) _6 p, g) v! d
  609. INX, m4 j3 E7 M+ w$ s
  610. LDA RELIFE_NUMBER_P1_ADDR,X
    + g4 [9 c% q/ q6 Z& y/ W$ g' }  _
  611. STA $0704- U, A; t" G- ~& j2 w; t! H
  612. JSR PPU_PROCESS* z% O2 \' \0 z5 V$ ^6 v
  613. LDA $32
    , Z$ u! {! {' z& w+ E: l) s; \. n. U
  614. JSR LIFETODEC1 Z( ]+ C: `- L7 q/ h. B
  615. RELIFE_NUMBER_P1_W:+ B4 S3 T& b; L6 q& D
  616. LDA $7A03) }3 g* }8 h2 @  v
  617. STA $0705
    % W& q1 D# Y* X1 M
  618. INC $0705
    7 b1 O: b. \+ K, ]
  619. LDA $7A04' l' F9 R! N3 i2 d# [
  620. STA $0706; \( b2 P6 e. Y* L7 ~. o
  621. INC $07060 |* U9 H1 J( m& E9 r/ J/ e
  622. LDA $7A05+ m: S2 M: W/ j2 k; w' _) Z: w9 u
  623. STA $0707) l3 ^1 F% s  ~! N3 j0 n5 _# S
  624. INC $0707
    ' a9 V/ `# g- a$ i( J! ^/ E
  625. LDX #$034 @* s* e3 d- v5 g! U6 m. B9 ~
  626. RELIFE_NUMBER_P1_START:
    9 |$ Y5 T$ |8 G- `
  627. JSR PPU_START6 @0 |  n0 W2 e: Y
  628. RTS) c5 c- H* k% \* Q( W+ m

  629. 3 `8 ?* A' J% o/ [: @1 z
  630. WEAPON_P1_ADDR:0 J7 x) }- b- C9 P' W7 X2 m: W
  631. .BYTE $21,$23
    " e! z( e0 p+ \/ i8 {7 \
  632. WEAPON_P1_DATA:
    : H: {; X" o0 [
  633. .BYTE CW,CE,CA,CP,CO,CN,CEND5 Q9 @, o" G0 \& @
  634. WEAPON_P1_PPU:
    $ Y  S8 B! w2 K: L
  635. LDX #$00
    . h4 L, _- R8 J1 v+ P' C
  636. LDA WEAPON_P1_ADDR3 @: W5 H4 t: Q4 c% U
  637. STA $0703
    + J6 o; a% ]! |2 |6 C3 S
  638. INX
    ! T0 a7 d7 `' L* I% B
  639. LDA WEAPON_P1_ADDR,X- v( b+ ^  x3 W0 @$ P) R6 l" }
  640. STA $0704
    , q9 K& k2 {7 R
  641. JSR PPU_PROCESS3 k% ?8 X/ ]9 F- F- i( ]
  642. WEAPON_P1_W:! a0 ]0 g; @1 C& s* ^
  643. LDA WEAPON_P1_DATA,X: V: R; f# Z) z: _& F" `# R: z4 z
  644. CMP #CEND& A1 F# l$ x+ r& m  }% L1 _7 ]" B
  645. BEQ WEAPON_P1_START; F6 P4 ~7 r: y( e8 a& }& L
  646. STA $0705,X
    & ?5 ?; F3 ]5 }( v: P1 a& j
  647. INX/ P5 {9 q  ]( n. L" v% w7 Z- }
  648. LDA #$00
    " `: Z. }  l, Y" j# ^$ ~3 A7 n
  649. BEQ WEAPON_P1_W  p' i& l! M& h: e* N
  650. WEAPON_P1_START:9 ~" b) u1 ]! [& S# q( p3 V
  651. JSR PPU_START/ \% p0 r0 n' J+ v5 r* Q' K
  652. RTS
    ' f( r: S9 j# ^
  653. + P- s" j! Z& e. w
  654. BULLET_P1_ADDR:
    . V' q" ~' a5 H) q
  655. .BYTE $21,$2A
    9 u! u' Z7 Z- k! J' L3 A4 r
  656. BULLET_P1_DATA:' `! r# e& U; a; J1 N: B
  657. .BYTE $00,$01,$02,$03,$04
    6 C+ ^  o$ C5 N' L: [6 @
  658. BULLET_P1_NAME:
    1 ^! m; V% A  h0 P
  659. .BYTE CN,CM,CF,CS,CL. s& s0 @3 z6 J6 X

  660. : N1 X. D6 {! Z) [* W$ w' @
  661. BULLETPPU_P1_PPU:7 x! D. Z. o& w& ~
  662. LDX #$00+ \, R  j! g, ]" [. f+ h$ j) }; P
  663. LDA BULLET_P1_ADDR2 A. v! R/ j" N! a7 ^7 x- q' r
  664. STA $0703+ A8 }- h- n4 D; q; X2 c
  665. INX& r/ Y' ]! `0 y0 |* c
  666. LDA BULLET_P1_ADDR,X
    " L* y1 ~' z. \: n5 a) x# j
  667. STA $0704: r+ _0 ^; Y5 p& g8 U$ A
  668. JSR PPU_PROCESS: g- Q0 F6 e% W. E7 @1 d  t
  669. BULLET_P1_WRITE:
    , Z6 E  W4 ^% R: ^9 M
  670. LDX #$00) v; B/ N- Z' t) h( W$ n/ Z
  671. LDA $AA
    # F+ m9 I# E. L9 Y$ i+ x8 n
  672. AND #$10: i3 w  I# F3 c! A* }$ {
  673. BEQ C_BULLET_P1; G) V$ A8 m' c, C
  674. LDA #CS% }% {( G8 u+ k" ]
  675. STA $0705
    : t$ W5 H9 s: P+ c
  676. BNE B_NAME_P1- v8 w  o! p2 [  P5 k9 `
  677. C_BULLET_P1:
    ( S+ @2 e2 Y, \" Y
  678. LDA #CC
    * [6 G  d8 A4 g+ ?, H; X
  679. STA $0705
    + H* ~( `1 A; I4 L2 m, z3 u
  680. B_NAME_P1:
    1 f3 @% D7 u) ^+ m' @
  681. LDA $AA
    & \( Q4 S# |1 x: M* g" N& D
  682. AND #$0F
    4 f8 A9 m; G% k  k- J
  683. CMP BULLET_P1_DATA,X
    - [9 `$ z0 \$ e+ w6 H1 g( X
  684. BNE B_NAME_P1_RECMP
    6 \# K+ q8 O* e! i! Z
  685. LDA BULLET_P1_NAME,X  W' V; o# q% B! [
  686. STA $0706
    & m+ ]$ X, z/ d+ G, r
  687. B_NAME_P1_RECMP" Y1 w& B$ h& P- @# f
  688. INX
    2 F) F2 d; a$ e. X# G6 P( z4 S7 {. p
  689. CPX #$05& M. H3 x& [" j5 @7 G' `. b
  690. BCC B_NAME_P1
    8 J5 p- t: ?  J8 [& V9 Q* |2 N0 N
  691. LDX #$02
    ! I# b9 a; }6 F3 @
  692. JSR PPU_START6 k" s  O1 R0 r8 |2 U* [% {; _$ ?5 I
  693. RTS8 p3 q2 U% \; O% I( B3 U' U6 P: N
  694. / j. |& `. T: {6 q/ i

  695. , b6 ^# v7 V3 ?0 i; m1 W3 n
  696. PLAYER_02_ADDR:
    + V+ e( E6 B5 `
  697. .BYTE $20,$B3
    ; }( R* S5 _  {. a2 m
  698. PLAYER_02_DATA:
    $ l" t9 i: \$ b# Q" N; v
  699. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND' i+ U" G  I; x1 ]0 T7 {
  700. PLAYER_02_PPU:
    9 w( @3 F8 j4 _" |5 q, x- z
  701. LDX #$00; O; }: |& q! x6 Z- \! D% h
  702. LDA PLAYER_02_ADDR
    ' {6 M5 k4 M8 \' V7 \
  703. STA $0703' ^( K3 ?6 S; _
  704. INX% D/ X8 l% _, f. R/ d
  705. LDA PLAYER_02_ADDR,X, o: Y* y; O; i6 ~
  706. STA $0704; N( Z3 l/ k5 l! d0 B; J6 x; W8 L
  707. JSR PPU_PROCESS; p+ G5 c7 z3 ~
  708. PLAYER_02_W:
      j+ g6 ]  H0 t
  709. LDA PLAYER_02_DATA,X  l1 f$ w8 g+ t
  710. CMP #CEND
    " c- e" T3 Q; `3 ]5 g
  711. BEQ PLAYER_02_START
    ) v$ ~( t  F  z& `. L. O
  712. STA $0705,X% x- I- a. Y  W9 d7 c
  713. INX
    : t5 u, C( `- l& I3 P3 D
  714. LDA #$00) P+ W& b8 Z$ H! H$ p
  715. BEQ PLAYER_02_W
    6 W7 k& N) e0 Y6 \8 [
  716. PLAYER_02_START:8 d) N9 w5 \4 A% ?4 A
  717. JSR PPU_START. J6 y3 h6 c* O; l% R# R& U! v
  718. RTS
    - _0 b# _, U: ^4 C( ?# [: `
  719. 6 L) I! B& s6 B( l

  720. 2 t4 l/ F% x& B0 p: e
  721. RELIFE_P2_ADDR:
    ) a$ I- T6 t% p. j
  722. .BYTE $20,$F31 q: X/ q: D5 {0 {& C, {
  723. RELIFE_P2_DATA:
    6 x9 H3 B) {9 T0 A
  724. .BYTE CR,CE,CL,CI,CF,CE,CEND' A5 z. E6 Q  L& t
  725. RELIFE_P2_PPU:
    & d) |( a  _5 U1 P# I
  726. LDX #$00
    * J& }# [+ K7 j5 z: o# p1 w6 X5 G
  727. LDA RELIFE_P2_ADDR4 N% P# I% L# f3 B# t
  728. STA $0703
    8 D) z9 Y% ]3 t& ?* J8 j2 Q/ G
  729. INX9 ^/ x4 U+ n; O1 y5 u$ m/ f- Y" w6 u
  730. LDA RELIFE_P2_ADDR,X" j# H; ]! R  o  G3 p5 t" ~
  731. STA $07041 v4 ~% _  q- V8 t
  732. JSR PPU_PROCESS% T! N1 S# d* Z" \1 D
  733. RELIFE_P2_W:
    # E8 X- G- W$ H& }( S& l0 v9 B
  734. LDA RELIFE_P2_DATA,X$ i. t: F: S4 o* j
  735. CMP #CEND
    , Y! _$ [# ^7 @- H$ j& m% v
  736. BEQ RELIFE_P2_START
    8 h7 |$ @% t' u+ v7 `( J, |' {$ `
  737. STA $0705,X
    3 w1 J9 V5 u$ t3 U+ L
  738. INX2 d9 T$ k: t8 K# j7 O
  739. LDA #$00- {* g4 z. Q/ t( A' C, c# ]  m
  740. BEQ RELIFE_P2_W
    0 r6 h5 @# c$ k$ G( x) v: b
  741. RELIFE_P2_START:0 r- Q% Y8 l; {
  742. JSR PPU_START
    ! F: v1 q, v* C/ `! H& l
  743. RTS4 B/ Q1 X* X. u& u! h) N  U

  744. & d/ H7 r" o9 P+ J

  745. % f3 O) d; }: u$ Y
  746. RELIFE_NUMBER_P2_ADDR:
    ' {( S) r& `1 C7 H  b1 r
  747. .BYTE $20,$FA
    , e* w3 \: k7 W6 a. w: ^
  748. RELIFE_NUMBER_P2_PPU:
    0 a) B5 v6 m$ W$ ]& ]8 M
  749. LDX #$00; e  x; I8 n; S0 `# o
  750. LDA RELIFE_NUMBER_P2_ADDR
    4 O5 X. X3 y0 l$ w( a  ^
  751. STA $0703
    ( g' N3 [4 }- U: _8 C  D5 b, ?
  752. INX
    & e$ F  T$ X& d
  753. LDA RELIFE_NUMBER_P2_ADDR,X
    1 i: z% O5 v# j0 J! b/ l& @
  754. STA $0704: t/ K9 f9 Z3 x5 E! z
  755. JSR PPU_PROCESS# M( l$ b' T9 j2 A+ u, W7 r) g
  756. LDA $33
    9 {) y' F) u( }1 l5 T8 `  @
  757. JSR LIFETODEC
    5 y5 e6 H# G7 G
  758. RELIFE_NUMBER_P2_W:  D# A# Q9 n9 G$ U+ T/ e
  759. LDA $7A03: e0 F) ?4 a; I  @  a
  760. STA $0705
    8 k, B  Y2 ]9 a6 Y5 G& P8 i7 L& {1 l
  761. INC $0705' y7 e% f# o  L5 c
  762. LDA $7A04
    * ]4 B8 i+ ?* v3 g6 q* \
  763. STA $0706
    0 K% E8 {, I+ M: j) j5 q
  764. INC $0706
    1 N/ D& a4 z) \# ?, ]# t, Q
  765. LDA $7A05
    3 Y( u  y1 v$ D& O7 B
  766. STA $0707
    & S) p3 u  q% ?8 k
  767. INC $0707
    , Z6 T5 m3 {% O
  768. LDX #$03  S+ i' x. r" e& L# f0 g
  769. RELIFE_NUMBER_P2_START:
    ( h2 o, ^. I/ b$ z
  770. JSR PPU_START) F( `5 `0 ~$ {$ M* j+ [$ K
  771. RTS
    1 t9 {. |/ O6 q6 `0 R5 f. k/ B8 }

  772. 0 @/ E4 U; o) R1 ~. P; m+ f  g
  773. WEAPON_P2_ADDR:
    3 F" q* x2 w  F5 @& _. Z( s2 Q. @
  774. .BYTE $21,$33
    - v7 s( z8 E& w6 u# o% V4 r
  775. WEAPON_P2_DATA:4 A7 v8 r. z1 e7 D5 C8 i7 c
  776. .BYTE CW,CE,CA,CP,CO,CN,CEND+ H6 W5 t3 q$ g1 u* ]; C
  777. WEAPON_P2_PPU:+ S& l* t1 W4 M% I) ?
  778. LDX #$00
    , V6 A1 Q( _8 r. z
  779. LDA WEAPON_P2_ADDR
    : A2 c( j0 l; N5 I( o$ n
  780. STA $0703- Q; g( K: L  [& k# b
  781. INX
    & w. c9 w2 |- u$ A' o" Q
  782. LDA WEAPON_P2_ADDR,X
    . T: ?% |# A9 E7 \3 N
  783. STA $07049 P2 u" k+ m/ |/ H- K
  784. JSR PPU_PROCESS5 [2 _3 i% X, f1 ?- N$ k  r
  785. WEAPON_P2_W:2 P1 w- n% ~8 a! q+ P3 r6 \3 {& j
  786. LDA WEAPON_P2_DATA,X
    ( s( k" g2 \& T
  787. CMP #CEND: p6 C. [! _) s) N3 m" X  e
  788. BEQ WEAPON_P2_START- q7 S; E/ g' _/ @: J
  789. STA $0705,X; I! Q% v1 C( n4 {  T7 x) q9 o
  790. INX
    $ ~; w5 @* d6 y( U
  791. LDA #$00( |5 l1 J) G9 _9 s2 @
  792. BEQ WEAPON_P2_W
    & G, B/ E) I5 ~; V
  793. WEAPON_P2_START:
    2 ]/ b/ S# ]) L# v0 x3 ]9 G
  794. JSR PPU_START# j" v8 B% _+ h" i3 }: x! F
  795. RTS" v1 A% l* F$ L; c" F

  796. % M- x* l; o  L, ^
  797. BULLET_P2_ADDR:" k! m4 V. S9 L' Z
  798. .BYTE $21,$3A
    1 D) u6 H, S* P$ R
  799. BULLET_P2_DATA:
    0 `! X# y1 q3 I; V
  800. .BYTE $00,$01,$02,$03,$04! `9 g# l; D& q8 z
  801. BULLET_P2_NAME:7 W2 `/ w7 j8 b. x/ h
  802. .BYTE CN,CM,CF,CS,CL
    " n: L) Z3 Y+ O  R3 g7 v  Q
  803. : {1 w8 b  W# n# L
  804. BULLETPPU_P2_PPU:2 R! e% ]0 ]% H/ n0 G
  805. LDX #$00
    ( H8 Q$ n, a& `. `" y& T
  806. LDA BULLET_P2_ADDR
    , ^* ?3 A  z# i" {, ~& C5 }6 {# N3 D
  807. STA $07037 ~9 P9 |3 d6 ]+ I5 |7 V4 {5 h
  808. INX& R1 j; ~! I3 P, F  Z3 {6 P
  809. LDA BULLET_P2_ADDR,X
    / r, d5 h0 ]# G; H3 Z
  810. STA $0704* a* f6 g; R* }
  811. JSR PPU_PROCESS; ?  a6 H1 O  B6 n
  812. BULLET_P2_WRITE:
    9 V3 l7 V" t0 [6 Q& `# g" K/ [
  813. LDX #$00. @1 X8 Y9 E3 k1 e/ r$ w& E4 Q, f/ A
  814. LDA $AA. A, L  P8 C, A
  815. AND #$10# F+ u4 I; Y; x! X) t6 w
  816. BEQ C_BULLET_P2
    , n. C! L9 R' `( a
  817. LDA #CS" _, b7 J/ g5 i& d  q1 L
  818. STA $0705
    7 w5 w& Q1 h; m0 Z, C0 }
  819. BNE B_NAME_P2
    3 ~, r8 K8 F  B3 g% l1 x' H/ V
  820. C_BULLET_P2:5 N' q, Y: F8 r6 T+ b
  821. LDA #CC
    % F5 ]4 Z; i0 W5 }8 S0 N% ^
  822. STA $0705/ z1 P5 p+ m1 Z
  823. B_NAME_P2:
    $ |/ ?& {9 D+ H4 w3 V
  824. LDA $AB( W- _0 C/ V" \# L/ c: v
  825. AND #$0F4 M5 J* A% |8 J) L, R( B1 t
  826. CMP BULLET_P2_DATA,X
    % Q% A% u  [) ]' @3 ?+ H0 W
  827. BNE B_NAME_P2_RECMP
    7 c; [1 Q! i7 u+ d
  828. LDA BULLET_P2_NAME,X
    ! E4 B6 u, t! j; p) y% o( A
  829. STA $0706
    2 g5 v7 w/ v0 k3 F1 o7 b6 n0 ?2 l/ {
  830. B_NAME_P2_RECMP/ \( |) f* `8 n% H
  831. INX$ n. ^& i+ J: r2 F, n! ]6 c5 T
  832. CPX #$05
    ' \$ ?* G; ]" B5 S: D$ c5 k0 W
  833. BCC B_NAME_P2
    9 k3 P( x4 s8 b( U6 a  ^+ K8 r) M
  834. LDX #$02
    3 f0 F5 W2 a8 Q4 A& ^6 w' w
  835. JSR PPU_START
    . H% P: M* w7 [" L6 _
  836. RTS
    7 R4 T7 D' `: w- p/ o. y  e2 c
  837. 6 G' A  c0 z- M! P1 `$ \$ g

  838.   U- m( J) H2 Y4 g

  839. " P% G+ I3 v& |
  840. & X" G' U) Z: |( ?5 F& X

  841. + y9 A( U- V6 j  e1 o2 {3 Y, m
  842. 6 T% t) V) D& J6 s/ H5 q& b
  843. LIFETODEC:                ;十进制转换
    1 ~" m' ~7 I3 q# n7 e
  844. LIFEL1:        ;initialise
    6 v1 j$ I  c, t+ D
  845. STA $7A00        ;$7A00=F3
    - s7 T* M$ [/ B$ N8 w4 N. a4 I
  846. LDA #$00
    * x! T7 x( [& z' f, ~' m
  847. STA $7A03        ;$7A03=00* F( G3 c9 ]- I5 q
  848. STA $7A04        ;$7A04=00
    - v4 q: o& V1 [& P% H; W- g6 E
  849. STA $7A05        ;$7A05=00
    6 \1 G" W+ X3 r: |2 @" t
  850. LIFEL2:        ;copy data $7A00 to 6001
    9 K! |+ X; H* h4 W  n& f& j- r
  851. LDA $7A00
    : z! P9 i: u1 k' `5 p! i
  852. STA $7A01
    . s9 g2 `% q3 s3 r  j, O- ]
  853. 9 T: I! h* U# s# |3 a
  854. LIFEL3:         ;hundred
    , Y5 z! d. m, _
  855. LDA $7A01
    6 ^; ]1 R! |4 v; ]5 u4 t* z" w0 \8 B
  856. CMP #$64: z  F" ~5 K7 U0 g8 g1 a8 x% C" f- F
  857. BCC LIFEL6                ;$7A01<100 goto L6
    & r1 L0 f2 b9 s4 ]% H, |+ y
  858. LIFEL4:0 ~: N7 a3 w; c& p1 F) y6 @/ ?  m
  859. LDA $7A01( s( z9 i' U: a3 ~' z' f
  860. SEC: l6 n3 J" \+ n5 G4 x
  861. SBC #$64        ;$7A01=$7A01-1005 H: Z9 M: M+ X! P% Q( Y
  862. STA $7A01
    ! }- G$ F& ]3 I( J+ k
  863. INC $7A03        ;hundred++
    4 q! ]) O/ U# r2 O5 v
  864. LIFEL5:
    4 @2 G! J2 B1 g3 S* [5 s4 \: @$ j9 e
  865. LDA $7A01
    $ R/ i8 Q% M2 [& R* g1 a% }3 ]
  866. CMP #$64
    ; O. t1 A% _; ^1 p( H: v6 R' Y  ~
  867. BCS LIFEL4                ;$7A01>100 goto L4
    - q1 w/ B- P1 o; g

  868. 1 _, }1 z) r) U5 z2 o
  869. LIFEL6:        ;decade
      R/ Y- x+ H5 K4 s/ V6 \' L) Y
  870. LDA $7A01
    / I& }) _# ]0 G2 c
  871. CMP #$0A
    $ k% ~) U* ]  c# e, \
  872. BCC LIFEL9                ;$7A01<10 goto L9: S2 T) V1 a. V
  873. LIFEL7:        8 B: T! J& r; }- N/ f0 l) x' g, }
  874. LDA $7A01
    8 l& C( m0 b6 A* y0 h7 f: Z
  875. SEC
    - x' @+ W3 ?! a* G' K5 q" l/ ^" S
  876. SBC #$0A
    , M3 ?$ f  X8 c7 X" S8 O
  877. STA $7A01        ;$7A01=$7A01-10, m: m4 I1 z# m& Q3 |+ i5 m
  878. INC $7A04        ;decade++
    & p! K3 F9 t( p
  879. LIFEL8:) M0 q1 H6 q$ a# B3 o$ J# P7 B
  880. LDA $7A01  k2 B* E/ _2 @; x; p
  881. CMP #$0A9 T5 R6 g3 m6 u4 M/ Q
  882. BCS LIFEL7                ;$7A01>10 goto L7
    7 S, J2 |* z5 V0 `4 C
  883. ;unit
    ( T( ?6 S2 Y& z1 u3 R5 r
  884. LIFEL9:
    8 T* n: c! w4 j- L
  885. LDA $7A01        ;$7A05=$7A01  d6 @3 d: h, b0 M9 U4 {/ @1 {
  886. STA $7A05        ;unit
    7 e+ |2 v8 z$ M" A' z% e9 ]5 B
  887. RTS        ;return
    % j6 o1 _5 z- x
  888. ) a( B3 i- V" I
  889. , l. v7 b1 [. J* `( T6 N9 m/ F  _

  890. ' R! I: N9 X7 g$ }
  891. PPU_PROCESS: ;PPU地址处理程序, k7 ?2 K# {: d$ }
  892. LDX #$00# C5 L7 A. k' j
  893. LDA $FF
    2 I' R/ P2 s' O; P; Q* m$ l
  894. AND #$01
    / s6 D& j% ]* X+ r6 V! K
  895. BNE PPU_2400_27C0
    ' @$ s5 q: Q  ?6 t5 C
  896. PPU_2000_23C0: ;命名表12 C8 z1 R4 x: |) n- j  I1 M
  897. LDA $0703
    6 {/ M+ G- J9 l
  898. AND #$FB) n& s# |& M! Z% Q; u  `
  899. STA $07035 p7 s7 _6 q0 U$ n
  900. RTS6 O$ p" c6 [( a$ T$ ?) m
  901. PPU_2400_27C0: ;命名表2; [# i! j7 Q; C
  902. LDA $0703
    3 T2 O' O1 m0 ~2 l( F
  903. ORA #$04
    5 W; ^0 c+ N! U
  904. STA $0703
    : E% O% s& C5 X# A" N0 {
  905. RTS% E3 @" |5 m& @* q' Z" ~
  906. 0 Q( _0 U7 h0 @. Z  r$ p
  907. PPU_START:  ;PPU数据写入2 r& y; ]% u; u# E4 r- N
  908. STA $21
    ! h' }% d: [6 Z  k$ E1 v" v
  909. STX $0701$ t0 Z& n' X7 r$ i
  910. LDA #$00
    ) }% W4 [, O( C# \) m
  911. STA $0705,X6 E, i( ]( b9 o
  912. LDA #$01
    1 [  |$ p/ t# W' B! J, l3 w$ k2 g
  913. STA $07002 }: ~# P! P  F4 j) m
  914. STA $0702
    3 ^6 F! \' J+ K4 v
  915. RTS. ?) K$ T: o( Q
  916. 5 A9 _( J& P/ W7 b" ~

  917. $ B5 g5 D# e9 D- e5 ?

  918. $ I+ {- [0 H* d8 |, {

  919. - N5 [0 {. r' x8 k2 b

  920. ! L; n3 ]9 ?9 q5 @

  921. / `5 \0 _$ o! x9 y
复制代码

  P% \4 b; d9 i7 d  k+ m

本帖子中包含更多资源

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

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

签到天数: 2092 天

[LV.Master]伴坛终老

发表于 2017-2-13 17:25:19 | 显示全部楼层
这么好的教程竟然没有人支持!
4 K, a$ m0 f+ Q. N/ T  ]

签到天数: 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-11 07:13 , Processed in 1.090820 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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