EMU618社区

 找回密码
 立即注册
搜索
查看: 140|回复: 1

[原创] [FC][音乐12 IN 1][nes + 源码]

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑
+ Z4 U. m( _7 i! |
5 v& F' J1 Q' `/ u% N" k; q- H[FC][音乐12 IN 1]
' }% t$ J$ J9 B. u  U' K  A% z# @  c时间: 2023.07.238 B! I$ C" C% c  {$ a& r
作者: FlameCyclone0 Q) D. q4 a% p& `! Q

  y& q. p  J9 k9 d( B, e7 D收录音乐内容:
( U2 e: \3 T% @( z( m% _1.Raf世界
9 B- f# A9 R9 Y2.最终任务
' p, x* ^/ V8 j" i# \$ F5 ^1 j0 p3.赤影战士
2 F# [1 q) c* r' C& q4 p4.双截龙
% P+ L7 N: V2 r5.双截龙2
- I% t7 |. S1 ?6.双截龙39 B5 @6 w4 j0 d2 J# c
7.洛克人
, x) C: \' ^1 z; [5 `1 Z' E8.洛克人2
+ V* @# Q4 Y3 C) W6 ?0 Z9.洛克人36 P+ m% }  P: z9 ~
10.洛克人4( X7 @4 N! g6 Z3 Q2 ?5 B
11.洛克人5
9 w) o9 E% p$ N& `( Z  q12.洛克人6( W9 g% ~! k; V- A) k, M6 o& c

3 f% F5 z3 _! x! d* Z/ T8 _操作:
; U( u6 x! \5 u! T% r+ ]上键:         上一个专辑2 H0 b/ Q* ^+ b6 x+ U% u& _
下键:         下一个专辑
4 ]* m2 m8 Z! A$ }% [/ t$ Y左键:         上一曲
( _# D6 c, v" k. L6 c& f% q右键:         下一曲0 L! C1 T5 L9 l, M( T4 o
B/A键:        前10曲/后10曲
, [3 x0 B1 |. b* a3 k选择键:       下一页
' W2 ?  u9 }( E6 Y开始键:       停止/播放# k' R" {- f) T* G5 {
/ r+ n0 o# C% x1 D4 l. ~& p
http://flamecyclone.ysepan.com/( {% `8 F: Y5 K) ?. p
2 U2 H. R. k+ Q. {/ ]" x
* g7 }6 o, A+ H  w3 `

+ `, N1 p& N, H1 v& G) l8 h) Y8 }3 {6 n: V
  1. ;[FC音乐][播放器模板], D0 e1 i! s0 K
  2. ;FlameCyclone 20230710
    - `( s/ S8 H% y/ G  }

  3. - ]  t* V# ~% H* M5 D+ f
  4. ;文件头
    1 T7 k) k7 p: ?+ b8 e2 k9 O
  5. ;======================================================================
    # v7 C# X: D1 w3 y" N* x* u6 K
  6. .INESPRG 16                                             ;16KB PRG 数量
    * y% i! k% V: G1 B- G
  7. .INESCHR 1                                               ;8KB CHR 数量$ ~3 j! J( v9 E( o: ]; n( y# r
  8. .INESMAP 4                                                   ;mapper 4! S+ C, }6 s4 y5 ]# L
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直
    & d& l1 o4 [0 @8 o( H' @

  10. ! l8 m  I1 M2 m. H4 l8 t* [! G
  11. ;==================================================* E  }) y( Z% e; M- P! o( z
  12. SOUND_BAR_SHOW_ENABLE       = 1# c5 O5 y8 T, ^+ ]% o9 s1 l
  13. ;==================================================. i- ?* E* U' F4 V6 D
  14. BANK_DATA_MASK              = $1F
    7 f1 B- |. u" n4 W% g  D5 M7 j
  15. CHR_RAM_ENABLE              = 0
    2 x% r+ G- e# D( a5 [6 b% y, x0 m$ X( f
  16. IRQ_SCANLINE                = 136
    3 @2 ^7 C/ H& B, v8 Y) R% q
  17. ;==================================================
    * N/ v8 y; Y9 n) E) X
  18. SOUND_DATA_BANK_00          = $00
    # d7 r8 |- w' f7 A/ r" l  F; `
  19. SOUND_DATA_BANK_01          = $01
    & |% t) W7 r6 r0 Z
  20. SOUND_DATA_BANK_02          = $02$ e8 f! v( F3 H8 l# j
  21. SOUND_DATA_BANK_03          = $03% V( }% k! ?, R9 ^0 B) }
  22. SOUND_DATA_BANK_04          = $04
    , V. c, g# B. J$ T% t5 |7 F
  23. SOUND_DATA_BANK_05          = $05
      b. S7 `! ^0 M9 A
  24. SOUND_DATA_BANK_06          = $06
    * y0 f8 F6 e- m% Z( X$ k  R
  25. SOUND_DATA_BANK_07          = $07
    . |* k3 `* X$ c* g! j
  26. SOUND_DATA_BANK_08          = $08& N0 g2 m: y1 R) M3 a
  27. SOUND_DATA_BANK_09          = $09
    - A" ~! o/ ?0 k- I7 I* Y0 Y
  28. SOUND_DATA_BANK_0A          = $0A
    3 u1 Z0 X- t0 N) b3 a$ h7 n
  29. SOUND_DATA_BANK_0B          = $0B
    + V+ Q( K2 Y  C# J+ H* r
  30. SOUND_DATA_BANK_0C          = $0C) {7 _2 k6 [4 D* Q4 [4 _2 G
  31. SOUND_DATA_BANK_0D          = $0D
    1 V% K& z! Z' S# G8 {4 ?, ^) I( R
  32. SOUND_DATA_BANK_0E          = $0E! S6 y. @, r0 }
  33. SOUND_DATA_BANK_0F          = $0F9 `; k& F: M8 L8 H
  34. 3 y" K& |8 i2 W
  35. SOUND_DATA_BANK_10          = $10
    , z& y. k3 q+ _' r- y
  36. SOUND_DATA_BANK_11          = $11  ]- j3 |9 I5 ?0 G
  37. SOUND_DATA_BANK_12          = $125 Z% T- `1 Y1 b: A( @
  38. SOUND_DATA_BANK_13          = $13/ l5 C  E6 E% L  ~, `" F- C
  39. SOUND_DATA_BANK_14          = $14
    * S! w" \3 t+ X
  40. SOUND_DATA_BANK_15          = $15
    5 r. M9 {/ J6 K. ]8 ^
  41. SOUND_DATA_BANK_16          = $16% h4 l- d) A7 d
  42. SOUND_DATA_BANK_17          = $17
    8 y$ T1 u! N. A- J* c
  43. SOUND_DATA_BANK_18          = $18# L6 M+ E0 w; o
  44. SOUND_DATA_BANK_19          = $19( Z! ]! x' \$ t; w( Y8 o
  45. SOUND_DATA_BANK_1A          = $1A
    ( O: o' U6 `9 W* i; Z
  46. SOUND_DATA_BANK_1B          = $1B
    + Y7 e" U( N, p% n- _2 p
  47. SOUND_DATA_BANK_1C          = $1C7 C) ?# G& ]/ w+ ?7 P) c
  48. SOUND_DATA_BANK_1D          = $1D% H) T' [4 y& I! Z5 Z/ i
  49. ' I2 f* V# }* N+ U: Y1 o
  50. SOUND_DATA_BANK_C000        = $1E
    3 O5 [; m: B3 d" M/ S
  51. SOUND_DATA_BANK_E000        = $1F
    9 H; I' R7 e) {* Y& [" K, a
  52. ;-------------------------------------------------
    % p6 w3 G! J5 a8 t
  53. CHR_DATA_BANK               = $20
    3 L! S0 u7 ^8 [2 W. ~2 z
  54. CHR_DATA_ADDR               = $A000
    : E3 G; a. r7 h' o1 D
  55. ;-------------------------------------------------
    5 q: n4 {4 x5 a3 c
  56. PROGRAM_BANK                = $002 B; X* ]2 u3 n3 A$ v3 L7 v# V
  57. PROGRAM_ADDR                = $8000/ t0 M* m- |( r
  58. ;-------------------------------------------------
    & p8 }* \) k$ ^- J% N
  59. RESET_BANK                  = $1F
    6 u0 y% S) W. `
  60. RESET_ADDR                  = $FD00
      A" K0 ?) U5 Q) I- Y
  61. 4 X( d7 e, x, F$ ^$ _
  62. ;==================================================& A) ?9 S( Z# b8 U
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数
    " @% V7 ~" X2 j- {" l
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引
    " C/ ?5 }* b6 |5 ^  V
  65. PAGE_SIZE           = 5                     ;每页节目数
    7 d2 o) H# i4 F$ |% s) g! j9 _
  66. 0 Q' E/ ~- w1 ~, @: W/ [: U
  67. ;==================================================
    4 M. T6 L& f  a3 b0 s
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除
    $ Q7 v1 Z0 F! D$ i# Z5 P
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数
    ( r2 `! Z: G, P' F
  70. .ELSE
    - R1 l1 O* p/ z; ~2 k' k
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数! o- F6 }$ @' z( `3 [- H9 z
  72. .ENDIF
    6 ]0 ~! o9 j, {' l6 q* Y  J
  73. 7 D- b1 U/ M6 [
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引
    0 J! Z' V/ X) h, K4 U% e6 \

  75. 6 c/ i5 s: s. X% v+ [0 A
  76. ;==================================================
    - `7 A  Y) ]4 I+ @7 @
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置3 r, D1 y6 S% M/ Z" n+ b- ?& c
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 21 X. P8 B0 N9 x. N; T
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;
    ( n6 m. Z  s4 z' Z" J& T
  80. ;==================================================
      s1 i( |9 F" G* t! O4 Z
  81. Caption_Text_Pos    = $204D ;标题文本位置' h6 [2 x5 S$ ]) W) _9 Z: T  f3 ]
  82. Author_Text_Pos     = $2324 ;作者文本位置, ^1 P6 U" U$ C% r
  83. Date_Text_Pos       = $236B ;日期文本位置
    , T: D4 Z. N9 G
  84. ;------------------------------
    3 H7 g. J1 `; e2 p) p1 [4 U/ L- u
  85. ;------------------------------# O5 n( I2 a7 N: F7 K5 m* D
  86. .IF SOUND_BAR_SHOW_ENABLE( ^8 P: ~* o4 m

  87. . L, R' S; r" e/ E
  88. Play_Index_Pos      = $2273 ;当前曲目位置* T7 B$ J- \) t* |. `" `* N
  89. Play_Time_Pos       = $22B3 ;播放时间位置
    5 @  `6 e& _; S' j
  90. Play_State_Pos      = $22F3 ;播放状态位置
    , z4 A5 P6 D- G; p( Q/ N
  91. / ^* M, |8 T9 f! ~8 _0 l/ i
  92. .ELSE
    7 p6 S" W' O: _9 Z0 D4 e' G4 G
  93. / ^% }( J4 R) H" z$ l+ m1 T
  94. Play_Index_Pos      = $226C ;当前曲目位置+ i( P6 N% ]* H) ~+ G$ t: {
  95. Play_Time_Pos       = $22AC ;播放时间位置
    : D0 t4 e6 C# L" |3 s
  96. Play_State_Pos      = $22EC ;播放状态位置: X; Y2 Z8 j$ M; v3 s. f( T, c
  97. , j/ a& x$ R/ i% D% x" Y5 R
  98. .ENDIF' b7 t+ G" \- R" o, I6 G2 ]5 V
  99. ;------------------------------
    9 l0 H6 R: G# X3 R$ U0 Y+ p* _
  100. Track_Name_Pos      = $222B ;曲目文本位置
    ! H" u* P* y# d6 Q! S
  101. ;Track_Name_Pos      = $00 ;曲目文本位置
    ( G9 |) K: w% f5 M! M1 H' J
  102. Sound_Track_Pos     = $2265 ;声道文本位置
    ( F8 {  m+ O2 s0 O) z
  103. Sound_Bar_Pos       = $2269 ;音乐条位置+ q. S2 L: {+ a$ P0 \( s6 _
  104. ;==================================================  |0 M' C5 x5 r' r1 x
  105. Scroll_X = $005 v+ i9 r2 _5 J$ B& Y1 s( M
  106. Scroll_Y = $001 _7 V6 c& f9 T5 c( M9 M9 Y, S0 Y
  107. ;==================================================
    # y# Q, i9 m/ R6 L  `- m- s# `
  108. Sound_Ram_Addr_1       = $0100
    $ }1 y- i' C8 {0 [" V8 O
  109. Sound_Ram_Addr_1_Size  = $800 N/ P, r$ L+ k& w! D' `  r/ Q
  110. Sound_Ram_Addr_2       = $0090
    & x: w3 S4 o' T
  111. Sound_Ram_Addr_2_Size  = $70
    ) {/ b9 z8 m9 y; i9 {7 R
  112. Sound_Ram_Addr_3       = $0700$ G, E8 n- W6 r8 q6 e8 Z/ L" \  @  G
  113. Sound_Ram_Addr_3_Size  = $00
    ! A' H* A' ~2 n' C: ]5 ]# s
  114. Sound_Ram_Addr_4       = $0400
    + L1 _1 @2 ^7 D. P
  115. Sound_Ram_Addr_4_Size  = $007 K3 W. P& J0 a
  116. Sound_Ram_Addr_5       = $0500
      Z( @6 [" _) b+ J# }0 K
  117. Sound_Ram_Addr_5_Size  = $409 w( b; W9 R& p$ B. f& k
  118. 8 u7 A  d- f7 y7 A% r, s1 Y- Z
  119. OAM_TEMP_ADDR   = $0300: @) T) c; {5 o" i  {1 _

  120. ) n6 r# g7 t/ j* j! `
  121. ;==================================================
    ; [0 b' x9 W. ^
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器0 [/ t. ?  }# d  Q) c8 ?
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器! m+ b1 F+ Q8 D: F4 r! Y9 ?0 S) m
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位
    2 o$ R" Y. E  u* U
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加1  x/ ?8 b3 Y8 G8 G1 L
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加1
    : N4 Z! F2 K# l' X- C3 P
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器 ' }. Y( S7 Y) x2 E7 D! t- k
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加! |) q1 {# ]6 o5 ^  U! ~7 D3 j$ \
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32
      c! X% Y; p: K9 D! V
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存: K8 l$ x2 Y; |" O4 k, \1 L8 u- D% n
  131. APU_STATUS              =   $4015   ;声音通道切换
    7 A) B( L0 P" J, l# }7 T- X
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通: V8 F, |  F4 W, {
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通. w6 M! P+ P! s- I8 ^% Z
  134. ;==================================================; z% X7 P( l7 N. y" i* z
  135. MMC3_BANK_CTRL          =   $8000* l% P& l- G$ B' _! G- n
  136. MMC3_BANK_DATA          =   $8001, f8 Q; {4 o/ b1 _0 h
  137. MMC3_MIRRORING          =   $A000
    / H# V1 F$ g' t; g9 D- r
  138. MMC3_PRG_RAM_PROTECT    =   $A001
    0 b) F; x: O& L! p  @6 o
  139. MMC3_IRQ_LATCH          =   $C0008 e# T( C  I1 _4 V3 j% d5 v
  140. MMC3_IRQ_RELOAD         =   $C001. x% i# V$ {+ @( x" Z% B" }
  141. MMC3_IRQ_DISABLE        =   $E0004 k5 [" A8 m  ?" @" t
  142. MMC3_IRQ_ENABLE         =   $E001( ]" m/ v+ z, f6 E. `

  143. 4 w# z8 M' |, R8 d( a: S# M2 a, m8 s
  144. ;==================================================
    1 C' s3 r# k+ Z! V+ l
  145. PPU_Addr        = $0200
    + I/ `) M4 ?7 b2 ]2 c0 g9 ^
  146. Palette_Addr    = $02C0/ t9 e4 z; F4 P: x  Z, c  y4 l  w
  147. Sound_Bar       = PPU_Addr+$E0
    1 ]+ b! O7 m/ c8 \. D$ ^; X+ S9 m1 r
  148. ;==================================================2 z# |$ e& F; w( N% o$ J
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D) W7 P# s8 _$ r
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$11; B4 p- c7 e  E0 B
  151. PALETTE_UPDATE_MAX      = $2C1 v9 k) C2 f( L1 s7 \  \3 X3 y5 G
  152. PALETTE_UPDATE_MIN      = $21
    & J9 P* Z" Z0 W7 f6 l
  153. PALETTE_UPDATE_INTERVAL = 60
    % i3 b& j. m8 m" `1 r5 K+ c" z
  154. ;==================================================8 ~! f% ^; `3 `- X; F4 P
  155. Sound_Bar_Cnt       = PPU_Addr+$F08 u% h4 b. G" v# w4 l* I, s) m
  156. PPU_Cur             = Sound_Bar_Cnt+$02
    4 E  s0 a! X; w3 w! }
  157. PPU_Addr_H          = PPU_Cur+$03& }) H; o7 R# V$ o/ U
  158. PPU_Addr_L          = PPU_Addr_H+$04* |9 N' q0 C7 p
  159. Screen_Ctrl         = PPU_Addr_L+$01( v! B4 v$ }9 x: y
  160. Screen_State        = Screen_Ctrl+$01
    . E2 w' C7 L4 a5 N
  161. ;==================================================$ U* K( v% Q* m8 u, O; P
  162. Use_Ram_Begin       = $50
    0 D! L, ?2 Q+ T4 X
  163. ;==================================================
    ( K8 K7 P$ g5 F; Y) m  ?
  164. JSR_Addr_Op         = Use_Ram_Begin+ A: n- m7 p5 Y
  165. JSR_Addr_L          = JSR_Addr_Op + $01
    ) l  Z8 n2 y& ]. x& C4 _+ X$ \& k
  166. JSR_Addr_H          = JSR_Addr_L + $01
    5 h3 }0 q9 E% I; v" a. C/ d. _% i
  167. JSR_Addr_Rts        = JSR_Addr_H + $01( p5 p) m/ g/ B& z
  168. Data_L              = JSR_Addr_Rts + $01* K% H- `, m+ y9 ]! E
  169. Data_H              = Data_L + $01: }* j* G1 ^' o5 f- g
  170. Data_Cnt            = Data_H + $01
    " [% X; B9 d$ s7 C3 u8 J
  171. Data_Buf            = Data_Cnt + $01
    + t" j! v$ z/ \) f3 b8 P9 U
  172. Nmi_Time_Count      = Data_Buf + $01
    1 M: s' J# x4 @# j6 B  b& _# l8 \
  173. Time_Wait_Cnt       = Nmi_Time_Count + $011 K/ U5 d( n) q* n7 R1 g) F
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $01
    3 t/ _$ W& U- T# S5 f3 O

  175. - U( \2 L6 v: }8 o
  176. ;调色板刷新标志. k  {4 f7 r) y
  177. Palette_Update_Flag = Palette_Wait_Cnt + $01
    % D4 U# X& U8 i6 Z3 n7 g6 P- J
  178. 9 Q1 F/ @: P' f/ L. h2 R4 D
  179. ;当前帧文本写入禁用标志4 z' U  s; v$ x+ H% r) G/ g
  180. Text_Disable_Flag   = Palette_Update_Flag + $01
    $ m0 G$ o: t" h9 }$ P+ Z

  181. 2 ?1 r6 y( f2 |. R7 W: b
  182. ;==================================================$ s8 a3 J7 J5 e1 Y
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动, h: @. \. P2 i1 v! j" M& i6 k( Q
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条. J8 p1 f1 R& H. b3 S, `9 f
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间- |: P0 B7 h+ A1 l
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间
    % ?+ Q1 H  L8 u  l' J
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间" x3 N* ^$ T# S" u! R7 F
  188. ;==================================================' g/ m- e+ {" q+ R
  189. Key_Keep            = Text_Disable_Flag + 1
    0 p3 ]! _! p) _1 W' g; W3 @
  190. Key_Once            = Key_Keep + $01- e7 K* W: ?2 f
  191. Key_Kemp            = Key_Once + $01
    & N% B1 ~- S1 ]- d+ ?4 Z
  192. Key_Temp            = Key_Kemp + $01
    ! }- a  A( L- ?- K! k
  193. Key_Getv            = Key_Temp + $01
    # v+ O, |: c, L3 k) o0 V
  194. ;==================================================
    2 s4 p1 o( r, m( w5 M
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集
    ) V8 i5 L: K+ t. F4 q) I  m
  196. Music_Item_Last     = Music_Item_Cur + $01
    0 k* x1 D* {, ^7 s, O( [+ U
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集( I; N1 E7 R5 I! s: ]( {  }& R' Q1 _
  198. Music_Cur           = Music_Total + $01  ;当前曲目
    : e1 S# x( e3 u- z- h5 C( y* [7 |1 ^/ ~
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目
    ( Y5 p* y& n. j' h
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态7 c* T4 Y- y. y' h9 }
  201. ;==================================================$ h% u2 G5 \4 u3 c7 d7 ?
  202. HEX_Data            = Music_Stop_State + $01
    0 i  e' n! P! X4 n* P
  203. DEC_H               = HEX_Data + $01
    ) x6 l- C% t! }" `+ I
  204. DEC_T               = DEC_H + $01
    - e) r  h% \" z5 l
  205. DEC_L               = DEC_T + $010 z5 V& K; Y$ Z4 ^  O' v
  206. ;==================================================7 j; O7 h) a; {6 Z
  207. Time_S              = DEC_L + $01
    : ~8 J) v; j; J  o+ X! S' j
  208. Time_M              = Time_S + $01
    : q7 b7 h9 u7 G, D' x$ Q+ s! E
  209. Time_H              = Time_M + $02! V! }/ T2 X/ x# O& Z4 y
  210. Time_Cnt            = Time_H + $03
    # v$ o+ e7 S% e3 n9 |$ P
  211. ) L1 D/ Z& n; z
  212. ;==================================================0 K6 X/ f- \/ S8 ]" R
  213. Music_Bank_8000     = Time_Cnt + 1
    7 @5 b$ L" H! d, y% g: Q
  214. Music_Bank_A000     = Music_Bank_8000 + 1
    7 I3 w5 E( i8 M& F
  215. ;==================================================
    & H7 C  p, ]7 q6 a! h3 N3 a# j) C, X
  216. Scroll_H            = Music_Bank_A000 + 1( o6 }$ b3 n8 Y8 f: f5 y% x
  217. Scroll_V            = Scroll_H + 1) e( f6 ^9 e; t/ k/ M
  218. IRQ_Process_Index   = Scroll_V + 1
    5 Y$ o. D7 ~, H5 f6 E, S2 d
  219. ;--------------------------------------------------
    " U4 [4 E% b+ T* N8 f  w
  220. Page_Cur            = IRQ_Process_Index + $010 a; G0 K  U5 O+ t  O+ W
  221. Page_Cur_Index      = Page_Cur + $01
    ; Q& ]/ k% k  i
  222. Page_Cur_Cnt        = Page_Cur_Index + $01- U* \1 m/ r# x4 \9 r
  223. Page_Last           = Page_Cur_Cnt + $01$ p* r3 Z2 k4 N' ^+ }
  224. Page_Last_Index     = Page_Last + $01" H9 }7 i" o+ u$ B5 k- {
  225. Page_Last_Cnt       = Page_Last_Index + $01
    3 ~/ u& s/ A3 H, B+ G2 v
  226. Use_Ram_End         = Page_Last_Cnt + $01
    6 q5 l8 g1 B+ D
  227. ;======================================================================
    ' L, u; x$ S3 s3 A. x+ p
  228. ;音乐数据块
    ; n6 \* e" `# m2 \; k" M/ i5 l9 z

  229. 5 }2 d, f# k' _6 @9 j" O$ c
  230. .IF SOUND_BAR_SHOW_ENABLE
    : \. M2 n' o2 V: d) M

  231. : l/ \, ^" i- u0 E; M0 }9 s, C
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK; S/ v3 g. t4 ~9 s
  233. .ORG $9000
    . L+ \0 q8 \* ^& R8 D
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"
    ! O" N# x3 N3 ]" M( d

  235. 4 `0 d% ]9 `  c* o( {
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    : p+ }: x$ ^5 P& Q% ~; R
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"+ K# Y5 _+ d: C: e. X' g; i4 P
  238. 6 G0 d7 r$ |4 l
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    . W/ }3 y8 h# H8 a( R
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"6 l% V& z; x5 X. |' Q6 r. v

  241. . |9 h2 X9 x7 v" c  K( v0 V# b
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    - H8 t" R+ |- j$ Q2 Q- m* Z
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    1 L5 T. B8 [, J7 V  V5 P

  244. 2 |% X3 H# j9 e
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK5 ]3 [) t* @: A0 ]6 B, L
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank"0 L1 i  P6 b( j( C9 M7 ^! O7 g2 X
  247. 3 ]2 N2 A  l) L  ^
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    8 A6 L+ r2 A& A5 T7 U3 ]/ a7 O
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank") A1 j+ j3 K: j8 E" ^0 ^

  250. ! a7 y) I4 p5 Q1 D. X- r
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    " U5 X& F) E) K$ p0 x, M: ~) a
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    * c- j8 r2 F1 E0 f' L
  253. ( z# z3 G! }* I
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    3 J9 z7 [: P; G6 H7 e( p7 @; f' M
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank"3 F/ X5 Q+ o' b5 m0 K. {4 m) V

  256. & l- p" |$ ?) [: d9 L" q
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK0 [' H% ^" ^/ q  d# Z
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    0 |. ^/ ?/ A" J+ W0 s
  259. 4 X# u) }# r' d# p. z
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK8 J, @2 Q( ^1 a5 T/ F7 u5 M  [
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
      @0 K; |, V: f: k, W: g0 x

  262. ! L, v! z5 q" Z# h. r9 [
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    1 i% S4 K1 }# v$ h( O; g
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"
    8 B) C( V) X9 t7 t* \- L7 w
  265.   d. r0 m- m6 U' V6 k- v8 _
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK
    4 y1 j; w3 Z7 [  [
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"+ n+ P6 s5 v8 N1 m8 z) z1 n/ d: v
  268. $ O$ G* F3 H+ l$ ^9 J
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    ' G2 ?9 _( u: n& F# b5 i3 ?9 E
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"6 S; e% F! M5 j5 Z7 {, v2 [$ X
  271. 4 g* Y' W( D5 W# ^6 o
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    + O. q+ r. G. Z; X: {
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"/ H$ L$ H7 m+ S; `! C0 E
  274. ( X9 u  ]: q# F5 b( ]
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK7 H3 ]0 w1 `1 f1 q! w
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"
    / X/ i. h  {0 `# t7 ~2 }) |! N
  277. 2 H$ O% o0 e% y# ?
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    % _2 ?; Y; G/ m( `9 {6 s; ^5 R
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"; L7 u. Q+ |4 C; {$ {! ~

  280. 8 I; Q9 m/ R' F1 w7 }  Z
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK" j+ |- [  S) K- R! l) \) \$ u
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank"
    ) S9 b) k$ T; h4 R7 G& d
  283. 0 P( m! z) J. H& ^! _; R
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    / w  }! X/ A& p8 M3 B2 P0 k
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
    4 Q* [/ F3 d3 J& Z' P; R

  286. 0 ]% K  S5 p: P$ Q
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    1 \( X2 K. A6 o' T# {6 Q. b% E
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank"
    1 T7 M9 m% ]0 c$ c. P4 f
  289. % V- ?0 M/ y: |# }
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK
    ! M/ R6 p* u6 @& C
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    % r1 S3 i, e# j- G

  292. , ~# U. A: v, ], G3 ^" T
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    . d4 T' q% c) P9 @
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    % @8 c6 Z7 r* M7 k% C- Q
  295. 2 @9 ]/ l( Z0 k3 H3 F- A
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    ! [& e2 S" m8 }2 T3 K
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank"5 X! |: M/ d0 ~, j6 M+ P

  298. ! D' P, N# r$ b/ F
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK- a$ [3 M- n/ U( c- K8 j& k! J
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank"! c4 u1 O8 l! T7 X! q
  301. " k% b- A- l' Y7 Z8 |
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
      }6 z! g3 B5 z9 ~2 z$ h$ ]
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"* O, J! q8 J, }, z" L+ v  }

  304. 0 j* Y' r8 |8 r2 H! K9 q
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    7 |* R1 B7 q. d8 d( J$ D
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank"
    . q) J+ _8 j+ U  V7 |% x! B
  307. % c- a4 Z( y# E& z! t0 L
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK- A' l0 c2 ~! R' x: ~
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"5 a* ?0 D1 q4 ?1 D
  310. . R) `: a7 M" t9 g9 x: _
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK% q9 e( b: O% r) o3 _' o
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"
    % T# J5 W! ]3 I  H- u: T1 d
  313. : J3 o; o8 A9 D4 j% E
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK  o  i7 l7 z2 k1 j9 s
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"5 U, \9 T) M4 S

  316. , |- S' A( z$ h# U9 g6 J3 ]( D
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    ' X* R& `" v& u1 J9 o2 ~1 ]  F2 ^
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    ! H  J& h- ^2 b+ a" T0 l

  319. # h8 A+ N  C3 S; K- }% H
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
      E5 E% a: \6 A% b
  321. .ORG $D4004 u* R. i0 Y! w6 U! @
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
      \' w& o5 X/ d$ {/ ~

  323. ; |! ^" S$ V9 t; D
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK" e2 F1 [$ f2 e* M2 }
  325. .ORG $D800
    ! @2 B5 t7 Y) H
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"6 n/ J8 ~# c& f
  327. ) I0 h; j. `0 t

  328. ; g% M# o4 s. U: M4 @9 }* A. A
  329. .ELSE8 m1 h) n. I1 a. L0 [

  330. 8 y' E) O  C# {- Z9 N+ y
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    - s. J% v7 ^( J1 C4 ?) Z
  332. .ORG $9000. V4 B3 ~, O" r1 g' @' v
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"& E& c2 G& ^. i3 T. r2 p

  334. 3 ]3 p3 T0 ^4 F! Z" {' {- d! }) }2 ?
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK+ n4 a! p7 S' C5 ~) {: K
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"
    ) ?: U% j) F( a. F

  337. " [: B! g# x8 t, P* B
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK5 P6 h/ H0 I0 z- A+ p7 [" b
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"
    3 t/ F3 _! M; W# W$ s5 ]

  340. " }/ d  O7 b) ]& F
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    ( |0 I8 e# f* e" \5 W
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"& f* |) V' ^% M
  343. & L% A5 Q" b/ Q0 n
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK2 \/ c9 t* T, ~6 r
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank". S! c5 E6 V  ^1 D* a

  346. 9 M! M9 y$ I. [, M$ n' r* i# _
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK& ~& b, h* H! @- ^& N' t2 J
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    , l. T1 K3 t- M. m3 v
  349. & @/ ~, y! n; _6 r" o
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    : f9 v3 x5 ?. E3 e5 ?( e
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    - z) t4 X6 l5 o' }+ t. c* S: L8 W* ~. |

  352. 3 T- X0 u2 s2 m/ l  ]  c
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK4 D0 z1 Q  O6 G* |6 ]/ w
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"
    3 R# h3 }5 E) ^8 p

  355. 5 }4 z, X3 k( ?3 T7 w6 X
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK( h8 f; Q2 S# f. s( L
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    $ N: M3 m4 t& R" k
  358. ! J+ q3 @. F& u4 c
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK
    6 E) X% v& q% \8 f% @1 D' P/ x
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    * y5 V/ q0 M# {, b7 K' v

  361. % p- N  ^% E) K9 j- g7 M" h1 o
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK3 O  |  d# A5 `* n
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"! A- u4 ]+ Y6 V9 c; s. B* x+ L) f$ @, h

  364. 9 s# [; r' j0 Z" T; M3 v* C
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK5 d, i: H  j2 V6 C* h+ A
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    . \; I; ]. Z: I5 O2 X. X/ x

  367. : j( i2 R' k# c) I# C' j- F* A
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    ; Y* V$ F+ J- N* _4 v% L. ~- G
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"! k! D, D- a6 @. h5 E

  370. + S) E2 A" g& u7 [3 ~4 M3 R
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK" J+ U+ f. U4 G3 i  `7 U6 r8 C1 B
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"% |2 W0 G" P; \5 O  W0 r

  373. " K" S  x- \  a
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    ! `0 B" @, [6 R; O; p' L. |5 Y4 ~0 z6 Y9 Z
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"9 S( O3 X0 Z; c8 V
  376. - ^# v* ~7 R% g% a- x) {
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK6 ?6 B* S: m2 z
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"; L3 }: e9 B, t# B* z
  379. . g" q- j! T5 t: f
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK4 E. z  I: \/ `. [
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"
    % J9 J+ `. S3 R2 n+ T: h
  382. % g  N, C! P1 b+ o* c3 I
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    4 u: h% F1 g* n& i
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
    , ~! x( R& |) z: w$ ?/ N. T0 c

  385. 7 t# y; E. X2 T4 J% |4 L# B) g, C, R! N
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK4 Z! q% o# [" b: F7 d5 E
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"+ [1 S& Y; V: i# V( G- \: n
  388. : M# o2 s# |! Z5 q5 e! {; N1 ^
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK6 D& \* @$ @5 s# C- q8 ~' T
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    $ Q. P+ N3 ^; T9 z- ~2 k6 x

  391. ! Q# K/ d, D# p7 C# g+ Y: k9 t
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK0 a7 W& f6 I2 x4 m! k2 W6 L" x+ ~  \
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank". R% H/ t9 B6 z1 a: o. P/ i# V  t

  394. / o# p9 ~# g' W/ k! M1 z
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    6 S+ Z; m' m, L2 C% y! a- z
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank"
    % S* X1 F1 N/ F$ \/ g

  397. 3 k. K( ?' j* D- d8 [# I% T
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK) P% p1 w, t+ {( d8 P1 C/ f7 s' |
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"+ h2 f: W$ H! n; B: M/ m

  400. ' `0 @3 K: H" r5 R7 c# }
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK6 h( }+ S. B: S$ A6 V# k
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"3 Q# `, i- o& }
  403. % d' d4 V  k$ ~5 ^7 K6 N. L" O
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK$ |/ `9 M, w' [% F+ p0 n# B9 T- g
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank"/ h9 y5 j5 x& e$ f

  406. 9 }9 n5 d. d) T$ h2 L
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    ( P" V/ R3 I! o/ y  y# J1 g
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"
    + _: V( F/ t: ?- R9 s1 d+ M
  409. 3 W2 d. D% w$ ~5 M, o7 K, c
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK5 m( X* k# j* V4 ?$ i
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"# T3 j& M5 S, i$ y4 Y

  412. # h% L/ G: v9 w
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK
    - O: H" e0 E6 s4 S
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"1 p2 E2 ?7 }0 ?0 G2 i9 ^* q
  415. 5 X4 f1 Y' ?. I/ z$ p- q1 h& x( @
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK" L8 P) V( _8 m% j: t
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"1 Q( x7 W& S3 w& `; N6 B. E# |
  418. 0 R! H! {0 ~9 L$ r  O! B
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK. c# Y- j$ t/ _/ D/ A+ E; ]
  420. .ORG $D4009 A2 y9 j) j4 Y& f& ?" S) w
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    7 e; F! Y* D9 m8 N0 {
  422. . R5 v) w6 B7 V7 ?1 F' l
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    ' G5 @/ f7 h) M; l: }6 p
  424. .ORG $D800
    5 a2 g9 b' l+ W) E
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"0 d! J1 d! I3 y+ h- \' v7 S' b
  426. 3 w6 ^  {4 w( E, X7 E7 x! k
  427. .ENDIF# s) h: Y- q% h+ l( r3 n4 d" T

  428. ) b( B4 V2 i9 k5 k  x
  429. ;CHR图形数据9 d0 x3 A$ o4 N* R
  430. ;======================================================================
    4 C" p) `3 p5 u/ p8 M3 }6 `5 v( I
  431. .BANK CHR_DATA_BANK* ~8 T- U# `# E5 U' l! [! B$ w
  432. .INCBIN "chr_bank/chr_data.chr"
    $ _) d4 _4 x" D- f7 I1 Y
  433. * I! V* C6 x( o" A7 b, p& t8 u
  434. ;======================================================================8 S; U6 `$ K; s  [8 c0 Q" C
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK9 G6 h; W2 ?4 ?; r5 {: I
  436. .ORG PROGRAM_ADDR
    / |, C# m& G1 e& w, v; Z% k( r
  437. " F3 B- {9 T' v; T9 A) _0 k$ M" z( c& j
  438. ;==================================================+ B, r2 ]% b! j9 ^( Q" [
  439. NmiProcess+ o1 y/ F! M, J9 i/ k$ ?

  440. ) s6 x3 k$ V; Z0 k7 _& x
  441. ;关闭屏幕控制3 t5 s7 J' `- @. j7 }" k
  442. LDA #$00. C+ W: k' I7 e/ S3 o# k" W
  443. STA PPU_CTRL+ }% ]; y9 r2 Y+ G
  444. , ^- }, K$ q; W6 K# M5 [8 n
  445. ;没播放音乐就不需要触发IRQ  M. E5 g5 B; W$ n' q" w7 |# h4 ^: n
  446. LDA <Music_Stop_State
    ) \+ R1 W9 H; X0 n* ~5 g' P
  447. BNE NmiNormal
    " C1 ~+ ~" M8 ?  g2 z* ], R
  448. % q4 t/ \, r4 z" B1 X3 K0 m4 o5 u
  449. ;重置IRQ索引/ j% e3 M+ a" A& [" @6 f
  450. LDA #$00
    ! K2 B2 l$ K/ a
  451. STA <IRQ_Process_Index- w/ d$ W6 F; e8 j; u9 e
  452. " q$ m- H! k% D8 M9 X  v9 f
  453. ;时间秒数为空则跳过
    * X: M5 C! ~& ?1 Y- r- M4 B
  454. LDA <Time_H( p3 `. l* H" U* W
  455. ORA <Time_M* `' w- ~9 {; J; n
  456. ORA <Time_S# ^% q1 z- g1 }4 X
  457. BEQ EnableFirstIrq
    2 y$ y" |7 ]# D9 @, E7 M0 t2 @

  458. 8 ?$ T/ N* Q' r* l4 a% B
  459. INC <Scroll_H
    " E: e* V8 o" {
  460. 6 [/ C4 O! O4 s
  461. EnableFirstIrq
    ; n0 E& f7 `* @' ?3 F, e2 G
  462. ;80条扫描线后触发IRQ" f; n6 T: B+ P- x6 r# l
  463. LDA #IRQ_SCANLINE
    * M* U5 K, j. H7 R
  464. STA MMC3_IRQ_LATCH6 o8 D0 }7 }& f2 G7 ]3 c) F! J
  465. STA MMC3_IRQ_RELOAD; Z7 w0 A, |9 a1 o  a+ h1 D0 z
  466. STA MMC3_IRQ_ENABLE
    / x0 L6 A3 c# J
  467. CLI7 ]1 n, L' G! f2 k9 h6 S. Y

  468. % R, [  Y9 K7 r8 [' ^
  469. NmiNormal
    " t# R5 U3 l8 I! ]0 {0 }' p
  470. $ e5 B% y$ p4 k/ `! w4 L
  471. ;处理PPU图像
    : Y, Z) C: y6 u/ a1 A' P4 J
  472. JSR PPU_Proc
    * W3 R4 s5 M: J& ^  c7 \- T# D3 i

  473. 7 o& \3 ?6 _" m
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化)' {+ \, {1 F1 G0 Q; S" Y
  475. LDA PPU_STATUS" Y" U5 V% Z( \( \- f$ O
  476. ;LDA #$00
      y: {; E. |$ F5 A
  477. ;STA PPU_OAM_ADDR
    $ J% p6 Y% x+ u8 W" F4 l/ {
  478. LDA #OAM_TEMP_ADDR / $01007 R# F& [/ [, C- n
  479. STA OAM_DMA
    ! s9 c) T$ c+ V( C
  480. 1 X7 p  [) ]* R" p: V  J1 g
  481. ;启用NMI中断3 i9 u' y9 s& F/ ]
  482. LDA Screen_Ctrl$ m; v$ T4 g; W( B- }
  483. STA PPU_CTRL
    4 `$ b, j) J0 I* C) E: q" U4 T, _) \9 N' c

  484. 8 G" I8 }& z: ~7 S: K( i
  485. LDA <Text_Disable_Flag# c7 J2 j7 f* A2 s. g5 E
  486. AND #TEXT_DISABLE_RAM
    8 J& u/ l" S6 ~  D" n
  487. BNE Nmi_Sound_Play. E! O- u6 t8 N3 h7 z" e  K/ a
  488. ) @& J  _/ N6 ^
  489. ;处理手柄输入) b* h+ e" f7 Z4 k
  490. JSR Key_Proc
    - `) k% S; }* g6 h- @+ V; V( m7 @, m

  491. 8 f$ x2 W7 p+ L4 o# |6 X9 _. K$ L
  492. ;切换音乐(手柄触发)# H) C2 T, |' ]8 v% x  C# C
  493. LDA <Time_Wait_Cnt" C1 a9 m& F) W& `" x# }
  494. BNE Nmi_Cursor_Arrow
    , Z$ \  F% C" ]1 L
  495. JSR Change_Select_Item
    ( O) K/ b" |3 t

  496. % P; D2 Z- E1 W( p3 U! }# `. G
  497. Nmi_Cursor_Arrow; l; @- D9 K% B+ A# r
  498. ( M8 T; F- p" T3 A) {' X4 H
  499. ;处理光标箭头
    ! W& L7 X" s, a2 |  l& C% f
  500. JSR Show_Arrow
    6 `, _0 c: X& p/ M9 z! `

  501.   x3 _5 [. L5 f& z( P8 A& o
  502. ;更新调色板" B+ b4 K  e# w6 N/ E# M, @0 A
  503. JSR Update_Palette_Data+ z1 J. I" F# {8 W
  504. 6 H% |/ H* e# X; S; w9 a
  505. ;显示时间(缓冲)
    % @( a6 Z4 _2 U7 I
  506. JSR Time_Show
    ! {- H4 O, }1 b- p1 _2 g0 y
  507. 5 h! `! ?8 s7 b/ [6 L. J9 P
  508. ;音乐显示(缓冲)
    4 K# [; z; o4 t# Z- x& {
  509. .IF SOUND_BAR_SHOW_ENABLE
    % Z2 s  P- M- Z) y+ d  @( z
  510. JSR Music_Vision
    , m6 D! X# A. q, ^% s1 w
  511. .ENDIF; E7 `8 F0 J: b. X, x

  512. / e: X8 L5 [& {( p( z
  513. Nmi_Sound_Play2 d: ~& K5 M! j( [8 |
  514. ;播放声音3 Y% V( d2 n9 d4 c  |+ M1 `
  515. LDA <Music_Stop_State% q3 l: F; R/ z" Q- y- i4 @" v
  516. BNE Nmi_Time_Wait_Set* r  S$ G' U& I" w6 X7 H
  517. JSR Sound_Play_Proc, V2 z& }" r3 U% ^. E- @. X

  518. ! o. ?9 L; y; |4 ~
  519. ;播放计时9 u, D4 r# l2 y. j# R8 |
  520. JSR Time_Count1 Z, w( Q! P: V, @5 V+ b7 Y
  521. # C# Q* a. o& R' f( b
  522. Nmi_Time_Wait_Set6 G  \+ h0 }4 ^) ^3 O) U
  523. LDA <Time_Wait_Cnt! \7 {% y( |1 j; T' \8 n# n* X; F
  524. BEQ NmiNormalProcessEnd+ E3 |" B' b" \5 L
  525. DEC <Time_Wait_Cnt+ r; y% ]- H, ?2 t! q+ `" V
  526. NmiNormalProcessEnd+ S8 y* d4 s5 c$ q( K. O, g5 n
  527.   D7 A+ z0 h9 I$ G
  528. INC <Nmi_Time_Count
    ; m: L, `( Z/ z6 V5 ~) X" @/ \

  529. 9 F: q% F) S% p7 M% u, t4 m7 n0 e
  530. RTS
    " q, F9 w7 I5 B; ^! o* A& e; A3 ], E
  531. ' K" ]2 G$ o; Z8 c  ?. N" d: T
  532. ;==================================================
    ) E0 X& g1 n1 i# V
  533. Init_MMC32 Z8 t4 Q! o& r
  534. ;==============================
    3 ]* Y" Z# K; E6 {, k
  535. ;禁用IRQ
    ! E3 Y( G# ?5 W% ^& R
  536. STA MMC3_IRQ_DISABLE
    ! T; O4 v/ I- h7 Y7 u$ X
  537. ; I1 X" |+ }# \9 i4 `1 A
  538. ;水平镜像
    . {% D+ b5 l* j) c$ j
  539. LDA #$01- O7 f- e1 _) g8 {% s
  540. STA MMC3_MIRRORING) A0 N' N3 y# |5 [: {$ ?

  541. - E, X3 y" G$ y' {
  542. ;初始化图形bank
    * u* e7 {& ~0 Q+ Y
  543. JSR Init_MMC3_Chr_Bank0 X8 G- n1 \6 f; }

  544. % o" p4 U4 B# c8 o& P
  545. RTS- m( J3 y5 ?2 `5 c
  546. ;==================================================
    6 j( H5 K1 d% W: J# z
  547. ProgramBegin;主程序" v& T7 T* `5 F4 F( e2 M
  548. LDA #$00
    " S& i( c: H9 ^& X, k
  549. STA PPU_CTRL' E" D% o& c3 y% t% T6 [' S9 o
  550. LDA #$00
    5 C. T4 r9 l% J1 ~/ x
  551. STA PPU_STATUS( y9 m2 C5 N, m
  552. STA PPU_MASK. O6 f8 a( g( M% r& G! k7 D
  553. STA JOY2_FRAME7 U: U. _" G/ Q7 g$ G# z/ Z5 F

  554. 9 x* z: B" O* K* X$ H6 z  q; Z4 e) X
  555. STA PPU_SCROLL
    ! x# M" m; L! M
  556. STA PPU_SCROLL
    # {1 _4 e1 J- K  R) l( J
  557. # b7 Y8 ^  U- @  A5 v2 J4 M
  558. ;==================================================# H6 T; E: Z( m4 q" L( q: ]; d
  559. LDX #$FF
    0 k3 O% J. K) h: ]) o
  560. TXS6 t6 R4 p. [" W
  561. + S. {7 L, k- W4 M% f) v; E1 `
  562. JSR Init_MMC3( o4 `6 b# j- I# {1 A: h
  563. 5 g" n% }! t' K! s" X
  564. LDX #$021 W0 s: S. _, f2 r' d" @
  565. Check1( q2 v. s  m8 j2 T; Q( M
  566. BIT PPU_STATUS
    9 V. O7 p' z$ n3 c: w+ ]9 ~; C6 B% B
  567. BPL Check1
    $ I/ Z2 d; _" U' ]0 b. Q5 Z
  568. Check20 v* x$ L; f9 E. J: U5 N4 r
  569. BIT PPU_STATUS* N: R( o4 Y$ l6 c. B' ]% Z, j& K
  570. BMI Check2
    1 b! H+ k- o2 K3 q. ], i" J

  571. ; ~2 o: x0 @/ s
  572. LDA #$0F* }: q7 [1 a& B7 ~; O& N+ [
  573. STA APU_STATUS
    ( y  c: D6 V7 T$ U4 v5 x$ ^# J
  574. LDA #$C00 k5 \* ?1 ]" I/ \, p4 G
  575. STA JOY2_FRAME
    0 F. B* T( d3 P; K( T# B/ [) B8 w
  576. ! o! y! u- B& Z) E' o" K
  577. LDA PPU_STATUS7 t' b8 v: @6 q+ R
  578. LDA #$100 S4 U5 ~9 a4 P8 z3 u1 t
  579. TAX
    1 P. D7 R' E, C3 t/ u( T* h
  580. Check3
    2 ~# T) r* s' X
  581. STA PPU_ADDRESS8 C4 n: o& d0 q& C; y6 \( S
  582. STA PPU_ADDRESS
    9 I& A' B3 L" W1 [" F2 T
  583. EOR #$00
    1 ?3 y$ T" a$ Y! D4 E
  584. DEX6 w7 T- @6 [* D1 D# y* {9 X* M, g
  585. BNE Check3
    0 N( Q7 R& O0 L0 L
  586. ;==============================
    ; H8 D9 |, m" Y  y; C' k( K/ b
  587. ;调色板清空
    6 c, I4 q, @0 d5 U2 R% L0 F
  588. LDA PPU_STATUS
    $ K4 B: X, H: M- k9 M1 b4 y2 ]
  589. LDA #$3F
      s& g, p" l  n
  590. STA PPU_ADDRESS, V9 y$ Y$ Y/ R2 V
  591. LDA #$00
    9 C7 c9 d% F+ F5 R6 Z# p
  592. STA PPU_ADDRESS
    . Q+ {6 r0 P0 Z2 y/ U1 c8 z/ _
  593. LDA #$0F3 u  q: Y- U" F7 x) r; [% o8 D
  594. Palette_Clear  a! ?6 G8 t4 y5 l$ F& G4 t+ S
  595. STA PPU_DATA" o% u, `5 M: ^9 i* F
  596. INX
    7 G$ z8 [/ Z  J; @) O$ P- H
  597. CPX #$20
    5 ?) |9 {+ p3 G% j* K% ]
  598. BCC Palette_Clear
      c: t& B% Q. Q* a2 S  j2 ?( Q
  599. LDA #$00
    $ ~1 F3 }7 V! M3 O) e
  600. STA APU_STATUS1 g- `! p9 C6 d

  601. - k( i/ P! W7 g' D! ?+ p$ O9 T% s
  602. ;==============================
    1 V+ C" C9 y+ \" e& A  Y
  603. ;RAM初始化  }& s7 S* o6 [! d
  604. RAM_Clear_All% ?# w9 G! t4 B/ `
  605. LDY #$008 H2 t$ k+ e' ]) p
  606. LDX #$08
    ( A$ S- x7 W) W  a
  607. LDA #$00* r7 g  X) Q! V/ u, @. h1 `
  608. STA <$00' T/ K2 c$ `1 a6 M' j
  609. STA <$011 d9 U7 J: o6 a6 D7 G# b
  610. RAM_Clear_All_Start2 e! e4 E9 w' ?' l* U
  611. STA [$00],Y
    + s" l, y+ @1 C  h
  612. INY2 Z0 `6 s) q& K4 H0 D6 q5 y
  613. BNE RAM_Clear_All_Start3 y" S3 W9 ]: h, Q# ?9 q9 s: w; C
  614. INC <$01
    1 e2 B4 d8 Z  E* @8 l8 r4 O8 K& ^# Y
  615. DEX
    ( c$ h$ _" B' }8 `7 Q
  616. BNE RAM_Clear_All_Start, F# b+ u2 h6 O3 z; b

  617. - Q' b8 C+ p& h5 }# S4 J
  618. JSR VramClear  }9 D( K, }, e
  619. JSR VramInit5 m% J: M- p: F/ P6 U0 A
  620. JSR OAM_Ram_Init( W" z" [! a2 G: j$ l1 U% Y
  621. JSR Init_Palette_Addr6 T1 a- W- D" J) c7 v" D& U6 d
  622. $ n2 U4 q* K0 q7 j! {
  623. LDA #$FF. M+ x' Z& T( p& @
  624. STA Use_Ram_End
    " M! b( A7 g" O9 z
  625. ;==============================
    - e2 D& |! P* e' W" a! h
  626. ;初始化背景调色板8 @8 y, h( ~: X1 y8 O
  627. JSR Set_Palette_Color
    5 S, y1 Q5 e( J' [- Y2 [; H3 x, T! r. A
  628. JSR Set_NameTable_Attributes* N9 D" ~* l( O* |7 r( |. n# W- h
  629. 1 @+ h3 C& h% H9 X7 F
  630. LDA #$00
    " c2 K' J+ e8 {6 w5 j* i
  631. STA PPU_OAM_ADDR1 Z) q0 Q- p$ I8 L. Y0 G  M( Q
  632. LDA #OAM_TEMP_ADDR / $01005 H! g  ]( E: x) M5 {% d! Y
  633. STA OAM_DMA& Q0 G7 o" x+ t. C5 K6 i! p
  634. ; {7 L; n% a( M* w  ?
  635. JSR Sound_Reset_Proc; |' o3 C6 X9 V. L/ [
  636. JSR Set_Sound_Total- U0 B% t$ O9 t3 k1 S- u, L

  637. 6 @! O/ ]" X! ]0 s9 g
  638. Init_Start_Music" |. x. N5 [2 i' M0 o3 P
  639. LDX #$00
    ! X3 M# h: k% Q( l
  640. Init_Start_Music_Write
    9 ~  g, h  h3 T5 ~4 i  `; G
  641. LDA Sound_Start_Port,X/ r# y5 L! M" d5 ]1 x- K# Y
  642. STA <Music_Cur,X
    $ r: I& p/ F, q0 s
  643. INX! W! `9 ?* y# z+ L9 G) X
  644. CPX #ITEM_MAX_SIZE0 I$ h$ Z" T0 Z, C5 S5 y* Q3 W
  645. BCC Init_Start_Music_Write
    ' Y  @) G. F) }. j

  646. 9 i% B8 O  E$ H  J2 B5 x6 j
  647. JSR Show_Music_Text
    5 ]; A. L2 s9 i% u5 v0 z* |! F

  648. / y+ c/ H, _3 A% E
  649. .IF SOUND_BAR_SHOW_ENABLE8 c4 A) E3 ]  t* r, `
  650. JSR Sound_Bar_Text_Set
    1 V, T  \9 B+ f- ^
  651. .ENDIF
    ( f0 D) C  X+ d1 D8 R
  652. 9 v* {1 ^. C0 d0 H  X; b! Y. e
  653. .IF Track_Name_Pos
    3 D. ^  l9 R3 D/ w* E8 q
  654. JSR Show_Track_Info, i+ ]6 D) b* A- Q. y% G0 o' J
  655. .ENDIF
    ! Y% \8 |, R$ D9 S

  656. 4 {9 B% i" ]' T# u
  657. JSR PPU_Proc& W3 H' c# s# `0 I+ G  ]( l
  658. / b, O1 f/ k+ N- k
  659. ;==================================================' m# M- G& Q5 m
  660. ;音乐bank初始化
    7 t2 Q3 e. j+ g" V: \1 Y' _% |2 C
  661. JSR Init_Sound_Bank
    $ e6 K2 n  W6 R! f" S: L. D
  662. # f! b7 }7 ^3 c2 y8 _
  663. JSR Music_Show
    + S- q4 \3 }. z# x6 k6 p
  664. JSR Time_Show
    9 `! v# U( p7 x! s6 F
  665. JSR Music_State_Show) E8 o. g. ~% [  o# U
  666. JSR Time_Delay( l+ i* A5 S7 K
  667. 4 K6 d9 W- I7 U; _, v" S0 x" N
  668. LDA #$01
    : C) M$ W  u' @# s* t4 c* }  [  j
  669. STA <Music_Stop_State" U0 a1 R0 l2 s" _  T8 ]: ]' n
  670. , k# O) |2 n5 c$ Y
  671. LDA #$88/ M$ U5 Z- `' t8 \
  672. STA Screen_Ctrl
    / c" T4 `" g% e* ~4 d: }
  673. STA PPU_CTRL
    & e+ t" w4 ]( i: c! O6 z( ^& O" }

  674. , T) h" T) r; J5 j
  675. JSR Show_Page_Text1 U$ F1 s4 `% \# K7 ^! _

  676. . W1 Q* o9 r0 v5 H4 E: b% N
  677. LDA #$10
    " [: u/ w  Y) W$ p% K
  678. STA <Time_Wait_Cnt
    ) x# T+ s( @# e5 Q

  679. - l- T+ e: {5 i
  680. Wait_Time_Over
    9 p4 i1 F5 Y6 m( `
  681. LDA <Time_Wait_Cnt
    8 X1 Z; H1 |7 g9 w2 {# k, J. J  l
  682. BNE Wait_Time_Over
    7 f# z8 ^+ T1 b
  683. ( K) e( _4 z2 X
  684. JSR Show_Arrow3 P7 _( f8 d' I
  685. LDA #OAM_TEMP_ADDR / $0100
    ) U1 }1 w# t" H0 r" z, Z
  686. STA OAM_DMA
    2 y0 u9 ^# C8 ?$ i8 \
  687. 8 x$ y* T1 C) C" C  i! S
  688. LDA #$1E
    2 v  O8 o* q  D
  689. STA Screen_State9 Z8 W  Z# e5 z1 H7 }7 f
  690. , Z2 {; Y1 {  F3 |0 E8 _
  691. LDX <Music_Item_Cur
    2 ?# [. \7 Q7 I2 w4 t( {* R
  692. LDA <Music_Cur,X
    - Z" v7 Y. s. x/ ~3 Q# Y6 I" u
  693. JSR Sound_Init_Proc
    8 f) T- S5 z' d5 E+ e( p6 v; q

  694. 7 p0 a" G% u$ L. q8 @
  695. CLI
    2 I. C3 w  z! G* \" k
  696. JMP MainLoop' f* M( L, s7 }( j: G8 C8 P: ?
  697. 7 C' v5 T. m2 I1 _
  698. ;==============================4 F8 n, Q( n+ F7 y5 S9 l+ z( K
  699. Time_Delay;延时等待7 t$ r0 I; m# }& T/ q# m. e3 Y
  700. LDA PPU_STATUS
    1 U" n$ ^. s% n  D. |
  701. BPL Time_Delay
    2 A2 @; N' t- E1 @0 g, K( w
  702. RTS
      R  X( z. t4 o+ D

  703. $ f( S+ @4 }. \$ G! W- ]
  704. ;==============================3 U- l& r: {! L8 W. m% [3 ^
  705. OAM_Ram_Init;初始化精灵内存- m' I- f8 S: n) o
  706. LDX #$00
    & w2 B- z- l- m4 v; y
  707. OAM_Ram_Init_Write
    0 o! v7 R1 }5 V( N, ~! a
  708. LDA #$F8
    7 O7 b% Z$ [, F3 N7 }0 b+ p1 t
  709. STA OAM_TEMP_ADDR,X
    $ Z4 P! l+ b5 G% O* |3 g
  710. INX
    ; V: I& P. g: M) \0 |# n
  711. LDA #$F8! V" t$ b. S" B+ a, z0 p% x
  712. STA OAM_TEMP_ADDR,X* [* E$ f+ t& S) Z
  713. INX! }% U* Z0 ]  f( a9 U5 p
  714. LDA #$00
    - O$ d# b& K6 J. w
  715. STA OAM_TEMP_ADDR,X: J) P- K) \$ k* u5 m8 d2 r
  716. INX1 |$ `( F( V! B& w/ r
  717. LDA #$F8' P9 t/ \& K; R' i' E2 }3 d
  718. STA OAM_TEMP_ADDR,X
    3 X7 z/ l6 z8 N
  719. INX
    ( E, s2 J) y* Q7 {
  720. BNE OAM_Ram_Init_Write9 k. {' O' V1 N- e2 i2 q
  721. RTS: L* S+ F7 Z$ P2 H. b' N  l
  722. 0 Z. N- d7 p5 H* o5 J  A' z! e1 T4 I
  723. ;==============================' s. R+ F2 r% v( `) Z
  724. VramClear;初始化图形内存
    ! W  m6 W$ u( `; m; i9 U
  725. LDA #$20, _) i5 n$ e2 D2 U1 q% Y5 Y0 k
  726. STA PPU_ADDRESS
    ! K' |8 S1 s6 N
  727. LDA #$00
    ; a& j5 [% i2 c7 Q/ V% Y/ S9 @: r) u
  728. STA PPU_ADDRESS
    & {& i/ t" h" D
  729. LDA #$00, T5 z% P- u1 g- _- B/ e1 r
  730. LDY #$001 ~7 T4 a0 Q- s' x, W
  731. LDX #$10
    3 M0 v- n3 w( G) k" g
  732. VramClearWrite
    . b* ~8 O  h6 \: f4 }
  733. STA PPU_DATA' G( L# f# \; ~* e/ x3 K1 B
  734. INY: z3 o$ V& u9 d% S. j1 z8 X* M
  735. BNE VramClearWrite& z  L+ D$ Y/ d
  736. DEX
    ; i2 ~! o8 p. p" u# G
  737. BNE VramClearWrite1 F4 R. w& m* U3 Q% z0 ^6 Y
  738. RTS2 b5 a% b. D3 U6 N9 {! k
  739. 5 Z1 T# a- @: O* q, F
  740. ;==================================================
    4 }* m& j0 b) c6 c" \& `4 d2 u8 \7 T
  741. ;设置MMC3图像bank: r- Y# v/ J5 e) w9 q5 _  x4 J' y
  742. Init_MMC3_Chr_Bank, |; I  m6 p4 l+ m
  743. LDX #$05
    ) |7 W5 r; {! o7 u0 Q- b3 W9 q
  744. Init_MMC3_Chr_Bank_Write
    $ ]4 ]8 Q0 F7 m5 d4 `9 n6 G
  745. STX MMC3_BANK_CTRL
    ) P+ \1 F. ~! p/ ?8 }4 I3 @
  746. LDA MMC3_Chr_Bank_Data,X
    6 f4 j9 d% R1 a2 j6 i: r( a1 |  a$ d
  747. STA MMC3_BANK_DATA  P% G! |: O. H- z0 }0 N
  748. DEX
      q( V; Y* L0 Q; V0 j
  749. BPL Init_MMC3_Chr_Bank_Write
    4 h1 M# x' O. N
  750. RTS+ H1 U2 }4 {$ o( T2 Y' i
  751. ;--------------------------------------------------3 x+ L0 Y# o: m$ T  A
  752. MMC3_Chr_Bank_Data
      l( [# ^. V, ]  n0 C2 J- `4 S% \3 S' B5 L
  753. .DB $00,$02,$04,$05,$06,$07; V% R- Q. _, ~, M0 \
  754. 0 H. p  z) l1 l' K+ ]
  755. ;==============================3 b: U* H& x- Z' P& r. |$ q2 ^: o
  756. VramInit;初始化图形内存8 j8 @5 b# G* T* o" e$ H
  757. .IF CHR_RAM_ENABLE
    3 g* P- Q1 Q* Y: _5 s
  758. LDA #CHR_DATA_BANK
    . E+ a& [3 ~" d4 i6 ^7 O6 a6 w/ F" f9 s0 u
  759. JSR Switch_Bank_A000
    , X! j1 E5 A+ w( N- S% X
  760. LDA #LOW(CHR_DATA_ADDR)
    " Q& K) x- F3 v* p* {+ k! m
  761. STA <Data_L& m7 o' U4 ?# a) M9 _- D2 v
  762. LDA #HIGH(CHR_DATA_ADDR)
    4 T) ^  J1 v4 F7 ?" p
  763. STA <Data_H: s  b4 ~% X% x: f# m+ Q  B# C
  764. LDY #$008 W' [& A$ x; y. R" |0 ?
  765. LDX #$201 l" x/ j$ {+ r0 s$ O3 a3 t
  766. LDA #$00
    $ H6 {1 `# y' j# l
  767. STA PPU_ADDRESS
    ' Q5 m6 T7 m$ v/ B% m7 D
  768. STA PPU_ADDRESS& W1 j& S& H/ d. Q5 [) k. t* E
  769. VramInitWrite
      s5 i) _6 W5 m0 v! {. K6 d1 D3 J
  770. LDA [Data_L],Y
    5 o. F& \& r7 [7 m  ?6 K
  771. STA PPU_DATA% a5 A! E- K8 q
  772. INY; t& u8 A0 e7 X. z
  773. BNE VramInitWrite! l; B" Q2 n7 Q! o" M0 }
  774. INC <Data_H2 ~2 n! l) p; P4 S
  775. DEX
    : w1 E' ~. y  c9 }7 k
  776. BNE VramInitWrite/ V. m; S5 G! M% z, Z1 ~; a; L
  777. .ENDIF
    . g% r/ h9 C3 X, E
  778. RTS. i3 s% l* p4 N

  779. * ^" o6 H6 H. w
  780. ;==============================1 y8 L% n: L9 i' ~4 [
  781. ;音乐切换" M: ]- n2 u% [; B
  782. Music_Play_Change5 v3 _0 v( v8 D% O5 W
  783. LDA <Key_Once
    ) m0 W9 R* q( }1 ]& ?4 c9 G8 c
  784. AND #$FF5 Q4 w& B4 M: O4 F, j
  785. BEQ Music_Play_Change_Check+ ?: f3 l- X# m# n4 Z3 j. M
  786. 6 @. U+ x( b2 K2 }0 f
  787. ;禁用音乐条刷新' L* Z7 a8 }& X% V* i. h" c( |! C
  788. LDA <Text_Disable_Flag5 O9 P: R+ [# W
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    : f* R, [8 [8 i. C
  790. STA <Text_Disable_Flag7 o5 @: {+ ?- T* F8 c

  791. ! O+ A0 T3 @( h& e
  792. Music_Play_Change_Check# Y1 u& j' l' d
  793. Music_arrow
    % S' y( _' c2 r, a8 g# n
  794. LDA <Key_Once
    - C( E  y% X% f( X
  795. AND #$0F
    ! _( k2 [1 C# w' V
  796. BEQ Music_Play_Change_End# V+ W* h, y, U2 w, D9 |6 @+ C
  797. JSR Music_Track_Change
    ( m& Y# ]4 l3 z' _
  798. JSR Sound_Reset_Proc5 r% U* U8 ]2 n. T
  799. JSR Music_Show
    2 ], Z* x& k5 B; t- H
  800. Music_Play_Change_End
    + a. U9 Y! K6 X
  801. RTS, E: v5 r5 c% o) b* k! v
  802. # \! C0 s% `  ^4 u( U3 L* c
  803. ;==============================6 @# u4 {! K8 `8 |0 q- k# |* y
  804. ;音乐曲目切换
    ! M# v5 y% H7 P# w1 P
  805. Music_Track_Change2 a2 r# e% `0 Q/ Q; C& \
  806. LDX <Music_Item_Cur
    & l! J, e& g$ r# L: L) w. u2 B
  807. LDA <Music_Cur,X2 e$ @& K. t4 d2 J% g! ^2 R9 [3 M) ?0 V
  808. STA <Music_Last' D, n* k9 @# _  T4 h$ i6 b
  809. Music_Decrease
    ) |- M  N; q- K0 n+ m0 J% ?
  810. LDA <Key_Once' Y5 f" x" z0 y; ]6 l
  811. AND #$42
    8 c# Q& j8 K# o) A. N7 m
  812. BEQ Music_Increase
    , L3 E1 u' X' M) Z* R% j
  813. LDA <Music_Cur,X
    4 h6 F; i3 ]! K  d) T$ D# g
  814. BEQ Music_Increase
    * v( p: S& m5 ?( H0 p- ]7 y
  815. DEC <Music_Cur,X
    & K7 R% P- k# S$ O/ j4 L& e
  816. Music_Increase
    % M0 V1 e, A/ c5 j5 W
  817. LDA <Key_Once7 x+ y4 {* c3 t( b
  818. AND #$819 C& B8 K4 L( Y
  819. BEQ Music_Decrease_10( ^8 K& s- _# w3 F* Q
  820. JSR Set_Sound_Total
    . c/ y. A& n; B! e4 H$ j# K
  821. LDA <Music_Cur,X. X* v# b. c. I) [% P. y
  822. CMP Music_Total( X3 x& M/ P: c* n  ~# X
  823. BCS * + 4+ U9 u7 S0 R4 g/ p
  824. INC <Music_Cur,X
    / B1 |0 o6 [# |$ W: K
  825. Music_Decrease_10
    + [. c  x; y: R7 a2 L; L- ~* e
  826. LDA <Key_Once
    3 n8 `& h3 b/ t% M5 {
  827. CMP #$04
    % n, k+ h, P$ w! U) G
  828. BNE Music_Increase_10
    6 B. S: u- ?+ p4 O
  829. LDA <Music_Cur,X1 ?" v2 B) l5 Y0 P7 a
  830. CMP #10
    . v+ P) E9 c, D1 H+ h& N
  831. BCC Music_Start_Song_Min1 h; m7 ]& H* |4 j% a: }
  832. LDA <Music_Cur,X% W4 d( g, O, v) P8 i
  833. SEC8 ?4 P) c+ K" i8 o0 L* b
  834. SBC #10) I( v8 F  @0 y9 X7 B
  835. STA <Music_Cur,X
    - S' E8 {. [, x, `  U& R5 v0 K
  836. LDA #$00% R) \; E7 w. l2 J+ |, L" u
  837. BEQ Music_Increase_103 f8 A0 S( e  l- _/ x' O
  838. Music_Start_Song_Min5 y# K0 Z& H/ ^
  839. LDA #$00
    5 S' @3 S; g) h% u
  840. STA <Music_Cur,X$ E3 |' C5 R7 X9 V0 z" {, T
  841. Music_Increase_10$ A  N' k8 D, Y
  842. LDA <Key_Once
    + F0 I2 e8 i" @1 l$ Q5 y
  843. CMP #$08( p; V3 }! U$ J- ~6 {- b' P
  844. BNE Music_Track_Change_End
    + g- c; Q5 ~" R6 z" e: I: f
  845. LDA <Music_Cur,X7 e" d" {, h. L1 D9 r
  846. CLC
    + A5 @4 b6 Q! E/ Q1 M/ p
  847. ADC #107 l( ?) e. o3 V- g& i! e
  848. CMP Music_Total
    / a; f6 u, X1 j
  849. BCS Music_Start_Song_Max! D6 g& l+ s. A$ Q% H* p. u
  850. STA <Music_Cur,X
    , G  l3 N! W' w- g% B5 G7 o6 A' v
  851. LDA #00
    6 P/ W0 i1 h. x+ V" `  h' m
  852. BEQ Music_Track_Change_End$ U) `' k$ h* E% U5 W) D: w" L
  853. Music_Start_Song_Max
    7 i: g! v# W( ?2 q* f+ k
  854. LDA Music_Total
    3 H0 V% Y- l( }, I. t: ^
  855. STA <Music_Cur,X6 E; k$ _8 a; G4 r1 U; {
  856. Music_Track_Change_End
    % f+ p) |9 {! \& y0 |, I
  857. RTS
    ) T7 f  o6 x% R. j0 t9 V# ?
  858. ; T$ g$ r0 i6 u
  859. ;==============================1 g/ K! Q; R# y8 u! ]$ J( S$ t
  860. ;按键处理
    9 e1 x( [. ?4 E
  861. Key_Proc
    - F& H6 S- g  N( z: d
  862. JSR Key_Scan$ p7 n" Z: N7 ~% ?4 w5 E) C
  863. LDA <Key_Keep
    - B% J7 t: \" c! R# h% O
  864. STA <Key_Temp
    9 s# s3 |4 n: ^
  865. JSR Key_Scan) X- |8 w0 R/ h9 `- n# @5 {
  866. LDA <Key_Keep
    ) f8 X- _; B  p0 t6 Z& t/ c4 B' i
  867. CMP <Key_Temp
    ' @7 i" O6 e* {4 _% F+ Z
  868. BEQ Key_Get_Once( U8 g; `1 w0 F
  869. LDA <Key_Kemp  z- r' F  M3 u
  870. STA <Key_Keep
    3 _3 q9 ]% R" O. T" z5 l
  871. Key_Get_Once
    8 T3 S6 C/ W' \3 _4 l
  872. TAY
    1 g1 x; P0 ~3 {6 @% G0 {) v
  873. EOR Key_Kemp& Z2 d' Q3 M+ \3 g+ x5 }
  874. AND <Key_Keep
      x: ^+ H, \! \: r, _; L  J1 w; O
  875. STA <Key_Once
    % {* c( D8 x5 m/ W5 Y
  876. STY <Key_Kemp
    ! N  }. `! a6 g+ i; N
  877. RTS
    . X0 D# L. ]- \0 `$ d  G6 j
  878. ;------------------------------
    3 `+ W& U4 e+ }# j, e  v- Z
  879. ;按键扫描0 N: }" |2 ?- Y! d* h
  880. Key_Scan! |. q* j2 I) L" w) W
  881. LDX #$01
    & h) F8 ]$ f6 s) T# J% m
  882. STX JOY1_FRAME, ^4 v" X6 H$ \9 f: v- z+ y
  883. DEX4 `) x3 A& @& @! q/ y) l8 w
  884. STX JOY1_FRAME
    2 g1 Y! V2 k8 m! X: m6 ^; O9 |3 a" \+ o
  885. LDX #$08: w, S1 S; J0 C+ L! H
  886. Key_Value" r8 m, z2 G' Y- n  O
  887. LDA JOY1_FRAME
    2 {, J( a7 D: [- z* f+ b8 F
  888. STA <Key_Getv& W: h4 K- f* D$ ^
  889. LSR A+ A" p' e& @. T% M
  890. ORA <Key_Getv9 g% k- l( C" O( d
  891. LSR A# P* V( C% K& q5 p5 P5 C
  892. ROL <Key_Keep* d7 T% c2 d% _+ Q) k
  893. DEX, C* I9 X$ H5 o
  894. BNE Key_Value
    : t" z! U! k( i% o  [" A* j2 r
  895. RTS1 d$ x5 ~( {3 L: f

  896. 4 k( k% V( |# ]
  897. ;==============================
    : T0 j3 U( w7 H& x: y
  898. .IF SOUND_BAR_SHOW_ENABLE8 T, w6 x" k: u3 x. `. ]; v
  899. ;音乐条显示
    ) d) V% [5 @1 u3 Q7 G4 r& a
  900. Music_Vision
    ' H# t1 ~. K$ @' j' |; N
  901. LDA <Text_Disable_Flag  E7 Z) h  m- ~, O+ V+ \
  902. AND #TEXT_DISABLE_ITEM1 _8 Z* w5 B/ y: V
  903. BNE Music_Vision_End' F& @( s0 W+ X( p  A, t  r3 P' H/ O
  904. AND #TEXT_DISABLE_BAR# v" s. w; `# Z4 Q2 o/ a+ F6 p
  905. BNE Music_Vision_Set
    " S% G6 b7 q+ C7 J
  906. LDX PPU_Cur
    4 a2 I0 s. w' s! S/ y$ a7 z
  907. JSR Music_Animation
    : Y" |4 j) G6 h+ b) f- u0 {2 T
  908. STX PPU_Cur
    . w0 l2 U$ X8 K# N! p/ C6 D
  909. Music_Vision_Set
    $ Z$ \3 l( ^! ]/ ^+ p: H
  910. LDA <Text_Disable_Flag% w9 X: E) G! N9 r% o9 C8 o8 X
  911. AND #TEXT_DISABLE_BAR ^ $FF0 P. t; b0 O% O: B0 I5 n% x
  912. STA <Text_Disable_Flag
    8 r* ]  I. I4 W1 I8 G
  913. Music_Vision_End0 c! C0 J9 G) f. M
  914. RTS
    & M! a5 Z  l: `$ T
  915. ;------------------------------
    0 b' E" j' r8 i, y
  916. ;音乐条显示处理8 @( b2 M/ M) v) |
  917. Music_Animation0 Q1 l1 p2 }& F2 t( ?; n  u
  918. LDA #PPU_MODE_CNT_LINE
    / t2 O) q$ Z- H6 u- x5 J' H6 A
  919. STA PPU_Addr,X& S+ S3 S: I" v( E
  920. INX
    2 E- g3 [3 q5 P) i5 V2 t# b
  921. LDA #HIGH(Sound_Bar_Pos)) G( U5 i7 n  u6 ^  H  L7 o
  922. STA PPU_Addr,X
    8 V; R/ D/ S: f0 F5 W, Y
  923. INX" |' @& L3 L6 }3 d
  924. LDA #LOW(Sound_Bar_Pos)
    7 @- G" X2 a+ r& P- ^. v
  925. STA PPU_Addr,X
    : Z2 X# Y& z8 y2 a& e5 r
  926. INX
    * D7 G% }" r& x! `& |
  927. LDA #$086 u/ H& _6 O/ v2 O4 S: f2 @# y
  928. STA PPU_Addr,X
    7 f# [1 S- y7 \5 s- B6 ^: h. a
  929. INX6 f5 r5 P$ }, ~4 I& l- h7 m- I
  930. LDA Sound_Bar8 W+ G- |/ l$ L5 Z: m3 h0 g# e
  931. JSR Volume_Convert
    - U) |) g0 M6 w7 z4 L2 G* S8 o
  932. " N) _& s: g  d+ L0 q
  933. JSR Volume_Set_Cnt
    / g; c# l- @5 Z4 _# l) T
  934. LDA Sound_Bar+$4
    ; J2 I8 P4 F3 W6 b; K
  935. JSR Volume_Convert4 w  {1 u9 [1 a. L7 W
  936. 2 d7 \* M: I$ Y( G7 z: r
  937. JSR Volume_Set_Cnt
    ) E5 p; T2 \9 o; o+ S
  938. LDA Sound_Bar+$8/ [  I. c* t0 ]  |/ Y6 L2 ~
  939. JSR Volume_Convert6 w; e. A4 r4 F& k* U

  940. ) S. U9 e7 o% ?  Z& T
  941. JSR Volume_Set_Cnt* }. {3 y% F  Z6 ?0 ?# Q8 c. t  f( v
  942. LDA Sound_Bar+$C  x6 i' M6 r' O* U8 q0 S
  943. JSR Volume_Convert
      A: k; v. f9 j7 q: {# A" Y; x
  944. ; F. Z# y, {  j" g  Z
  945. JSR Volume_Set_Cnt
    % u+ L  k. S6 o" h3 _- u! P; t+ |
  946. 8 h: C, q% X- T$ g
  947. LDY #$10* S- u! ~0 X& D
  948. LDA APU_STATUS
    . j7 O* V" Q1 W0 Z. S+ x
  949. AND #$10
      s6 r2 T" _2 @/ s
  950. BNE Volume_Count) F  N& N6 U: g8 K) ~
  951. LDY #$00
    ) ^- h1 G6 F" a0 z% b% n
  952. BEQ Volume_Count3 Z2 S; ?& |4 Z* v& x! m0 t# C# m

  953. % G9 x' n# w0 ^2 W+ ^; `
  954. ;------------------------------9 z; h: T5 C- G, E: r
  955. ;音乐条处理
    + }) ?" {* e5 L2 p
  956. Volume_Convert7 v( g; p/ q7 I9 Z) k
  957. AND #$0F7 p! ?8 B; m& Y3 q# t2 s& E. V
  958. TAY$ }* a$ Z. ]3 a: I6 Q8 h4 m* h
  959. Volume_Count
    2 U" ~, z+ N3 c3 T9 I6 l
  960. LDA #$08" K; T  @6 k. p0 k
  961. STA Sound_Bar_Cnt
    : C5 F& \( ]0 l: N9 }6 l0 D
  962. Volume_FILL( X0 C$ {# Q3 Z# E) F& O' B# ~
  963. DEY5 ?) u, D3 Y0 h) V$ ]/ o2 Z
  964. BEQ Volume_Half
    1 E; r6 |1 b- k1 h( f5 z: ~
  965. BMI Volume_Empty% U  k8 n# `1 R
  966. DEY
    , c, [* q8 @" G+ U" w7 e+ Q
  967. Volume_Full- A; X: p# n+ J: K
  968. LDA #$16! [+ M( A' ]7 H9 ~- j
  969. BNE Volume_PPU
    / M2 d. ?) ]( o/ |6 U  C
  970. Volume_Half
    " @4 K1 F/ H& C  z
  971. LDA #$15
    ' _0 o5 i9 X0 S7 P0 i! _. T
  972. BNE Volume_PPU
    1 F- R! M5 L) \9 Y& _
  973. Volume_Empty
    6 S1 t! W/ k1 u" N, h
  974. LDA #$14' ^: n7 p3 V. q( o
  975. Volume_PPU
    4 R2 ^) m) L" k4 G
  976. STA PPU_Addr,X" o" {4 H  G6 ]5 F9 h9 e  z  u0 `
  977. INX, q7 j5 t/ Z$ v; L& q( x
  978. DEC Sound_Bar_Cnt. |' E2 j) @& y' E
  979. BNE Volume_FILL
    6 S3 S1 |) Y! o0 z
  980. RTS
    0 D5 s2 g0 d, j4 |, T

  981. ! ^) o; \5 {% z( G$ L/ y& E, w
  982. Volume_Set_Cnt- a% ~! `2 r+ a" J. V7 v8 T
  983. LDA #PPU_MODE_CNT_LINE_NEXT* u) ]4 y1 D, {/ S0 G
  984. STA PPU_Addr,X
    ' k$ `1 {- i% X
  985. INX
    & H; X" }% O) [, D- u
  986. LDA #$08
    & B5 N/ Y' [) E1 y, C* {/ E
  987. STA PPU_Addr,X/ N- g" t8 V" t) }" v( T
  988. INX; f# p3 v0 O: [: a
  989. RTS
    . N* L9 B! v6 M# i& k( `. a- Y
  990. % v+ ^; c. ~: d% |5 {! k
  991. .ENDIF
    , C& E" |8 u6 R/ ]/ x3 ]; @# C) R
  992. 0 ~6 F) S+ G1 `+ B  j/ Z( j0 a
  993. ;==============================
    : \+ s. t4 [' H, ?- [3 s0 f3 @% Q# h9 T
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入6 {- H  o+ E4 v' Q: m# d! l# j
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式
    - F  \1 Z5 s2 F- p& D; i
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除) n* T! {' p, C6 K
  997. ;------------------------------+ `  [; ?, @% e1 @5 o) J( Z
  998. ;PPU处理9 H8 A; K5 Y# X4 c% @5 y4 |
  999. PPU_Proc
    ! @$ {" E* i$ |! b  T
  1000. LDX PPU_Cur1 D/ G) c# G& }* K3 ^
  1001. LDA #$003 |1 n6 v# M; ^* X
  1002. STA PPU_Cur
    5 U6 h$ U! w( \
  1003. STA PPU_Addr,X
    . D- U* _& _9 a. E' q
  1004. LDA PPU_Addr  ^$ o! }$ ~7 o# `$ d5 J& u$ F
  1005. BNE PPU_Proc_Beg
    1 g) V7 N: N: c, O
  1006. PPU_Proc_Ret
    0 s1 E5 h6 U4 j
  1007. RTS
    / W- l; L& [/ G. G* h
  1008. 6 M. p, N# v) M3 |" a4 z
  1009. ;------------------------------
    " Y+ m; m- {! l
  1010. PPU_Mode_Return_Cnt  ;转下行模式; I" r: d) e& H+ d* n
  1011. INX0 ]+ c# v" n; g/ G5 _3 Q# F( _
  1012. LDA PPU_Addr_L
    & F- m  \6 J9 }/ a) \! s. z
  1013. CLC; ~, e0 d1 `+ o: j7 o
  1014. ADC #$20
    ! u; q4 p( ^% I9 K8 X. C  a
  1015. STA PPU_Addr_L
    . v- B* f( w$ r" W( k. Q* ]: I
  1016. BCC PPU_Mode_Return_Cnt_End9 K- v7 G/ b& U, K8 n
  1017. INC PPU_Addr_H, z6 v  B8 [# q. M3 U
  1018. PPU_Mode_Return_Cnt_End9 o7 {* q- B8 r( e$ y
  1019. LDA PPU_Addr_H
    ) I6 L& E+ ]' t! e$ |5 p) `
  1020. STA PPU_ADDRESS
    + o7 ?3 x/ L8 v' M( M
  1021. LDA PPU_Addr_L
    + E# l3 s# d5 m" Z* z
  1022. STA PPU_ADDRESS8 @8 p. r! ^3 M! B
  1023. LDA PPU_Addr,X
    5 Z8 s# v2 r- c9 n
  1024. TAY
    * d0 W( M6 _9 f. D- \3 n
  1025. PPU_Mode_Return_Cnt_Write
    " T  d2 G% v$ Y* S  h
  1026. INX
    / w; ]' u' e2 i7 G$ L& d. v7 s
  1027. LDA PPU_Addr,X; R% R/ ]8 s5 b' d. }
  1028. STA PPU_DATA
    ' P* O* H5 H6 S( \; F2 Y) E5 O
  1029. DEY
    . [& ^, Q" p, E, |) A4 E& i/ N
  1030. BNE PPU_Mode_Return_Cnt_Write! R! y5 H8 Q' U9 n& r0 Q& B
  1031. JMP PPU_Proc_End
    $ j( d; W/ M$ s0 R3 _

  1032. + v7 l& B1 P; o+ b4 T& A
  1033. ;------------------------------
    . w/ B5 H0 T* |8 I
  1034. PPU_Proc_Beg  ;处理开始
    ! B( b3 F' h! D$ @8 s3 n- H' W
  1035. LDX #$00! ^( c2 U" L0 O. A- P3 L2 h8 ]
  1036. STX PPU_MASK
    . J4 m6 {" S, X; @6 P4 C+ R" S9 r
  1037. ;------------------------------6 c! f" R& i5 J( X, ^
  1038. PPU_Mode_Select  ;模式选择
    0 q, C* H8 h# ]. {# y# U
  1039. LDA PPU_Addr,X
    ( h9 X/ N3 E! p$ N* ~6 O; \
  1040. CMP #PPU_MODE_CNT_CLEAR( D& ~' \, L5 p5 L& w# P
  1041. BEQ PPU_Proc_Clear1 p9 l2 A' H$ H9 ?
  1042. CMP #PPU_MODE_CNT_LINE! u& y% m& ^& U4 D
  1043. BEQ PPU_Proc_Cnt_Line$ [4 p. i# }! h" \+ Q" v5 y
  1044. CMP #PPU_MODE_CNT_LINE_NEXT
    , y. K9 T0 r. X
  1045. BEQ PPU_Mode_Return_Cnt: B: z- v+ N1 m$ F
  1046. JMP PPU_Proc_End_Write
    2 A4 M$ m  P4 d' t
  1047. ;------------------------------
    . i" G0 B, H7 R* Y+ S
  1048. PPU_Proc_End  ;单行写入结束0 H! n# _8 p6 m9 O9 z, i
  1049. INX! C6 `2 L8 }4 t! D1 i
  1050. LDA PPU_Addr,X; Q" u4 T9 z8 r) L
  1051. BNE PPU_Mode_Select
    , m; m. c. K3 r
  1052. STA PPU_Addr3 E6 _: c6 L: R/ m8 ~+ s
  1053. JSR Update_Palette_Color
    ( S' V- A- C+ C) o2 E; b- w: G
  1054. 6 f3 Q& I8 ]1 J( R" D# i! ^
  1055. PPU_Proc_End_Write
    ' o5 W( O, C  T: h
  1056. LDA #$00, f3 X# q+ ^5 j. v5 U- C- @# {& S/ }
  1057. STA PPU_ADDRESS
    3 Z" O) r( \( d& U6 @0 c' [' N
  1058. STA PPU_ADDRESS. ?( G. V" }: I' y3 m# @* x
  1059. LDA <Text_Disable_Flag
    3 {5 c$ x2 S: [2 B0 Z' s
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF( y2 s" |0 Q3 x4 a: T
  1061. STA <Text_Disable_Flag) b% `  }9 D8 X# p
  1062. LDA #Scroll_X
    ) t# Q5 j; P' \0 Y* E. v! ]
  1063. STA PPU_SCROLL$ s7 A! z! j! D0 Y8 \9 I2 q
  1064. LDA #Scroll_Y
    & w8 E, R+ s6 y4 N: C" ?! n. V4 u
  1065. STA PPU_SCROLL  ]& E. G2 o0 B+ q$ l4 d
  1066. LDA Screen_State
    9 s. u; ~9 j8 [0 Q! N9 Y9 t* P6 B
  1067. STA PPU_MASK
    5 V6 J1 r9 m9 C8 b( K2 p9 o0 H7 {7 ?7 H* f
  1068. RTS1 v* U8 u2 l4 t' q% h2 s/ h

  1069. ! |8 W# R; c/ j
  1070. PPU_Proc_Clear5 T7 e3 o  D( r+ W( B
  1071. INX5 I7 I7 ^4 G  D' [
  1072. LDA PPU_Addr,X
    $ B8 @( u9 y! ]- Z& R
  1073. STA PPU_ADDRESS) T6 N, H, `: Y1 ?8 F0 j) q7 Y9 W
  1074. INX
    4 i5 a3 O4 ^! |! f3 l( ~
  1075. LDA PPU_Addr,X. P8 Z3 z* J9 A* s2 e# P
  1076. STA PPU_ADDRESS) w# n( D9 L/ C" c1 |
  1077. INX4 p' N. \) W4 e, P9 q; f
  1078. LDY PPU_Addr,X
    1 U8 x' g3 U, o
  1079. LDA #$00% Z: q9 q. T3 s7 ?3 T
  1080. PPU_Proc_Clear_Write
    0 e- d, ]/ k1 K( o6 D/ X
  1081. STA PPU_DATA
    % F  [8 ^* |! s" E6 P( }9 b
  1082. DEY( s( r4 c& e5 f7 Z8 f* g! y* R
  1083. BNE PPU_Proc_Clear_Write& o! I  k+ W3 {' N  N) u2 B
  1084. JMP PPU_Proc_End
    $ [$ x) r( j: W' Q& r

  1085. " F; P. ^2 `2 ^" {% ^
  1086. PPU_Proc_Cnt_Line7 F' {! E7 u& n: m# i9 a  y
  1087. INX
    / u5 w% I# [4 ~4 o, n
  1088. LDA PPU_Addr,X5 Z- T7 f9 k; f
  1089. STA PPU_Addr_H0 v1 z7 p: W6 p) B
  1090. STA PPU_ADDRESS
    " \$ V# ^  V8 p/ Y3 K
  1091. INX
    0 }) c$ q( h2 ^$ |/ Q+ k# z- B
  1092. LDA PPU_Addr,X; c, `$ ?0 Y! n( c9 v4 D
  1093. STA PPU_Addr_L
    , {) a! z; C  {# A8 T$ H* C
  1094. STA PPU_ADDRESS% h+ Z) q- a' v2 o
  1095. INX+ t  R) h. C, h7 ]/ m+ O
  1096. LDY PPU_Addr,X! E/ p$ v, |5 A0 t' F% \- {
  1097. PPU_Proc_Cnt_Line_Write
    7 J; s* @) o$ |
  1098. INX  H% Y& J% f! y1 z8 O( l: g, _$ F
  1099. LDA PPU_Addr,X( g3 p4 f: n% c: X+ }: D; g
  1100. STA PPU_DATA
    " I; ?; a+ D5 }& {& C9 L$ ]
  1101. DEY
    * R* u7 V: \+ Y: U
  1102. BNE PPU_Proc_Cnt_Line_Write
    - I0 D# T' ^# _6 v8 P* N+ T8 y
  1103. JMP PPU_Proc_End
    + q% u' z# C; R2 h7 m7 q& x, F
  1104. 9 t# Y% C8 y7 k6 r
  1105. ;==============================* F: L! N7 a+ L* ]
  1106. HEX_To_Dec;十六进制转十进制3 _% D6 B: [) |2 r+ q
  1107. STA <HEX_Data8 s% ?, L& F4 ^' k- v$ R
  1108. PHA# V0 m0 J+ v. z( {9 }
  1109. TXA7 s7 _: s$ G2 i( p+ O
  1110. PHA
    * O- r$ @/ h- Z) F3 E' K1 P9 S
  1111. LDX #$00
    ' D- ^4 m6 K0 z; N/ m+ J  t" L' Q
  1112. LDA #$001 j: s$ L5 a; O  t- p& l5 W
  1113. HEX_Cln9 j+ [' d" W+ r( Q0 q: M
  1114. STA <DEC_H,X- [+ \6 x# _9 q( k% X, c
  1115. INX
    8 n7 o: K4 K! M
  1116. CPX #$03
    6 y; y8 u2 Y$ ~) }3 m" h3 P- ?4 v
  1117. BCC HEX_Cln
    6 U9 Y1 j- x4 C# r0 H! f4 W) O
  1118. LDA <HEX_Data
    2 [1 g0 U9 a" f% c: R$ Q6 g
  1119. ;------------------------------. J. A8 [. a& n% j/ g5 l6 k7 K" f7 H
  1120. HEX_100
    8 O3 l+ l# ~% h" U: g
  1121. CMP #100
    & f1 n5 H0 \( m* j) ?2 t
  1122. BCC HEX_10
    1 P8 E5 W; |% x* E# W# O4 `8 {/ B- A
  1123. SEC/ P- z9 e$ l' K0 T, j
  1124. SBC #100
    6 s+ D" x- @+ P' s
  1125. INC <DEC_H
    * g. d( u! t) W3 {! ~
  1126. BNE HEX_1009 h% o& n2 T; ]% g6 W: k, F9 j$ F
  1127. ;------------------------------
    ! `5 m# j" F# r+ ~9 ]6 j2 }. |, V% I) E
  1128. HEX_10
    # M/ D1 V" \# n! _- z3 T3 U+ y
  1129. CMP #10
    $ x8 o# a# O4 q& c1 s
  1130. BCC HEX_1. ^+ \( w. U1 z* W+ T9 z( l9 [
  1131. SEC
    ) n# B' \" w* c' }$ `- O5 `1 N+ b/ E
  1132. SBC #10
    7 r# G3 o( X3 Q9 f) L) M6 p% ^2 u! y
  1133. INC <DEC_T$ H5 m4 o) ^2 V/ ?
  1134. BNE HEX_10
    6 H  L, G# T7 L: n0 Y, E4 D
  1135. ;------------------------------8 P8 S: g- k) u' H4 S
  1136. HEX_1+ H. T  U! j& c* ]2 _# [+ E! X- ?& G
  1137. STA <DEC_L
    ( e% P  f* k2 c1 p9 |1 I- ]
  1138. PLA7 h% i3 J2 Z9 o- R- }
  1139. TAX3 S5 e) S" b! e3 b6 S+ n
  1140. PLA7 D# A1 Q9 n, u
  1141. RTS
    , O0 g+ f- E8 w! ]! m: ~# f9 o6 h3 T, T' J

  1142. & d; k" e8 n, X8 [5 ~8 g* F
  1143. ;==============================$ f  D- I- F9 Z6 k/ Y' K
  1144. ;音乐曲目显示
    # l; ~/ x- A- V
  1145. Music_Show
    % l( ^. Y( |3 f, U3 L8 }4 k
  1146. LDX <Music_Item_Cur3 ?9 D% n/ T0 j  Y6 k6 a
  1147. LDA <Music_Cur,X7 S; ^  \: @% n- `3 ~! G! Z- D
  1148. CLC
      |; A  B- x: a2 Y* n
  1149. ADC #$010 A! J+ p1 z- j+ a+ q, m$ k# U
  1150. JSR HEX_To_Dec# n0 i! y3 s( u; F6 H" c
  1151. LDX PPU_Cur
    8 |0 C5 ^: Z4 L* ]8 P: C: b7 _" u
  1152. LDA #PPU_MODE_CNT_LINE
    . R4 J/ C; j5 v3 S+ V: K/ y
  1153. STA PPU_Addr,X& _* h4 k: P/ T+ W$ O, \, `0 k9 q* R
  1154. INX
      H8 J9 j! V3 i5 Q9 A" I: ?
  1155. LDA #HIGH(Play_Index_Pos)3 D3 ?/ ~9 W( O# N3 R! C0 n& u
  1156. STA PPU_Addr,X
    1 H3 p& o: o7 c3 Q8 w
  1157. INX
    ' ]  Z" U4 A* S7 ~0 \
  1158. LDA #LOW(Play_Index_Pos)
    ( z0 i9 |4 M/ b/ }# ^
  1159. STA PPU_Addr,X
    6 R( S8 v$ f. m' I* ]  o6 Q
  1160. INX$ N+ r& C3 M. }2 R$ e) h6 ^
  1161. * q- f* L  q# f5 x: T
  1162. LDA #$07: |* f. s! ~1 {+ X$ |' I
  1163. BNE Music_Show_Length
    4 M% j5 _, L+ j* `+ e, q
  1164. 9 Q5 x' O; B, J7 v4 k
  1165. Music_Show_Length
    ) v" a+ {; j" y) w5 z
  1166. STA PPU_Addr,X2 f8 d9 b+ \; j- y, o# n
  1167. INX4 g! h0 C$ `, _+ I
  1168. ; v$ G7 j' L3 {
  1169. LDA <DEC_H% G5 X, e/ h, T. i/ K. Y
  1170. ORA #'0'
    5 r+ |4 v. Z% C: ~  d( W* J# [: m
  1171. STA PPU_Addr,X
      f  c! [: v8 \; D3 j! t
  1172. INX* k9 Q. D# i& s, e- F  `) C: J

  1173. * w6 A' ^" p& l8 V3 D& ?
  1174. LDA <DEC_T
    ' e; v$ M! s  z8 Z: F
  1175. ORA #'0'
    * N1 A8 ^9 b9 |: z5 s, ~
  1176. STA PPU_Addr,X' A' U2 K. f- Y+ G
  1177. INX( h6 T  k5 D- f) L8 `. k+ u

  1178. : r+ n4 b  [- n$ L! G( c
  1179. LDA <DEC_L
    ' Y& @: k4 I! R9 c8 R
  1180. ORA #'0'
    " p0 M# M" |5 i# {, C* E0 I4 d0 e
  1181. STA PPU_Addr,X
    & T! f# A' [& q! W! h0 R2 ~1 d
  1182. INX% D. A7 T) T/ z: h* `
  1183. . x; l' E! z# H$ }9 M  U
  1184. LDA #'/'. q6 T: ~6 |4 m' Y. B6 r
  1185. STA PPU_Addr,X' d& [4 E% k1 B3 Y- J
  1186. INX8 k; A( {' @" y5 c+ L  T# U$ @
  1187. Music_Show_Total
    - g' g/ t# }# X& r
  1188. LDA Music_Total+ |% P8 H* s) S7 ~& T9 J- g  N
  1189. CLC1 @$ L5 x% T6 C
  1190. ADC #$01
    6 G# }7 W! h+ ^% q6 J
  1191. JSR HEX_To_Dec
    4 X' h2 c! y$ J. e# E* c# t+ _- }
  1192. 6 ^( d) U% r) ?* G
  1193. LDA <DEC_H* }% j; o  \! T* a" b( z6 C+ f; k
  1194. ORA #'0'* ~. U0 s# Z# o& ^3 A& M$ ~
  1195. STA PPU_Addr,X
    ; }7 E$ c) h+ Z7 j- {7 {% ~
  1196. INX8 w2 I. k, n! Z! b
  1197. 6 `$ E0 {; v  G7 F/ Q
  1198. LDA <DEC_T& _5 d- _9 D4 T/ K
  1199. ORA #'0'# J9 E, V) G2 k7 Z3 o% r
  1200. STA PPU_Addr,X
    . `1 ~; g$ o, K: h) p8 |
  1201. INX
    6 a) @) |" C* x2 ?7 M2 u: R
  1202. ' V/ Y' e' x  A2 W6 N6 P; F5 L& W5 F& m
  1203. LDA <DEC_L
    4 v9 c3 j- ~7 O. R* d2 D" ^
  1204. ORA #'0'. z) q5 {- k0 I+ w* g* E8 J
  1205. STA PPU_Addr,X4 Y$ N' x0 V1 z* h6 {
  1206. INX
    . N, F+ g' H, q' i

  1207. * @4 Z% Y3 u0 U: {6 v3 Q
  1208. STX PPU_Cur5 i$ |  X& \- O  H
  1209. Music_Show_End
    $ K# W+ G  y  m7 K, A' U! V3 D
  1210. RTS1 `  G. _9 Y% e7 D  ^! a
  1211. : P# x, O+ C# I& i8 K  b
  1212. ;==============================. l# W# Q. h) w: ~( e' r2 s. \8 v& H. v
  1213. Time_Show;播放时间显示
    % f( @" T& o" i4 r# S9 J- ]
  1214. LDA <Text_Disable_Flag5 U& d3 [' q" Z2 A. J9 \9 ~9 t
  1215. AND #TEXT_DISABLE_ITEM
    8 p0 }/ Q4 I, Q; v/ F% J3 ?
  1216. BNE Time_Show_End
    " M; t4 X# l# X
  1217. AND #TEXT_DISABLE_TIME2 d0 B" h+ K" f7 N) Z  s
  1218. BNE Time_Show_Enable
    ) b$ P8 {0 @" w/ G2 Q' l

  1219. 4 N  P+ e+ ?* B2 z* W8 G' `8 L
  1220. LDX PPU_Cur
    : O! h* u* e; T/ ?9 a, F* Y
  1221. LDA #PPU_MODE_CNT_LINE& l8 l2 }- p. p' z. a9 Y
  1222. STA PPU_Addr,X' R; k; j5 x" I& _
  1223. INX9 q/ ^) I% Y# H9 V% j1 c5 E7 I( c+ `
  1224. LDA #HIGH(Play_Time_Pos)  }0 h3 S" X+ A2 S( W4 s9 b3 V
  1225. STA PPU_Addr,X
    ( w# w1 C. G$ u+ l. l
  1226. INX
    2 E8 b3 i9 r8 s4 i$ j* \
  1227. LDA #LOW(Play_Time_Pos)$ \. i+ j* ]! o! k  H
  1228. STA PPU_Addr,X
    9 i6 f8 C8 b' a0 D
  1229. INX1 `% L7 h' K3 q8 I# J, W; e
  1230. LDA #$08
    6 l, o2 Y" g) e( K
  1231. STA PPU_Addr,X. z: T2 n" I0 |0 x9 r2 T
  1232. INX
    , _6 J6 R7 x: c) M7 x4 [
  1233. Time_Show_H* u+ }, _2 p4 {+ x
  1234. LDA <Time_H# F- ~1 Q5 U! H- H
  1235. JSR HEX_To_Dec3 u( O' |" C8 f& M. V9 @$ ]$ ]
  1236. JSR Time_Digit0 q7 N0 |9 ]4 y& ?& Z# r
  1237. LDA #':'
    ; Z9 z9 ~/ P; z  r7 C* s2 g% v$ @6 q9 _
  1238. STA PPU_Addr,X
    , r8 w. X, [% u5 i1 B% r  P5 O! C- o2 V1 u
  1239. INX: [" @) ?0 X% ]8 ~+ y1 ?+ m8 E
  1240. Time_Show_M7 B  w# P" X. [* W
  1241. LDA <Time_M/ O, b: F! K( Q. V& `( e9 t
  1242. JSR HEX_To_Dec4 T1 T( y( S3 L. M
  1243. JSR Time_Digit  \% @1 C  p3 P# q2 |6 A; d" }) c
  1244. LDA #':'
    3 l. ]1 v& p" n" y" x2 L! H% ~9 s
  1245. STA PPU_Addr,X; k% Y5 H3 ?2 R* h# U, y
  1246. INX6 L( t4 U" `2 `- t# S/ _* _* i
  1247. Time_Show_S
    : l, z  {" R# \  f; v( ~$ \6 `1 d
  1248. LDA <Time_S
    % Z% u- q1 ^* Z; z
  1249. JSR HEX_To_Dec
    # L. o1 t/ [& N& \' g" W( M: W
  1250. JSR Time_Digit; @( |) I. o$ Q
  1251. STX PPU_Cur
    0 `5 x1 D2 N$ z' c/ \) u0 \
  1252. Time_Show_Enable6 o  y; n4 x  X! x
  1253. LDA <Text_Disable_Flag
    " K, y/ X7 P# Y% V! x
  1254. AND #TEXT_DISABLE_TIME ^ $FF
    . t8 o4 u/ d/ E. R% t
  1255. STA <Text_Disable_Flag
    4 g  l1 j% D5 V, j2 y
  1256. Time_Show_End
    - J: F5 W% u8 u0 P0 C4 K* a
  1257. RTS
    4 t8 o; B4 C1 J, `) S0 h3 a

  1258. 5 g+ K' }( q1 T0 l$ n) V  x
  1259. Time_Digit
    " z! s* z* M* T" q/ S
  1260. LDA <DEC_T
    4 Z8 c; G* [) b5 D* J
  1261. ORA #'0'- [+ @' X6 W* n  V# g
  1262. STA PPU_Addr,X
    . A# X" L* c% |8 z& m
  1263. INX+ u, }9 p) t7 B% w7 _, ]
  1264. LDA <DEC_L
    ) N8 L; _" Y; ~/ c! i
  1265. ORA #'0'8 c. ^/ L- H! U
  1266. STA PPU_Addr,X
    ; p8 P, T( S( u  c; u% `1 J5 b) z
  1267. INX/ G* M7 H9 k/ I4 Z
  1268. RTS
    0 o( ~: C) C3 T; v) E1 |  I

  1269. , j# z( }' T) c! Q0 y
  1270. ;==============================
    / @, Z+ i; d! t
  1271. Time_Count;计时) R4 `! }+ R: V0 R, P9 d/ x  B
  1272. LDA <Music_Stop_State) i9 s/ x8 v. p
  1273. ORA <Time_Wait_Cnt
    % t% i- P9 p+ A9 G3 [
  1274. BNE Time_Count_End: h7 a- A. ~6 R% p$ |2 @
  1275. INC <Time_Cnt% k' e' Y  v; [$ a2 m
  1276. LDA <Time_Cnt
    - ?% [7 s$ N" ^3 Q9 I, `- f+ t5 I
  1277. CMP #60) D! _4 D9 U5 m9 f% Z! q4 ]# V
  1278. BCC Time_Count_End( F7 Q4 ~( |! M& E: v
  1279. LDA #00
    ' r2 p2 {' B' M  u& e6 y; ?
  1280. STA <Time_Cnt
    6 v: w' ?3 a+ ^. g1 I
  1281. INC <Time_S0 T6 ]1 f' ^2 k

  1282. : |* B- [  a' V# u: ?" p' f, H3 h
  1283. Time_S_Cnt; [- @2 V9 i0 Z2 U
  1284. LDA <Time_S8 O4 X1 p6 q- a) V# P
  1285. CMP #60; j6 B& P. O0 B6 f1 s
  1286. BCC Time_Count_End) j7 C9 c( _* K8 f# S$ Y/ o
  1287. LDA #00# T+ h6 }/ R$ g' S4 a
  1288. STA <Time_S+ c4 Q& ]* e5 R. p# H+ v  b1 ~( w
  1289. INC <Time_M4 h) P  ?9 V8 i7 ?

  1290. : r* p; t4 h" J
  1291. Time_M_Cnt1 x! r$ r) @$ I2 a, z9 a1 F( a
  1292. LDA <Time_M
    1 ^0 @  l# I/ d& {$ J6 _
  1293. CMP #60
    # D+ ?' n* n2 X8 Z
  1294. BCC Time_Count_End
    . V& a3 C. d$ R0 N. q
  1295. LDA #00% U( r/ [* u0 v2 t, H# X. |  O
  1296. STA <Time_M! ]/ q1 O8 r( {
  1297. INC <Time_H
    " D. A  [& \) Z6 q/ j

  1298. $ n  `5 |4 P7 C0 ^0 D# i
  1299. Time_H_Cnt
    ' W+ {5 F, {9 D# [. D1 D" v
  1300. LDA <Time_H
    2 ^3 t0 Q+ [; r# ~' l7 P( N4 r
  1301. CMP #24
    ! h8 i' d3 _: b6 ^
  1302. BCC Time_Count_End
    % `3 g2 _/ V2 r7 z' M' R4 }9 Y
  1303. LDA #007 x5 m& Z0 d1 i$ o
  1304. STA <Time_H
    4 ~' D3 o" j. q+ x; |5 V

  1305. 6 D7 K0 d; o+ I" N/ v3 v
  1306. Time_Count_End7 _6 m+ W1 `6 d. Q
  1307. RTS. }' j- k) c$ ]8 b- E. G1 u
  1308. , [0 G# f" N- N! ^6 k5 N
  1309. ;==============================0 n5 U; p3 f7 U- p- m4 `6 }
  1310. Time_ReSet;播放时间重置8 B: O5 l. Y; Y. w  ]" k5 J' ?; C
  1311. LDA #$00
    ' Z: M, y% I  ?7 H( b6 X  q
  1312. STA <Time_S
    # r1 `$ c. K- G9 Y" M
  1313. STA <Time_M ' ?# W( x& H, V( w
  1314. STA <Time_H9 s" M) G6 Q$ d+ k
  1315. STA <Time_Cnt
    " b& \4 @' W4 J6 O1 x" }) N! ?
  1316. RTS
    6 r% s7 B3 Y! Z- K# S; P0 Z
  1317. , s' B: q# A6 e, A/ X, o
  1318. ;==============================
      c/ I" {4 o. s' o# v$ f  @
  1319. Music_Bar_ReSet;音乐条重置
    / `5 S6 E  n6 `8 r+ Z3 A
  1320. LDA #$00) U8 B; ]3 Y3 ^- T
  1321. LDX #$003 |' c/ U5 R: ]+ t0 A' K6 C# B! C
  1322. Music_Bar_ReSet_Set8 i" j: R' V. x" m4 v+ e" x
  1323. STA Sound_Bar,X. ?0 B" A6 A0 Y7 F$ R
  1324. INX
    ! e0 B. d) w$ K& p9 ^( L) c
  1325. CPX #$101 _+ L$ k) ]$ `: \+ l
  1326. BCC Music_Bar_ReSet_Set8 z! p! ~  b3 n
  1327. RTS, z* T- _$ o3 t4 R) |; w

  1328. , t1 X5 P# h( u0 G6 P/ o7 D2 d- e
  1329. ;==============================
    5 a" V4 H# W) r! O
  1330. PPU_Data;PPU数据写入
      j$ r1 m$ g9 g' d( T8 e1 B: t
  1331. STY <Data_L5 y* W* B8 E9 L  _- F
  1332. STX <Data_H: s* Z1 i( v* @: W+ X% P
  1333. LDY #$FF0 m3 O: e" G( d8 c
  1334. LDX PPU_Cur" P) d9 ?/ U& a* j8 u  ?- I
  1335. DEX, L8 G0 q+ ^" M4 S, L  a7 O
  1336. PPU_Data_Beg
    ; P% u( D0 _6 o
  1337. INX
    # a( f$ }* A5 Z& v" B3 I. n; G  s
  1338. INY' x- k: p( ~$ x3 _, \8 [
  1339. LDA [Data_L],Y
    % z) O) {  }. l+ O8 f
  1340. STA PPU_Addr,X
    ' H) N- A. b* F9 p
  1341. BNE PPU_Data_Beg0 @4 |4 n1 K' s( ]
  1342. STX PPU_Cur
    4 O+ E; {5 w. Y5 z8 H
  1343. PPU_Data_End
    $ o1 X: g5 F  N5 O4 }
  1344. RTS
    # i; I( A9 A5 b5 J
  1345. 2 x3 M: B9 i/ R4 R! w' Z# Z9 B: R
  1346. ;==============================
    - K  `0 [( K2 {  ]% M6 l+ p8 s# }
  1347. Music_State_Show;播放状态显示
    - B* M. A. e6 o, X! Z. Z+ \) s
  1348. LDA <Music_Stop_State
    ; e4 m' a$ Y% x  `' n) E& p% m+ V: Y
  1349. BEQ Music_State_Show_Play
    % T& @9 o. C" F) J6 ]+ o
  1350. Music_State_Show_Stop9 m# I- @* H! P; V& c* G
  1351. LDY #LOW(Music_State_Stop)
    7 \1 `. i3 U* Q, c! m: _
  1352. LDX #HIGH(Music_State_Stop)
    - O! J, E. R6 Y  l( t( g  q
  1353. JSR PPU_Data
    / ]( f' f" D$ ?
  1354. RTS# `5 ~( V2 a  {3 F' o" A
  1355. Music_State_Show_Play
    5 R# R/ j- p- G" E
  1356. LDY #LOW(Music_State_Play)4 U4 O2 `2 }% i7 M' j- e5 W
  1357. LDX #HIGH(Music_State_Play)
    + i# d9 p& E1 y3 k! g2 B: s! g
  1358. JSR PPU_Data& d1 u! G: \- c  [: B- ~+ l
  1359. RTS5 q0 E( i2 A% w8 W1 f

  1360. " Y1 E3 j" `. q+ W
  1361. .IF SOUND_BAR_SHOW_ENABLE
    . z- |( ^/ Z* f- Y1 b4 n. N
  1362. ;==============================' t8 y' a9 Z- ?2 Q" `  t
  1363. Sound_Bar_Text_Set;标题与音乐条初始化5 _. \! }  J4 X% U* b0 }* @! v
  1364. LDY #LOW(Sound_Bar_Text_Data)
    . q" [6 W3 ]8 Q
  1365. LDX #HIGH(Sound_Bar_Text_Data)
    $ h0 a2 u( ?$ Y" h8 ]* u4 g* @! Y, d
  1366. JSR PPU_Data3 B- E+ o9 |! u- I% z
  1367. RTS6 g! v: G7 e+ Q7 U
  1368. 7 l, Y1 ?. v7 V' v% o' a0 K$ o
  1369. .ENDIF; G* s* h/ `1 K  W
  1370. 0 W/ F5 N& G2 S4 P1 |7 \/ {5 A! I
  1371. ;==============================- w' m$ y, {6 |/ @9 X
  1372. Set_NameTable_Attributes;设置命名表属性  N8 t' D: @; U$ c& A
  1373. BIT PPU_STATUS: k" l8 `# A: k7 o* e
  1374. LDA #$237 r6 O( T" P/ l" g8 z0 Y# D0 {# P/ B# Z
  1375. STA PPU_ADDRESS; A9 q2 u0 O8 g4 f5 I0 Y8 }
  1376. LDA #$C0# `' F" D, j! Q7 x1 Y8 b" U! O
  1377. STA PPU_ADDRESS
    5 r: k6 k% ?# u% R) w8 c$ H
  1378. LDX #$00
    ! g' E9 t# g8 L& p
  1379. Set_NameTable_Attributes_Write7 {. L; k9 ]( j: g- G+ h
  1380. LDA Palette_Attributes,X
    2 S% C' l  ]" ~: D
  1381. STA PPU_DATA- W4 v, k% M1 G! t1 ]: d  v
  1382. INX
    # r9 N' Y# o0 a7 N; z  Y' B
  1383. CPX #$40, `* v/ e$ d3 C( n2 I
  1384. BCC Set_NameTable_Attributes_Write7 c3 Q  R3 E: T+ }" L/ y
  1385. RTS% w2 Y# B' q* c' {6 S

  1386. * S9 ~; n; H, }2 Y. {5 z9 D
  1387. ;==============================
    " z) b- S# Z5 R
  1388. Set_Palette_Color;设置调色板数据* `# r. o, z" L. `7 I
  1389. BIT PPU_STATUS
    ' u; P7 b, r+ B0 i# H' @6 q+ i
  1390. LDA #$3F
    + ^/ m2 b+ ^& a: B0 ^0 B. v
  1391. STA PPU_ADDRESS
    ( t# B0 T8 R+ Z0 [0 d8 N2 L
  1392. LDA #$00
    + K# P1 g) z3 e  _& p& [4 I
  1393. STA PPU_ADDRESS1 L2 `( I. Y6 ~4 b, U0 F6 T5 _
  1394. LDX #$00' R" X  W6 [# N$ Y& |, D
  1395. Set_Palette_Color_Write' Y) ~# j5 r# V6 L- G
  1396. LDA Palette_Data,X3 z0 a+ ?1 a9 c' k% p( g
  1397. STA PPU_DATA) Q, G$ [* B0 Y5 |
  1398. INX
    6 ^- u: {  d9 v% M9 h0 e; T- G3 y- s1 c
  1399. CPX #$20
    ; O: Z* b! `* j  z* P( @; Z; L
  1400. BCC Set_Palette_Color_Write( Y: h8 w1 `$ q+ k  G6 K8 v
  1401. RTS
    ' x1 b4 s' d* {9 z  Y* q5 D4 V" f
  1402. . V/ V1 |& z  r/ d( ^
  1403. ;==============================8 g# Z: D5 ~! V# y$ t7 r
  1404. Init_Palette_Addr;初始化调色板数据
    - V  l1 E- K# O( T9 j
  1405. LDX #$005 A% F; ]0 a- `# C- e
  1406. Init_Palette_Addr_Write
    8 x' y" g; H, m' q; E
  1407. LDA Palette_Data,X
    0 c9 H% G  n8 u6 e6 L) [4 r9 k
  1408. STA Palette_Addr,X
    - p; ]/ S! m2 ^' _6 n  C9 @1 I* d; i, b; @
  1409. INX
    * D8 Y" [6 G' \1 b' _5 i
  1410. CPX #$209 J; l, q$ Z' h: O. i0 {# w8 W4 g
  1411. BCC Init_Palette_Addr_Write% R/ g8 ]5 `* C( _0 T% d9 |
  1412. RTS
    : j  o1 Y7 S, @0 j+ p
  1413. / p9 j( H% E( S; h( q2 _
  1414. ;==============================
      ]# p& @1 b0 z3 O/ Z
  1415. Update_Palette_Color;更新调色板颜色
    " F  V# X, u2 ]
  1416. LDA <Palette_Update_Flag# N+ Y: A9 D2 \- I! |7 o8 Y) o' t
  1417. BEQ Update_Palette_Color_End' L- G+ |) |0 O5 T$ k8 H
  1418. LDA #$3F; F8 x9 J7 O, x, q, ?! w% S$ s
  1419. STA PPU_ADDRESS0 f, Q: H  n0 K2 V- J& z( z8 c% o
  1420. LDA #$0C
      ~- G- g- Z+ f& p
  1421. STA PPU_ADDRESS! f1 I5 p6 a4 }$ l' y) }! }8 R
  1422. LDX #$0C
    $ Z0 e% w) W5 B; @$ O& H* ^
  1423. Update_Palette_Color_Write
    9 O" N4 _5 [4 d* L$ X
  1424. LDA Palette_Addr,X
    4 u. U2 Q: ?5 t  [" c  p# M* ]4 H
  1425. STA PPU_DATA
    ( u9 q! Z2 ]% q1 U8 }/ B0 Q$ l: I
  1426. INX- H* g. h3 S* R0 V, d$ z0 U
  1427. CPX #$141 W) t% p) Z8 i/ n
  1428. BCC Update_Palette_Color_Write
    ( Q# L$ u/ @# r: \2 E9 y9 C  y
  1429. LDA #$00
    + }! ]* G6 Y, K5 q6 I$ f
  1430. STA <Palette_Update_Flag
    ) P" ]7 m, r3 Y- @) {* B
  1431. Update_Palette_Color_End
    2 _- Y' G, r. b) J5 Y# \7 P- v
  1432. RTS
    : e4 i# u: W. ~

  1433. 1 ^6 x+ @* Q, D8 _% \

  1434. 2 K8 J4 |0 S( N7 L3 @3 G2 i4 K
  1435. Update_Sprite_Palette_Data0 [: q- C- T5 k& O  p+ |
  1436. .DB $21
    ' v( ^1 s2 V- u5 L0 x
  1437. .DB $211 `/ u1 L  t- n0 _1 {' i
  1438. .DB $11  M& Q$ ^# q% b/ U# }
  1439. .DB $01
      |' E: s+ q3 K( C; i
  1440. .DB $01
    4 ]3 _- I2 c- [" y
  1441. .DB $111 j1 c- s- _( _, Q9 o5 d6 G. v! u
  1442. .DB $21  U9 }7 x" V% o
  1443. .DB $21; P- G; c5 w) X. c
  1444. .DB $11  o( r! R8 _4 j! {9 n: n% T
  1445. .DB $018 r) m5 ~5 V' X7 b
  1446. .DB $11! R1 y/ B* @7 \" Y( s' ~
  1447. .DB $21, o' p, g3 a; S( P& d0 i* h
  1448. .DB $21; T/ h1 c8 L1 @' V7 g
  1449. .DB $11
    + a" O, l: @- H+ [4 M
  1450. .DB $01
    & d1 u8 B7 o4 Q. b/ B
  1451. .DB $110 B; T5 K5 Q' O2 W
  1452. ;==============================
    , E* f( C9 p* c3 Y, E( Y
  1453. Update_Palette_Data;更新调色板数据4 J' ]+ U' [9 \4 y
  1454. LDA Nmi_Time_Count: l8 x. _& j' t- _  n. Q6 S8 ?
  1455. AND #$08
    & @( {1 z- t+ V& ?7 \
  1456. CMP #$08
    6 c2 ?, O# p1 a) D# Q" V4 [
  1457. BNE Update_Bkg_Palette_Data
    8 D. c2 b; E! j% x) h
  1458. - I7 [* x$ b  [! ~3 ^3 R3 |
  1459. Update_Sprite_Palette_Data_Set# {. N& X. R- q5 \
  1460. LDA Nmi_Time_Count  G- q5 l) P8 f* S8 E4 D
  1461. LSR A
    + ?! W6 S( r# X( i1 D" l
  1462. LSR A# S+ r7 S4 W# A5 V9 x$ ^4 d$ j6 @9 p# K
  1463. LSR A
    & Y6 `3 _- k* g3 \
  1464. LSR A
    . G, B' T* q; {3 z2 F
  1465. AND #$0F
    1 b0 @. {' T; `1 q: m; W, E
  1466. TAX
    0 ^/ y2 F5 _# f$ @
  1467. LDA Update_Sprite_Palette_Data,X
    3 M- D' t1 y( B7 c
  1468. STA Sprite_Palette_Update_Addr
    ( h! p- J( R9 v' `7 B
  1469. LDA #$01
    " `7 A5 H6 W4 C1 `0 u- e
  1470. STA <Palette_Update_Flag$ x; V2 g, e  J* F' I
  1471. * y% B- t. t# `3 r! U
  1472. Update_Bkg_Palette_Data
    1 _! I4 u1 H. A: W
  1473. LDA <Text_Disable_Flag
    # y- P& o9 [% M+ u
  1474. AND #TEXT_DISABLE_RAM
    # s* S# x2 W" Q6 x+ [7 {: V; T
  1475. BNE Update_Palette_Data_End, h) ^7 m6 M2 Z* }7 t
  1476. LDA <Music_Stop_State$ c! P9 l' H6 s  Y
  1477. BNE Update_Palette_Data_End
    0 a& u) J# }5 K1 l* J5 T

  1478. 2 m5 \" |' r* W9 h% e' X8 }: V
  1479. Update_Palette_Data_Check
    4 _3 {; P1 w1 u
  1480. LDA Palette_Wait_Cnt
    . u1 A9 G! M# b; F  _
  1481. BPL Update_Palette_Data_Check_Over9 n8 a& H4 u6 r$ X/ t$ X. Q
  1482. LDA #PALETTE_UPDATE_INTERVAL
    ; U8 i* S6 R. z4 D7 N2 }. f
  1483. STA Palette_Wait_Cnt# [7 @1 x7 H' T1 @; X7 S! H% H& F
  1484. Update_Palette_Data_Check_Over
    6 {" k6 m/ W' J2 U
  1485. DEC Palette_Wait_Cnt
    & M; s. E! Y3 h1 g+ Z" r" }" B5 k
  1486. BNE Update_Palette_Data_End
      |4 G: y' S3 n6 _" Y8 ], {2 q1 R
  1487. 9 ^; l+ w) A" o; `8 U/ w% d0 r" c
  1488. LDA <Text_Disable_Flag7 F: I4 S0 Y, g1 C2 O- @- K  R/ _
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    $ |2 `; e; E9 \4 \- g
  1490. STA Text_Disable_Flag
    3 P5 m/ e. O5 u
  1491. INC Palette_Update_Flag
      N3 N0 g2 e; {# K) C
  1492. 4 E! O) l7 ?, g* p5 z$ w
  1493. LDA #PALETTE_UPDATE_INTERVAL
    2 D3 C: m- `  v  r% N: J5 T
  1494. STA Palette_Wait_Cnt1 N' X! Y' p& A! W9 F( ~
  1495. ) P3 _7 c4 x8 g2 w8 g
  1496. LDA Bkg_Palette_Update_Addr
    $ n  r# r; \5 V2 v8 H$ r
  1497. CMP #PALETTE_UPDATE_MAX+ A, k; i7 Q& O  @8 }
  1498. BNE Update_Bkg_Palette_Data_Set3 {- O, `( x9 T/ e% [
  1499. LDA #PALETTE_UPDATE_MIN - 1
    2 x1 k9 V' b1 R: W. @4 s
  1500. STA Bkg_Palette_Update_Addr
    - Z, c8 P0 y- }+ R
  1501. Update_Bkg_Palette_Data_Set
    % v2 W9 L/ k, E; P8 U* }' g# h  h
  1502. INC Bkg_Palette_Update_Addr. A: {" s4 u* L7 C7 ^

  1503. / P$ m: d" |" r2 G
  1504. Update_Palette_Data_End7 U) y( }4 q2 O$ k
  1505. RTS& F6 @  z, K3 L8 {

  1506. ! g. x7 z/ s4 x
  1507. ;==============================
    ; B3 W* V, t0 r" L9 R% k
  1508. Show_Music_Text;显示静态文本" v( S# I8 {# A# ]1 e2 `9 c8 c  W
  1509. LDX #$00
    # E5 H7 \* t; q- v
  1510. Show_Music_Text_Set; |8 J/ [1 n5 M" P  c( K
  1511. LDA Static_Text_Data,X
    1 p! b: c3 v* h
  1512. STA <Data_L
    8 Y- e$ [) X! {& N5 V8 K( F
  1513. INX
    5 D( t. c. n) D2 q
  1514. LDA Static_Text_Data,X" q* j: \# n! i
  1515. STA <Data_H8 S0 P0 @$ x. P8 Z) k# y2 B: o
  1516. INX
    8 H4 g) I: |$ Q6 J7 L
  1517. LDY #$00
    ; A( P4 D2 k4 b" W3 E1 g5 _1 j/ v
  1518. LDA [Data_L],Y( L( P' J0 Y; ?
  1519. STA <Data_Cnt
    . z& a8 E  y, b4 A
  1520. DEX! ^9 J: \' G. f/ p8 d
  1521. DEX( [$ b: M3 j8 @( ]8 r2 e
  1522. LDA Static_Text_Pos,X
    # V+ g# {! h( X' g# J6 P" i: G
  1523. STA PPU_ADDRESS5 k- v8 }* R: i3 j1 w8 q
  1524. INX
    , @- _1 A' H2 G" n
  1525. LDA #$20
    , Y( ~' v7 i9 f* Z
  1526. SEC
    , W4 g% a4 D5 M7 |: M0 E
  1527. SBC <Data_Cnt0 q  ~6 G5 H0 D- Z
  1528. LSR A% C& w- p5 ^# F/ u
  1529. STA <Data_Buf. c/ o' e- Q* m
  1530. LDA Static_Text_Pos,X
    6 s' @$ H" H; {3 ?% }( Z' N
  1531. AND #$E02 Q6 [" U$ l  k3 j! J* [
  1532. CLC
    ! [: S6 p  Y; ?% Y% i6 F
  1533. ADC <Data_Buf, f! `( q& N; x
  1534. STA PPU_ADDRESS
    . V- o% e( W$ e! c
  1535. INX
    + w- \1 F% p+ M' V$ {% h
  1536. Show_Music_Text_Set_Write1 c3 Q% e! d9 G% A- m5 x
  1537. INY
    : Z% [( _: Y5 P
  1538. LDA [Data_L],Y
    $ C, ]8 |7 w( I3 |* t
  1539. STA PPU_DATA- I4 k: p3 C$ V5 {! B4 s) r1 r. ]
  1540. DEC <Data_Cnt
    + I! \& D; j/ o: X% `
  1541. BNE Show_Music_Text_Set_Write
    0 j, n; r! M- Z$ |
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos$ e8 x: z$ D! _: b0 q
  1543. BCC Show_Music_Text_Set8 e' s+ O, |& Q, |2 p& r
  1544. RTS
    ( v4 m4 r3 c. f' V1 U5 e
  1545. 0 R. U# ^( P( w, d5 S
  1546. ;==============================
    $ `' S9 W- W( L0 _1 U7 v6 d* j
  1547. .IF Track_Name_Pos;显示曲目信息: M0 j# E: n: U: A% h. t) S( A# d
  1548. : F8 k6 Q, N: u. X" Q) X5 f$ K7 v
  1549. Clear_Track_Info% ~$ C  Q# V; C1 j4 K6 i
  1550. PHA
    - u4 |8 Y  }0 f& b
  1551. LDX <Music_Item_Cur3 k5 a5 H( H8 w8 u( C6 h
  1552. LDA Track_Name_Addr_Flag,X" a$ y# Z0 E/ ?- P/ R4 c
  1553. BEQ Clear_Track_Info_End_Ex2 Q# w" _* M0 c$ u
  1554. PLA+ t' y1 G5 J# G0 n9 l8 F
  1555. ( m$ x& |' C9 i0 e) v
  1556. LDX PPU_Cur/ m8 T+ _9 o7 ?; x
  1557. PHA3 D/ G2 t5 {" b# H1 R
  1558. LDA #PPU_MODE_CNT_CLEAR
    / w/ R2 r' @8 |7 H  s
  1559. STA PPU_Addr,X4 P( P! |2 H* P& l
  1560. INX
    ; @% {9 _# b* g+ @7 x7 k" i
  1561. PLA1 c# e1 e( T% B- n! A5 Y! v
  1562. JSR Show_Get_Track_Name_Center_Pos) J0 b$ F; A8 q, n' \2 U: P! f$ v8 U
  1563. STX PPU_Cur
    $ b3 q* U% R) f3 k9 C* Z
  1564. Clear_Track_Info_End$ J& V/ E) m8 O# t1 C8 N1 l
  1565. RTS8 o5 j- w# H2 F( Z7 x- d# Z
  1566. Clear_Track_Info_End_Ex
      O1 X8 l. r* T7 G, Q0 v$ S
  1567. PLA
    " }, ~/ g% C1 \! n! X: l; |; n
  1568. RTS/ m4 I6 J. h- i/ |! E, m' j$ }

  1569. 7 q8 @# `4 K; y
  1570. Write_Track_Info4 c& Z5 O/ @+ n- K7 x; b7 m, p: l
  1571. PHA
    1 D3 z1 N9 |( H) j
  1572. LDX <Music_Item_Cur
    3 b$ K2 s+ s+ U/ j+ I
  1573. LDA Track_Name_Addr_Flag,X
    6 z" p* i- m- e
  1574. BEQ Write_Track_Info_End_Ex
    6 j- C4 \. f, D& }4 y. l7 \
  1575. PLA4 v8 U) r, z0 K) Y( Q4 I

  1576. / f' u* K2 X6 u6 R+ ^- C4 c! Q
  1577. PHA
    " w4 R  Q1 H' D3 H' f( R
  1578. LDX PPU_Cur$ S! y+ M2 b) o* |1 E2 z) y
  1579. LDA #PPU_MODE_CNT_LINE4 r- ~' x2 x: h1 v  W/ p" t6 `
  1580. STA PPU_Addr,X; |7 B/ k9 T- j, i  S
  1581. INX/ z1 W: g2 m! [8 {% ~3 W
  1582. PLA
    % a, d/ v6 H) Z. c& E7 D
  1583. JSR Show_Get_Track_Name_Center_Pos
      ^; G$ G5 }. g, f
  1584. Write_Track_Info_Data
    5 a2 ^+ }0 x2 R' j1 v
  1585. INY
    , K8 P  I6 F9 }- w2 I, V% o2 _
  1586. LDA [Data_L],Y
    2 p3 l0 @( T) s+ U4 O9 k: R, S
  1587. STA PPU_Addr,X. L9 {( ~5 d5 D" [2 P* u
  1588. INX
    $ `: F' }; p% }, m5 x+ e( j
  1589. DEC <Data_Cnt
    . I; s! c7 H; G' ]5 [( e
  1590. BNE Write_Track_Info_Data
    . o' A! x% g; G& S0 U. A9 p; L: M
  1591. STX PPU_Cur+ Z7 S3 o4 I: L3 K( N
  1592. Write_Track_Info_End  T% s* I' d& x
  1593. RTS
    ; D& z! T1 p! u8 h
  1594. Write_Track_Info_End_Ex
    1 H1 O2 b" ]  i9 |( k8 R& X
  1595. PLA  _1 x' k+ a( r0 ]1 K3 G9 J5 m
  1596. RTS
    8 ^* a) }  l2 p' F2 }! c  h1 r

  1597. 9 M' k9 E1 c* \5 E0 o: R
  1598. Show_Track_Info3 b  n1 m, K$ o3 p, j! |
  1599. Show_Track_Info_Clear
    5 A7 Q" I. S8 S5 f* |3 W
  1600. LDA <Music_Last
    6 V7 U6 ^1 n) ?

  1601. 8 k$ p4 _8 z) N+ O
  1602. JSR Clear_Track_Info
    ; H6 j5 t2 W4 L5 ^4 p

  1603. % ?/ V; ^5 \: S' H# ]0 C
  1604. LDX <Music_Item_Cur
    - q, m) |( q6 q* L3 v3 L  z" x3 z
  1605. LDA <Music_Cur,X  x8 w1 F; g5 ?& g$ X
  1606. JSR Write_Track_Info
    ! [6 ?/ r8 w' Q; [
  1607. RTS
    + w. p: k7 H( {( y

  1608. , e1 k* ?* J8 O0 \) i# v
  1609. ;==============================+ T7 p! _! a1 Z. u: m0 |- v3 q7 |
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置
    # I, f) p* a4 q, G

  1611.   d; j8 A7 a2 n* \& e
  1612. ;取出集合名索引
    : m. m& U7 U2 ^7 o+ t; b! J0 }/ t
  1613. PHA$ i" L" T. M, y; ^
  1614. + }) b# K( `7 t1 ^
  1615. LDA <Music_Item_Cur
    5 s6 X4 t9 u0 q3 Y& k. N. S6 u9 O
  1616. ASL A0 O9 |9 }3 s% d7 v0 y( A* s1 E
  1617. TAY
    3 c( J: ~4 H- s: J* f. [9 q: M
  1618. LDA Track_Name_Addr_Port,Y1 y" U& J& J3 Z+ I/ D$ |% t& Y
  1619. PHA
    1 ~2 i! m; C: s! V
  1620. INY1 _' U/ ~$ Q# Q. C6 @5 d6 {
  1621. LDA Track_Name_Addr_Port,Y. n& o  ~( M' \+ e
  1622. STA <Data_H6 `- O# i) r% @: E. `4 a% p
  1623. PLA
    ' I: m4 J. W, }3 B- T1 U4 o$ D
  1624. STA <Data_L
    ) _  u0 _# l6 m& d+ d9 y/ @
  1625. # Y' t  d8 ?' S" q  `5 n% P
  1626. PLA+ a2 P; x' v7 o+ g
  1627. % j4 F- D3 G$ ~8 b5 e, ~
  1628. ASL A
    & }" b3 U- X3 z4 |
  1629. TAY$ ]& r2 `/ L9 I3 z7 z! B- W# N
  1630. LDA [Data_L],Y
    ( F" n4 p7 t% @/ F# l  y# f7 s
  1631. PHA
    % S# R: ~' _+ O7 p# X& p
  1632. INY
    & c5 G- H7 A+ i( ?5 V
  1633. LDA [Data_L],Y. N9 Y1 V4 e  {( O
  1634. STA Data_H! z3 Q7 G5 |" w. n. Z- A
  1635. PLA
    & h8 C% d8 j1 A
  1636. STA Data_L
    5 K9 ~/ S4 y' M

  1637. 3 e! z2 q2 D! W2 h
  1638. LDY #$00
    7 e8 j/ p0 G: B2 w! Q' M& n
  1639. LDA [Data_L],Y1 X5 p2 a4 i5 P" h9 ^7 |
  1640. STA <Data_Cnt
    " q) o7 \1 J6 ]. P; Q
  1641. LDA #$20# F# ^! K6 g* }6 g5 C2 A. t
  1642. SEC& Q$ e; `7 o% ^& ]" t" F3 r
  1643. SBC <Data_Cnt
    + k. b: F+ O% ~2 A& e7 n. {  D9 @
  1644. LSR A
      p4 F5 L# B( Y/ T
  1645. STA <Data_Buf+ I! s+ @9 m7 d) I
  1646. LDA #HIGH(Track_Name_Pos)1 j( e8 f, i. [  O
  1647. STA PPU_Addr,X! i3 C/ n: f1 A# }
  1648. INX
    & U7 O9 S4 ~  c6 j" n4 c
  1649. LDA #LOW(Track_Name_Pos)
    8 e8 x* @% Q$ c9 p3 i, P
  1650. AND #$E0
    3 s9 P( z# _- R5 W8 \0 s* X/ k
  1651. CLC7 N' K. I8 J! i% b4 j# \& B* |4 {! @
  1652. ADC <Data_Buf
    6 _8 G# n* W$ J
  1653. STA PPU_Addr,X; L/ T- t+ v( r
  1654. INX
    # v) l& _; j) `  s( X
  1655. LDA <Data_Cnt
    ' Z- H5 c9 K3 B. Z# z5 j
  1656. STA PPU_Addr,X
    * S  ~- _# V0 }& ]
  1657. INX
    & a2 _/ {8 Y$ K5 X, j
  1658. Show_Get_Pos_Center_End) N7 E# L$ n' O. i
  1659. RTS6 B7 a( f# S6 X1 o
  1660. .ENDIF
    ; w+ [# D% X6 V! N9 n
  1661. 0 T, q- e, x8 ?0 d+ T+ `
  1662. ;==============================* H" }3 r- g1 b( x, N  {* v
  1663. ;音乐端口清除4 S) K5 }/ A! i3 \7 L
  1664. Sound_Data_Clear
    8 s8 R# a) q1 t7 n. O
  1665. JSR Sound_Port_Clear0 U2 Z5 T9 K6 E# D" O3 `+ p0 E* {# w
  1666. JSR Sound_Ram_Clear8 {+ r, m; r8 n/ S  V  _3 Y
  1667. RTS7 F% _  J% w9 X
  1668. & t, ?! i3 T8 U, C5 z8 d
  1669. ;==============================
    1 h8 K5 {2 }, s5 t+ e+ X* Q
  1670. ;音乐端口清除
    ! @. q& g8 j) e0 E
  1671. Sound_Port_Clear8 h+ e7 }$ C5 y
  1672. LDA #$002 S; y/ r/ N4 [6 P# @
  1673. STA APU_STATUS
    & \: h: K- D8 T  {+ S! f8 `0 H8 Q
  1674. LDX #$00
    4 U0 f# [, g5 Y. t& r) {* K
  1675. Sound_Port_Clear_Write6 Y: P' l  f3 j6 M5 e( W4 D
  1676. STA $4000,X
    $ Z$ P( ~0 H: ]3 C% I0 L7 P
  1677. INX
    2 J0 M5 E8 L; ]9 a4 t8 F
  1678. CPX #$14; o" w, F) f" A% T
  1679. BCC Sound_Port_Clear_Write
    + G8 e  |0 C- B% h8 k% x
  1680. RTS
    2 z7 _" @" k$ e0 s" N6 b2 ?

  1681.   Z. D( B! H* z0 o2 H: H% q! i! ^) _
  1682. ;==============================$ u6 U+ q5 R9 l+ g, g
  1683. Sound_Ram_Clear;RAM清除$ n" m) E2 w- g! w; i
  1684. LDX #$00
    ! Y% Q0 u8 {5 h+ u! F, q  [
  1685. LDA #$00' q  @, p6 V4 I2 |2 m* G7 j% N( W
  1686. Sound_Ram_Clear_1& v2 |, o3 N  F$ r4 ~6 b
  1687. STA Sound_Ram_Addr_1,X
    8 Z. @2 ]0 y: `
  1688. INX
    / g* R7 _5 |, E: j8 N3 {, `6 p5 d
  1689. CPX #Sound_Ram_Addr_1_Size, o; u# g$ i7 R  l/ F7 a4 N
  1690. BNE Sound_Ram_Clear_1; {; b, s. d3 Q
  1691. LDX #$00
    ; l5 a# Q* _0 P
  1692. Sound_Ram_Clear_29 X9 m' D4 s* g/ ~6 E, c' }7 R
  1693. STA Sound_Ram_Addr_2,X
    : D+ L2 J4 h  `& r0 ?* R  |
  1694. INX
    $ H# g1 c3 `3 \0 F0 p
  1695. CPX #Sound_Ram_Addr_2_Size
    8 C0 ?3 z6 e' ~5 r
  1696. BNE Sound_Ram_Clear_27 ~; _$ u4 U0 q1 J9 |4 c
  1697. LDX #$00
    . g) ]2 T0 d: g8 Q
  1698. Sound_Ram_Clear_34 w% X# v- T' D& O& q
  1699. STA Sound_Ram_Addr_3,X2 Z9 ^* V# N0 h) `* g
  1700. INX
    4 g/ V7 R/ v6 a! X: ~
  1701. CPX #Sound_Ram_Addr_3_Size. Y4 `+ M; X- p* m! ^
  1702. BNE Sound_Ram_Clear_31 ~" m6 A  n* R! s" i" R3 R( c7 b
  1703. LDX #$00
    2 j+ i0 I( {$ t5 J8 m) g
  1704. Sound_Ram_Clear_4) g3 }. @& Q. v2 D
  1705. STA Sound_Ram_Addr_4,X6 e. `. L% [% K. a
  1706. INX
    8 B9 N6 T* A7 o! g9 y
  1707. CPX #Sound_Ram_Addr_4_Size
    " |0 h' O. `" U! R& a
  1708. BNE Sound_Ram_Clear_4- B( A9 ^, o( I* G% u% A% L
  1709. Sound_Ram_Clear_5( g8 a, Z' P+ z; ]7 H8 Z" R, x
  1710. STA Sound_Ram_Addr_5,X
    : `. K! Z! F5 \8 w- ]  c$ t& {+ g
  1711. INX
    8 ]9 R  C3 K/ Z
  1712. CPX #Sound_Ram_Addr_5_Size5 ?5 S8 s' D+ j1 F& e. O  l. W
  1713. BNE Sound_Ram_Clear_59 B* i$ W+ q1 e( H3 @
  1714. RTS
    0 Y- x1 p8 E* d* I9 H5 q

  1715.   |5 T: ~5 C. u; D5 t" F! \
  1716. Get_Music_Collection_Name
    3 _5 l4 |9 j" @$ D
  1717. PHA. X! e, C7 b0 o) u( y) }7 L
  1718. LDA <Music_Item_Cur
    5 d2 \1 M3 _0 @" V
  1719. ASL A
    7 U; f/ i( M+ E3 L3 _7 J# ?5 H) @
  1720. TAY
    * d0 G, r% m( }
  1721. LDA Music_Collection_Name,Y: T) K4 B# V4 ]2 ~+ G2 q; D
  1722. STA <Data_L6 L# X; e0 V  q8 U
  1723. INY% P" u- \+ C; A
  1724. LDA Music_Collection_Name,Y
    % ]) w% D; j; @; z' i1 G
  1725. STA <Data_H
    * P& n" Q8 C1 K+ ?2 J
  1726. PLA* I$ T" K3 c% m6 l, L  V, C
  1727. RTS
    + t' l  z; P: S* l
  1728. 4 M& l! Q) ^" _' |# |4 j! d( e8 _
  1729. Set_Sound_Total* M! C6 v' F9 y+ S! x' Q5 K
  1730. LDY <Music_Item_Cur
    ' V& w; G8 I  ~  ^6 v$ x
  1731. LDA Sound_Total_Port,Y) g! F; E, G2 q, l5 Y$ `
  1732. SEC) D6 q" y- ~, N1 c6 S2 j' C
  1733. SBC #$01; _: r* p9 @- p% P1 x
  1734. STA <Music_Total
    0 j/ y" ]3 O; P7 m7 R
  1735. RTS
    , f) R$ ~. v  Q: j2 I

  1736. / S" z4 M) J! g. \. V# m
  1737. Get_Sound_Start
    8 ]' H. X6 K% c' s3 T
  1738. LDY <Music_Item_Cur
    6 \6 K" Q: g3 k3 b( ?0 t3 L
  1739. LDA Sound_Start_Port,Y! e5 i0 }! p9 ?' g
  1740. RTS  b# e9 V* W7 E' i
  1741. + l6 L4 {2 W  f. Q5 G7 V% T/ z
  1742. Set_Sound_Init_Port
    ' u' P7 I/ W. Y% y% P' J
  1743. PHA1 n2 p  @$ b+ ?2 M
  1744. LDA #$20% ~9 w- v& z/ V4 e
  1745. STA <JSR_Addr_Op1 E9 R$ b! n6 o) x7 S% [+ G
  1746. LDA <Music_Item_Cur4 Y9 f, v- A6 r
  1747. ASL A8 G1 K0 ?! _1 V& k
  1748. TAY
    , a0 P1 J# N1 a9 H) Q! A8 r4 e
  1749. LDA Sound_Init_Port,Y( i) _5 n( ~! X! U' \$ B
  1750. STA <JSR_Addr_L& C" Z0 P9 u# N3 t3 m' |6 S
  1751. INY7 ]4 |3 G' q# Y2 X: ~: f  u8 b4 C
  1752. LDA Sound_Init_Port,Y5 W+ U/ r$ E; v2 M5 `( Z
  1753. STA <JSR_Addr_H% Z  g0 \& S% ]# J
  1754. LDA #$60' B! m9 n) a: I9 _; t2 D
  1755. STA <JSR_Addr_Rts. G+ T  s, Z. Y* |" N
  1756. PLA
    - \* V" h( p1 Z/ `. r' I; A) ~
  1757. RTS7 i$ P% Y/ t4 |% Z9 }- T4 \
  1758. 2 g- Y" Q! x) \  y& X+ t! ~
  1759. Set_Sound_Play_Port
    ' `; k* K+ u+ d% ?* b( ]6 S
  1760. PHA
    # b, }  J- N  E9 X% H
  1761. LDA #$204 I" t$ H5 s& q1 l* x: n
  1762. STA <JSR_Addr_Op
    0 K% U3 W& f6 Z+ \. v; g, ^* h
  1763. LDA <Music_Item_Cur
    - V; [% g4 P, m7 m
  1764. ASL A! p5 v) |3 ?3 b/ u0 H% a! {
  1765. TAY) l' B: @: a7 U
  1766. LDA Sound_Play_Port,Y  t- ]7 J, ]+ _3 O$ C$ m
  1767. STA <JSR_Addr_L
    6 v9 n$ d) U! `$ B/ Q' V6 H8 |; i  j
  1768. INY
    " L6 Y( X5 K/ c3 |7 \& U) _
  1769. LDA Sound_Play_Port,Y
    ! [7 \# Z+ u  Q8 h) W1 N' R# x9 N
  1770. STA <JSR_Addr_H
    4 l/ k) K% `7 ^. U% R
  1771. LDA #$60
    # {8 z# A! p0 A  x* n2 j
  1772. STA <JSR_Addr_Rts
    / P" n# X$ _  U# Y) o# Z
  1773. PLA5 {$ z$ p6 E9 q8 Z! ?7 c
  1774. RTS
    6 U! L: \2 l  X/ E
  1775. $ c; X8 d- P) X* Y4 c% b" |
  1776. Set_Sound_Reset_Port+ @  s# g( @4 h9 N' y6 J- R  O2 M: A. f
  1777. PHA! p, Y; z: Q  A  }% m
  1778. LDA #$20
    5 {+ o8 e6 o) u' }. t* |
  1779. STA <JSR_Addr_Op
    7 C* |. T2 O" d2 k% X: R% U5 g  j0 ^) ]
  1780. LDA <Music_Item_Cur) o$ C: ]2 e: k/ y7 W! P
  1781. ASL A; G" R. i6 J2 I5 U' b
  1782. TAY
    / Y. D6 w3 d7 F# `9 M+ z
  1783. LDA Sound_Reset_Port,Y
    ) l1 {5 n7 E( q7 I9 r
  1784. STA <JSR_Addr_L/ S1 D. q/ }$ V3 Q9 K' l3 O- n  U
  1785. INY
    3 C# n( v2 g1 k5 k
  1786. LDA Sound_Reset_Port,Y
    3 ]2 P& d5 P' j8 ^1 ?
  1787. STA <JSR_Addr_H  e# X3 |8 C1 A* |
  1788. LDA #$60
    2 h7 x. h3 Y  W  [( H6 L+ Z
  1789. STA <JSR_Addr_Rts" ~9 y7 `0 c% n5 }- Y0 t! G
  1790. PLA
    # g7 j. a0 S7 v4 }: G# W
  1791. RTS+ a6 `- N/ h" Y
  1792. 6 C$ V0 D8 X% h. D9 ?% O+ N( V
  1793. ;初始化音乐bank+ P. P0 k/ y) `7 _2 z8 m
  1794. Init_Sound_Bank
      f6 q1 a5 u8 y. K0 x
  1795. LDY <Music_Item_Cur% t4 V" ^0 e1 l' T
  1796. LDA Sound_Bank_8000,Y) s8 d" h% G% Y
  1797. STA <Music_Bank_8000- e  d6 L7 ]7 H6 d/ x
  1798. LDY <Music_Item_Cur  r/ l& J, R3 `
  1799. LDA Sound_Bank_A000,Y
    " }8 H3 A. U3 P% e/ a' {2 R& Z
  1800. STA <Music_Bank_A000
    - w0 _/ r: T( ^2 P5 J
  1801. RTS6 P  p, |/ s& f- S; q
  1802. % y$ s3 I* A5 v# E. n8 \6 C) `' H8 y, W
  1803. ;==================================================
    9 n' p3 Y7 M: C* l0 u5 }
  1804. Sound_State_Reset;音乐状态重置
    ) ?' i0 ^( |9 s
  1805. JSR Music_Bar_ReSet        ;重置音乐条
    9 t) _* P3 y2 ?1 g: U
  1806. JSR Time_ReSet             ;重置播放时间
    4 n2 [) l5 A: d$ h% I$ F% F" ^& z

  1807. 4 G0 Q: e+ L! d5 }$ o1 H8 T. Y
  1808. LDA #$00
    1 Y9 z* Z- Z8 h- a% j# d3 |
  1809. STA <Music_Stop_State( H/ m- Z# x# m
  1810. JSR Music_State_Show       ;显示播放状态0 y. ]2 x& Y$ P5 }3 M

  1811. * ]* `3 @3 M" Y: p& K3 |
  1812. .IF Track_Name_Pos! D$ a: f6 x( C4 u0 K! Y1 X
  1813. JSR Show_Track_Info        ;音乐曲目名显示# B1 E, ^! a# C6 e: X! u. U3 m* Y
  1814. .ENDIF
    ( I7 L/ Q. a3 }; t$ f( S
  1815. + K& h# T1 o  W, w) J4 q' ^5 `
  1816. RTS
    * [3 L5 ^) l  q2 U, y! @3 G

  1817. 9 C' Y! X4 R- ~3 i# n
  1818. ;==================================================! x8 I0 V; p: K5 i' w
  1819. Sound_Init_Proc;音乐初始化处理/ f  Q6 S. P1 K8 v
  1820. PHA
    * U  c( g9 Q& W  A  u$ l: C  B
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址
    ) v, b1 l# [! Z) n8 f4 ]. s* y
  1822. LDA #$00, L* D9 x; ~/ E! e' z0 S
  1823. STA <Scroll_H               ;重设水平滚动7 C1 [4 r( |) F/ C2 k
  1824. LDA #$0F$ {" T# x5 C' }4 |. I
  1825. STA APU_STATUS8 V3 V. o7 Z5 Z" U6 E8 q8 A
  1826. PLA
    + ^* Y* O3 G9 h& q/ Y) s3 y5 H
  1827. JSR Sound_Init             ;音乐初始化8 w& l5 Q# o3 F8 B0 p7 ?4 I* S& p
  1828. JSR Sound_State_Reset      ;重置音乐播放状态  H! d) w' J0 O7 M, d* t! |. q3 B
  1829. RTS8 e2 v$ G. k2 z2 |
  1830. & L% P8 W$ `; T* }
  1831. ;==================================================2 G( E+ ]$ x+ m9 \( T
  1832. Sound_Play_Proc;音乐播放处理$ V( e' k% c0 W  [% e  m0 d0 @4 G
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址; t" v  X8 j. ^4 u) l
  1834. JSR Sound_Play             ;音乐播放
    0 M2 z9 a; D$ y9 _& J
  1835. RTS' e: V. T/ Y" c, {; c
  1836. ( c0 y. n# d- i. F) U. s" u3 k; M# |; R
  1837. ;==================================================- f& r$ p4 T9 |0 T. n% a9 L
  1838. Sound_Reset_Proc;音乐重置处理
    ( V1 ?5 W- f4 r6 X5 w
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址
    7 v  ]0 V5 S  X3 R3 _
  1840. LDA <JSR_Addr_L
    3 E  D9 y: E/ r$ y7 Z+ e
  1841. ORA <JSR_Addr_H' `9 Z0 `" _5 w* ]
  1842. BEQ Sound_Reset_Proc_Default# `2 N! y; O; n& h% Z7 y, H$ v7 s% y
  1843. JSR Sound_Reset            ;执行音乐重置
    2 X0 C5 N; Q# y# M
  1844. JMP Sound_Reset_Proc_Init_Sound6 H* o2 V5 L& `& f) L6 B  z

  1845.   _% a6 ~0 F  x) B; I
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理# c0 L4 U4 P7 _* q( [
  1847. . d4 f. r/ J1 T- L
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断1 [0 Q; _2 X. J" s' d/ X  o
  1849. LDA #$007 y, h+ ]9 i+ L3 [7 p2 e- {  s- I: l. W
  1850. STA PPU_CTRL
    : f3 w& H" b! ]0 }

  1851. 2 q% K; y6 H+ \' ]: ~4 X
  1852. JSR Sound_Data_Clear6 u( W# X. ~5 Y) _, T

  1853. 9 W+ L( B, V; [+ ^
  1854. Sound_Reset_Proc_Default_Wait4 g( N9 w  V: |* ]- r; N# I
  1855. LDA PPU_STATUS
      R& k# q2 `2 O+ D
  1856. BPL Sound_Reset_Proc_Default_Wait6 _1 u/ Z. ^8 }, m

  1857. 5 {, [, u8 g8 X0 J$ V
  1858. LDA #$00
    ) g6 q+ H3 O8 O& F* B: u. n
  1859. STA PPU_ADDRESS
    ( s, T7 S% t% g1 x5 ~
  1860. STA PPU_ADDRESS
    % m: h2 P# g9 U2 @% V, `3 H7 @
  1861. STA PPU_SCROLL8 s5 F# y# c- |. f: l: B
  1862. STA PPU_SCROLL( M* z; z1 f1 X
  1863. 0 a! G5 r5 c! s  W# x* M
  1864. ;恢复PPU控制$ a. \  t) N) h% m. c! S8 e* ?
  1865. LDA Screen_Ctrl# G6 v0 p% U) o8 r$ Y
  1866. STA PPU_CTRL- |6 y9 d; u; R4 L6 D

  1867. 3 H$ n. R% C  ^, u. f9 J
  1868. Sound_Reset_Proc_Init_Sound
    * _9 s- x  i6 \- y% [% O
  1869. LDA <Music_Stop_State# d2 m8 h& Y9 d( O/ f: V
  1870. BNE Sound_Reset_Proc_End
    , C' l6 L) E4 L6 w
  1871. LDX <Music_Item_Cur
    ! f8 H+ |6 |. J
  1872. LDA <Music_Cur,X2 c, Q& o& @) f" G+ [0 H: ~
  1873. JSR Sound_Init_Proc
      [5 f& n! u+ U/ @( F, {  K" v
  1874. Sound_Reset_Proc_End
    0 h! k/ b. ^5 _7 |3 t  {
  1875. RTS) X, e% u9 t9 ?. ^. W

  1876. 4 f/ L+ V5 Y4 `& y
  1877. ;==================================================4 ?" z% {% R2 C+ s, w9 B
  1878. Clear_Item_Text;清除页项目
    1 o1 z: K. A' m: r( Q2 ~9 l
  1879. LDX PPU_Cur
    , q4 K( X2 _0 G
  1880. LDA #PPU_MODE_CNT_CLEAR
    $ U# h5 e! v$ e% {
  1881. STA PPU_Addr,X% r3 o- D) v; V' P# c' h5 t
  1882. INX5 x* k/ N. c5 Q% J

  1883. " D4 K5 Z( Y$ o( Z5 r
  1884. LDA <Page_Last
    % f) O1 ~; C- R- ^
  1885. SEC5 T! l7 H4 o/ I# C
  1886. SBC <Page_Last_Index
    9 c& `* R" q$ j; }
  1887. ASL A/ o1 B1 r  v3 [$ d0 Y

  1888. 9 H/ n  J; v: Q6 m
  1889. TAY
    7 z6 f- g! o7 B$ ?9 n% l6 M1 G2 G
  1890. LDA Item_Pos_Data,Y
    $ ~5 U4 S# U: y& M7 w1 `3 I
  1891. PHA
    , Q/ O4 C% {7 q, y1 T! e
  1892. INY9 U2 |! [& w  q! U4 b3 |' R, J6 X
  1893. LDA Item_Pos_Data,Y
    # p5 Z: v! b; V+ K- _* A2 n; q
  1894. STA PPU_Addr,X
    ( _  y) \" b& P& a% I, R/ G9 U3 j
  1895. INX
    * S/ B6 u: D- A
  1896. PLA
    - N/ b( o5 d( F! o) q
  1897. STA PPU_Addr,X
    ( f( {, ~3 ?9 [/ [/ L0 o. a2 {+ O7 `: y
  1898. INX: t; L! M6 I( R# S
  1899. 9 [3 Z  S$ j& I+ c4 h
  1900. LDA <Page_Last
    2 k. y% T$ j9 A" l% u* a
  1901. ASL A
    % ]1 w5 J# c" }$ ~9 C3 b2 |
  1902. TAY/ i* _/ L* y$ k2 g! y* m5 I9 a
  1903. LDA Music_Collection_Name,Y
    ! B" C' K1 P1 b& H
  1904. STA <Data_L
    / w" j: U% w8 e% j4 I) M
  1905. INY
    % B4 E" Z/ l/ b& |& K; g5 P
  1906. LDA Music_Collection_Name,Y0 E' a$ D8 P- y5 N
  1907. STA <Data_H
    6 T' h7 V9 S+ l+ D

  1908. " p6 P/ }$ P) V; O3 Z
  1909. LDY #$005 Q" ~" R* t6 ^# [/ P7 g
  1910. LDA [Data_L],Y
      ?/ ^9 P8 R0 z- Z
  1911. STA PPU_Addr,X
    . n4 W  l) S" a  J
  1912. INX
    ! Y2 B0 n& |6 _- {  z0 B) j
  1913. Clear_Item_Text_End4 e/ D; e( r4 J  R
  1914. STX PPU_Cur( X7 d5 J2 C5 `' `# P( a5 {
  1915. RTS
    " r4 K; x8 P8 i# W- u$ [" d

  1916. . a7 y, H4 M+ `: z: E! x% l$ A5 r
  1917. ;==================================================
    % c+ L" \' v0 ~. i3 k2 m$ w7 M
  1918. Show_Item_Text;显示页项目
    7 |- ^! P# V0 x0 u5 A
  1919. LDX PPU_Cur
    " _4 P9 N# t" @" z
  1920. LDA #PPU_MODE_CNT_LINE
    : t4 @5 m8 N8 F2 R+ R
  1921. STA PPU_Addr,X
    - X& `5 s1 i8 ?% c) l0 t* J: V( \4 ^
  1922. INX4 p) r$ G* z- n9 x" G; R
  1923. LDA Page_Cur7 U8 ^9 J# G7 f  b, V
  1924. SEC
    - X% U' y$ F% \( c0 e
  1925. SBC <Page_Cur_Index
    * z( h- w- L7 Z6 G8 Z: Y
  1926. ASL A
    2 j! j: J( L6 i* F6 W8 f
  1927. TAY; [6 n( g/ V. K% d+ @
  1928. LDA Item_Pos_Data,Y3 Z1 @4 r6 Q9 Z1 h
  1929. PHA# o9 i! a; n3 [: f! z- O$ d0 K1 p
  1930. INY
    2 ?: Q' b6 H6 n4 H' q3 J( c5 O$ E0 t
  1931. LDA Item_Pos_Data,Y
    . z* y# F) s1 r
  1932. STA PPU_Addr,X+ d7 T+ ?, n7 w1 E$ u* U2 j: b( l
  1933. INX; s$ @# ~# l- S( H7 r
  1934. PLA5 _( H' p4 E; h8 T' p! u" |
  1935. STA PPU_Addr,X
    2 y+ H! |1 e( Z7 e+ d! I. j; ^
  1936. INX
    9 W- @2 R9 Z5 K+ r
  1937.   p1 J( e: P" {+ ~6 z/ r% W
  1938. LDA Page_Cur
    # m6 j7 x. m+ b8 E& c1 u
  1939. ASL A1 h5 A  j% r2 J% ?- k0 n& j
  1940. TAY
      l7 Y; C, Y- S1 y% y! C% q+ }
  1941. LDA Music_Collection_Name,Y
    + S) ]. F4 O% K6 g- _5 a
  1942. STA <Data_L
    ) \. q3 z- b$ I: D
  1943. INY, q1 c+ u2 @) l; E
  1944. LDA Music_Collection_Name,Y- V7 h3 ^2 F+ F4 s5 k
  1945. STA <Data_H, y' d2 o3 w! T/ o0 l0 r
  1946. , K9 J/ d3 U: n& j
  1947. LDY #$00) R$ B; W4 K4 r: p- ?
  1948. LDA [Data_L],Y& u3 H9 \: a1 b1 p, S" q3 z
  1949. STA PPU_Addr,X0 z2 H4 |* @" u5 R. J" h9 C
  1950. STA Data_Cnt) m+ D/ B8 \; O0 {
  1951. INX% o# \  \4 e( s/ |5 u& S

  1952. 5 V2 n9 C& i, M/ [
  1953. INY3 i2 P. H) Z& @- _2 i2 t
  1954. Show_Item_Text_Write0 F$ W" ^. x# o+ P6 w9 D# |0 C
  1955. LDA [Data_L],Y
    9 {, ]- o* P0 Y; R
  1956. STA PPU_Addr,X/ f- r: z2 O% _4 Z
  1957. INY
    * n# t0 N( Y! q4 [8 e7 x1 y
  1958. INX" D$ R# n- d. u4 J. \" ]) u
  1959. DEC Data_Cnt
    ) l. E% z9 |4 ~  Q" D  {
  1960. BNE Show_Item_Text_Write  u1 I" h' r% y- U
  1961. 1 q1 ^0 |2 t& }; y" Y4 m$ }
  1962. Show_Item_Text_End: V; ]% W  A+ ]+ c- u0 }4 {+ u/ O; B
  1963. STX PPU_Cur
    * r4 ?. e. p7 i* N3 m
  1964. RTS, x4 H( ?; k% H/ V
  1965. , U- \( D5 z1 ~7 S% F
  1966. ;==================================================; P6 [' m( {7 f7 C
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量
    7 P% E4 H- o3 Y
  1968. STA <Data_Buf
    $ H& B! d. a; h9 J
  1969. LDA #$00
    " h$ H) a* [8 u6 I3 r3 S  O5 G
  1970. Get_Page_Index_Calc
    0 n' ~: L# b- G
  1971. CLC
      d2 @' m0 `4 k1 p* b' i; [
  1972. ADC #PAGE_SIZE
    ( p, N9 r9 ^: X* ?
  1973. CMP <Data_Buf+ L: S8 v7 L/ \
  1974. BCC Get_Page_Index_Calc4 f6 k5 }4 p7 S9 T& |
  1975. BEQ Get_Page_Index_Calc_End
    : G% n2 J% Q8 h+ c* n, s
  1976. SEC& ]6 u" ?9 B% G' _$ m$ q5 s( ^
  1977. SBC #PAGE_SIZE
    / Z' c8 h% y0 z4 X$ F+ D
  1978. Get_Page_Index_Calc_End
    2 u# f4 F" p0 \8 s3 \7 R
  1979. STA <Data_Buf
    * U  k5 ~* p0 i! W. L8 |
  1980. Get_Page_Index_Cnt
    ! s; }0 n( \" d; Y" q
  1981. LDA #PAGE_SIZE
    7 L6 a3 L) N# m; @1 V; V
  1982. STA Data_Cnt
    & [# m: E# \' `$ X% D

  1983. + g0 ?8 ^2 n- N, w' d
  1984. LDA <Data_Buf
      X+ r; L1 B9 E# s3 ?- G
  1985. CLC8 u9 o! L2 l0 R' }
  1986. ADC #PAGE_SIZE
    # m  l0 X1 F; w* A! F" n1 A) s
  1987. CMP #ITEM_MAX_SIZE  W) i; c9 l) [9 M# R' S) m
  1988. BCC Get_Page_Index_Cnt_End
    4 ~4 P6 h6 B6 y! w) a4 t/ r% y* j

  1989. 8 s8 \& d4 Y5 x, Q7 E- Z; C. Z# |
  1990. LDA #ITEM_MAX_SIZE: ]& A7 }; d8 ~( G+ h6 Q% J
  1991. SEC
    / x1 a/ x1 g- W
  1992. SBC <Data_Buf, B$ n9 u' S) }% _# G% U. A, R
  1993. STA <Data_Cnt
    7 A% c7 |+ v9 a% W5 r- N
  1994.   P& r+ Y) V: ?5 G
  1995. Get_Page_Index_Cnt_End! X4 a5 Q0 d: o  Y$ o
  1996. RTS. |) D4 ?( x+ D7 \% \
  1997.   g9 C+ m1 z+ g0 H6 N" u7 g) ^
  1998. ;==================================================
    3 q/ k6 h6 i* `& `, F6 V' E
  1999. Get_Last_Page_Start_Index
    # X. h* a6 _: e' n
  2000. LDA <Music_Item_Last; D' e) H+ j' P. }5 Z' ~3 a
  2001. JSR Get_Page_Start_Index
    2 G. s) g' w9 v: ~
  2002. LDA Data_Buf8 K& `$ b4 |1 B6 U+ \) z. J
  2003. STA Page_Last
    / ?! j# g! R; _
  2004. STA Page_Last_Index
    2 l4 c" Y% m6 e/ R2 {0 t8 Y, _
  2005. LDA Data_Cnt+ K5 X6 ]& ~5 w, x
  2006. STA Page_Last_Cnt
    # W7 n& c( X) k5 m; n
  2007. RTS. U' m7 W, N: I3 d4 r; R  u4 ?

  2008.   s. ]3 s1 O) t6 H" _8 o
  2009. ;==================================================
    5 a& R$ _3 x3 S4 i' ^3 L. k$ j
  2010. Get_Cur_Page_Start_Index4 F5 x0 [. ^3 p5 ^5 y, [
  2011. LDA <Music_Item_Cur
    ' G) B6 J4 F# U5 Y; ~1 c: |
  2012. JSR Get_Page_Start_Index1 H) z: {  B) T! C% \
  2013. LDA Data_Buf7 ^( R: S$ p) R/ R5 |7 b: P) k0 `
  2014. STA Page_Cur  J- z" b) E' N& K- t  u8 M
  2015. STA Page_Cur_Index7 g, V( D2 A- Q( O  Z( n
  2016. LDA Data_Cnt8 g4 r& a' B$ e; f
  2017. STA Page_Cur_Cnt
    5 y5 G8 R5 W* [, A- n; F% c
  2018. RTS# K! u9 J, N, c, ~2 t2 Y" l
  2019. 5 g1 \- f/ P  p& F) |  m
  2020. ;==================================================
    4 U- Z" v, k/ H2 P1 V% U3 Z; x
  2021. Show_Page_Text;显示页文本
    + h# {# y0 z8 a& f
  2022. LDA <Text_Disable_Flag; k- K" j9 W2 _/ @3 ?: s
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM
    ) Y0 Y8 o0 n2 b$ q" h- A
  2024. STA <Text_Disable_Flag
      x! m  Y( S" Z! y. J  b' ^/ H
  2025. : P- c% U$ n8 R2 i( t
  2026. JSR Get_Last_Page_Start_Index
    , p, \% K) Y% T# U4 K- X6 q
  2027. JSR Get_Cur_Page_Start_Index
    & Q6 W0 w& ~; t: G9 P
  2028. 3 A8 d3 s4 b0 V9 i
  2029. Show_Page_Text_Set
    $ U0 j1 S, x, }: ^% q1 Z
  2030. ' x4 e* e9 u4 M" C  D9 t
  2031. Clear_Page_Last_Item;清理上一页
    $ s& O. {$ x  d' @
  2032. LDA Page_Last_Cnt8 k# s2 H/ [6 i) L7 m! o% m
  2033. BEQ Clear_Page_Last_Item_End$ ^6 ~4 l$ u- N
  2034. JSR Clear_Item_Text
    & i/ m, ~6 T8 {+ \( A
  2035. INC Page_Last
    4 c" k( M+ ]; J. c! V  _9 k. F
  2036. DEC Page_Last_Cnt; E7 L' P5 J. `7 u$ o- [2 V
  2037. Clear_Page_Last_Item_End
    $ _- i* G1 T7 `3 _1 D' f2 t
  2038. 0 M! e& X1 V) y7 B7 G+ I* O
  2039. Show_Page_Cur_Item;显示当前页
    9 k3 o6 I- X( p7 c* n8 Y: g
  2040. LDA Page_Cur_Cnt) M! u1 }( U  A
  2041. BEQ Show_Page_Cur_Item_End
    " n! o0 k- Q# ^/ U6 `
  2042. JSR Show_Item_Text
    1 c0 r3 I# E6 p8 h5 ~% u! V
  2043. INC Page_Cur* E$ Z3 r! D+ B2 j' }0 X' y6 C
  2044. DEC Page_Cur_Cnt
    ; N4 c7 D7 j; V  r2 T8 Y6 K% e
  2045. Show_Page_Cur_Item_End' F4 h3 V: B  b' W0 m9 p/ `/ ]

  2046. ; R, q1 M# S# @2 s" V. `
  2047. INC <Time_Wait_Cnt
    8 |5 g& H1 l4 T
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作+ `3 f7 L$ U/ H, O. g7 v" s
  2049. LDA <Time_Wait_Cnt8 g) f5 U1 i. i& t4 V7 S3 G  m
  2050. BNE Show_Page_Text_Set_Wait
    6 Q0 j* S# L" H5 s8 {
  2051. & V. m/ ?+ e. y$ [# m4 ?
  2052. LDA Page_Last_Cnt0 @8 \' [% R7 h  K6 N# |* f, b( S
  2053. ORA Page_Cur_Cnt
    & L  G+ t5 `, Y+ J, p- T/ I
  2054. BNE Show_Page_Text_Set
    " d& L( K  F( K! h& C9 N) O9 G7 T
  2055. LDA <Text_Disable_Flag
    : b( `3 q7 o, b$ v, y2 t
  2056. AND #TEXT_DISABLE_ITEM ^ $FF
    2 T  S( H. |- _; K# R: x% _8 P  w
  2057. STA <Text_Disable_Flag
    - E5 X% K/ Y  ^. j) g( e# k
  2058. RTS5 Z) W( o) H: D! `( [

  2059. # V' R1 I  N% v2 @) p2 Y
  2060. ;==================================================9 Z1 w- A9 g4 W. I1 q$ F! r7 s
  2061. Last_Item;上一项
    % z5 f  T3 P; f$ F8 L
  2062. JSR Clear_Last_Track_Name
    6 T! \% r" k! H3 c- ]
  2063. JSR Disable_Text_Draw
    3 D, U% g6 p- O1 L5 l5 K

  2064. 8 u2 ~# S( r9 B3 e
  2065. LDA <Music_Item_Cur
    3 Q0 A. p% ^/ v: {6 U0 v5 p
  2066. STA <Music_Item_Last3 D% }$ G, @1 y9 Z, X% k5 h2 X1 @+ S, ]

  2067. 8 }- j: ?4 n( G: L- O) a
  2068. JSR Get_Last_Page_Start_Index
    , `# e3 ^1 p/ G" t

  2069. 6 k( }$ h8 B0 @6 N  t. V
  2070. LDA #$00
    . Z3 ~  N0 d" ~1 ]4 Q
  2071. STA Data_Buf
    1 s6 S- H+ Y; q( Q2 Y: s# M7 X

  2072. ' t3 V7 N) c8 ^- T0 e! G
  2073. LDA <Page_Last
    . Z* ~& d0 W$ ~! _
  2074. CMP <Music_Item_Cur
    " G1 o* X1 ?, S" @3 `
  2075. BNE Last_Item_Begin
    8 X3 H3 P4 i$ R- e( ?" S& J: X9 F

  2076. 9 p4 f" l& Q+ U/ k  k
  2077. LDA #$01
    0 V7 ]( k" C. ^# P
  2078. STA Data_Buf1 c# R7 D$ E- Z+ X
  2079. Last_Item_Begin6 J. E( T0 o8 U! E
  2080. LDA <Music_Item_Cur
    7 n0 Y1 b2 e7 R& ]
  2081. BNE Last_Item_Set
    ( U# W+ N5 j( s" y' A  @
  2082. LDA #ITEM_MAX_INDEX + 1
    $ S: l# y/ A6 H: K7 \
  2083. STA <Music_Item_Cur% o  k( E8 g# D. [& _" k! a

  2084. : |0 {' C' f. W, r. ?& V3 U
  2085. Last_Item_Set
      ^* e& N; `+ s4 Y
  2086. DEC <Music_Item_Cur0 ]7 R% b9 @( t  O5 p" u
  2087. LDA <Music_Item_Cur
    ( q; l5 S! j6 k# f
  2088. JSR Reset_Current_Music
    2 c8 _' ^- M6 H# {2 P1 C' y- V4 Z

  2089. & e4 g- S" ?" K; w& a' e
  2090. Last_Item_Play- p# ~) d; _+ |0 B1 ]4 S
  2091. LDA Data_Buf
    2 A! ]1 @6 [: O! m* B6 u: @
  2092. BEQ Last_Item_End: f5 N; p2 d% y( ]5 V
  2093. JSR Show_Page_Text
    ) S8 K+ C* @& K! s3 Z" U5 T8 Z
  2094. Last_Item_End' a* s# T$ P# z4 K: t: E5 w1 M
  2095. RTS( j5 L% o1 e2 k& _
  2096. 9 d* H! c" d1 A, Y9 }8 `
  2097. ;==================================================5 p8 ]& i9 [$ X% ?" L
  2098. Next_Item;下一项: O1 x  K# u% W. ^9 Y7 f- T- G
  2099. JSR Clear_Last_Track_Name" Z+ D5 u$ `: t( m
  2100. JSR Disable_Text_Draw
    / |2 E1 q. f+ Q1 {

  2101. ; H- E# e& k! R
  2102. LDA <Music_Item_Cur& t4 _$ |% n3 ]: y4 Z2 u5 `
  2103. STA <Music_Item_Last
    , |8 X$ Q7 p6 y* t

  2104. # D" ^# j* i  [* ]1 \# p( I2 y/ s
  2105. JSR Get_Last_Page_Start_Index8 D+ R: U  v/ N( n# \( N
  2106. : `$ {2 c  }) P" ?5 J( Z1 |% y# A
  2107. LDA #$00
    2 O5 S  B+ C$ s
  2108. STA Data_Buf
    & U$ O3 _1 A; p

  2109. 8 G0 _8 s( u3 o' K. S6 @7 ^$ U
  2110. LDA <Page_Last  u0 E, i% x' o  \0 u
  2111. CLC
    : v2 A9 y3 y4 l
  2112. ADC <Page_Last_Cnt
    ' v( Q. s) |( d1 N
  2113. SEC4 K: X0 q) W1 b. h3 M  b* q
  2114. SBC #$01
    4 i( |# k5 w% i! B- `! M
  2115. CMP <Music_Item_Cur% [7 O  P8 f6 T3 c
  2116. BNE Next_Item_Begin  K4 B1 m' p4 d0 m. u) t
  2117. ' S$ J3 q- g% D/ I% M
  2118. LDA #$01) o: W. V9 I5 p1 L$ A6 R3 U
  2119. STA Data_Buf0 N" W# Q" a! d2 |
  2120. Next_Item_Begin
    / l6 @& G  @) O( {' _/ @: J  \" D- i
  2121. LDA <Music_Item_Cur
    9 f. V* U" L# e- I# y- a) f
  2122. CMP #ITEM_MAX_INDEX
    3 m3 e' l* Q" R
  2123. BCC Next_Item_Set) {' b! V! o5 {7 F% c; L
  2124. LDA #$FF4 j! K" G' h$ {1 y5 A$ e
  2125. STA <Music_Item_Cur  K, a: `$ h6 o3 J
  2126. Next_Item_Set- C( z4 V5 W$ i* S4 u
  2127. INC <Music_Item_Cur2 m# U& v5 R& P% ]0 a. {
  2128. LDA <Music_Item_Cur# v2 L. m1 U. S3 `
  2129. LDA <Music_Item_Cur8 Q, j! o3 {( d2 v. n( F  P
  2130. JSR Reset_Current_Music
    / R& D% {& }5 H8 ~, A3 N
  2131. Next_Item_Play9 A! Y3 Y# J& M0 q$ J6 Q. s# J
  2132. LDA Data_Buf
    " E5 ^8 ~" m' P, w' t
  2133. BEQ Next_Item_End2 J& v1 O$ }( _+ Z( y8 b/ `
  2134. JSR Show_Page_Text
    4 D1 q/ m" m. p8 J  i& ?5 i  u% U) X
  2135. Next_Item_End4 N4 f9 M% ?  {# m
  2136. RTS
    3 ^5 P# q$ k, J; w5 X9 H' I0 K
  2137. 1 _; e! `$ J/ b7 B
  2138. ;==================================================: k5 t) g7 S9 D* L, K% U3 V3 N
  2139. Last_Page;上一页
    : B+ B/ z, ?, M& ^
  2140. RTS% R* @% i; p. {$ y: e0 X6 S/ Y

  2141. 0 Z* f/ a; r2 Q
  2142. ;==================================================
    3 B8 S0 b& g# j! g: l( Z
  2143. Next_Page;下一页
    , j. }  @1 l8 E7 e1 W
  2144. LDA #PAGE_MAX_INDEX
      [( E- G1 D* R. w. h5 e5 Y  Q
  2145. CMP #$01
    # S' {  b$ }, m1 j
  2146. BEQ Next_Page_End
    0 R3 ^; t+ D2 y" `5 i5 [$ B% n

  2147. " G' s8 n) m, B" I' z$ x, E, ^1 o
  2148. LDA <Music_Item_Cur! P+ B9 s% ?/ C+ Z# b" v8 {1 M
  2149. STA <Music_Item_Last
    # h) d* `' \) c1 R8 D% O

  2150. * x+ H' `' _/ r: T) }; S
  2151. JSR Get_Last_Page_Start_Index
    ( H2 J) I# d* S) F+ g
  2152. ; W8 {& |! [/ o; O6 g
  2153. LDA <Page_Last_Index
    ! H7 r2 r4 f+ {3 @/ X! c
  2154. CMP #PAGE_MAX_INDEX4 H" a3 L- [8 t. k
  2155. BCS Next_Page_In_End_Page
    % E( _3 F$ b4 u: v, R# c; V

  2156. # d1 I4 M: Z9 Q2 @. U3 w- Z
  2157. Next_Page_Not_End_Page;不是在最后一页6 U: [6 }+ ^9 E/ K  B- f  M/ D1 a8 l
  2158. LDA <Music_Item_Cur
    7 k! a6 G5 z0 d; \
  2159. CLC
    6 m/ E* W' q. W  |7 ~! P' ~
  2160. ADC #PAGE_SIZE4 g# y( Q0 m. R; p/ g
  2161. CMP #ITEM_MAX_SIZE
    ( o" U2 s- y+ D
  2162. BCC Next_Page_Not_End_Page_Less  k" R& q& h4 W0 R7 t
  2163. LDA <Music_Item_Cur
      M! G& v+ w# ~. @1 u8 P
  2164. SEC) E& y# h4 _& e9 l% k% F
  2165. SBC <Page_Last_Index  p3 m" j, |7 Y( x" u* ]* Y! x
  2166. CLC) N+ n: W; j; s' x+ p* S/ o6 O
  2167. ADC #PAGE_MAX_INDEX4 ^: h& R5 w9 z" Z0 X
  2168. CMP #ITEM_MAX_SIZE( A2 G% t2 j9 a( b2 u' M' |! h4 S
  2169. BCC Next_Page_Not_End_Page_Less
    : x8 u9 X* J- j  ]- D7 d
  2170. LDA #ITEM_MAX_INDEX% U' p8 K  c1 P! l7 @5 Z/ Y4 y5 \  R
  2171. Next_Page_Not_End_Page_Less
    : j: ~5 [- v7 M$ q# |
  2172. STA <Music_Item_Cur1 S1 G8 \3 z0 r  P
  2173. JMP Next_Page_Reset- w& v1 P3 o" U% n5 O! g2 F% W5 p
  2174. 8 U  W, W  s. v; F
  2175. Next_Page_In_End_Page;在最后一页
    4 c  w8 U! P5 i. Q  c; o
  2176. LDA <Music_Item_Cur9 X( \/ n1 f: ~' N
  2177. SEC- H7 [2 b& o! l8 A9 y' U
  2178. SBC <Page_Last_Index
    . W) a$ O' i3 _
  2179. STA <Music_Item_Cur  X" v- J+ i% L0 q# M
  2180.   S& X4 e# c+ m; h
  2181. Next_Page_Reset) L8 d8 D+ k+ W9 P
  2182. LDA <Music_Item_Cur
    : X6 |, P' B7 P5 b( w* @
  2183. JSR Reset_Current_Music( a" J9 [1 J. @
  2184. JSR Show_Page_Text
    1 l. o* V, j+ t0 z: o
  2185. Next_Page_End
    - I0 W6 ~0 F+ ?" Y$ ?' l: ]3 G
  2186. RTS4 `3 O0 W2 W- t6 N$ h8 M
  2187. 7 N. B# \) ~% V
  2188. ;==================================================
    + O8 ]- p7 X. I" X: T% N; g
  2189. Disable_Text_Draw;禁用音乐条刷新( f( ~" {8 W3 ?: t  Q. x  ]
  2190. LDA <Text_Disable_Flag
    : Q6 W( T8 q8 z) a
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    0 T2 ~) U0 w7 V6 ?3 e( i
  2192. STA <Text_Disable_Flag* E& ~1 j* j% g2 E# z2 z
  2193. RTS. S, `0 D7 S! g0 X
  2194. / b; j3 f6 ^( v- ]
  2195. ;==================================================/ }4 [) s* Y. X" t) v
  2196. Clear_Last_Track_Name;清除上次曲目名! {) e4 R8 \1 b0 \$ y0 m+ g
  2197. LDX <Music_Item_Cur
    $ ^- l& M9 F& L2 N- R5 x8 P
  2198. LDA <Music_Cur,X; n7 c" @( Z! |7 E4 W
  2199. .IF Track_Name_Pos# @3 m) U$ E$ y) ~* F) C2 r
  2200. JSR Clear_Track_Info
      [; x1 Q+ ~- g- b5 p6 M
  2201. .ENDIF
    6 y; x3 L) S- s* l: [
  2202. RTS
    - Z; X. r# L5 H$ o* |

  2203. 7 e* b7 y& \( e3 s
  2204. ;==================================================: [9 C* k$ s$ F+ V) e8 _4 T
  2205. Reset_Current_Music;重设当前曲目& l, `5 N- p" n! J' F( q3 J& Z

  2206. 9 }$ w/ K8 ~5 z. [7 Y6 A. J- [$ K
  2207. ;写入当前总曲目1 t# H% Z% K' S; L0 z
  2208. JSR Set_Sound_Total+ Y+ X) L# h4 R# t4 h5 x; u
  2209. LDX <Music_Item_Cur
    ( L1 x1 J9 u0 Q2 {8 }3 Z3 T
  2210. 7 B) ?. T5 L# G4 r, X
  2211. LDA #$00  _% |- [. [' `1 g- T& x4 Q% b
  2212. STA <Music_Last* W6 e  h2 _8 a4 E2 j
  2213. & w% r9 l! G3 O0 k1 a7 v
  2214. JSR Sound_Reset_Proc
      V5 m( J4 L5 d$ p9 I
  2215. JSR Music_Show
    6 s& A- e6 |1 E! q. E* L' B2 I0 G: h8 C
  2216. RTS& j; r0 X& _" W3 y" M
  2217. / I, r5 V. o4 W! r
  2218. ;==================================================
    * T$ l4 w$ c# z- ~
  2219. Music_Song_Stop;音乐停止/ A3 W% n$ f$ f8 J( W) o
  2220. LDA #$01
    * c' m1 n* \+ N1 X) O+ }. h6 r
  2221. STA <Music_Stop_State
    2 W" h! O! L5 ?0 f
  2222. JSR Music_Bar_ReSet
    8 ?+ B: ?; b5 k: A1 r
  2223. JSR Time_ReSet
    4 S, q* M3 b# u( t9 [6 L4 Q( G
  2224. JSR Sound_Data_Clear
    - A4 n5 R1 z2 q
  2225. JSR Music_State_Show
    ) X( d: H/ C, n: F& P7 h1 j2 c
  2226. RTS+ R* f" G$ b- P/ m6 l) y7 m) a
  2227. 8 ?' X  p# n% j, ?' V
  2228. ;==================================================* F4 g$ f- h: x; I! n$ y* i# y
  2229. Music_Song_Play;音乐播放
    , }9 S% x3 v) _5 ^
  2230. LDA #$00, c: w3 A, g; b4 L- M  d
  2231. STA <Music_Stop_State
    - o5 d+ A- U" u8 a4 S5 |4 V
  2232. LDX <Music_Item_Cur! n" O/ t* F0 e6 ?; k, d
  2233. LDA <Music_Cur,X: Y! ^- V* t1 R5 P- z' u" E
  2234. JSR Sound_Init_Proc
    6 a8 B1 R" J1 M- I& @' u5 a$ ?& z
  2235. RTS1 }5 |6 W/ c! @! P

  2236. 7 e+ \0 E. J- o& k: T: _
  2237. ;==================================================
    " E' ~4 i, W# f" }9 x" D
  2238. Music_Song_Last_10;上10曲
    ' C; }6 J4 f# p( t) o4 l" g" K
  2239. JSR Clear_Last_Track_Name; r1 m( `6 C' M7 x( U
  2240. JSR Disable_Text_Draw: |% D2 \/ L8 s
  2241. LDX <Music_Item_Cur
    0 w1 I+ w/ V4 \1 v
  2242. JSR Set_Sound_Total
    5 {% e+ u) {2 p! `2 P2 @; `0 u
  2243. LDA <Music_Cur,X" F" {( A$ g: |9 z0 J& X9 b: {
  2244. SEC
    ; u' j3 ^; k" V, d8 T& H+ t( z1 m* `
  2245. SBC #10
    : p+ J! l6 }; `! `7 V/ n
  2246. BCS Music_Song_Last_10_Set+ G# L' F& N+ {) t
  2247. LDA #$00
    2 c1 p! y2 G3 E. d! \
  2248. Music_Song_Last_10_Set' \5 w0 ~1 a& }; [! H& b0 G
  2249. STA <Music_Cur,X
    9 r1 }' J  c- _) |" [6 ?# U
  2250. JSR Sound_Reset_Proc" f7 j! P; f0 m7 _4 a
  2251. JSR Music_Show
    0 U; z$ Y5 b: U. Z+ H
  2252. Music_Song_Last_10_End
      c: z& P- D4 {  `4 c/ a
  2253. RTS
    % l! O4 P' }" k/ G% L

  2254.   r& J( z1 x. Z0 O8 k
  2255. ;==================================================
    , t4 T; T9 d6 e2 P
  2256. Music_Song_Next_10;下10曲
      w4 d/ c+ \# C6 f5 B
  2257. JSR Clear_Last_Track_Name
    . N/ u" `0 x2 j( I
  2258. JSR Disable_Text_Draw
    5 {, g' ?4 F1 }
  2259. LDX <Music_Item_Cur8 e) R- A* I1 Q" _: k  z( N0 G
  2260. JSR Set_Sound_Total, A3 _. @2 K4 w( m! {' V$ s
  2261. LDA <Music_Cur,X
    2 d- B* h- a2 r8 V& _& V8 @2 e
  2262. CLC0 j. q+ ?4 E$ A0 `% P& h
  2263. ADC #10
    9 [8 y8 Y6 q" |/ T
  2264. CMP Music_Total- Q9 O3 x. M; c8 F! j$ w
  2265. BCC Music_Song_Next_10_Set/ j' V$ P+ y/ s
  2266. LDA Music_Total5 [2 p: R' Y* W! o* G
  2267. Music_Song_Next_10_Set2 o6 I8 G) s+ K% Q) s/ |1 H  l3 U
  2268. STA <Music_Cur,X) O3 F0 s8 n5 ]& O* u) T! H/ M" s; V
  2269. JSR Sound_Reset_Proc' B& e3 y7 P/ A4 \: p7 Q: q4 H
  2270. JSR Music_Show
    1 E5 {# i9 U' P( I
  2271. Music_Song_Next_10_End
    ; }2 ?! ^( X9 D) r! ?
  2272. RTS
    ; s: Y4 k+ ?4 s3 c) L  @" t4 g; P# o
  2273. : w0 a# }9 U% ]' a0 m
  2274. ;==================================================7 J" h2 O$ [( y+ N5 ]% Z  ]5 m
  2275. Music_Song_Last;上一曲
    9 j! F+ C9 H* k; r7 n
  2276. JSR Clear_Last_Track_Name2 @9 C& q6 [2 q8 w$ u
  2277. JSR Disable_Text_Draw7 a( g3 J6 m& }3 Q; T) E
  2278. LDX <Music_Item_Cur0 F* q9 }, }# E# U2 f
  2279. JSR Set_Sound_Total9 F" v* T0 Y& E5 r; Z7 g, \, \. m  p
  2280. LDA <Music_Cur,X% D8 {7 ]. c# V" x! U/ u% N
  2281. BEQ Music_Song_Last_Set
    4 \/ y" l9 p4 X. e3 R2 \
  2282. DEC <Music_Cur,X
    1 N, ]% E2 o: p
  2283. Music_Song_Last_Set/ _+ L/ y6 R+ ~0 f/ s) R' o* ~
  2284. JSR Sound_Reset_Proc
    2 q2 G9 y) D% Y" \' J+ h' f* a5 q. B
  2285. JSR Music_Show0 F$ x" Y4 t4 i+ F
  2286. Music_Song_Last_End* x/ z( V: f$ @0 E( Z
  2287. RTS
    ; n( s, q. n. {, h+ i; \

  2288. 8 n! b/ b; q( H6 x% Y- L" g
  2289. ;==================================================
    - I+ y7 t: ?4 B* Q4 g7 _
  2290. Music_Song_Next;下一曲& }3 Y  @! S! P' C' N
  2291. JSR Clear_Last_Track_Name1 h0 G* a5 `+ J
  2292. JSR Disable_Text_Draw
    0 y+ f: z3 Y% Y8 Y
  2293. LDX <Music_Item_Cur5 u" B! Q2 N! }$ ?& u
  2294. JSR Set_Sound_Total$ p% g3 Q3 U; p& n3 W
  2295. LDA <Music_Cur,X- h) M3 f8 i7 _( ], Q
  2296. CMP Music_Total. I7 G2 U2 Z, N8 M2 D
  2297. BCS Music_Song_Next_Set. c! P2 m: I* g+ ?6 u
  2298. INC <Music_Cur,X
    $ R+ n- ^/ O  w3 E$ Y/ ^. c8 R
  2299. Music_Song_Next_Set
    , f% u% f' Z5 o7 N9 c3 P
  2300. JSR Sound_Reset_Proc
    & v' b' A7 T% y9 x) U: ]) A, ~
  2301. JSR Music_Show
    1 i" q+ T0 d1 O9 C1 j9 m" w
  2302. Music_Song_Next_End# b, j6 K) h: ~& [) L* D- [
  2303. RTS  J0 J! Q6 _9 t6 D9 o
  2304. 6 O, r( ~' P& z; o9 w) I4 A6 B2 A
  2305. ;==================================================
    ! u+ b+ V! K  e0 b5 p  e7 J
  2306. Change_Select_Item;改变当前选择项
    / i1 ?$ P# ?( }+ m0 F1 U
  2307. ;--------------------------------------------------
    * n) J2 ]+ B7 e5 y2 `
  2308. Change_Select_Stop_Play_Item;停止/播放
    1 R' u) ~. g4 Q. D, ^
  2309. LDA <Key_Once* e) n) ~, l+ Y8 O
  2310. CMP #$101 i$ G5 _6 Y$ b9 }# V. ?! U. \
  2311. BNE Change_Select_Last_Item2 V/ v* u0 D. I7 z# V% ]6 Q$ m
  2312. LDA <Music_Stop_State' P. G( }3 d/ c7 a
  2313. BNE Change_Select_Play1 x5 s, E4 f6 k: b
  2314. JSR Music_Song_Stop1 l7 h* D! k% U, Z
  2315. LDA <Music_Stop_State
    ; e: u8 ]8 z" K. o' ?5 ~
  2316. RTS
    3 D% {. |4 S5 p
  2317. ! W; h& W2 y. W  y- `
  2318. Change_Select_Play- Z; p! R* p- B; ]; N  |% D
  2319. JSR Music_Song_Play
    / F( N; x2 a1 D; O  n; H
  2320. RTS6 n7 q( k/ Y  ]; F

  2321. " g  x( ?' q8 a
  2322. ;--------------------------------------------------
      j1 z9 a: E; G9 v: s; |
  2323. Change_Select_Last_Item;上一个专辑
    # {0 K1 g) s" x: c$ h" n# y8 p
  2324. LDA <Text_Disable_Flag! ?2 j$ h, u+ G* r
  2325. AND #TEXT_DISABLE_ITEM6 G) f4 ?( C+ V% M4 b1 c9 @- B
  2326. BNE Change_Select_Item_End
    % |) n* p9 K& e$ |
  2327. LDA <Key_Once
    1 O8 Q  m" k+ C- i
  2328. CMP #$08
    ! `4 D+ c) W  H0 a3 |
  2329. BNE Change_Select_Next_Item
    ) T2 n& b/ y3 S" j# N/ w- b
  2330. JSR Last_Item
    # I; k' T# @" v* y6 U( O8 L
  2331. ;--------------------------------------------------
    - d4 ~2 I: i5 j* g% F$ n4 i& n
  2332. Change_Select_Next_Item;下一个专辑' ^: O4 d/ H/ E( V
  2333. LDA <Key_Once
    * A$ h+ J9 M7 _: I- s
  2334. CMP #$04
    # S2 r5 K( u1 \, `
  2335. BNE Change_Select_Last_10% @! O& P- M9 F' W; L" @  J. M! X
  2336. JSR Next_Item4 ~6 i+ F. C( _2 q. V& N3 b
  2337. LDA <Music_Item_Cur6 Y& X0 Z# y. G( a! d/ E# N* j
  2338. JSR Get_Page_Start_Index( `% a( k8 N1 M, F8 |6 R7 X$ g# z
  2339. ;--------------------------------------------------
    1 e7 J! H8 {6 E; N
  2340. Change_Select_Last_10;前10曲
    4 |( t. ~7 ]$ a& B$ A
  2341. LDA <Key_Once
    & A, F2 a5 y7 |- }& z; C$ N
  2342. CMP #$40  U/ G5 x: C# p6 f
  2343. BNE Change_Select_Next_10
    0 u  R2 V; G& W
  2344. JSR Music_Song_Last_107 i5 l: r0 d0 |& c( u9 Q
  2345. ;--------------------------------------------------2 p: ~9 o- |# h8 ?& ^
  2346. Change_Select_Next_10;后10曲
    ! |# h$ T( x! Y  Z% ]
  2347. LDA <Key_Once
    * l" m0 h0 ^4 T% E" T5 f
  2348. CMP #$804 Z0 R3 U" J+ |6 W2 o
  2349. BNE Change_Select_Last
    , f3 b! {6 G1 b* l3 B7 t3 F5 e
  2350. JSR Music_Song_Next_10
    4 n5 D5 P+ a/ l: _
  2351. ;--------------------------------------------------) }( `: Q7 ]/ [9 u8 b
  2352. Change_Select_Last;上一曲' ~; Y0 E8 t7 I! V& S$ Z$ X: g
  2353. LDA <Key_Once. u2 s# S0 v! \
  2354. CMP #$02
    9 y! D5 U7 g& v4 j* p
  2355. BNE Change_Select_Next
    # w# H: Y9 c3 a4 p% q4 t* ^* g
  2356. JSR Music_Song_Last
    : {% s8 I$ w7 r7 C
  2357. ;--------------------------------------------------
    # ~% N- z6 I" f# ?0 x$ b
  2358. Change_Select_Next;下一曲8 w, H' a# q0 a4 l- ^0 L0 ~. H/ x
  2359. LDA <Key_Once
    * m' K! `6 {- k& X2 Q
  2360. CMP #$01, Q9 }* J7 X2 v9 \) i+ k6 b, W' F" a9 B
  2361. BNE Change_Page_Next
    3 A' L7 H8 ?% R1 m$ S; P; \
  2362. JSR Music_Song_Next
    " |  Y4 @& x% ?8 M; k+ I+ a, c
  2363. ;--------------------------------------------------: r& f$ A! g/ U9 X) k) s* J
  2364. Change_Page_Next;下一页
    ( f. P4 k( ?9 S' e1 _' _8 G
  2365. LDA <Key_Once- O  N! M" Y# t0 d9 j! ]! `2 p
  2366. CMP #$20
    7 W, x% Y. C1 u  O6 o
  2367. BNE Change_Select_Item_End
    ' v1 S# X) Y/ E- R5 f
  2368. JSR Next_Page+ y; y1 Y' n' g' I9 |
  2369. ;--------------------------------------------------
      m1 h# @5 l. E) n1 ?5 r  c
  2370. Change_Select_Item_End! V2 o) u: j  P* w  }1 y
  2371. RTS
    * N" |$ ?; P" r( X4 p- U: r- w8 d
  2372. 4 K1 f2 K4 o0 d: Z% B; ~& ^5 R& X
  2373. ;==================================================
    4 \, M9 H1 u( k, T! o
  2374. Show_Arrow;显示箭头光标* \9 L; H2 ?' b& R) U
  2375. LDA <Music_Item_Cur' |& M6 g6 _& X$ e
  2376. JSR Get_Page_Start_Index
    ! ?( P5 A: A- W8 O- {
  2377. LDA #$00- ~+ W  Y$ Y+ f5 w! x9 O- B
  2378. STA PPU_OAM_ADDR
      L( j$ r5 J+ a: c9 F. ^, ]
  2379. LDA <Music_Item_Cur
    1 C9 x0 U1 ?& p: d# B
  2380. SEC  I+ @' p. @, ?3 m% T$ n1 Z6 [0 I
  2381. SBC <Data_Buf" L/ x" T4 |# I' k) R& w; ^! Z
  2382. ASL A0 l* n3 W1 r6 X3 S" h
  2383. ASL A8 A  S5 e- S4 s2 M5 o
  2384. ASL A
    ! U: D8 p9 _$ b$ A' @( ?
  2385. ASL A
    # U! O6 o, ~4 z( T  O8 Z( w
  2386. CLC
    % E1 ~" V  z, A" e2 P! a6 q
  2387. ADC #ARROW_Y_OFFSET
    2 ~2 V0 X7 z2 \/ N. w+ C
  2388. STA OAM_TEMP_ADDR + $00- j5 L; t2 S' s- B  L2 A
  2389. ;STA PPU_OAM_DATA
    # r0 T5 s8 ?+ F1 T
  2390. LDA #$1F
    # Q7 k! M& Q3 j
  2391. STA OAM_TEMP_ADDR + $01. A3 O& K6 A2 n5 w0 U
  2392. ;STA PPU_OAM_DATA; x( I4 k$ L1 X6 \/ {- t
  2393. LDA #$00
    5 V" t7 {; o, {% [4 j
  2394. STA OAM_TEMP_ADDR + $02! Z1 b3 d/ y: s; [
  2395. ;STA PPU_OAM_DATA" G- M3 |7 R) a  G1 |5 S, R* j$ U
  2396. LDA #ARROW_X_OFFSET
    ! x9 D+ b% j/ u  Q) ]& L, z
  2397. STA OAM_TEMP_ADDR + $03
    $ q$ I( G8 D, k/ b0 s) J
  2398. ;STA PPU_OAM_DATA
    & E7 Q3 A2 C4 W& i
  2399. RTS
    0 e; j* S* z/ F. N( y8 ~

  2400. 6 M" u7 B' R9 h; c+ `
  2401. ;--------------------------------------------------$ s8 w$ }5 H  t6 a# n3 M
  2402. ;命名表数据- T# R% x2 b7 Y" G. v
  2403. Palette_Attributes
    * r2 ?9 r5 b! |! {
  2404. .IF SOUND_BAR_SHOW_ENABLE( W6 q3 e  b; g
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    7 |( S7 z; z( N& y; `+ E# k% \3 R/ W
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    ! L9 q8 P& b: l- m
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    4 P0 g" b9 }5 ?9 Q; _
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA& C& u, y; R& Y, z- x
  2409. .ELSE3 P5 T" q2 \4 A
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    1 z7 q7 N! `/ r4 g0 N
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55+ v) o  w; Q8 ]0 {$ F5 d4 Z
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    / }0 e0 I7 P2 `2 @; h- i8 k2 U
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
    ( `$ g9 E5 r' t. [% N
  2414. .ENDIF" v0 u# ?9 R2 O* L5 X& u- }
  2415. " L3 G9 Q7 r, ]4 D
  2416. ;--------------------------------------------------" Y4 E" Y# x$ }  {; D
  2417. ;调色板数据
    4 b7 r1 C( G4 w. y- G
  2418. Palette_Data
    . G" S# G' N( B( Y, X
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F
    ( j# K. f, W  t+ Z+ n' v
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F
    3 H9 c" i1 [5 \8 ^$ Z

  2421. ! h& A- D( `# |. a5 I# P
  2422. ;--------------------------------------------------
    ) r7 H" K  S0 u& \6 \, S* ?
  2423. Static_Text_Data) h- k4 D2 w- [3 r& n: S# d4 j- v. ]
  2424. .WORD Static_Text_Caption_Data
    2 d  p  `; F8 I" O1 A
  2425. .WORD Static_Text_Author_Data
    - Z, S+ k5 O8 d. U- B
  2426. .WORD Static_Text_Date_Data7 F: x# B" B3 g/ t4 z; S0 |4 y
  2427. Static_Text_Data_End& G* c+ {" t, C8 e4 e# I# O  \
  2428. ; B% D; O7 L$ u2 n. t2 y
  2429. ;--------------------------------------------------: c# a/ C  N6 T/ g. j/ i# c
  2430. Static_Text_Pos, _- }  B0 F6 [- U' V
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)* D7 H) z0 n- ^
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos)
    3 I  ?5 {! A0 [# k0 P0 _
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos)& z  }; j7 D, I
  2434. Static_Text_Pos_End
    ; _! H" U0 l3 {8 n  K
  2435. - o* F" x6 F# _3 i
  2436. ;--------------------------------------------------
    7 U4 [. O% d, I4 I9 b
  2437. Music_State_Stop9 t+ J7 Y: y% a: {
  2438. .IF SOUND_BAR_SHOW_ENABLE
    ' R' z5 d$ H' w$ ~% K) R1 }
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00, Z( k+ J% ]% z6 Q/ s- v
  2440. ELSE& n# U# I8 ^) e8 o% ?
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    * H2 O" p7 b1 f. \9 d% {! ?& [
  2442. .ENDIF
    * r# Z4 g5 ~3 ^- k& ^, u9 x0 ^
  2443. Music_State_Play  T5 n1 b+ A* q9 K
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$00
    & ~# ]( x& ^' `6 ~
  2445. ! k2 h' p- ~. E' S
  2446. ;--------------------------------------------------. K1 T6 L- Y+ o9 H% g6 E8 i
  2447. Sound_Bar_Text_Data;声音类型文本
    9 r' i, o, C3 w  a0 Y
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-") g. v2 E8 Q- h! c0 t& `( {
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-"
    1 Q7 F) i9 _( R+ q: f
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-"
    ; F" g4 k: D" g2 \
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"
    - ^/ ?: c: b& z# Y+ {
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00
    2 V5 D5 ?$ d" H! S/ o- g2 d
  2453. ( v$ c0 t) {; _* ~
  2454. .IF Track_Name_Pos3 s( W3 _; r/ X( J7 V3 G$ k% t
  2455. ( R& s6 z# ?; f9 C% y+ l; B* H' o
  2456. ;--------------------------------------------------
    , o0 N- w! ~! i( ?2 ?  q
  2457. Track_Name_Addr_00;曲目名地址索引
    2 B3 ~# o) ~# k! \* N+ G
  2458. .WORD Trackr_00_01
    # @% W  ~4 j* j6 r* u
  2459. ( u2 Y1 R, L" ]
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"! @  t7 h1 D2 g/ h# P( N* ?% r
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"
    ! V# O9 s& S+ P: k7 s

  2462. $ t  m5 B4 H2 f% R9 g+ ~
  2463. ;--------------------------------------------------6 J& u5 t! M5 S7 l8 x
  2464. Track_Name_Addr_01;曲目名地址索引& W/ y& G  D5 c0 ?  w" |) d! B
  2465. .WORD Trackr_01_01! q$ H- s. _2 ]* `' `" f
  2466. ' @6 n. G, e$ M  ^5 o. k9 `! i8 c+ l
  2467. ;==================================================+ W7 R. k. `) d
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1", n% F4 ^( C, q" I
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2"% p8 O: T' S# }0 V# j
  2470. : [8 {' J. o) A' X. E
  2471. ;==================================================; i( M6 }  e& N; s' q; O
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引% |5 V3 v: a/ G; s7 c/ B' r
  2473. .WORD Track_Name_Addr_00
    ' F" }6 ?5 s* D% k9 E, c6 y
  2474. .WORD Track_Name_Addr_013 {% m  J9 E/ z/ j% z  \* V) G
  2475. .WORD Track_Name_Addr_01
    5 N: c! R4 s+ }" |$ t: e2 j# b

  2476. + I: M% N: k' J
  2477. .ENDIF. M5 J" [4 V8 {; S) z/ }  Z) @' w( s

  2478. & [- j+ h( p  m+ s( Q
  2479. ;--------------------------------------------------
    8 x5 U4 Z+ d# L* P( ^
  2480. Static_Text_Caption_Data;静态文本数据
    , _" Y$ s3 k$ V: Y" r( g5 J" Q
  2481. .DB 161 t  c2 T" G5 m0 d
  2482. .DB "FC MUSIC 12 IN 1"
    + m) }6 s6 ?. l; u
  2483. Static_Text_Author_Data% M1 m, @7 \* x
  2484. .DB 25: a2 y; ]# k, e9 B- C6 D' T
  2485. .DB "EXTRACTED BY FLAMECYCLONE"* i( P, ?* n# b$ S- i
  2486. Static_Text_Date_Data4 ?" B! m7 @4 A( N% K
  2487. .DB 10# _* b, t6 i9 |  e( |
  2488. .DB "2023.07.23"/ q) ]1 N1 T) w' W, P  K$ G. m5 t

  2489. ( u2 O& `1 S5 J' D: j
  2490. ;==================================================8 b4 ^. L; q& l7 ?9 A& F
  2491. Music_Collection_Name               ;专辑名间接索引: x: c2 ?: \$ Y2 z2 ^7 e0 o& m
  2492. .DW Music_Collection_Name_00; p% z7 w% {2 S: d2 a( ]/ K
  2493. .DW Music_Collection_Name_01
    * w# Q$ H* z6 n& M8 U) w
  2494. .DW Music_Collection_Name_02
    - A2 S! Q2 `. M/ }- E# M
  2495. .DW Music_Collection_Name_035 o6 G9 w! C2 F5 u% A0 `
  2496. .DW Music_Collection_Name_04% i3 o* L2 ]0 ~  D: S# p  E
  2497. .DW Music_Collection_Name_05  d, c$ A; M3 x) q
  2498. .DW Music_Collection_Name_069 ]/ w' e' |- r6 n* l
  2499. .DW Music_Collection_Name_070 _+ M) \: Q4 k  R* q$ C
  2500. .DW Music_Collection_Name_083 `" E/ p* Y, w$ e7 u* B
  2501. .DW Music_Collection_Name_09! }6 u) w  [; T( m  |1 q
  2502. .DW Music_Collection_Name_10& d) |/ l$ B  t. t7 R8 p& W5 l, Z
  2503. .DW Music_Collection_Name_11: Q0 {" V9 t' k+ w0 Y

  2504. " O7 v' f5 y7 n) `- w( s3 w
  2505. ;==================================================- q9 `1 i$ p) H3 H; ]
  2506. Music_Collection_Name_00            ;专辑名文本数据9 W7 c3 c8 v0 s0 B2 a; n
  2507. .DB 11,"1.RAF WORLD"8 _( j# \, @  ?. d) k) i8 s
  2508. Music_Collection_Name_01# w& o7 Q/ P& B) ~. m/ Q! c
  2509. .DB 15,"2.FINAL MISSION"2 I( y- r8 S+ z4 i; O
  2510. Music_Collection_Name_02
    ) f$ |. a- ?+ [* ^" O
  2511. .DB 06,"3.KAGE"
    3 `8 m% l( ^3 V+ m! P7 ?$ x, E
  2512. Music_Collection_Name_03
    7 o5 L# p. r% h* F$ y, n
  2513. .DB 16,"4.DOUBLE DRAGON"
    3 a3 [& r+ m6 a0 [+ k: f
  2514. Music_Collection_Name_040 q8 i! m$ W1 ~0 L1 Y
  2515. .DB 17,"5.DOUBLE DRAGON 2"
    $ P4 D/ J0 O. {8 q$ i5 t
  2516. Music_Collection_Name_05: g* F% X: O& Z
  2517. .DB 17,"6.DOUBLE DRAGON 3"/ u. |1 R0 s9 k, v
  2518. Music_Collection_Name_06$ Z7 q6 Z5 L) |
  2519. .DB 09,"7.ROCKMAN"' X7 l8 g8 R0 q# ]5 E3 w8 s
  2520. Music_Collection_Name_07
    2 [  L* z. W! }* v
  2521. .DB 12,"8.ROCKMAN 2"' j) ~+ |; I6 B) X6 v! V. H- @* [& i
  2522. Music_Collection_Name_08: {" p! W+ O( W, Q
  2523. .DB 12,"9.ROCKMAN 3"
    # \' y; [- `: i: c
  2524. Music_Collection_Name_09
    # v/ l+ P# ^/ ~, _" a7 T/ M
  2525. .DB 12,"10.ROCKMAN 4"
    , ]! c: x  u! o9 `1 \7 p" Y
  2526. Music_Collection_Name_10  p) i( ~- o; }  N  K1 [& _
  2527. .DB 12,"11.ROCKMAN 5"8 u- @0 f' C5 f' c7 h7 x+ Q5 U3 b
  2528. Music_Collection_Name_11
    0 v2 x1 M4 B0 G  G; }, i
  2529. .DB 12,"12.ROCKMAN 6"9 Z6 V; ]# }( [+ S/ z% N' h- g  T# z& N

  2530. % D& ]$ Y$ j* H# P: Y) H3 |6 h9 d( H9 i
  2531. ;==================================================
    ! C; C( ]& ], Z" P
  2532. Track_Name_Addr_Flag                ;显示曲目名标记* Y; B% N4 _' Y
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,0
    4 b7 ?- e3 L# D+ C8 H0 R
  2534. # p9 \( [6 c$ J/ o
  2535. ;==================================================
    6 T7 ]6 I* B& k* T( \
  2536. Item_Pos_Data                         ;光标箭头位置
    9 A. t6 w( s# v: B
  2537. .WORD ITEM_SHOW_POS
    ; \- F+ k' I; i8 u2 R3 v/ q
  2538. .WORD ITEM_SHOW_POS + $0040: ~7 n, s' K- E3 v7 j" q
  2539. .WORD ITEM_SHOW_POS + $0080
    & Z; W/ Q% p3 h
  2540. .WORD ITEM_SHOW_POS + $00C01 F8 n& w3 F, Z: s6 r1 j5 F
  2541. .WORD ITEM_SHOW_POS + $0100
    , J+ ?. l' O' ~! e5 B
  2542. .WORD ITEM_SHOW_POS + $0140
    3 G8 j0 K+ i5 s7 O1 w: U& Q. n
  2543. 3 X8 P/ ]; n: b( t2 k1 [
  2544. ;==================================================
    + L; t0 N) F- E% B! L, `2 {( q
  2545. Sound_Init_Port                 ;音乐初始化入口地址
    7 b5 W6 B7 q  ?+ Y4 L; p; Y( p
  2546. .DW $BFC8
    4 B1 K! [  W- N9 l4 _! }
  2547. .DW $D7F0
    8 i$ H) F- X9 N9 |9 p$ D
  2548. .DW $9FC0
    0 M, ^( \) P% X
  2549. .DW $BF70* ?9 n2 E; U- P/ K+ V5 }
  2550. .DW $8003
    # s1 q% Y7 Z0 y0 _4 s
  2551. .DW $BF30' ?2 L# V+ R6 `
  2552. .DW $9003
    & M  C; W0 `9 [% W' @0 H
  2553. .DW $8003
    0 |% `  s" E. \9 [3 z, `2 _2 V
  2554. .DW $8003
    & g- n% S" c* ^; Z& Z6 C
  2555. .DW $8003
    : a$ i* l3 k! X: D! j/ e0 T
  2556. .DW $8003
    5 g( ^3 p  I9 Q1 U& Q
  2557. .DW $8003
    5 F, l8 ~3 d* Z0 p3 U$ ^, l
  2558. , a% m8 w/ l6 h3 e; G) a
  2559. ;==================================================
    ) }) L/ Q. ?! N* Z
  2560. Sound_Play_Port                   ;音乐播放入口地址
    & A6 h  I' `  G% Y. f3 t6 o) F$ G
  2561. .DW $8000
    1 Z" S" o5 d7 i( w, p
  2562. .DW $80011 `* n& l4 \, i, n8 x! h, H+ Q, [" D
  2563. .DW $A000( }( d  x6 k$ ~- \- m. w' E
  2564. .DW $8003
    5 T' e. a+ x, l
  2565. .DW $8000
    % u. y6 j- a6 J. X
  2566. .DW $8003
    7 X/ ~! N% O& T2 K  a* e8 C
  2567. .DW $9000& N$ L  ~* `% x7 J( V6 W
  2568. .DW $8000
    + n/ N4 _& J* T$ [/ y& H
  2569. .DW $8000$ d9 i5 t' `5 ?! ?$ s( S) e
  2570. .DW $8000
    ! M) \* B) E# }2 j  S: X1 O9 Z
  2571. .DW $8000! V( `% E4 H; q3 l
  2572. .DW $8000
    ; C& _1 h2 k, P! B9 A/ F
  2573. ( o6 I; R9 ^3 _1 d8 n# }
  2574. ;==================================================! \5 x$ t/ k0 Y: B2 e6 o& n
  2575. Sound_Reset_Port                  ;音乐重置入口地址* R5 S, x- s1 e: F2 h
  2576. .DW $0000
    7 `4 R1 A$ p7 Q1 h9 a; @7 |
  2577. .DW $0000
    # Q$ f  x5 ]# Z& L- M
  2578. .DW $0000, f; a, `, \' K; l" Z
  2579. .DW $0000
    ; i" U3 i, {+ L! W% U' k# b$ N
  2580. .DW $00001 {7 a7 S/ k, g. R$ Y4 Y' W9 j
  2581. .DW $00007 G3 C" t; `3 U' z& v1 d
  2582. .DW $0000! n) }, {! ^% [2 H& f8 I7 r
  2583. .DW $0000
    0 H0 _) J$ ^3 u2 y
  2584. .DW $0000
    ( E; m( ]) J6 s) ?! P
  2585. .DW $0000
    3 d. a( Y) R$ X! M7 ?& a, k
  2586. .DW $0000  F* A6 g2 @5 L) e4 G* a1 i+ m2 A" o
  2587. .DW $0000
    4 E: D( x& i+ O7 q: w

  2588. 4 q9 p5 c  i9 r( n3 w" A
  2589. ;==================================================( ]+ p& ~  h- Z& F1 K
  2590. Sound_Total_Port                          ;曲目总数- I2 m& O8 @+ g% i
  2591. .DB 38- [5 F! q& A9 u, `5 E! R
  2592. .DB 33' o$ I$ t5 u5 k& [- k& z
  2593. .DB 49
    & z7 I1 v% g! {( Z1 w" |! \
  2594. .DB 410 e* r' }8 q% Q: m  ?, {
  2595. .DB 83
    7 g; t1 q3 E& e1 T3 E7 ]
  2596. .DB 70+ j+ E7 L* d# N) m( O! s
  2597. .DB 507 g  T% G- V. B* ^' z5 i  C' g
  2598. .DB 675 M; u3 i4 E" S9 V4 _, y
  2599. .DB 57# }+ O* [9 H& R1 R
  2600. .DB 71
    & Z5 s" |9 Y0 x( E) o/ w
  2601. .DB 76: r; l+ C# |( g, o9 p7 x/ y
  2602. .DB 1022 w; O- s4 p: N: f) }
  2603. ' D+ Z1 K* E# [4 [& i" Z
  2604. ;==================================================
    0 U* T5 G- `, O, R
  2605. Sound_Start_Port                      ;起始播放曲目
    8 F6 W& ]6 K% L$ \( S
  2606. .DB 00
    % d9 Q3 x# A4 X( v+ W3 ~
  2607. .DB 00
    ' T( c- z& i9 M1 j% ^
  2608. .DB 00% r" R: N  B& F6 n$ ]4 o4 Q
  2609. .DB 00" n8 P( p3 K! y& P
  2610. .DB 00
    # j3 n- A" i( N! e
  2611. .DB 000 t, N- \& L1 b+ ~; u* Z/ f
  2612. .DB 00+ G9 n2 M; d+ Z. @
  2613. .DB 00
    ! h# Q  E" c' n+ f
  2614. .DB 006 j0 @" m" }0 j; ^9 [1 w
  2615. .DB 00
    5 e$ ^( R' k" Z, {; H5 s$ l
  2616. .DB 00. n! A6 J& G1 c+ f' w
  2617. .DB 007 _  {4 T( e4 ?, }8 j" t
  2618. / B% b* A7 i$ ^6 Y( t, B
  2619. ;==================================================
    * p7 e2 F* z; X
  2620. Sound_Bank_8000                      ;专辑bank_8000
    1 U2 a  _# b. Y# p# Y7 L2 m
  2621. .DB $10
    , o: X. Y8 I/ q' X3 J
  2622. .DB $12% g9 w3 U4 K. ]8 s8 _9 N
  2623. .DB $14
    1 t3 N9 }6 f& U) f
  2624. .DB $16, P+ Q0 r- o  R& e* O
  2625. .DB $18
    # G2 n4 g2 N  T) C+ T+ o- i
  2626. .DB $1A
    $ z) T' K6 J* a' C& g# A

  2627. 1 D' M- p* M  D5 T3 L8 W
  2628. .DB $00
    8 F% E2 A' ]- Z3 w
  2629. .DB $02
    * z9 ^' }2 a* T" N8 w6 @
  2630. .DB $0D- B+ @3 R; K+ O: n6 d# g# f
  2631. .DB $04
    ! d  t$ K, t4 t. D- V
  2632. .DB $072 b: ^( c# c9 N$ N  d6 v  F' I
  2633. .DB $0A0 D' \  k/ s) W$ t# \

  2634. 2 c8 ^8 L+ |% w) L0 I+ X
  2635. : r% e' k2 }& b3 G/ [
  2636. ;==================================================
    4 [3 I( B2 P9 J! ^6 g
  2637. Sound_Bank_A000                      ;专辑bank_A000% g2 l7 }5 ]- q9 z4 N6 \
  2638. .DB $11
    . @' k  f; H$ ^' y* T
  2639. .DB $139 P! ^: y& g" L+ v6 _0 ^5 g
  2640. .DB $15# s7 L5 l* U. d. k5 C
  2641. .DB $17
    : y& {' v2 J6 v! x* A, M
  2642. .DB $19
    * s+ R9 \' ~+ k; t) Z# G+ ~
  2643. .DB $1B
    1 G1 C8 m2 s# n- ~, x

  2644. ' w% |- @! e/ L
  2645. .DB $01# m6 p$ R8 o3 j2 ^  h# [3 W( }( W
  2646. .DB $03& {9 t8 y  `; {- F  o& h( B
  2647. .DB $0E% z7 ~7 e* S. \2 Y& P( s
  2648. .DB $05
    * I; ?; {+ L( D
  2649. .DB $08
    ) g' e2 y! ^; _5 T& |
  2650. .DB $0B$ u3 |* _6 X1 @( A2 V5 B

  2651. - {. `! B/ V, }; X8 ^0 I0 b
  2652. $ i4 t; S  g% f9 `
  2653. ;==================================================
    * o; D3 c' Y/ h5 q4 [
  2654. .BANK RESET_BANK & BANK_DATA_MASK8 a1 u# d4 Z( \
  2655. .ORG RESET_ADDR- A9 c# R& X: K; E" T+ d
  2656. 6 ]3 n& J" ^1 W/ O7 X3 R$ I
  2657. ;==================================================6 f' }  U3 N; ?% s7 o
  2658. Switch_Bank_8000;切换bank到8000-9FFF
    # J  _2 v" u& c% t( @
  2659. PHA
    + i$ k( _5 d8 s2 u, V  f! \, n
  2660. LDA #$06
    . r7 k! W0 n+ _5 z+ T
  2661. STA MMC3_BANK_CTRL
    8 z! O& z% |  u
  2662. PLA2 s' ~" s% ~0 f2 H( r" Q2 ]# S
  2663. STA MMC3_BANK_DATA% E  Q/ {/ ~: Z4 A
  2664. RTS
    . a3 @8 t% }' U  ]& z
  2665. 8 u. k. U+ y1 x/ t
  2666. ;==================================================' R. d; h+ {& h) I3 z
  2667. Switch_Bank_A000;切换bank到A000-BFFF5 d( C8 t4 e4 l; N9 _. i- w
  2668. PHA7 ~, k0 F  H6 S
  2669. LDA #$072 Z0 X3 A0 ~# R8 x$ P  n; e: x9 L
  2670. STA MMC3_BANK_CTRL
    6 j- m5 ?& b; d5 j
  2671. PLA
      q3 G- @3 f2 x% d" ~
  2672. STA MMC3_BANK_DATA' o% M, D% e" t& H: E7 P
  2673. RTS
    / ~* G/ N, j8 [0 O5 f9 o
  2674. , B; Y7 C$ w9 p% E$ n1 G
  2675. ;==================================================
    % @9 `& I; P; G' v4 l
  2676. Switch_Main_Bank;切到主程序bank
    & e7 K& l* H$ M8 m5 E. F/ ^
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK
    # G0 d' b6 r/ b3 D5 E1 _
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank
    & X( n0 K/ p: A6 j) `
  2679. RTS
    & l! E/ I8 Q$ f7 \

  2680. " N4 M! r; v5 E9 D. H! z) z
  2681. ;==================================================
    1 N8 Y9 ], V3 B$ Z4 ?/ b
  2682. Sound_Reset;音乐重设(如果有的话)) g% N3 S( [4 z8 O- J  Q
  2683. JSR Switch_Music_Bank  ;切换到音乐bank. s7 j5 i& q; q/ d9 h* R' c( k3 N
  2684. JSR JSR_Addr_Op        ;执行音乐重置: L9 Z- g. l$ v( D, r* c: H
  2685. JSR Switch_Main_Bank   ;切回主程序
    ) p6 B+ P" K" k) I
  2686. RTS
    - d! l2 X$ y. @4 ]" {' |7 l
  2687. * {  w' |! G3 g$ S1 T
  2688. ;==================================================- E$ d0 I8 O6 ^, L( c
  2689. Switch_Music_Bank;切换音乐bank
    ' S% T& G  u. h; h5 n4 r' c
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号$ W( P9 Q4 K! t
  2691. LDA <Music_Bank_8000+ W- O. \: y  E2 N  B
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank
    4 L8 y6 R; w% c
  2693. LDA <Music_Bank_A000
    - g& E" K7 q: G+ G% D' Z: ?/ o# N
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank
    . d- u1 ~  D+ S2 T* P; e
  2695. RTS' |' a5 e# f& I: i- r
  2696. / O0 ]* Q7 f3 G  |5 z2 N4 U
  2697. ;==================================================
    & ^. X$ c! q6 Q& [9 {1 p, B# A" t
  2698. Sound_Init;音乐初始化
    / b, `1 S, ~4 \1 ~3 T. ?
  2699. PHA0 Y! ?( k5 H! [; T. j* @4 \
  2700. JSR Switch_Music_Bank  ;切换到音乐bank
    # ]' S" |$ X& |' J
  2701. PLA
    ( B9 ]. ~  [% Z  `! R" y
  2702. JSR JSR_Addr_Op        ;执行音乐初始化3 |. S0 O* K' J- x) c
  2703. JSR Switch_Main_Bank   ;切回主程序% J1 G* X' p5 ]" V5 h- ]
  2704. RTS
    9 B, c9 E( i+ U( e) e# f

  2705. 9 a" n8 s/ S- y( Z3 o9 {
  2706. ;==================================================/ y; s8 a, u" z4 x. D% X5 {3 V: x
  2707. Sound_Play;音乐播放
    & b5 @/ }+ s1 }. r  T0 n. k
  2708. JSR Switch_Music_Bank  ;切换到音乐bank
    & y. y. s; _% A
  2709. JSR JSR_Addr_Op        ;执行音乐播放# D# V) i+ t2 b4 l# z+ _% |. o
  2710. JSR Switch_Main_Bank   ;切回主程序
      [/ B5 U3 [+ i( Q% ?: y1 H
  2711. RTS/ F2 L+ K; V( Z
  2712. - B2 Y" @! I  m1 C# n
  2713. ;==================================================1 X. H% h; x: g, r! h& A
  2714. MainLoop;死循环- P" g# ^. _7 y. Z+ ?. a: H/ r
  2715. JMP MainLoop
    7 D1 }* a$ L7 [" }3 Q! o* j

  2716. ' ], }! i, e2 P
  2717. IRQ_SUBPROCESS_JMP = 0
    9 z/ q+ }& w! d# L

  2718. ! Z* k& Z$ l* U$ w$ B, p
  2719. .IF IRQ_SUBPROCESS_JMP
    0 _" P/ j( D: Q+ y, E$ ^
  2720. ;==================================================9 A/ I+ S* K8 Y$ {
  2721. IRQ_Process_0;IRQ处理过程0
    7 p+ q+ ~7 `! B$ A# V8 r2 h/ C

  2722. % M1 r5 t. F% a4 M( \0 d8 ^
  2723. ;15条扫描线后触发IRQ$ C  ~3 M. n( W* U
  2724. LDA #15
    & K6 N! j7 e  Z7 T# v6 E
  2725. STA MMC3_IRQ_LATCH3 ]) F( r1 J' q% _* g
  2726. ( p7 C4 _2 P4 u0 q8 _
  2727. ;设置屏幕滚动
    $ X( _) L+ i- T& Z' Q+ [
  2728. LDA <Scroll_H2 Y2 ~0 P' f8 U+ P
  2729. STA PPU_SCROLL
    7 d! e- E) C+ S/ o1 i
  2730. STA PPU_SCROLL
    , w6 S- d/ v% f1 [1 y) e) ^
  2731. 4 @5 r2 T; D# E" Q/ T$ Z/ k0 \8 S2 g; C
  2732. IRQ_Process_0_End+ O4 k% P# q6 v3 b+ y0 X& `
  2733. INC <IRQ_Process_Index
      p0 r% l4 m/ {- t9 {- U
  2734. JMP IrqProgramEnd
    ) f3 y5 L! c" }0 m' U9 N" z7 `

  2735. ! H- L( y4 T) q$ D7 {+ F. c, Q) {( M
  2736. ;==================================================* N; Q* M- }# q1 w
  2737. IRQ_Process_1;IRQ处理过程1
    2 i; x/ H7 d* x+ C$ i; b

  2738. ! H0 W+ S  a( e# q* z5 [
  2739. LDA #55
    - C" l- N8 I$ Y4 R4 \3 p
  2740. STA MMC3_IRQ_LATCH  x5 ~, z- I0 V- V

  2741. - ^/ d% ]: e# |9 ?2 q! P' R- o1 |
  2742. ;设置屏幕滚动1 i% V( _; n' Y
  2743. LDA #$00
    7 ^" M6 M) u4 S/ s! d! E8 D+ a8 ]
  2744. STA PPU_SCROLL/ }  o, N; n- |% U
  2745. STA PPU_SCROLL+ ^! w1 z# L4 ]9 P* e1 v& B
  2746. : b1 h+ t1 i  A$ L
  2747. INC <IRQ_Process_Index: Y9 q! }: b  K9 ], Q
  2748. JMP IrqProgramEnd
    . d% P- \6 j( y+ c/ R) v3 [1 {
  2749. % H# |0 B; h6 n
  2750. ;==================================================+ }( H! h5 e" n
  2751. IRQ_Process_2;IRQ处理过程2& ~' ~' l5 R) C# n7 e1 `
  2752.   M! H4 Y2 _  r6 B/ J
  2753. LDA #15# [1 Z' ?1 ~) E* \$ |
  2754. STA MMC3_IRQ_LATCH0 D; |7 \) l9 H/ [

  2755. % q  h5 ?/ y. L1 ~
  2756. ;设置屏幕滚动
    9 l) ?% N# l. B
  2757. LDA #$00
    : u0 B: q' m8 L5 z( G( i3 ?& I8 ?
  2758. SEC
    8 q& o3 X) M# m$ k7 M
  2759. SBC <Scroll_H
    $ [) q* H$ D5 h) M: \2 S! w
  2760. STA PPU_SCROLL
    ; ^: |: Y$ P; x: d' @6 Q
  2761. STA PPU_SCROLL
    ) ~' k4 l$ n( Q& B4 Q0 T7 ], d

  2762. 8 _+ ^: P% ^- U0 K
  2763. INC <IRQ_Process_Index2 S  B0 E9 L- ?$ l! X3 f# r2 Q5 w
  2764. JMP IrqProgramEnd- _. J3 U) x( Z1 ^2 i# f

  2765. / C( c4 a+ k6 `+ n+ W
  2766. ;==================================================
    + P$ q- Y, u9 K3 }3 n) _" t
  2767. IRQ_Process_3;IRQ处理过程3" V% t; T4 ^) [9 l0 }- K

  2768. * S. W" B' A; U( L
  2769. ;设置屏幕滚动
    : X$ ]+ ?  a( x+ O7 V# E
  2770. LDA <Scroll_H. K6 G8 R$ F* M4 l, v6 i. ?
  2771. STA PPU_SCROLL" p0 x( C" }4 k6 R5 w
  2772. STA PPU_SCROLL
    " l, ~/ d# S: q% K) R- `$ p

  2773. 9 I  q) C, U& x5 [1 `# I- l4 i) c2 R5 l
  2774. ;禁用IRQ
    - [+ e5 r  S4 Y! _8 U* M
  2775. STA MMC3_IRQ_DISABLE; S! e5 P+ \. h5 i
  2776. JMP IrqProgramEnd
    4 H# h! I0 l5 |( }5 N7 F8 e2 B
  2777. ! @' c0 Y) H- u6 [
  2778. IrqProcessAddr
    * s( N) V; B; {% @, X, c& l
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_3
    6 r2 u% k. }2 @

  2780. 5 A+ H# [& L( F; R) o
  2781. .ENDIF
      a% q' T- t) E0 r

  2782. 1 L1 ?1 A0 n: t* l/ o0 g. X
  2783. ;==================================================( H0 t6 t2 b# ~8 M; l! Y
  2784. ;IRQ滚动模式常量" h5 {& t# i1 N& e
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动
    . M9 E( s$ K( Q; l3 v  Z6 k4 A
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动( d1 _$ s& e% c) h/ q
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动& k" S( Y2 _/ y. q, B( \8 s3 p
  2788. ) X7 A! B' Y/ l, U- }
  2789. ;IRQ扫描线数据
    5 s0 c; _7 c/ |- `
  2790. IRQ_Scanline_Data
    4 {& N4 x- G! g; c+ N7 Z
  2791. .DB 8/ Z: [  Z; l$ X
  2792. .DB 54
    ; [6 v3 S4 U( n8 |6 O
  2793. .DB 8
    3 X: H% B- J- O& T
  2794. .DB 00 ;关闭IRQ7 x6 r: E" t( Z" v) c
  2795. ! P9 O# y) H% ^0 j. A5 p1 r
  2796. ;IRQ滚动控制模式  U! h9 P3 S) r; ^) B
  2797. IRQ_Scanline_Mode2 j. ]7 H9 ~+ g1 @7 u
  2798. .DB IRQ_SCROLL_MODE_ZERO
    ; r6 b) X% ~3 a" s3 ^3 s' ^/ }
  2799. .DB IRQ_SCROLL_MODE_ZERO
    5 ?  \( f1 ], H7 X  X
  2800. .DB IRQ_SCROLL_MODE_RIGHT
    ( ~! w$ B" @* E$ W
  2801. .DB IRQ_SCROLL_MODE_LEFT) N7 p* z9 g; |$ @, N  f( i
  2802. ! I# x; b% j0 G7 D5 g
  2803. ;==================================================
    # q$ F3 R7 f! i* K5 _  M5 g
  2804. ;IRQ处理
    , X5 l% H8 [1 Z
  2805. IRQ_Process
    ! y! X( m+ N8 n+ E, [7 a# U
  2806. LDX <IRQ_Process_Index
    6 _4 |- C  F( Z/ a1 `
  2807. LDA IRQ_Scanline_Data,X$ P& a1 ?* a9 w2 P
  2808. BNE IRQ_Process_Latch, J1 K) u0 Z; U3 |
  2809. IRQ_Process_Disable;禁用IRQ  U/ ^9 A% ~( g9 L
  2810. STA MMC3_IRQ_DISABLE! b$ O4 q% ?/ K# ]
  2811. STA IRQ_Process_Index
    " [; [+ l; z9 U. v8 C8 _
  2812. BEQ IRQ_Process_Scroll
    ) W" G1 x/ ^6 [  l: Y3 H
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线
    ) I' x" \/ q* z5 J. n
  2814. STA MMC3_IRQ_LATCH
    ) K5 h# S6 L( R  o/ J8 [
  2815. INC <IRQ_Process_Index
    . U8 z8 N: N0 s; c. P3 i! y4 U
  2816. IRQ_Process_Scroll;IRQ滚动控制
    / j4 {/ ?/ `) B2 s9 ?8 o2 U! y
  2817. LDA IRQ_Scanline_Mode,X
      C6 X) b% M4 @3 [6 f
  2818. CMP #IRQ_SCROLL_MODE_LEFT$ K# D$ d/ D% g( t6 [9 ?! r9 J
  2819. BEQ IRQ_Process_Scroll_Left3 J9 W0 W9 D5 k1 l) U
  2820. CMP #IRQ_SCROLL_MODE_RIGHT
    + y# p+ J/ s# u' l& H
  2821. BEQ IRQ_Process_Scroll_Right
    ) G' q& f2 G5 `" V9 o9 k
  2822. IRQ_Process_Scroll_Zero;不滚动$ H8 B- w+ {% _- j2 e
  2823. LDA #$00
      s. g6 k* R- ]/ ?
  2824. STA PPU_SCROLL, y% q* D8 a0 B5 u, ?. ?+ q
  2825. STA PPU_SCROLL2 K/ H% s$ g4 D; U+ G4 w# ^" I$ S
  2826. RTS
    ) L. `& u& J& k3 @' Z' w
  2827. IRQ_Process_Scroll_Left;向左滚动% N5 y5 d6 A3 I5 u/ b$ v, L
  2828. LDA <Scroll_H
    / u4 P% e) T2 Y$ U7 [' s1 @
  2829. STA PPU_SCROLL
    ; C( \  g1 M. T, B. h( ^9 N
  2830. STA PPU_SCROLL
    ( ~/ ?, h+ W& X
  2831. RTS  Y  G" d0 t' M
  2832. IRQ_Process_Scroll_Right;向右滚动
    3 a6 Y5 \8 E7 A! g. r5 V' y
  2833. LDA #$004 M1 w2 L% T- b; g
  2834. SEC7 Z9 @  w/ r2 @# \  O
  2835. SBC <Scroll_H
    2 \3 X2 a, K) U
  2836. STA PPU_SCROLL' L8 T  x$ l- J
  2837. STA PPU_SCROLL0 Z" ?8 t9 R7 m- u$ R$ x: k
  2838. RTS6 K7 g2 k/ O, i0 o

  2839. + a/ p- l5 S' L$ b4 S/ E1 d2 x
  2840. ;==================================================
    ; g4 J8 l/ v' J0 H. B
  2841. NmiProgram;Nmi中断处理
    ; `2 k% a( Y' `/ v8 E
  2842. PHA
    + z% B9 \! s/ w% `' S
  2843. TXA9 n# P" B/ R; y. b0 u4 F
  2844. PHA0 P3 W* }7 ~# z( a7 X
  2845. TYA8 H9 M1 G+ s7 l7 [/ y
  2846. PHA
    7 e5 F5 \! p: H4 o

  2847. 4 b$ v$ c) i3 s5 k  [# R2 M" {
  2848. ;读取清除Vblank标志, 防止重复进入
    1 s% g: w/ b, |1 L+ ~5 a
  2849. BIT PPU_STATUS# d& d: t- z( f& d

  2850. ( j, ~/ @0 x1 j5 Z$ n
  2851. ;切换主程序bank
    , {  G( q/ Y& }0 m8 b4 n0 k/ t. M
  2852. JSR Switch_Main_Bank
    $ ^9 g) T9 ?! q! b

  2853. % O) Q/ A/ {- L% r4 X+ n1 |; t+ r& C
  2854. ;Nmi处理
    # P/ W5 Q$ h/ h, d
  2855. JSR NmiProcess
    - l8 D7 h7 V  p* Q6 k6 \
  2856. % ~  l4 j6 `4 }+ G
  2857. Nmi_Proc_End6 a  J% b2 o' j9 B! I9 z  [8 [6 ~
  2858. PLA
    % s1 X' U4 }$ }
  2859. TAY, B  w0 V9 l9 `0 [2 S/ V. Y! m
  2860. PLA
    . [5 e; u$ \. f+ \
  2861. TAX
    8 ?5 R' M% G4 G# X+ L
  2862. PLA" a/ ~$ A. W5 N# [  y
  2863. RTI. I1 K% M3 y: [
  2864. ! _( I. G8 S1 S; Z
  2865. ;==================================================
    ! f6 R) G9 R3 C  g  U4 j2 t* z
  2866. ResetProgram;重置中断处理: o6 t4 i% t9 U' k9 ?
  2867. SEI( h- N# A1 g8 n# B5 M7 t
  2868. CLD$ [) p9 v' Y! j
  2869. LDA #$00
    , ^+ o9 g8 O8 K  I( O5 e5 S
  2870. STA PPU_CTRL# E; }( A: t8 p2 O: U7 Q) e
  2871. STA PPU_MASK
    7 e2 O' o! W, [) M' S

  2872. . L, x3 A9 ]- g# ~
  2873. ;切换主程序bank
    ' C$ k' p; d+ q" @
  2874. JSR Switch_Main_Bank
    $ w5 u3 i: B* d, A$ Q8 Q
  2875. / x: M5 _2 D; O, v- c# e$ x7 b  J
  2876. ;程序处理开始
    ( S; v. k; y2 X. U0 h5 ]+ o
  2877. JMP ProgramBegin1 t: B% k3 U/ G1 ?2 z( b

  2878. # U3 a1 W7 J% h5 J' H
  2879. ;==================================================4 w1 ]6 @: z6 z3 o4 E5 y. G
  2880. IrqProgram;Irq中断处理
    ( ]! G' o& g) j! f6 H/ K$ a$ v  ^
  2881. PHA; @8 C" u1 J+ B% ^0 `4 u' u
  2882. TXA
    % W. @/ @& V( K- F! x( G0 @
  2883. PHA
    , ]+ I1 j% N" [) H+ G# }- q6 V; |
  2884. TYA5 U; I+ h9 u) q5 Y
  2885. PHA
    . k" w& S( f% `3 r* o4 _# b# S( y; B6 g

  2886. 9 \: {, k: Q6 I# t; }+ _0 j  S
  2887. ;关闭IRQ! }! Q; m4 a3 `7 Q7 o
  2888. STA MMC3_IRQ_DISABLE% U' Q7 ?, j1 c) w+ g

  2889. 2 T) ?5 k! u4 y
  2890. ;允许下个IRQ触发6 V; L7 v, |; Z) D1 O* [# k9 n
  2891. STA MMC3_IRQ_ENABLE
    : w! w& ?+ ?: [1 ]7 }
  2892. * w4 N, ]1 r/ B: @& b" {
  2893. .IF IRQ_SUBPROCESS_JMP
    $ a. e- a4 M# P. j
  2894.   U# v( I$ ~& r5 i# j+ W
  2895. ;执行IRQ过程
    ; g+ L# D' i8 ~# X2 _
  2896. LDA <Data_L! d' z( p/ r' H6 S' m  N' y
  2897. PHA7 F9 s3 V& z% v. h8 }* U
  2898. LDA <Data_H% F8 t2 v3 ?8 c) ?
  2899. PHA
    1 \3 M7 F7 T& d) l
  2900. LDA <IRQ_Process_Index
    0 U1 [# f1 h% }4 W, X
  2901. ASL A
    ; Y, [4 o* H" m1 u" E0 n% w
  2902. TAY2 Z/ m4 r7 f2 i# T, u0 D. Q" [
  2903. LDA IrqProcessAddr,Y
    6 h/ R) Q, ^) z
  2904. STA <Data_L
      k  Y! N  H. ^! s* l
  2905. INY
    6 y# I. S3 L- r& q4 ]2 M% R
  2906. LDA IrqProcessAddr,Y
    " q, I( o8 g* u5 U. A8 q* i
  2907. STA <Data_H" j7 f" Y5 R5 J- D  `
  2908. JMP [Data_L]
    7 g3 G8 c5 h1 F" {; B% Z
  2909. " ]$ k& j) U) s9 q6 A0 }0 C
  2910. .ELSE9 n) @3 @5 ^/ r# h! f

  2911. 9 p; d7 i; W2 ?9 o1 G
  2912. JSR IRQ_Process
    ; I+ e/ P- N4 t( y$ z
  2913. # Z$ K' {# }8 i2 ~
  2914. .ENDIF: _- S( w6 o: V# F% z% }
  2915. - z, b3 s, p* c
  2916. IrqProgramEnd3 k( N# ^& U9 E2 \7 z( _& }. f3 G5 t
  2917. .IF IRQ_SUBPROCESS_JMP, c2 E( g8 b: _" F: y# |
  2918. PLA% X% l5 S7 W" h# {1 y6 k& C" o
  2919. STA <Data_H+ h* N0 \8 {1 D3 g( C
  2920. PLA' Z, Y! M& j! R/ r9 F
  2921. STA <Data_L
    3 E& {: q9 ~0 o
  2922. .ENDIF
    % n; v/ a( {  z- \+ `4 _9 R& ?
  2923. PLA
    * |; o% i( v( ?1 X8 f% M( Q- X3 i8 a
  2924. TAY9 V! g; G; u4 W6 t, o
  2925. PLA
    4 l4 |  u. p0 j5 R
  2926. TAX5 d4 D/ z8 Y. s6 b: f2 z
  2927. PLA
    * Y, T5 x- Q2 @" K/ G6 e
  2928. RTI9 H/ m1 z3 a% Z9 J3 }* f
  2929. , f; k- h" h3 f; D& L
  2930. .ORG $FFFA& n- M  D, t4 x% o$ n
  2931. .WORD NmiProgram1 D, b$ L/ y/ Q! u  A- C
  2932. .WORD ResetProgram
    1 w! V5 S7 x$ H, F1 P$ Y0 E  \- l
  2933. .WORD IrqProgram' h0 l% U5 |0 A& j
  2934. ) q+ M4 m5 U0 `1 K1 r
  2935. .BANK RESET_BANK & BANK_DATA_MASK
    " D* m7 S' z0 n8 D
  2936. .IF SOUND_BAR_SHOW_ENABLE
    - Z' J1 w* ^0 A$ o
  2937. 1 R3 }  A& F. W  Q, T
  2938. .ORG $FE00# i5 C, w1 X; j- X8 J7 [8 @% o9 d4 v
  2939. PHA4 T; Z. u, S/ c1 q
  2940. STY $07BA
    ; d8 z* K4 r; K
  2941. LDA #$8D
    0 {, N0 i; P+ f; ^% f
  2942. STA $07BC
    & M: c( ^% G2 Z5 z5 R# _
  2943. TYA
    & O  {6 \7 F( A$ F
  2944. CLC
    0 D" @. L  K: L# ^2 ]* n' k
  2945. ADC #LOW(Sound_Bar)
    2 N1 C3 X% C6 L; c( m9 O  @
  2946. STA $07BD, H' ?6 t/ ^$ o; c
  2947. LDA #HIGH(Sound_Bar)
    : ~" F/ P. k0 J8 Q" A0 o
  2948. STA $07BE
    & Y3 l( V+ p9 `/ s/ Q" C4 R( h
  2949. LDA #$60, @0 R' r6 ?) H7 i' O+ d
  2950. STA $07BF. p9 r! w+ ?8 ^, i3 P/ p7 ~
  2951. PLA
    ) @4 ?! \) M- B; X  N# |$ z
  2952. RTS
    ( q, A6 J% h% M3 F7 S: _) [
  2953. ) p: S5 _* p9 ~4 K( k
  2954. .ORG $FE20/ c7 i/ J) F2 L( k
  2955. STA $07BA/ R& j: ?7 x; Q% T" s/ W& J1 Q
  2956. CLC
    4 a& s! c# w5 f0 q# `% `: P
  2957. ADC #LOW(Sound_Bar)# p0 l. C: P$ ]' b& b$ q7 _
  2958. STA $07BD0 y8 k- z% g, A& h& Z
  2959. LDA #$8D/ ~% d& `% h+ T$ y* |- V
  2960. STA $07BC8 \. [3 D" ^, r
  2961. LDA #HIGH(Sound_Bar)
    3 Q8 }$ q9 Y: D+ E2 j1 ~7 h# W' D
  2962. STA $07BE( i. @. l1 f" {! r; L' f+ g7 x
  2963. LDA #$60
    8 Z$ q2 S( n* V3 v/ Y/ n& `7 I
  2964. STA $07BF
    0 s2 x9 I- s6 e+ K8 t! x
  2965. RTS
    9 F! \, y6 U0 Y

  2966. - f- O% D5 q0 d) K3 R
  2967. .ORG $FE40* p2 u$ H+ f0 K* h# F, I
  2968. PHA$ E0 U" \9 X( Q3 f+ @
  2969. STY $07F17 l! L: C3 P& A" @# D8 Q8 `
  2970. LDA #$8D
    - M7 ?! \4 L( m$ {" f0 a
  2971. STA $07F3
    % K3 J2 {# A  i2 d, @% {( Q# z
  2972. TYA, c4 ]: k. t, s2 k+ A% h
  2973. CLC
    5 o$ u5 s7 y$ J9 h$ {( q, _
  2974. ADC #LOW(Sound_Bar): n5 B5 v3 D$ i9 D; o
  2975. STA $07F4( Q. t' g! K  R% T4 X4 R; u+ b# n
  2976. LDA #HIGH(Sound_Bar)0 ]# J* [, M; e) c
  2977. STA $07F5
    4 l- `! }; F6 z+ u  j' ~' O
  2978. LDA #$60
    5 Z" c8 s0 @% I0 f8 ^( u' P: {/ L  m
  2979. STA $07F6
    + o4 o+ z6 Q7 A( a! |1 s" A
  2980. PLA
    2 r* ?8 [% R: f' _) m4 a, X) X
  2981. RTS
      z$ a% Q, ^# e4 @) E8 `+ c

  2982. % P+ a2 C" V6 W2 e
  2983. .ORG $FE60+ m* j/ V7 b  f; S
  2984. STA $07F1
    ; z- B( G8 L" I% A" b
  2985. CLC
    . m/ x5 H/ Q% V) i; M
  2986. ADC #LOW(Sound_Bar)- [1 s5 u: C8 ~3 \2 D
  2987. STA $07F4
    ( j% B, G5 f0 ^* D" R3 Y& O
  2988. LDA #$8D
    ! [4 @6 Z' n8 p9 j7 x2 `
  2989. STA $07F3
    $ g" k9 z% s( }% V3 e
  2990. LDA #HIGH(Sound_Bar)
    2 ?  l; n6 J5 D" l' |
  2991. STA $07F58 A: g  V! y8 v) p) b( k; ]  L/ Q
  2992. LDA #$60% n  q) p% G: p+ C! q
  2993. STA $07F6
    # O* Z6 A- l" `  X: ?- e
  2994. RTS
    $ y+ Q* Q& U1 t$ |& P

  2995. & [  C: s% [8 s* Z- r! R6 S7 ]/ ]/ u
  2996. .ORG $FF40
    4 T: g8 I1 i: v
  2997. STA $4000
    % W8 @& Q1 W6 \1 K8 G
  2998. STA Sound_Bar + $00, j1 X3 M3 E5 t! }" P* {
  2999. RTS
    2 r5 W4 T: n4 v0 I" k! u
  3000. 8 h' w& j! O" G6 A7 Q4 i5 A
  3001. .ORG $FF48
    9 B& g3 m* _% v  @' j
  3002. STA $4004; W, ]3 K4 |/ L3 l0 P
  3003. STA Sound_Bar + $04
    $ I, h* P7 k5 I
  3004. RTS
    ' y& u3 j& n3 x( b" K( v

  3005. 0 n! _- }1 L) E
  3006. .ORG $FF50
      o& _& ?( G7 _) h
  3007. STA $40081 G2 C; B( Y; _1 P: _0 F" y
  3008. STA Sound_Bar + $08
    / U& L2 T1 t+ Q$ t5 s
  3009. RTS
    7 g$ v* n; g1 B. I. l

  3010. * V  {8 a6 W0 ~4 f2 g  G! J
  3011. .ORG $FF58" L3 q7 L$ ?) k1 P6 h. n4 D: M
  3012. STA $400C
    5 ?( J3 e1 k0 K# [" Q: l" L
  3013. STA Sound_Bar + $0C
    7 I, M+ S; G: t  n# v- f6 f
  3014. RTS
    # F2 d- f# n# [# |, C1 c- b$ [

  3015. 3 E6 _7 D  r7 w1 Q* {3 S) _
  3016. .ORG $FF602 P2 a/ V4 @; ]& G/ B& p
  3017. STX $4000/ Q* Q7 T, P# Q$ e3 @* p3 W
  3018. STX Sound_Bar + $00
    0 Y% F) d6 x! n# {$ f  p$ R
  3019. RTS
    % u# B& e7 X2 k- x- U+ a# t
  3020. " G) V, v: l7 A" W
  3021. .ORG $FF689 [* f/ w0 e4 K: K
  3022. STX $4004
    ! P# j2 R) b2 B  l% ?1 `
  3023. STX Sound_Bar + $04
    - c4 C6 C0 u3 d6 F/ l: o; n. A4 g
  3024. RTS, k+ `1 a% Q% M- ^! ]
  3025. # b* S9 w7 C( p9 U% G; j0 k/ D
  3026. .ORG $FF70$ ^: H: r- x5 l$ j
  3027. STX $4008
    - J0 L+ Y$ a' V( g0 L2 ^1 a7 P
  3028. STX Sound_Bar + $08
      @  X" z+ ?4 U# B. q; G
  3029. RTS
    ; \& q, z+ _, `1 @" a$ l* w) K

  3030. ; d7 T( X. Z. G% b. l1 Q
  3031. .ORG $FF78
    9 w/ J  Y- d; J; c
  3032. STX $400C
      _( ^" ^8 b( p% q9 [( G
  3033. STX Sound_Bar + $0C
      D7 i- P% e4 M. d5 [2 V: T* q
  3034. RTS9 h6 g( F$ d( i4 Q- K0 t
  3035. 3 {; W0 m" H# Q9 p; Y, r
  3036. .ORG $FF80
    ! N0 Z# g$ t$ R  g! R: a: A9 L
  3037. STY $4000' i6 H) }* v0 _; U, n# a
  3038. STY Sound_Bar + $00# b! C2 C" Y4 r# V  b) K7 g& I
  3039. RTS
    " [) h# R$ i% V! O9 @- w6 N7 D; T
  3040.   O% D: e, O9 p1 h; r, B
  3041. .ORG $FF88
    : c3 f3 n# \& L" W
  3042. STY $40041 g1 u* p5 U) A& F9 h
  3043. STY Sound_Bar + $048 S5 J! `4 R( J/ ^) ]
  3044. RTS
    ; U$ ?: p9 G) X* v& o8 B
  3045. 2 U& y0 L& N- K
  3046. .ORG $FF90
    . l7 T! M8 N3 t0 g3 w: U+ o- `
  3047. STY $4008
    / K# i) W" j! p9 e
  3048. STY Sound_Bar + $08
    0 F6 F! Q8 x. v+ z1 t5 Q0 q3 c4 |
  3049. RTS! c* F3 T' n/ ]& c; v

  3050. 1 N8 s4 q/ i; N: G6 n
  3051. .ORG $FF988 y: d( b& v, r- L
  3052. STY $400C  O" e% ?3 `6 e& p/ }
  3053. STY Sound_Bar + $0C2 Z& I  \2 ~% a1 T  `4 w$ V
  3054. RTS
    , B# W' o# N6 O! o) q/ u

  3055. : u& r* V: b& l9 q% G
  3056. .ORG $FFA01 ~) O" z% o* G% [+ H3 y( I
  3057. STA $4000,X6 p% y- S7 B+ l7 {! c' u2 A8 p
  3058. STA Sound_Bar + $00,X/ t7 L9 e/ k$ U# s% I- `' f1 h
  3059. RTS
    9 X* ]# X1 M2 h2 i7 S4 E# ~
  3060. 8 K" Y- S/ u1 {% m! f, l: T5 U9 S
  3061. .ORG $FFA8! v) Z' Z% c% ~
  3062. STA $4000,Y7 B7 d- ]5 B) M2 S  }% `4 ~- K
  3063. STA Sound_Bar + $00,Y
    * ?' N% @# S  h" O. x6 [! x
  3064. RTS
    2 c2 a( ?' J, P3 N
  3065. " t* \  I3 x' b, Z
  3066. .ORG $FFB0" K3 S7 G5 r6 M# [- }+ s, h
  3067. STA $4004,X
    $ ]" s6 y2 L' _6 U3 |
  3068. STA Sound_Bar + $04,X
      F6 _% z0 R$ n9 {$ i6 Q* U0 {
  3069. RTS
    ! x0 ]' @' U4 G! f& i+ t

  3070. & d8 o: d; @& q, [5 S
  3071. .ORG $FFB8
    1 k: W) G! X' @6 F9 \+ ?; g
  3072. STA $4004,Y7 z* |) f# [% M- p* |6 U. r: \
  3073. STA Sound_Bar + $04,Y$ s- o9 C# r5 T) g; K0 F0 q. A
  3074. RTS7 S, F# w0 i5 D, L% k

  3075.   Z& }1 j9 U! t8 V1 A* e1 |
  3076. .ORG $FFC01 [3 [( V, D+ _$ y/ n
  3077. STA $4008,X
    5 |9 ?  d: u8 c+ D7 d% @
  3078. STA Sound_Bar + $08,X
    ( W7 n& z2 N' I6 ~9 j
  3079. RTS
    - C6 i3 @2 y) k% {

  3080. / c. }9 H- t: ^( i' z& }
  3081. .ORG $FFC8
    ( Q) Y  ]" }0 W' A
  3082. STA $4008,Y
    8 o/ e2 r: f& w% Q+ C; V2 H' M+ k
  3083. STA Sound_Bar + $08,Y  n/ o$ g# t" _) `; `
  3084. RTS7 M- k! D6 j4 o  C5 [& g/ L

  3085. % O, @+ [* u& H( K: T" q
  3086. .ORG $FFD0
    4 q+ w  z( L8 G; I6 ~
  3087. STA $400C,X4 M. H, ~( d+ _! |6 ^; v$ d
  3088. STA Sound_Bar + $0C,X
    0 @+ x. X# ]  [2 {' r3 E9 l8 o
  3089. RTS
    $ q  G; I$ \9 r1 l7 D* W

  3090. & q. T6 V$ N2 `* R
  3091. .ORG $FFD8" w# Y% s5 g: `$ d1 V  `3 f! {
  3092. STA $400C,Y
    7 _9 ^. |6 ]+ j% s' A
  3093. STA Sound_Bar + $0C,Y# ?) M& l6 p1 X; g
  3094. RTS, `7 Y5 x+ z1 E

  3095. 6 z+ b7 g; m3 K) J! a; J
  3096. .ENDIF) i1 e1 _& Y* H1 o/ }
复制代码
9 a! x3 h5 }4 ~: i' H) u% K
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

x
[发帖际遇]: yandagui扶老大爷过马路,警察叔叔奖励yandagui 3 个 柠檬. 幸运榜 / 衰神榜

签到天数: 3057 天

[LV.Master]伴坛终老

发表于 2023-8-5 12:37:15 | 显示全部楼层
非常支持您
[发帖际遇]: 一个袋子砸在了 leshui 头上,leshui 赚了 5 个 柠檬. 幸运榜 / 衰神榜
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|国治模拟精品屋 ( 沪ICP备15012945号-1 )

GMT+8, 2024-12-21 19:31 , Processed in 1.148437 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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