EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2017-2-13 11:57:33 | 显示全部楼层 |阅读模式
  1. Contra (J) PPU写入程序& }! P# J$ u* k: d$ H+ H
  2. 作者:FlameCyclone
    + d6 U! L; v  ]! i. x7 @
  3. 时间:2017.2.12
    ; Q( M& N  F) V7 X: |

  4. ( h0 z/ g6 U; n' j3 t  W) I
  5. 按键跳转:$ U& ?" j/ u# u: t9 n
  6.         C1EF:95 F5 94 F17 v& c* V/ M( O) N
  7.         C1EF:20 70 FB EA
    : b$ n  E3 g3 I( k
  8. 8 @2 X6 X, m! q; K  ?% O. i
  9. 滚动偏移:
    ( g, p0 x7 q' y$ D7 w. z& ~9 s, N. K
  10.         F936:A5 FD 8D 05 20 A5 FC 8D 05 20- B! D2 k$ v! [/ i
  11.         F936:20 C0 FB EA EA EA EA EA EA EA
    ; J' `4 E; c& w7 r6 b

  12. ) t. J4 Y- n* u4 t! e8 F  V2 q
  13. 背景调色板:
    / q, U# u$ o2 l2 K  r
  14.         CF20:9D C0 07, a. Z+ O  Y& n, e! t! r3 Q; p
  15.         CF20:20 A0 FB
    * g0 N' h. x: J5 r
  16. 6 z$ D$ y- Y( N3 M( o6 l
  17. PPU BANK号:
    : R' O" i* L; S9 X
  18.         C8C9:9D F4 07
    7 u8 a% b& l$ K% D5 I( E0 t
  19.         C8C9:20 B0 FB
    ( l8 r* O8 }# n! C. p
  20. : W. h$ x. c" f: Y* |
  21. 按键跳转:
    ( k1 x, S1 x& o
  22. FB70:        95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 20* Y  I) l( a. P5 _+ W0 S
  23.         AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 20: f. {8 e6 q% y
  24.         21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF
    / D6 B2 A) z* C3 `

  25. 4 }9 z3 n$ ?  A" r5 W- h1 Z( v! H
  26. 背景调色板:0 K! `( }3 Q3 v) |3 X9 `* Y1 H* W; \3 o
  27. FBA0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF
    * _1 r( \+ W4 t+ b$ a. M, m

  28. , K5 G0 a1 P* m2 L6 W0 y9 H
  29. PPU BANK号:
    # r( _0 i" v' {& ~. E1 m  r
  30. FBB0:        48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF
    - @5 @/ _; u1 B9 h  \
  31. ( f9 ]" v% S& F2 N6 [9 G
  32. 滚动偏移:
    8 T9 j' p4 y7 v! m
  33. FBC0:        AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 60
    & }, C- @  g( @* T8 U
  34.         A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF% t$ w, E% f& o
  35. - P/ o1 L  @3 u) F2 j* H' ?
  36. 3 ^, S1 J0 f0 r
  37. 切BANK后A000:5 q8 ~2 }+ s; X
  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, E' _* Q+ {' J6 s& q" L! i  I
  39.   k+ z5 \( h) E# N! f) V" S

  40. 0 ?* b$ K3 a9 b. w1 E, H5 M
  41. 6502 simulator:# _# s/ G. p6 y& @* E
  42. PPU写入程序:
    + a8 C9 A# F8 }- P3 x4 Q7 T1 N9 G
  43. .ORG $A000
    5 S0 b" M! l' \( N: o* _( N/ d5 o
  44. CSP = $80
    , A" P8 s/ h# K" ]% R
  45. C0 = $811 k% }1 r3 J3 x; v- S7 q$ z
  46. C1 = $828 b  S6 z: L' `2 f4 A
  47. C2 = $83: H# @. A- x7 z' ?
  48. C3 = $840 r; h0 P% H- B, L
  49. C4 = $859 ]# _0 p/ z4 O  e6 [
  50. C5 = $864 z1 O+ P: f2 s1 z
  51. C6 = $87
      o* i. V0 d/ g. r: z
  52. C7 = $88
    - @. ]# b) |, D7 E, p0 y0 y" ^
  53. C8 = $89
    / D: Q0 [& @( N6 |) B
  54. C9 = $8A
    # I1 d2 o1 t9 d# v; r
  55. CA = $8B
    * A5 o. V1 p+ E
  56. CB = $8C
      t5 E8 p) y6 {% ^5 I
  57. CC = $8D+ [! F3 T8 k; T$ {0 S3 [
  58. CD = $8E
    , c7 E, [9 f* r
  59. CE = $8F3 M: J8 q! A; f, @# }
  60. CF = $909 V" c* I$ `% Y
  61. CG = $91
    , y; @3 o; s& S5 e- Q
  62. CH = $92
    2 G) p6 [, p, E2 \( G% ^2 t
  63. CI = $93
    # y. ]' d8 l6 l$ K( d+ H
  64. CJ = $94% S! J/ n) Q( w! o# [. D# t6 Q
  65. CK = $95
    - \0 q& T+ M# S6 x' a' Z& Z8 U8 n
  66. CL = $96, Q# g( E" s4 n7 {: G6 ~0 Z8 ~
  67. CM = $97
    $ U3 b* s- \2 L! G7 P- R) W$ r
  68. CN = $98
    : b* x+ R1 C+ [1 G% a
  69. CO = $99) L8 V  R# q* C
  70. CP = $9A% u4 W# K' J; c/ O  h: ~" \$ j
  71. CQ = $9B
    * R- s7 [; w6 f2 N* u. ^+ x
  72. CR = $9C
    8 a+ V% L$ |% }( ~5 k
  73. CS = $9D
    # z4 v3 ]6 V/ B' N7 O
  74. CT = $9E% R( v7 V  s& Y
  75. CU = $9F3 I) T9 S0 Z+ @+ T8 g# L
  76. CV = $A0$ b) u* H5 J& x3 ?1 X2 d8 k
  77. CW = $A1, ^0 f" I& E& k$ ~! k' }6 l
  78. CX = $A2/ G1 E( ]2 m, k# v$ F9 z* [
  79. CY = $A3
    & z& X' k5 Q% @0 t* v. n) ?% W
  80. CZ = $A4
    8 H: N. I# ^: G7 n( f
  81. CEND = $FF
    ' x3 v! G# Q0 f' n
  82. & E) L, y. ^' h) x

  83. 3 k1 F; X& S3 E
  84. CMP_RE:7 C4 a$ a4 }" I2 [7 V5 v: g
  85. LDA $FF
    . j- c  M/ j7 ~+ L& y
  86. AND #$7F
    ) f' E) a" ?- R& U
  87. STA $2000
    ' A7 n: g9 ?) ~5 _# N- B% D
  88. LDA $20027 S) e1 ~, J& ^
  89. LDA $25- r9 o4 n* `8 m  B
  90. CMP #$01; W' I, N. e2 Q- J7 d) u* [# I3 f7 D
  91. BNE PROREG
    5 `5 h# u5 y- k: f
  92. LDA $F5,X
    : ]: P3 u# k: p; Q4 Y9 d  I
  93. AND #$CF
    ( p+ O" m) ]' b1 F$ j
  94. BEQ PROREG; I8 l4 Y6 Q7 i) a9 H6 `; {
  95. JSR PPU_CMP
    : Z5 ?; R) V; `: J7 v/ [; p' z6 [) K
  96. C_RE:
    $ b( s% q8 m# f0 d0 k
  97. RTS
    8 A6 [- ?) i' }& f' [
  98. PROREG:
    0 @5 l7 U, `) T( i+ @
  99. PHA
    ; g2 I) ~: z- Q) C7 ]9 T" X
  100. TXA
    % ~) E- X" {. X
  101. PHA- ], j: T' ?$ K) t9 r+ B* _
  102. TYA- Q* B$ m' V- [
  103. PHA: w* V6 |6 t6 b
  104. LDA $25
    : |* u. Z% W9 z* j+ l3 T
  105. CMP #$01
    + O  E1 M. v9 C* L( b; O3 ^
  106. BNE RE
    7 b+ m8 \# L; b/ E8 O; \$ D1 h5 Q
  107. LDA $010A5 D, Q3 G5 @) S* ~
  108. CMP #$00) [+ W: p* C5 p- Z  Y" I, a: j
  109. BEQ P1
    2 u  E- T. S/ u  V' p8 M
  110. 7 v8 [8 Q( }) ^. Q) m/ b# A
  111. RE:* K8 U. |* I$ p. P0 g
  112. JMP PPUWRITE0 _  I3 Z6 t9 Q5 q- \8 C+ H& T

  113. ( G; A  W2 q& C' e4 R5 P* U
  114. P1:                ; 条件判断
    * w; u# g) C; }( D$ }- N
  115. LDA $7FFF
    4 G1 N. r* m5 g7 l0 ^: K9 U$ h" c
  116. CMP #$FF
    ! s. v) K$ L. ~+ ^0 L, K' J, D
  117. BNE P1RP
    / G- X( i* p- ^/ v8 F5 @6 h# B
  118. LDA $7FA0. s0 s6 g& ?- a4 B# {
  119. CMP #$00
    7 K% h! C3 z. d) O  g7 A  a
  120. BNE P1CMP* n! ^% L( R) `# n
  121. LDA #$FF
    " c" r+ ^5 k" O, \) i
  122. STA $7FA0
    % Y; P$ Q  n- e+ v/ Q
  123. JSR CLEANA) l% ?% S0 R, }5 x
  124. JMP PPUWRITE
    ) ?' M) b# B# [' u1 n7 l2 m
  125. P1CMP:
    * q, f& v/ O) n  G, D
  126. LDA $7FFF
    - U/ o' ?3 w9 \
  127. CMP #$00
    8 g# q8 j) G9 u
  128. BNE RE) L+ U/ p1 k7 ~+ p' l/ t+ `+ f
  129. P1RP:7 l* h1 U5 g6 R" d2 R$ t8 r: B
  130. LDA $2002
    * ~' C# ?- x* `* Z+ k
  131. LDA #$00
    ! j2 y. o) |1 E( h4 p# A, H. ~. L
  132. STA $2001
    # ]! b. f% J; Q2 Z
  133. LDX #$00
    , Y1 e* Q$ W2 F) ]% y9 v0 Q9 u
  134. LDA #$FF6 R  w1 k/ h( V$ L, h; J
  135. STA $7FFF9 l7 ^: b- r5 W  e( R
  136. STA $7FA0  L7 t8 {+ E* l
  137. JSR COPYPPU0 K. |8 p. ]/ v
  138. PIRP2:
    ; e& Y' w5 W) S4 L. e
  139. JSR CLEANA
    4 Q0 W$ p% z8 l3 r- P2 L# Y( N9 z
  140. JMP PPUWRITE) Q. C3 f) |* Q. X

  141. 3 R/ D. g. X  C9 h+ t  f& ?
  142. COPYPPU:
    + [" _# K/ J, |. k0 ^- Z
  143. LDA $FE9 [6 K; X8 ^: q
  144. STA $7F50
    ! m4 A$ g; v' N4 g
  145. LDA #$08; c/ ^  o% ]+ B2 `
  146. STA $FE; C# e5 \! U6 \6 S% |0 o4 l/ @. N
  147. L0:
    6 [4 a$ ^9 r, f. K6 I
  148. LDX #$00
    ' \& B. R: v# C, ?6 v* `3 _
  149. COPY_07C0_07DF:6 a. ?$ G* X! |  [, R. f& f6 s
  150. LDA $07C0,X1 `: j; u4 \, x7 _: ?' G
  151. STA $7F00,X/ c( F' X  C# z8 b, b/ u3 D3 L; O7 B
  152. INX
    " Z! @$ F/ w2 s3 f5 h7 _+ N
  153. CPX #$40
    + L* Y6 z' w' l8 g
  154. BCC COPY_07C0_07DF
    3 F1 w3 B2 K$ R3 h9 d7 K
  155. LDX #$00
    ; c- }6 D3 [6 L
  156. PPU_07F4_07F7:0 U1 G; Z, Z! q, Y* p/ ~" O
  157. LDA #$00! U  k" \, {! ]
  158. STA $07F4,X
    $ @2 X& n: X0 v& T
  159. INX
    9 V+ X4 {( c) E+ \0 }" k
  160. CPX #$04
    & I4 P- V# g( S6 s
  161. BCC PPU_07F4_07F7
    3 `0 \' i; l" ]
  162. LDX #$00
    - Y& j7 @; B; l6 U
  163. COLOR:; b% R& a$ p1 E1 W" B
  164. LDA COLOR_DATA,X  d& n5 \5 `% V; |" \$ b
  165. STA $07C0,X
    0 h1 |, u. ~* m- u7 J- u' `0 i, @& x
  166. INX
    4 z) j# x0 g& \7 w; G4 \4 D
  167. CPX #$10" b0 Z, t9 c' k' f+ T/ ~; `
  168. BCC COLOR
    ( u& z$ Y( m, U
  169. - w: A1 S' _# I5 s: o# U
  170. PPU_COLOR:
    + D9 A3 c7 E6 E  j5 `( J. W, J
  171. LDA #$3F
    ' {4 r9 C- L3 Y( P
  172. STA $2006. d1 a- J  V) y! z
  173. LDA #$00
    ) S- {5 r7 e  m
  174. STA $2006
    5 Y$ b" w* n& |8 Z# ]: y6 y! {2 ?: M
  175. LDX #$00
    4 Z  V+ }$ m% k5 f$ s0 h% b0 {' f
  176. PPU_COLOR_W:
    % ~" F! a8 P! L, ?2 l% M) L8 L8 W
  177. LDA COLOR_DATA,X
    1 T9 C# o/ P9 X+ ?
  178. STA $2007
    % y$ u8 e' J* y8 t1 i1 e
  179. INX
    7 I  z9 v3 h: _# S6 q
  180. CPX #$10$ Q  g' g% z0 c- Z8 O+ B  a
  181. BCC PPU_COLOR_W
    * J1 r- \5 o9 S/ y$ \" U4 ~* Y

  182. * H- C0 n4 F# f3 [( ~3 C

  183. 4 T2 a2 M8 e) @5 R; C% O/ h
  184. LDX #$00
    7 A" q' ?4 F2 d; j: `6 w4 H
  185. LDY #$00/ _8 F% n2 y  g
  186. LDA $BD( N1 j3 @  r* c  [
  187. PHA; U, ], }' h" ]
  188. LDA $BC' [2 d4 M: ^8 _# k; b7 E1 [
  189. PHA8 ?) a5 {! _5 f" f3 B
  190. LDA $BB
    , Q9 m% l, G& [% I  {& o
  191. PHA
    / }9 p: Z- }6 T
  192. LDA $BA/ s) E; r! Z" W% n" w
  193. PHA3 s* f% |* i; x! _* J! L
  194. LDA $B9
    ! I) C7 o2 |9 ]
  195. PHA
    ) g+ m- W4 Z1 m! Q
  196. LDA $B89 W* M4 w( O/ W
  197. PHA
    5 s' f: d/ o9 @) V1 v
  198. LDA #$00
    ' V2 F4 s6 Q9 r* R& I. S
  199. STA $B8# Z/ v9 B" G. c' D8 S/ i0 K
  200. STA $B9* U$ b' z2 h6 E0 s! @. Y4 H: R6 c
  201. STA $BA# b) L3 F1 t4 H: X& q2 x7 q1 P
  202. STA $BB9 `, ~, c% T* e7 t
  203. STA $BC
    * C6 X  q  W  b9 E/ L( i9 Z$ b
  204. STA $BD9 V' L6 g' C, A1 t
  205. LDA #$00
    & F+ m. S3 w5 }/ p
  206. STA $BA
    , P! B  `+ [5 L
  207. LDA #$20' |( e% P9 m$ u
  208. STA $BB/ q& Y& g4 q& H$ C( X; t
  209. LDA #$00
    / f4 x0 r1 u9 x( }" {  {
  210. STA $BC
    5 j. f$ g. U, g! e1 P& U
  211. LDA #$60
    ) a; Q/ ?- f- |! K
  212. STA $BD
    " v( V" h: w- @. R# R" Y

  213. 9 X. l+ j, T# @2 e5 r: r: k) |
  214. L1:                ; PPU复制
    9 T; ~7 N! B- B# H
  215. LDA $BB
    4 C/ D) T- ^0 V; C  a# N4 {
  216. CMP #$28; }1 u* @% J3 d8 c- S
  217. BNE L25 G4 m& h3 c( k) f5 F" Z  i0 H
  218. LDA $BA$ I2 x( u1 b( P1 M. I. w8 @
  219. CMP #$006 _3 D6 Q. M7 L- W0 {& ^, |
  220. BEQ PROADPLA
    0 C# {6 N/ i2 r! U

  221. & \6 Z/ F: j/ j5 \& m. L( S; R& R
  222. L2:5 R& J5 y3 b- a; T8 g
  223. LDA $BB
    ( S3 K3 C$ l. N
  224. STA $2006
    2 k+ @. ?& e; m, l+ B: v
  225. LDA $BA. G+ r- E; c- G" J) d( ~0 J
  226. STA $2006
    ) g" K/ g5 r. A/ ~: r

  227. - [, h! \/ j1 P1 H7 b- E
  228. L3:. ^" z7 T1 p1 X0 P4 C
  229. LDA $2007% s) @: e/ e! B' ^
  230. LDA $2007) q7 N' X9 k0 G7 e0 P5 h5 S* @
  231. STA ($BC),Y
    + H5 k. [) u  e- z  `8 ?1 ?/ F9 w

  232. 0 {5 X! @* v9 r' |
  233. L4:/ ?2 U2 u7 N( j
  234. LDA #$00/ x2 h/ f5 @0 o) C9 n5 Y
  235. STA $2000) N3 @9 K+ G& T9 r* k7 U
  236. INX
    ( \$ _3 j" q/ v8 b5 T" r
  237. INC $BA
    7 c' u& ^+ T! M: n
  238. INC $BC
    # L+ z9 @( S1 D
  239. CPX #$007 R! t. _, D7 H8 L) T. x- `0 O
  240. BNE L1
    * B7 ~, I: R5 O5 e( r, }" O
  241. INC $BB0 _+ H) g3 n; X$ M- v1 \! p
  242. INC $BD
    * e) ?$ l2 ?; K( x
  243. JMP L1
    8 c. \% B+ U* e

  244. 0 C  C" s9 S+ S1 [% F- Q2 T& M
  245. PROADPLA:                ;出栈1 J+ Y/ D2 |3 {! F# x( ?2 h
  246. PLA' h* y; C& Q' c$ @' Y* I5 L
  247. STA $B8
    + G' ^; l: S! Q* a- T
  248. PLA
    $ u- l; c3 [* q: [
  249. STA $B9
    , [( G. u) {( X
  250. PLA
    ! G2 e$ ~+ h/ T8 ]1 J2 i
  251. STA $BA
    1 B$ i0 n0 P# P0 a" }. Q% c5 s, u# p
  252. PLA
    : @( h' R0 F* g4 d
  253. STA $BB
    % P( q- l3 o  I: C
  254. PLA4 m. `, u' p7 i; {, U4 B
  255. STA $BC
    " V4 |. ]) X1 s) m3 R* ]% z7 B
  256. PLA
    ( H& o. }- S8 R/ l% w7 p% u# h- }
  257. STA $BD
    % a9 h/ {0 u9 _1 o  `( K
  258. CPRE:. @6 h% B+ W$ v5 |0 Z; I
  259. RTS
    : \' j# f, I4 k9 A; N, ]- v7 ?
  260. & N  W( z0 _% c2 ~( _
  261. CLEANA:                ; PPU清空
    " v. m. Y% W* g6 n: ~# [
  262. LDA $BD
    $ O0 W( l( U1 E5 l- U
  263. PHA
    : \) t' B2 M) M  N& S1 a' Q
  264. LDA $BC
    + d4 o5 {& `$ `/ J5 Z9 U
  265. PHA( ?6 P7 A! R/ s( s' D' S
  266. LDA $BB- N  x6 d! n6 G3 u
  267. PHA
    - a, k) l) ^6 f2 ]1 r+ Q7 Q- w: W9 k( b
  268. LDA $BA
    ' N$ {; Z  y7 X; s0 V$ h
  269. PHA- }* ~* ^% X4 k
  270. LDA $B9
    ) F- X' e; W2 K3 _4 {1 G: g' X
  271. PHA& r. }3 p# ~2 ?8 c8 @
  272. LDA $B81 o5 z/ U- O* B! n3 ?# w# R
  273. PHA
    5 C/ }4 J, x* f1 Q
  274. LDA #$00
    4 O8 y+ D' f- s' p3 G4 G& L
  275. STA $B8
    6 y: W, |# f, M
  276. STA $B99 a3 [( N) I. l3 U( i
  277. STA $BA
    , `: Z$ k+ N4 t/ \, C2 s
  278. STA $BB
      u7 E0 T, n9 A6 k0 N
  279. STA $BC+ `7 ?6 J# ]# d7 g$ L+ \3 A
  280. STA $BD" \9 F& H, ^3 ]0 Y6 e. X
  281. STA $2001
    , G6 i5 y8 E- O" B" d* i+ s
  282. LDX #$006 p+ t7 I6 h& F
  283. LDY #$00
    1 s8 b1 s. Q0 U. V: h- k+ m& m( Z
  284. LDA #$00
    . F! C4 u0 v3 s& c& ?
  285. STA $BA
    ! J1 p3 T9 w+ M- E' i1 C
  286. LDA #$20
    # c; u: d' A; ?8 c
  287. STA $BB
    # r; @& Y4 K1 |' n
  288. ) Q' R5 G4 t3 y
  289. CL1:5 A. [+ l8 @- d2 k/ H
  290. LDA $BB& g# k& {4 b# j2 D
  291. CMP #$28
    6 P" x: B5 l6 H/ p5 e5 r* [% q
  292. BNE CL2$ G  L% b+ S' i0 L7 |/ j. E* ~
  293. LDA $BA% `" l8 i& M# P% Z0 K3 Z) |
  294. CMP #$00. {  o) @* ^7 U
  295. BEQ FREEWRIYE7 {. s0 c7 P- q5 G
  296. 8 n0 b, b$ N2 U+ D: e
  297. CL2:
    ! z) P+ ~: _. T- l: N
  298. LDA $BB
    + D- Q" H2 L4 L4 x' ^. m
  299. STA $2006& e, d+ g  U5 p% f9 V& \9 n- y: X
  300. LDA $BA  ]) ^. I! w5 c1 Z0 A. m+ y
  301. STA $2006
    ! e1 E% Q2 [3 H  g' p) [% m
  302. 7 {9 g: e, V# ?  i, {
  303. CL3:" W. i% ?- t- r+ M- c4 T
  304. LDA #$00
    1 A+ x7 r- p; Z9 v% k  n/ k
  305. STA $2007
    # g" ]/ O( O" r2 @* m

  306. 4 K* Y0 w7 d8 H) H, A  q, N, o7 y: h. h
  307. CL4:
    & B1 R& t, x, N7 F
  308. LDA #$00
    5 j8 m" C5 B5 J6 l" i( J
  309. STA $2000
    1 g- K$ B' O! X! r8 v
  310. INX
    ; P3 n6 C& T! k* O# N7 Y1 p
  311. INC $BA. M, F/ g: A+ F6 f1 {
  312. CPX #$00
      S/ r6 f, Z* o+ R$ ?" [; D* N
  313. BNE CL1
    / G/ o8 x6 t  R8 V
  314. INC $BB
    % S. m: s6 H2 ^. p* J
  315. JMP CL1 8 k' i) ^* |  q. ~2 \+ ~, ~7 P- l6 U

  316. 0 f" _8 J4 M+ g& Y8 j
  317. ) X4 O5 P3 L  @0 }. v9 @5 e
  318. FREEWRIYE:
    * ^! g5 j- b: {+ P" `0 F

  319. : J$ t9 f( F5 |+ ~
  320. NOP
    ' V1 H: D9 p1 R5 p7 y9 e$ {! W
  321. 7 s: C' w/ [1 k4 D; u; l
  322. . U& \  {$ N3 D$ ~
  323. ; X# \6 H3 p& O+ \

  324. 1 l" i7 a3 z9 j5 @& R4 i' P

  325. 7 B9 T4 r; ]8 [& d$ o+ L/ s* q  d
  326. CLEANF:                ; 恢复现场; W/ w4 n  I0 q

  327. - @/ G$ J& q+ R( G$ |# s
  328. PLA
    * H8 w5 j. w. q1 I  d# f% b- R
  329. STA $B8+ t4 X% V0 `* b
  330. PLA
    5 x! z6 n8 V" y3 S( p( j" q+ f
  331. STA $B9  P& u3 Q; w0 q4 x! w
  332. PLA, Z1 S; w8 f* T$ i3 ]) x' L
  333. STA $BA
    $ P3 |: \4 S" V. T) l: t3 r& w
  334. PLA! H$ @# w7 ~: y" Q* b
  335. STA $BB8 Q% r0 b2 b8 L: J' ^( [2 ^3 N: ?
  336. PLA
    " V' e! z" l6 ~  U; g+ S  X
  337. STA $BC
    + \. q& A( d5 G& @1 h- a3 E
  338. PLA" L$ \- S8 J6 F. `, f3 h7 y* F
  339. STA $BD$ s3 Z2 Y* I/ @, A' c5 u5 v
  340. CLRF:2 P) |& A8 p0 P" S4 i- ?
  341. JSR FREE_PPU
    / I: r$ w/ t0 c1 ?# |
  342. RTS- [: R, e8 U% Y. l8 Z( l1 }

  343. 1 _2 e2 M, H: m& k

  344. / W! v& l; H* \3 r: ^* z& z- f. D* x) Y
  345. PPUWRITE:    ;PPU写回
    9 o6 h" N5 f" w, T8 A' m& @. M
  346. PLA8 I; B. y" z0 b0 A
  347. TAY
    5 z; N1 O: g, l  [$ x- U& g  u+ L& o
  348. PLA/ o( ]3 k) @2 f. W( v- W7 c
  349. TAX1 p* @8 D8 j: n# j1 X
  350. PLA8 K4 p7 E: i$ M4 |0 ]# S, v
  351. LDA $25
    % H, f& i. A3 g; j
  352. CMP #$00
    * e% r$ x* j- E
  353. BEQ WP14 N" Z% C8 ]2 L: S9 [0 C# _
  354. LDA $25
    " D5 Z! T$ @! g" [% {
  355. CMP #$01
    2 e' |  X' U+ R  ?" ?
  356. BNE WRE
    9 v1 x7 n* W* e, b
  357. LDA $F5,X
    1 x" f- Z- h2 u
  358. AND #$EF
    9 u) _' I4 n' S0 A" y* H
  359. BEQ WRE
    & k. f6 W. a" g5 W
  360. LDA #$00/ ?; ]$ I$ C& t% ^  n  c
  361. STA $7FA0# e# F3 \. c0 Z( @( X& B7 r7 @3 q8 M

  362. 2 P% m* F$ I# Y: Z# h
  363. WRE:! [: {4 A1 [4 N  _/ o! D
  364. RTS
    # [2 X% m2 T, S

  365.   T$ t% U; X5 @' ^# U! m* D# U" U
  366. WP1:5 n; r3 K' A; C8 q
  367. LDA $7FFF& h) I: {: z4 r6 G$ p- f
  368. CMP #$FF
    $ t6 N7 b! r% V! F" \
  369. BNE WRE7 ?% E8 N7 x* E6 P
  370. LDA #$00
    6 f! E. T& ]) e0 D  B
  371. STA $2001
    5 K. L8 {4 V9 o" a, O3 w- i2 C
  372. LDA $BD
    6 C# E. C* s! y9 w
  373. PHA- s1 U# Z4 S- U2 A( C9 e# W3 g: W
  374. LDA $BC/ ~. C7 I, E4 k- a; A3 P
  375. PHA
    9 u, Q- k% D) \* A  P
  376. LDA $BB
    ' ?4 M" T5 k" R- U( P* S
  377. PHA5 W# a: Y! g3 A& m
  378. LDA $BA9 O% i" i( k& {( Z8 A$ q  V
  379. PHA
    ( y% T& [' j0 r/ M9 w' ?; c
  380. LDA $B9
    3 w/ t2 z3 J; m* g6 g! F
  381. PHA
    ; p8 h! I" O$ z' }8 `' ]- p
  382. LDA $B85 v4 U5 d% ^# C  w; G
  383. PHA
    2 }  G2 {+ O4 }, `  T! g3 g7 A
  384. LDA #$008 L* s" c; s# o
  385. STA $B82 ^4 U( E+ O! X; ^5 v
  386. STA $B94 w5 x" @8 B4 U0 j; Q
  387. STA $BA
    2 u2 }% N, P! Q9 i, b
  388. STA $BB
    * R9 m5 T/ ~# L$ S$ C# s3 U) n
  389. STA $BC
    ! R0 K) g/ }" a4 W/ c  Y% _
  390. STA $BD
    9 Y+ j5 Y" k/ J1 s3 w6 h  M
  391. LDA #$007 J: ]! H1 U, c( L  E! I0 n3 r. \; F
  392. STA $7FFF
    6 x3 q' i7 c9 B

  393. ! t' ]3 y! }+ H- ~, v
  394. WL0:
    % c% j/ b# J6 ~. c
  395. LDX #$00
    * o$ T: H0 F# E" r3 I! |
  396. LDY #$00( ]  O+ D$ x1 f" E/ H  I. g
  397. LDA #$005 Q* ]4 b& [! l2 W7 q3 q. k
  398. STA $BA  l1 P% w8 ]+ d1 d( Y
  399. LDA #$20
    $ C% X4 f6 Z5 z8 G
  400. STA $BB
    6 O. m/ U. M0 {0 o5 z
  401. LDA #$00
    ! t* ^9 t. y( E  S1 F& g7 B+ }3 |
  402. STA $BC
    7 M# g, r! W6 v$ I* \/ [
  403. LDA #$60
    1 B6 }; p8 B0 D: }# x3 {  q6 {' e! j
  404. STA $BD' X! V! g4 E& T9 B1 N

  405. . o7 I( k! y) u, p7 p, E7 }& o8 [
  406. WL1:* l0 E, J+ y. ]
  407. LDA $BD
    6 ?: d5 n& K$ E1 q$ u
  408. CMP #$685 ~4 g1 o2 x3 E" q" @* F7 ~6 G$ a
  409. BNE WL2
    9 T- |/ p8 [, y8 |" y; d8 u
  410. LDA $BC+ A& Z5 i( g& A: P
  411. CMP #$008 S! U% s; J* e' P
  412. BEQ WLR
    8 Y2 b5 s, L8 w) ^" q8 I# X3 Z
  413. ( F/ W+ \$ p! p' c, O, s
  414. WL2:+ ~  t3 u  h% S' D! m" ]
  415. LDA $BD
    9 a* ^8 j$ X. s' {/ }0 A
  416. STA $2006
    ' v8 {9 ^' g+ H6 `
  417. LDA $BC
    9 m8 V+ H4 v6 V* `
  418. STA $2006( y+ u1 |8 r% v, G

  419. ! U* v. \& t6 X' f0 u8 i# a6 F
  420. WL3:. H& ~* j" ]9 O% e
  421. LDA ($BC),Y
    % G" i: H+ H) o( |
  422. STA $2007
    $ ^* G# j- b0 t' O! ]

  423. 8 A, V' @( I0 b+ K- {( f
  424. WL4:4 U/ b* f, e. h) K# ]
  425. LDA #$007 z& g1 K% a5 p' V
  426. STA $2000: a( z% E; Y( A; _
  427. INX
    7 \. {! r' ^  H
  428. INC $BA4 X$ `; k# q7 S# J) a& _
  429. INC $BC* P* }/ _  q/ F, h6 u3 ^6 w8 S
  430. CPX #$00
    8 Z# S7 B: x2 l/ Q% }, z+ o% L
  431. BNE WL1# p! T+ @# F3 N4 y# a9 f/ N
  432. INC $BB. C, Q5 p# U6 g
  433. INC $BD% A7 W. M0 z0 ]
  434. JMP WL1; r1 c& c6 |3 {7 g2 K

  435. $ s, b7 j" w- v8 q/ F" Q5 s6 P
  436. WLR:# M* n4 ^2 w0 ~9 ~
  437. LDX #$00
    ) b; J  ~/ @4 Y3 n
  438. COPY_7F00_7F3F:
    ' X3 E2 X( Q& o
  439. LDA $7F00,X
    0 n, x( Y( y- F" |
  440. STA $07C0,X
    ' S& F+ A6 x- P  g% y& z+ P
  441. INX4 C+ R. l, z  ~
  442. CPX #$40/ J9 k" V, J. r3 J- m
  443. BCC COPY_7F00_7F3F' F/ P" Q1 {1 y4 d1 W- \/ Q

  444. : C; D# }% d* T$ E6 L
  445. LDX #$00
    ( t4 o, i4 g1 o* W. {
  446. LDA #$3F
      D- J7 g/ T8 t( x* B; \( v5 c/ M
  447. STA $2006# G) x5 r5 o4 t' j' d
  448. LDA #$008 A/ J$ I4 f5 K! y
  449. STA $2006
    6 u4 w3 {9 V& h; R# `
  450. COPY_7F00_7F10:
    . H* Q4 Y$ c1 O0 g" a/ i/ K; K- k
  451. LDA $7C0,X" v4 ~! t- r" U
  452. STA $2007+ e0 ]+ r0 i% o* q6 W
  453. INX
    8 T" s1 M1 x) _8 ?
  454. CPX #$10# a- D" W* a  Z1 P* Q9 l
  455. BCC COPY_7F00_7F10
    : J7 w+ r; r* {" T
  456. . T$ _  C" b$ ]8 j# Q5 x3 V8 p! g8 J
  457. LDA $2002
      v4 Y! @" Q! Y1 w9 V
  458. LDA $FD# ?" N3 f) s8 r' e" E/ }$ l- A7 W
  459. STA $2005
    ! j' Q- ?* @" a  M- X
  460. LDA $FC: c! {$ y# K" B3 Y+ U. g2 O
  461. STA $2005
    5 s0 a1 t1 K  l/ D; j

  462. 2 Y' L; j# `4 U8 ~
  463. LDA $7F50
    . p% h7 u; A- L# j( F4 j6 z
  464. STA $FE  f% N! p: m7 W
  465. LDA #$00
    : E6 i* Z2 U' U% G0 k, |4 `
  466. STA $2000& {( S0 g& u. m1 l
  467. PLA5 R" ?! z, A% `9 N& @$ ]: `0 U
  468. STA $B8
    3 {" P" G7 X0 K+ A. Q
  469. PLA
    6 O+ d. O/ E& h3 r, z4 O( y
  470. STA $B97 g3 T3 V  A5 e. s
  471. PLA( Q3 F9 a: F+ H. i! l: N5 _  c
  472. STA $BA
    0 G3 k/ N* z. _/ A# B' [
  473. PLA
    $ w3 W0 L/ Z5 y1 @% L& i. k
  474. STA $BB7 a2 B1 S; Y2 O) ^  V9 s
  475. PLA
    " h* K# H9 \* h. v0 A
  476. STA $BC
    " F# J8 K1 L& E; s& L
  477. PLA- g" _9 }% @! |8 B) j" \
  478. STA $BD
    . P5 N9 D1 T3 v- @6 ?

  479. % S5 {6 |7 \" C  W" m2 l: A& l1 K
  480. RTS7 o2 n0 W- a% M, q' h5 X" k

  481. / A) @6 h2 u0 M0 M7 G
  482. PPU_CMP:
    # e+ u4 ~# t, a/ X8 \
  483. * Q" a# i% x- Q; y# M# L. k$ D
  484. 2 v5 o' _9 Y; \3 u+ u; x
  485. PPURE:- X6 k0 H+ J! r8 s% V9 O4 v
  486. RTS
    4 z% x% [2 S9 ?, D3 h

  487. 6 p3 z: K5 g4 A! ~" `% z( g+ o) L9 {1 [

  488. 8 B7 _% p2 D4 D) S0 f; p" R- y0 j! Y
  489. FREE_PPU:
      u# ?/ h% t% a  D

  490. 3 c1 R# s+ W. m( ^/ ?3 t$ W
  491. JSR TEXT01_PPU5 {2 @: H# {4 S* L
  492. JSR $CBC0
    4 O3 Q* a* s2 b& Q' A
  493. JSR P1_PPU3 @' v% g. J9 s
  494. JSR P2_PPU: x4 N' j' S: T/ J0 F
  495. RTS6 m# s8 ~- v( z5 K- C/ _
  496. 3 I" `  D% I. s1 I1 m( X; }! R) w) R) F
  497. TEXT01_ADDR:
    + F, N$ t3 s) L4 c) d
  498. .BYTE $20,$42# F$ _# S( t  w9 `! Z
  499. TEXT01_DATA:1 b6 j; ~0 J& T. |& a' b
  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
    6 y" ?$ t7 ~  ]
  501. TEXT01_PPU
    ) K7 f1 Z3 X: X2 O! t
  502. LDX #$001 {% u2 J8 R/ B1 ^8 U+ o
  503. LDA TEXT01_ADDR
    5 ^7 e/ Q7 ~$ D. ?; b/ [4 A; {* m- W
  504. STA $0703
    , s- F: x3 P! ?4 l% s
  505. INX7 w5 Y( N+ p+ }  \9 [0 ^3 @
  506. LDA TEXT01_ADDR,X
    ; ?4 {+ N4 o8 C! o+ U( M; S# Y
  507. STA $0704
    4 {' D, t" z: R. f) ?% E
  508. JSR PPU_PROCESS" |- W7 e3 S2 y$ y0 I: w
  509. TEXT01_W:0 c& h9 o( H! Q/ g3 P4 z/ t2 c
  510. LDA TEXT01_DATA,X
    * j$ A) L/ G4 {) m
  511. CMP #CEND
    . f! I  x, m. Y
  512. BEQ TEXT01_START0 n; C% V" O- N1 ?, V# J( y
  513. STA $0705,X
    3 a0 @; M9 S3 {7 n! s
  514. INX5 p' E: E" @! k" q% v5 c  F
  515. LDA #$000 R# M  {4 B2 A
  516. BEQ TEXT01_W
    ) U! ~6 ^, j; z% m/ n7 ?" `
  517. TEXT01_START:
    8 Q+ d) l" o3 X6 d0 ^# l
  518. JSR PPU_START1 R6 o8 b  @6 _3 `0 A& j- D# u: j0 k% C
  519. RTS! x! M7 R* ]0 V3 y& j" V
  520. % g: v& Q/ m! t- x9 c
  521. 6 K% U& q2 x3 v" p
  522. COLOR_DATA:
    : G! C& N7 W8 K; b  p" A
  523. .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28; f; g! ?" U1 j  o* L- H
  524. 7 F( h, j) U1 [) D
  525. P1_PPU:
    1 \4 B0 K% |! ]* r3 b( g. T% _
  526. JSR PLAYER_01_PPU8 d" h7 R( d* q8 R4 z2 L0 b
  527. JSR $CBC0
    + X& P9 X* [  \1 H" E0 G; S
  528. JSR RELIFE_P1_PPU, S8 t2 Y+ C9 b; S+ L
  529. JSR $CBC0, q- O: ~" W) t  y
  530. JSR RELIFE_NUMBER_P1_PPU
    # k3 Z, ~) S: W; I7 l" ^7 q
  531. JSR $CBC0
      h9 ^2 S9 C. T# x
  532. JSR WEAPON_P1_PPU' G$ M, a' |6 P7 Q, z) G# x/ ^
  533. JSR $CBC0* y- ?1 M9 l9 l* N/ _. P  f
  534. JSR BULLETPPU_P1_PPU
    3 m, c" E( V; }6 n, N/ ?$ y
  535. JSR $CBC00 V4 v: F7 s0 k
  536. RTS
    ) [3 P3 r8 Z- ?9 l/ N/ l5 ~, B4 N

  537. ( w$ S- _) f6 @
  538. P2_PPU:; f0 M7 y# K, z5 j/ |
  539. JSR PLAYER_02_PPU
    ( G% I, m% y! u( A% k. P
  540. JSR $CBC0, N& _% y, x. d( v) K' m; p
  541. JSR RELIFE_P2_PPU
    , C( B7 O, n$ r+ E; N
  542. JSR $CBC0
    * _; P3 C6 I5 t4 u* |
  543. JSR RELIFE_NUMBER_P2_PPU
    8 p- ~2 q5 i1 u9 J: J
  544. JSR $CBC0/ w' N4 L9 u+ B6 J7 B% \1 |6 T
  545. JSR WEAPON_P2_PPU
    ' l. t% z- ?0 R8 n" i8 R1 y/ Q
  546. JSR $CBC0
    6 f; U5 J+ Z% i$ O+ G
  547. JSR BULLETPPU_P2_PPU
    ' Q" j6 J6 f2 g! T
  548. JSR $CBC0
    ; F) @# Q. A! G3 J
  549. RTS
    * d% V1 f7 f4 E0 B" j1 z$ y) k* B
  550. 7 s& l* d7 ~7 \7 V3 y+ X

  551. + |! k+ \! w, q# c7 }

  552. # f  H' q2 F/ K& X6 I
  553. PLAYER_01_ADDR:
    7 @" t: u4 \# [
  554. .BYTE $20,$A3* e! s( \/ K2 `/ f6 h0 s$ P: c; C
  555. PLAYER_01_DATA:  {3 K) G; M5 R8 @/ m5 \+ S5 ?
  556. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND$ h3 j0 r8 o( i3 I" _
  557. PLAYER_01_PPU:; i3 W$ a5 n" T# Y
  558. LDX #$00; b2 r% [) \& m0 _
  559. LDA PLAYER_01_ADDR$ S/ z- b" k' w3 L1 X. H
  560. STA $0703+ T" t% E$ d+ s/ p: Y
  561. INX# J' k: a4 \1 O) I& Y+ t
  562. LDA PLAYER_01_ADDR,X
    9 Q3 w* X6 B! M  K$ p: g
  563. STA $0704
    $ J; s  `8 \7 Z/ Q( q
  564. JSR PPU_PROCESS3 \  k9 i0 v/ X: [8 t8 B
  565. PLAYER_01_W:
    2 @" `5 D4 t2 E( l- }! V# i" R. N
  566. LDA PLAYER_01_DATA,X# i3 {. ]7 J- p) M
  567. CMP #CEND
    3 r1 s+ S2 j! e. G
  568. BEQ PLAYER_01_START3 d2 j+ N6 r7 P
  569. STA $0705,X
    8 `/ q$ d5 @, {; o$ i, v8 r; w
  570. INX: V6 S; i0 W$ p5 f8 F. f" J% R
  571. LDA #$00
    . Y8 d' p( I( N9 b
  572. BEQ PLAYER_01_W" q  V& B( l, m
  573. PLAYER_01_START:" Q  R9 k* u: ~( e! [1 J
  574. JSR PPU_START
    : @) A7 M" x! S7 a6 F6 F+ e1 N1 o! m
  575. RTS
    : l% j5 K" Y  [. @
  576. , @, m. O, q- \! V0 D- z
  577. ! F! m6 L/ V2 F# B
  578. RELIFE_P1_ADDR:
    % \& |; w% p- d5 Y
  579. .BYTE $20,$E38 T  }" K1 ]( z7 o  j
  580. RELIFE_P1_DATA:
    " J+ ]6 t( V, _" e
  581. .BYTE CR,CE,CL,CI,CF,CE,CEND
    0 I) P- U+ e+ A' h
  582. RELIFE_P1_PPU:1 w# I/ ?$ k! [9 ?, W
  583. LDX #$00
    , [( W' X8 P0 t) Y4 ~8 @- p
  584. LDA RELIFE_P1_ADDR
    5 Z: i5 S0 R* E% |
  585. STA $0703
    # L( d$ R9 [2 w1 b; G+ |
  586. INX5 i# k& {  H. |' b
  587. LDA RELIFE_P1_ADDR,X
    7 {( C; p7 N% y! K
  588. STA $0704" X$ @8 @, `+ @9 I+ f# N4 {
  589. JSR PPU_PROCESS
    % r5 u$ U! }0 }9 U
  590. RELIFE_P1_W:; C- B9 C! G* {: ]+ J, g3 H6 B
  591. LDA RELIFE_P1_DATA,X* Z+ w* D! U# y$ v8 T$ \! J, Q
  592. CMP #CEND
    8 A" X" O! Z+ I: F! e
  593. BEQ RELIFE_P1_START
    . V, q$ c- C, R* D0 \" w
  594. STA $0705,X
    ! f) w  n# y! _: }
  595. INX9 K+ _" }, Z7 ?% I2 x; p+ M
  596. LDA #$00" a& z+ o+ r: t0 k" S3 ^
  597. BEQ RELIFE_P1_W. O& D: i0 i( {) }' H/ u  ?- y7 @
  598. RELIFE_P1_START:% {2 w- b+ `% H* N2 E/ o/ v4 ~6 n1 |
  599. JSR PPU_START
    8 X9 ^/ H" |, A
  600. RTS4 X- }* W/ A1 R. H! y, O4 P
  601. 7 c) A# [# G' k& j: G! n2 R! T
  602. ) e$ n" f' S# F: h' S
  603. RELIFE_NUMBER_P1_ADDR:
    8 }5 V$ N/ O1 Y  g8 R* ^. H
  604. .BYTE $20,$EA
    : _6 K  n  P0 ]
  605. RELIFE_NUMBER_P1_PPU:6 G2 W, w' f4 l& A
  606. LDX #$002 P" U$ g  L0 F1 G. B
  607. LDA RELIFE_NUMBER_P1_ADDR& l  [# p# D3 V6 R8 z0 Q( H# F! M
  608. STA $0703
    : f9 _/ `& W, g! ?
  609. INX/ H5 m; s+ E1 i( A6 F/ |" a
  610. LDA RELIFE_NUMBER_P1_ADDR,X' D6 y4 [7 I6 v& h, @- F
  611. STA $0704
    ) r: M6 Y5 O" n7 A  J* b: J
  612. JSR PPU_PROCESS% s. p5 f/ C2 z9 L
  613. LDA $32
    , b: `& g* q& M* k
  614. JSR LIFETODEC
    ' L+ |& E  k9 {5 a) a# o( Y
  615. RELIFE_NUMBER_P1_W:
    + Y* C  r4 x* o5 m
  616. LDA $7A03% b; ^: z$ W5 R+ _1 [# ]
  617. STA $0705
    3 h* j( p" v7 q" l: Z
  618. INC $0705
    5 j" B& V& }( V& }
  619. LDA $7A04* y( B# @# M0 v. z6 r
  620. STA $0706! D: s" ^: ~% R* O4 {% f
  621. INC $0706
    7 w# o! m- @/ P7 R
  622. LDA $7A05
    8 T7 Z; C6 `: B* b
  623. STA $0707: F8 Q+ y  z' q: B) W
  624. INC $0707( B* }0 w. b! h; c, F
  625. LDX #$037 A1 z) W* u+ h) X. Y. X
  626. RELIFE_NUMBER_P1_START:
    9 O7 M) f( ~' t, P& q
  627. JSR PPU_START5 N8 ?* J1 Z- h2 V2 \; f6 B
  628. RTS
    2 ^0 w7 E) E' A& W. Q% A6 `# e

  629. - r3 y' s# f. V: T2 [4 q
  630. WEAPON_P1_ADDR:
    # H! C6 x% b; D6 y' g6 {
  631. .BYTE $21,$23
    " V, K( x  d$ j2 A- a, C
  632. WEAPON_P1_DATA:" a- Z( Z' c5 h  b( b0 M" v0 S
  633. .BYTE CW,CE,CA,CP,CO,CN,CEND
    % x) j4 `9 W5 R( m- \( {8 K
  634. WEAPON_P1_PPU:
    & L$ l" _% H9 s, P/ `7 b
  635. LDX #$00! M9 ]9 N* l5 r/ l$ X. J$ {
  636. LDA WEAPON_P1_ADDR
    $ H( b/ N% v' J" _/ L
  637. STA $0703& c1 Y! r) z% z6 v5 Z. L
  638. INX
    ' z$ |, K; K9 W7 D
  639. LDA WEAPON_P1_ADDR,X+ U9 C9 v( H; _2 D( H
  640. STA $0704+ m" u. g5 P* C: c8 i, {5 |8 g
  641. JSR PPU_PROCESS% e; L! v; u. O- v, V' u. g' I$ O
  642. WEAPON_P1_W:' o) G  c, `# R0 B; T& O' H
  643. LDA WEAPON_P1_DATA,X
    $ A( {7 Z; u+ O, ]# M
  644. CMP #CEND
    9 E# V7 y( J% @7 f
  645. BEQ WEAPON_P1_START6 ]$ `5 N( y" P, m* }4 q; u
  646. STA $0705,X
    ) O: X7 H6 M3 F
  647. INX/ S6 t# ?9 M) b" w0 Q6 y  X
  648. LDA #$00
    3 k7 [3 s1 }: S% g4 _
  649. BEQ WEAPON_P1_W
    ; w* Z5 L- V& N& V' P+ `7 B
  650. WEAPON_P1_START:% `8 Q  X7 C7 {. S, b! [4 ^
  651. JSR PPU_START: Y7 O3 f% F& l
  652. RTS
    7 |* @/ q  V% Q% D# Z+ B8 H
  653. 1 H  {, o0 v7 M; p
  654. BULLET_P1_ADDR:
    * _* b0 j" I, k8 s
  655. .BYTE $21,$2A
    ) f% p6 J4 _, g' L+ J  W
  656. BULLET_P1_DATA:$ ?% g& O! R3 r" x  I
  657. .BYTE $00,$01,$02,$03,$04
    # n( V* v+ P2 S5 m5 R% r
  658. BULLET_P1_NAME:) a, g- R, G% s
  659. .BYTE CN,CM,CF,CS,CL: l1 y  U  ^. v: F0 B8 y

  660.   O1 R# ?& i" |& a
  661. BULLETPPU_P1_PPU:
    " C4 m# m' q4 t0 Y
  662. LDX #$00
    * D( R: j) {2 k* `1 |. t9 W! z
  663. LDA BULLET_P1_ADDR
    ( l5 H! T: h9 |/ e8 q8 E
  664. STA $0703
    . U/ B1 g/ a4 ?' `* r4 L
  665. INX/ B, c8 d3 {0 j# _: P
  666. LDA BULLET_P1_ADDR,X
    6 r9 E. p: L- m( D. t4 q; \- {
  667. STA $0704
    . M4 Y4 k, n) P' T  y# O
  668. JSR PPU_PROCESS
    7 E; `1 u5 |, J7 S1 i
  669. BULLET_P1_WRITE:. y7 t( ]7 N0 U+ ~) X  _5 K7 A
  670. LDX #$00
    2 d1 i) Z* u0 h) |" c0 E# M, E
  671. LDA $AA
    ( h+ O) W  `. u
  672. AND #$10
    0 v* \- P6 i  ?6 A* \% U# W, |
  673. BEQ C_BULLET_P18 Q' _9 S3 x) x& V0 ?: {2 r
  674. LDA #CS8 z( h$ @" v% a, w! k* m$ ]. o
  675. STA $0705, Y5 K. {) H: v' [
  676. BNE B_NAME_P1
    3 A; o8 `3 H3 }8 n/ n' \* k
  677. C_BULLET_P1:
    % x8 l9 B. E  y
  678. LDA #CC1 Y" q7 h& u5 `5 w9 |  R
  679. STA $0705, i0 E: C' l: f8 H8 A7 ^# b% b
  680. B_NAME_P1:, G3 \7 o4 {% {
  681. LDA $AA& f5 {! L8 P% ^' [# E
  682. AND #$0F
    # n% K# X+ ^; p
  683. CMP BULLET_P1_DATA,X5 j# [; c6 B0 v, z" E
  684. BNE B_NAME_P1_RECMP
    2 X* [& B) r2 R- S: b
  685. LDA BULLET_P1_NAME,X( C. ^6 ~  S! t# R+ B
  686. STA $0706
    ( h; }& ?2 h# T: Z1 c0 ?& {
  687. B_NAME_P1_RECMP
    , _) I3 F0 ]$ N+ u
  688. INX
    + s. a. F, q# P4 K
  689. CPX #$05
    # X6 a) C, I/ A! ?  T& \1 K7 c  d
  690. BCC B_NAME_P1
    ( @6 \/ A( u( n- S
  691. LDX #$024 e7 T( Q: S( a3 d
  692. JSR PPU_START  N( v  a* p9 e. U. d
  693. RTS  ^; d5 g8 B  ~3 }* h1 o# W
  694. . j( C7 j. n8 R/ U
  695. 5 j3 I: s6 I# l  H- C
  696. PLAYER_02_ADDR:- F. s# Z. o; Y
  697. .BYTE $20,$B3
    ' F2 L# U& I7 ?
  698. PLAYER_02_DATA:
    % a1 a- m! M  G$ K* S, O' p+ X( {
  699. .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND
    * S  j" _* F" k1 z" t  m$ v
  700. PLAYER_02_PPU:
    , @! A, }( s7 `. i5 W
  701. LDX #$00# K# }# X  H( g
  702. LDA PLAYER_02_ADDR
    ! A2 L1 y- }, n
  703. STA $0703  F8 l3 D8 F! @5 r! j2 g
  704. INX
    - ]# |# t' r* g( Z" f% Y
  705. LDA PLAYER_02_ADDR,X
    + |9 u' l) q& y& Y
  706. STA $0704
    + y- G/ t; S' T" b/ M
  707. JSR PPU_PROCESS+ n& U  {6 I3 C
  708. PLAYER_02_W:* Y  |3 H; }3 K3 M! R" C/ Q
  709. LDA PLAYER_02_DATA,X
    ) \9 y$ ]) r' `7 V0 `" L
  710. CMP #CEND
    " H- V3 B3 M# I) h6 c9 C
  711. BEQ PLAYER_02_START
    : J& Q& r) G' O
  712. STA $0705,X; R: ^: ^: O9 y- C# a% W2 G. S6 l
  713. INX
    : N+ `  P. h0 x( R! t7 g6 _
  714. LDA #$00* }( w1 j! \6 e% X! H
  715. BEQ PLAYER_02_W/ ]) `2 }+ x0 }1 F7 v9 k& \
  716. PLAYER_02_START:4 L# ~. P/ ~+ [1 ?6 _8 y/ H* j+ Z
  717. JSR PPU_START/ V$ J: X& I9 q8 C: F* J
  718. RTS. b& @+ z& ~$ k8 O* u# N

  719. 1 S, R7 P! y  j( b, A

  720. 0 p% _0 m! ]2 N+ C( }( l8 O1 L
  721. RELIFE_P2_ADDR:7 U& O6 o  |  H' w
  722. .BYTE $20,$F3
    1 g: ^9 b# H& }" q9 Q. G
  723. RELIFE_P2_DATA:5 G& j. b( R+ j6 h- [
  724. .BYTE CR,CE,CL,CI,CF,CE,CEND7 K# h# L" u3 Q# Z! x
  725. RELIFE_P2_PPU:9 Q! R, U! k; P( V6 N8 V
  726. LDX #$00
    : g4 t3 S9 R/ N, O% F5 W
  727. LDA RELIFE_P2_ADDR5 E1 D8 s6 F8 U# }
  728. STA $0703/ ~8 H/ H2 [+ x; g7 t8 V
  729. INX
    8 ^  B: l8 q' t4 N6 v
  730. LDA RELIFE_P2_ADDR,X5 x) |/ c7 h0 Z3 M4 H" A2 R+ e& L
  731. STA $07041 U- _  q; D6 c) a1 P
  732. JSR PPU_PROCESS* j! x5 g9 O3 |& R8 o  b
  733. RELIFE_P2_W:
    - F. v2 r3 R' y
  734. LDA RELIFE_P2_DATA,X, q0 _2 }  {2 `  X# c$ p
  735. CMP #CEND" ?- p# {$ M. N! T# J
  736. BEQ RELIFE_P2_START" N( \: x( J/ A* p, j- K
  737. STA $0705,X: G! q, ]3 G* S) y1 x
  738. INX
    4 Q3 Z7 ?2 b1 r  P
  739. LDA #$00+ Z, l( q( f4 j/ A
  740. BEQ RELIFE_P2_W
    ) _$ |9 J. _. f9 w; v2 _! T
  741. RELIFE_P2_START:( w" Y% M6 |) A7 L" V2 T# I( Q
  742. JSR PPU_START
    9 s, G1 d' l7 Q
  743. RTS: ?6 c+ ]' i! W0 L9 @
  744. / {4 a! [5 [; f& ^* \4 Y" x
  745. 3 J6 [: G; }: S8 y" {4 l6 y
  746. RELIFE_NUMBER_P2_ADDR:
    9 q6 E: _7 \( _; |% V2 [3 ?9 K+ e
  747. .BYTE $20,$FA
    % h1 O  B8 p% W1 m7 l
  748. RELIFE_NUMBER_P2_PPU:
    2 T7 o0 t: j$ H9 u6 ~" H
  749. LDX #$00- I; |1 J7 o( K+ F# n: C; _' N) \
  750. LDA RELIFE_NUMBER_P2_ADDR. m6 D. R5 ]& v
  751. STA $0703! A* s1 k7 }# q4 ]
  752. INX
    4 A( e+ ]4 k( M0 S, h0 N
  753. LDA RELIFE_NUMBER_P2_ADDR,X
    3 N. {; [5 L3 Z; C4 n8 r
  754. STA $0704
    & M$ v6 }4 _! h/ {9 A- c1 b& s
  755. JSR PPU_PROCESS
    ) q! \0 E) |& O6 i- V( D4 A9 k& C5 P
  756. LDA $330 [, g9 T. {5 S% ~. N
  757. JSR LIFETODEC
    * I( W+ }  I& @- y5 g( Z. d5 }4 |
  758. RELIFE_NUMBER_P2_W:
    # a9 q: D0 k. g$ l3 U
  759. LDA $7A03+ f7 l3 e9 T# N5 K0 |4 ^9 ^( Z+ _, h  \
  760. STA $0705
    8 R' T8 W/ Z) N
  761. INC $0705
    + f# I- G* P; ]6 q$ q
  762. LDA $7A04
    6 a! f8 V+ g. r$ a
  763. STA $0706
    # l1 |/ \$ ]  n+ u9 n6 U$ Q9 Y
  764. INC $07068 ~7 Y; K/ F9 d5 G& e: I1 R
  765. LDA $7A05' ^' n: D/ a4 x4 ]
  766. STA $0707
    0 l& U& U: `* ^+ v
  767. INC $0707) w1 z( c4 Z( I+ `
  768. LDX #$034 H7 v* ~) N9 p) G- K8 d
  769. RELIFE_NUMBER_P2_START:9 g$ c+ [. D- L8 C, p1 Q. U* L/ r! C
  770. JSR PPU_START
    ) j7 U& u8 }% f8 H3 H& \, b7 P
  771. RTS
    - W+ v& m% h% r: D! }1 U

  772. % f& k8 B+ }  `! V
  773. WEAPON_P2_ADDR:
    3 Z  B  [/ q: T( u" y
  774. .BYTE $21,$33
    7 Q* u+ \1 ~9 p
  775. WEAPON_P2_DATA:
    0 S5 T! t- S$ G  H/ j
  776. .BYTE CW,CE,CA,CP,CO,CN,CEND2 x8 \# o* z6 ~1 [  B2 N
  777. WEAPON_P2_PPU:5 K! m9 H0 q4 Z5 L
  778. LDX #$00
    - Z' S5 k  X/ ^
  779. LDA WEAPON_P2_ADDR& M% N3 I1 q4 ]. ~, e5 F0 c9 P
  780. STA $0703
    1 L1 E! z/ g) ?  n& ]6 X
  781. INX; o8 i, L) Z1 z2 n5 j1 z
  782. LDA WEAPON_P2_ADDR,X! g& A) k# r+ ^0 S. c
  783. STA $0704
    / a% z1 ^& L5 B- D8 a
  784. JSR PPU_PROCESS
    & j! L, u# H( x2 l' r% Z- Q/ u  |/ k
  785. WEAPON_P2_W:
    - V/ O8 Z* P$ G) D0 y. U9 n5 O
  786. LDA WEAPON_P2_DATA,X* d- S* S5 R% k" W" [6 [$ v
  787. CMP #CEND, h! K" f. S4 P" n; v! i8 R
  788. BEQ WEAPON_P2_START; Y5 j- Y& u+ `% X  v6 f2 H
  789. STA $0705,X- Z) W$ f: ~: O  X" N
  790. INX
    3 r. j7 ]6 V  U! Y3 F- d' s& G
  791. LDA #$00$ O+ i! X  o: ~5 N; f8 ]
  792. BEQ WEAPON_P2_W3 m3 p7 S. R7 r+ X& T1 i$ N
  793. WEAPON_P2_START:
    0 k3 J9 L- m1 j& C" P$ n3 v
  794. JSR PPU_START
    4 ^9 j2 Q! a0 c3 D; o* |( A; c
  795. RTS
    5 g, Y9 E( q) Q3 c  d8 V) x2 U7 g

  796. " f$ P) J4 X$ l" Y& S
  797. BULLET_P2_ADDR:
    5 _, l6 a& M8 I4 S
  798. .BYTE $21,$3A3 B' g4 b0 O! U, j8 @
  799. BULLET_P2_DATA:( h2 z9 u' z; c+ @8 }
  800. .BYTE $00,$01,$02,$03,$04" {5 B3 I7 j- M
  801. BULLET_P2_NAME:0 O$ w( p& K$ W
  802. .BYTE CN,CM,CF,CS,CL2 i/ [8 |4 S( W9 a* @; P
  803. % b& ?8 E& [7 F# z$ q; W. ?$ O
  804. BULLETPPU_P2_PPU:) x9 P) t1 X/ C: G
  805. LDX #$00
    ( |0 f1 O' k3 I  h
  806. LDA BULLET_P2_ADDR$ d% Q( a  g% u# w$ d; [
  807. STA $07037 J7 H+ \0 w  ~* l, f# P
  808. INX
    1 b8 I& b2 _5 _) t1 o/ F4 {
  809. LDA BULLET_P2_ADDR,X4 k" f+ T- D, `# b0 B" t3 \6 m
  810. STA $0704
    / I; ~# b% z: w8 u. \& X9 ~4 I: b, \
  811. JSR PPU_PROCESS
    ! W4 e0 D9 y, l7 q5 ?/ t# E: o
  812. BULLET_P2_WRITE:' ?/ q  B  i3 e# i
  813. LDX #$000 D. l5 W8 d, j! `  p0 d
  814. LDA $AA; }& W0 S" d% @$ P8 s# N- |
  815. AND #$10
      {4 X- p3 D: Q, s  A* I: t
  816. BEQ C_BULLET_P2- W2 b, s6 D' H+ A5 n' I/ H! x
  817. LDA #CS
    ( G% Z1 y2 ~. P- c
  818. STA $0705! b8 l7 M8 U* k
  819. BNE B_NAME_P21 ]2 V$ j% \7 @
  820. C_BULLET_P2:( e, L6 {* f( a. Y2 a
  821. LDA #CC
    0 y' ]  h, A: g2 r+ o4 S% b5 E  D5 L
  822. STA $0705& L3 L! w' a4 s* ~
  823. B_NAME_P2:
    5 g% g& o' H7 m: `
  824. LDA $AB, h, e& [- W. y. b
  825. AND #$0F
    6 w, s% a" d; l3 M/ G# m# N
  826. CMP BULLET_P2_DATA,X$ T/ u6 h  S  s, e1 o7 m/ V- c
  827. BNE B_NAME_P2_RECMP
    & M, @7 f! N- d2 _
  828. LDA BULLET_P2_NAME,X: H; A2 H) b0 [% I: e
  829. STA $0706
    ' }7 x, m4 c! [) _
  830. B_NAME_P2_RECMP
    6 s+ ~2 f- g$ [! y7 h! {% A/ m
  831. INX
    ) h! F; `) z, t  `# h
  832. CPX #$05/ D' Z* E0 D% e+ R" |( E
  833. BCC B_NAME_P27 O" S* e0 r9 C" Y7 `& z2 E
  834. LDX #$02+ {# J, \! m3 U* [$ p" l5 s0 E6 n
  835. JSR PPU_START( j0 ?" P: s. K9 z& [# G
  836. RTS
    3 m' L" A0 i/ v8 }6 x7 _( I) K
  837. * A, ?3 |" j" U3 n3 K' f

  838. $ X% h# t5 Z* e- ~( a

  839. * o2 {2 l# T+ ]. u
  840. 5 X0 K1 P3 g0 ]: @- p

  841. ! T* h/ j1 b* X  F7 }4 S* i. k

  842. 2 B( i6 y% m0 y$ V
  843. LIFETODEC:                ;十进制转换
    : b9 V0 I& A( ^: R6 Y
  844. LIFEL1:        ;initialise  L" `1 c- t8 G
  845. STA $7A00        ;$7A00=F3
    : x0 K# t5 |% L5 A) v
  846. LDA #$00- E; W" |4 C9 m( n; A: ?
  847. STA $7A03        ;$7A03=00. A$ \  x) C4 a! s  O
  848. STA $7A04        ;$7A04=00
    $ k3 F8 A" ]" S7 y' K! K0 L# G( j: Y2 W
  849. STA $7A05        ;$7A05=004 U. v7 ?- W- K1 e
  850. LIFEL2:        ;copy data $7A00 to 6001
    & T  T0 [* Q0 {2 A$ Y
  851. LDA $7A00* p& b/ U7 R3 u9 p
  852. STA $7A01
    # w6 M% {$ n- U6 J! V
  853. 9 c' J/ y  s. w) Z
  854. LIFEL3:         ;hundred, l. [1 a  c% c6 c0 Q' H
  855. LDA $7A01
    5 o4 F" D6 w3 W
  856. CMP #$64" F0 o2 v' W, M4 F! c/ x
  857. BCC LIFEL6                ;$7A01<100 goto L6( R: ~8 ~. t+ y$ M
  858. LIFEL4:
    % P; H5 u- ?# r0 q& _
  859. LDA $7A01; X2 z! H' N4 ?0 \3 n
  860. SEC
    ( P5 q/ T* f! N0 N; Q2 K* Y& n) b
  861. SBC #$64        ;$7A01=$7A01-100$ R5 i* x! @3 f& v6 W0 b
  862. STA $7A01. Y/ y* j0 D1 B, u* K
  863. INC $7A03        ;hundred++
    4 _, m( }; B, j2 G
  864. LIFEL5:2 c( ~- e4 Q( l  B0 y
  865. LDA $7A01+ X0 X8 d1 l0 d
  866. CMP #$64! P) W, \8 F" A+ D: s  L2 P
  867. BCS LIFEL4                ;$7A01>100 goto L4
    - j3 n. @8 o0 W2 K9 I
  868. 4 @, W' c. v1 N: k7 g
  869. LIFEL6:        ;decade
    * z# ^% s+ X0 n  l1 D! i8 J
  870. LDA $7A01
    ! M  I% f. d/ F1 g
  871. CMP #$0A" S" O- S6 y% f
  872. BCC LIFEL9                ;$7A01<10 goto L9
    : P( G' i4 Z8 @) g2 k  F; R- w
  873. LIFEL7:       
    $ |2 P6 c2 O9 L! F
  874. LDA $7A01. J9 c6 \$ O. \% `
  875. SEC
    , x2 g3 u" k7 x5 ~. V
  876. SBC #$0A, ~6 G. K, J% j" j0 n( ^! q3 M
  877. STA $7A01        ;$7A01=$7A01-10
    5 o1 }( G& R+ O) f
  878. INC $7A04        ;decade++
    ; h. Z7 j3 R9 x, }$ i4 t6 ]4 @. u( Z1 j
  879. LIFEL8:# L! `, V/ i: j- g; `) j6 T) \8 Y
  880. LDA $7A018 c* q8 W0 p0 |
  881. CMP #$0A
    2 d! W8 a; M) v4 v5 d( O
  882. BCS LIFEL7                ;$7A01>10 goto L75 R. z. h7 l8 ?* Y
  883. ;unit& R. j! \. ~( B; w" W+ s: T
  884. LIFEL9:# R. Y/ b! j( v5 Y9 p! N
  885. LDA $7A01        ;$7A05=$7A01+ E+ n4 b+ M9 T/ [* Z
  886. STA $7A05        ;unit5 t+ K# _7 k/ U$ n, v" T
  887. RTS        ;return, u7 m7 Q9 u2 ~' D% S+ N! U
  888. ; J& k% i! x! I9 R$ J
  889. 4 x1 ^: i& w% p
  890. 0 M: b# h' w) a; |
  891. PPU_PROCESS: ;PPU地址处理程序
    9 ^- u; r. e0 V2 G4 D4 f
  892. LDX #$00
    $ V$ }# K6 g% _6 h' b# s# p  x
  893. LDA $FF. b: o& w: A8 s5 g* H1 Y
  894. AND #$01
    " s) P- L/ A( J
  895. BNE PPU_2400_27C0# D9 ]1 }# K' w7 G
  896. PPU_2000_23C0: ;命名表12 d5 Z; E" C% w# \% j
  897. LDA $0703
    - J8 x$ O3 h- q9 e
  898. AND #$FB) ~$ D% ^$ o. V- L8 X8 t  v
  899. STA $0703
    ( A6 Q- v0 r& ]6 O5 Q7 D
  900. RTS6 ]+ J* X# U! B  ~) X' h. J
  901. PPU_2400_27C0: ;命名表2' R  W* T5 ~1 q' X3 ]3 j2 |7 _0 i
  902. LDA $0703# [8 _: ?: V2 q
  903. ORA #$04$ z5 }8 Z( b6 k6 M9 p" Q
  904. STA $07036 c1 t1 t7 d) q* @' H
  905. RTS
    9 H; E. I2 ?) N; w

  906. * n8 I2 |, d  E4 B- D* Y
  907. PPU_START:  ;PPU数据写入
    % x# f2 u, S2 n' r1 e& \) y
  908. STA $21* J  f' l/ P6 F" q. k8 R: {
  909. STX $0701
    9 t6 C# Z- T: C1 f- Y* S
  910. LDA #$002 t4 Y. @* h0 x1 t; w3 z% n
  911. STA $0705,X
    " ?9 y* R" i* @! ~: Y
  912. LDA #$01
    ; P! Y, E( z6 o% S5 \
  913. STA $0700# q6 `$ _# W5 p  Q7 }. T$ R4 n
  914. STA $0702+ O5 _; k* n( w% ~2 D( o4 ]
  915. RTS
    3 i6 q8 m" F8 ?3 r+ `. w; h
  916. # ^% h. a- }! U! x4 z, g2 t" ]9 c

  917. : W# ]* X; W) U
  918. 9 R" Y' @1 _2 y4 |7 U

  919. * r2 X* S6 t  F9 I! A9 Y7 H, W

  920. 8 Q+ G! a$ ]2 i2 d3 H9 N( H! T
  921. - r$ x( v0 r' ?; P% d
复制代码
/ B4 H3 I0 S  ~. [: {2 Y

本帖子中包含更多资源

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

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

签到天数: 2048 天

[LV.Master]伴坛终老

发表于 2017-2-13 17:25:19 | 显示全部楼层
这么好的教程竟然没有人支持!& T0 _4 S1 D$ A- k6 M

签到天数: 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.140625 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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