EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑
* L) E& L& V8 U9 r+ X+ p" o3 i4 `2 @# Y# n1 V: |& S
[FC][音乐12 IN 1]
9 n2 Q0 T& B6 a3 B时间: 2023.07.23
7 F5 ]0 m8 B) e% x' K. r' y. @0 u作者: FlameCyclone
& Z6 w/ c/ B* u, S7 w4 E# h5 Q- f) d7 _4 _1 {+ w5 j
收录音乐内容:) ~+ |5 U1 g, h1 B# F3 q" M' J7 v
1.Raf世界
# D) f$ F: X" U$ X& K4 D2.最终任务
- |2 X. H4 W* q) i3.赤影战士
$ g$ v# F: u! ?# U: z4.双截龙
6 ~. n/ k2 g6 m+ f; h5.双截龙2- \9 q8 m% ]/ V- j* j7 j3 }
6.双截龙3
# n5 J' z. Z) W$ |: ~# K3 ^7 \9 c7.洛克人" r# p* c: E! s
8.洛克人2
- S. l0 U5 s$ s& g  `3 @: f9.洛克人35 V! @7 F: H; D/ ^) o( k3 s8 X
10.洛克人4( F5 Y7 z( o9 f1 n8 x7 M/ S
11.洛克人5
) D9 k9 l/ k$ J7 Y) L; f' m$ G12.洛克人6/ u. t$ N) |+ Z) @! G; U/ ]' r
6 y, J2 Z, ?9 Y' M
操作:' U1 S1 x1 |3 ?# K& N! M
上键:         上一个专辑) ^! h# E- z3 b- e
下键:         下一个专辑) q  [' X# z) F9 z
左键:         上一曲. b  C# _) Y) j& z' P
右键:         下一曲
6 I1 h9 G( T2 c+ D8 HB/A键:        前10曲/后10曲
4 {" O) k! T0 I  H$ o  g" o: x选择键:       下一页
) l; x. F% {8 Y! p开始键:       停止/播放( s+ t0 t# G3 \, \/ N$ s. y; f
" V6 W/ o3 Z" D. ^' I' q" B
http://flamecyclone.ysepan.com/0 a  R3 e9 w. c" l7 @! M, Z

  Y' d0 K1 L8 P. \/ w
1 h! G1 a) g7 b8 \6 h/ p3 f" A7 D7 j4 \
$ R2 ^8 M4 d- U: r
  1. ;[FC音乐][播放器模板]( M2 O+ C7 _$ z5 J; E& B
  2. ;FlameCyclone 202307106 d2 _/ U% N/ a* ]0 d  o

  3. 5 b0 J. @# U0 G3 o: z
  4. ;文件头
    , M3 R$ u+ W( w+ ~
  5. ;======================================================================
    5 t* y: |' ^; T2 \6 `! i" l/ [
  6. .INESPRG 16                                             ;16KB PRG 数量
    " u1 P1 U4 z: Y
  7. .INESCHR 1                                               ;8KB CHR 数量
    % ~# z+ X% c1 _, \! h4 ^$ A# H, o
  8. .INESMAP 4                                                   ;mapper 4/ U9 ?: T- N2 d/ ?  Y! o
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直
    8 {' i& @; O4 ^# O+ k! k. G
  10. . k. @6 r- U& l$ a/ Z6 c
  11. ;==================================================
    / q2 R8 V8 e# F8 q6 ~
  12. SOUND_BAR_SHOW_ENABLE       = 1
    , C2 `: ]' K, D' `9 y: S9 E4 R/ j
  13. ;==================================================
    : V/ L2 x# O  H1 J7 y
  14. BANK_DATA_MASK              = $1F
    ( G/ V5 ^1 \3 G3 e
  15. CHR_RAM_ENABLE              = 0
    9 p5 N: c* {( o# ]' _: o/ ?
  16. IRQ_SCANLINE                = 136* u5 h* q* d4 B" ?1 D% N1 I: k5 r
  17. ;==================================================
    0 T( F. K) w( ^, K
  18. SOUND_DATA_BANK_00          = $009 z- _' A  j1 T, [# k6 {* b
  19. SOUND_DATA_BANK_01          = $01! D* t) j, f3 S5 o( N7 Q
  20. SOUND_DATA_BANK_02          = $02) p' M  L) g, |) U2 q) x7 l
  21. SOUND_DATA_BANK_03          = $03$ N  N+ F5 l% o* a0 Y* a5 B
  22. SOUND_DATA_BANK_04          = $04; {3 L, r3 X* B/ i) |# z3 M
  23. SOUND_DATA_BANK_05          = $05% Q% M1 K/ G# _7 Z
  24. SOUND_DATA_BANK_06          = $065 C  B/ ]+ [  ^2 I8 S9 j
  25. SOUND_DATA_BANK_07          = $07, N5 x8 o" ?9 U& d3 m
  26. SOUND_DATA_BANK_08          = $08
    ) ^* z2 ?# W/ K% c
  27. SOUND_DATA_BANK_09          = $09
    ; E' Z9 a+ q5 D) }9 J1 b1 f' g
  28. SOUND_DATA_BANK_0A          = $0A4 b' g) B6 X2 `% \! w
  29. SOUND_DATA_BANK_0B          = $0B
    , I& ^  J7 i# P% Q6 r) i1 L+ P
  30. SOUND_DATA_BANK_0C          = $0C
    " a! h  r$ ^5 q- A% T
  31. SOUND_DATA_BANK_0D          = $0D
    " I" W) p. R) B. ?: W0 \: a: Q
  32. SOUND_DATA_BANK_0E          = $0E$ U2 P1 M5 S/ G: M/ ?) ]. x7 k4 p
  33. SOUND_DATA_BANK_0F          = $0F
    , ^6 q+ A- y9 L0 q7 @: E- B6 P# X9 L
  34. 9 O) ^5 \3 R+ M7 x2 d  }3 L
  35. SOUND_DATA_BANK_10          = $10
    7 Q3 H. w+ f' O  K
  36. SOUND_DATA_BANK_11          = $11% `9 f; i* \! V. W, Z/ o6 n1 Y
  37. SOUND_DATA_BANK_12          = $12
    ! }! F6 k+ S- V# M* S
  38. SOUND_DATA_BANK_13          = $136 K7 b) A. j; S: g1 W, m" j0 G; I
  39. SOUND_DATA_BANK_14          = $14$ r" X6 F0 E- I" X( T6 Z
  40. SOUND_DATA_BANK_15          = $158 Q" V/ }& `4 t8 N! D$ t
  41. SOUND_DATA_BANK_16          = $16
    " t1 z0 O, ~2 L
  42. SOUND_DATA_BANK_17          = $17
    6 b8 @+ }6 i. L$ U) @+ k, p
  43. SOUND_DATA_BANK_18          = $18
    6 A2 p7 ~$ t& Y
  44. SOUND_DATA_BANK_19          = $19
    & M- A: B: d3 C/ }  S* w6 p+ J$ {3 [
  45. SOUND_DATA_BANK_1A          = $1A
    , t0 D) C. h) s# C+ p6 V1 d
  46. SOUND_DATA_BANK_1B          = $1B
      Q/ V# P7 R. @: A. _" i
  47. SOUND_DATA_BANK_1C          = $1C' B: n2 t% R8 @
  48. SOUND_DATA_BANK_1D          = $1D
    9 b6 r+ h# W8 g! V0 a

  49. : A6 v4 J9 t4 h/ _
  50. SOUND_DATA_BANK_C000        = $1E( s! o7 u9 ^( _/ z0 r5 C, o* U
  51. SOUND_DATA_BANK_E000        = $1F$ W+ }: N( M7 N% k1 W9 K, b2 w
  52. ;-------------------------------------------------
    , b3 y+ ?! g- L# r
  53. CHR_DATA_BANK               = $20" B. [- i* K( I1 h( g
  54. CHR_DATA_ADDR               = $A000
    5 J& s/ K+ Z, v
  55. ;-------------------------------------------------- l( S  H! [! Z2 D4 _0 v. @$ F- o
  56. PROGRAM_BANK                = $006 }9 ^, X0 \/ P* e5 j: K7 T/ ]
  57. PROGRAM_ADDR                = $8000
    - k2 j# Q3 F9 c
  58. ;-------------------------------------------------
      v9 F# ~3 N1 p; O
  59. RESET_BANK                  = $1F
    & g+ o- T. ~1 ]
  60. RESET_ADDR                  = $FD00
    9 N8 i2 z: o! Z% w' `$ n& r" A
  61. % n- ]* q; j( T: O$ v4 g# q5 L3 k
  62. ;==================================================
    1 ^) G6 N* n8 B6 w$ q$ T& x5 ^
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数2 T) w" y3 s. }
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引
    ) a+ m: _; u& [
  65. PAGE_SIZE           = 5                     ;每页节目数
    2 Z# B8 l5 E4 J. k/ T0 Z3 i  D
  66. + ?# k, x6 o) P0 r0 N" A+ }) Z
  67. ;==================================================3 s7 w" N' F9 ~
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除. W7 p% ?' M1 C& n, V2 l% K
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数( g5 k5 `2 w* Z- V
  70. .ELSE7 x9 M( e' d" y# c7 P
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数5 G* b( l% o6 @2 i) L
  72. .ENDIF9 |0 F8 b6 r  R5 V7 x2 d2 G

  73. . W0 q+ J9 z9 B: e
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引& @6 h. N- Q. X* [

  75. - \0 M1 }6 _' L* t1 Z
  76. ;==================================================
    ( Z# [  A- J" ~8 `& K
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置0 B( R# V  }3 ~9 J: Y
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 2
    - X  E+ q; e/ d. N4 Z
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;
    1 m3 n2 i. _! T% j& g  i* a9 u$ T8 ]
  80. ;==================================================' j: o6 p& [: i) y: L
  81. Caption_Text_Pos    = $204D ;标题文本位置' K4 G5 |' f+ |, Z) |( m7 W
  82. Author_Text_Pos     = $2324 ;作者文本位置( e4 A+ U0 h, ~  \0 S* h
  83. Date_Text_Pos       = $236B ;日期文本位置; K, \' _, J- v# j/ K
  84. ;------------------------------: y& l3 o5 G( B% F* k
  85. ;------------------------------5 n$ Z5 C, @2 h
  86. .IF SOUND_BAR_SHOW_ENABLE
    3 i* S" r$ K$ i; I8 e

  87. * g3 j9 R; _& ~! K) ]4 ^; |) V
  88. Play_Index_Pos      = $2273 ;当前曲目位置
    9 s+ d6 Z3 M( l2 _; z4 w6 b7 S8 N& B; x
  89. Play_Time_Pos       = $22B3 ;播放时间位置3 a" A/ n9 V; |; a- v+ d
  90. Play_State_Pos      = $22F3 ;播放状态位置; \1 G# ]) V" v0 f

  91. / C- D1 E$ S" i" ?* x, _3 N1 v
  92. .ELSE( q( k9 y* \. i% o0 O0 ]
  93. 4 [9 n2 O8 b3 o) ?- j( q6 {
  94. Play_Index_Pos      = $226C ;当前曲目位置
    : t8 G2 @! \3 U/ X" k+ {
  95. Play_Time_Pos       = $22AC ;播放时间位置0 ~! t/ g; _/ O% H1 e
  96. Play_State_Pos      = $22EC ;播放状态位置
    # i1 n) |1 {. K3 e! i
  97.   T5 j, t8 @4 A4 a7 @9 w) m: q& R
  98. .ENDIF
    + w- C( H: \1 U4 W
  99. ;------------------------------
    0 O" ~. W/ [0 b0 ?' E
  100. Track_Name_Pos      = $222B ;曲目文本位置# C& f: ]5 ]) J( R4 T
  101. ;Track_Name_Pos      = $00 ;曲目文本位置! W2 {* F, V& x4 r0 _
  102. Sound_Track_Pos     = $2265 ;声道文本位置
    " _" v. A4 b- V/ U& D
  103. Sound_Bar_Pos       = $2269 ;音乐条位置
    . Q0 h6 M1 m- T( V
  104. ;==================================================
    7 i7 n7 J+ O+ f; v3 O
  105. Scroll_X = $00
    . E+ ?7 h' g4 T! I* H! A/ s% M; M
  106. Scroll_Y = $00( V, V1 m  B& Z9 q
  107. ;==================================================' z& l, s- O! p# l4 p0 e& V$ l. f
  108. Sound_Ram_Addr_1       = $0100! x' O6 v/ k8 O. ?8 }; G% z
  109. Sound_Ram_Addr_1_Size  = $801 s5 ^- f$ c9 I% P  O' R
  110. Sound_Ram_Addr_2       = $00905 C6 h# S* }5 G1 ^
  111. Sound_Ram_Addr_2_Size  = $707 ^' E! P% x4 l1 ^; W
  112. Sound_Ram_Addr_3       = $0700, m6 ^" Q" ^+ ]4 Y
  113. Sound_Ram_Addr_3_Size  = $001 z5 }2 n: t7 L) _. r) a& B8 H, [
  114. Sound_Ram_Addr_4       = $04004 p; i8 b8 ]$ D4 s& a
  115. Sound_Ram_Addr_4_Size  = $00
    2 @& V( g! E( x9 W; L
  116. Sound_Ram_Addr_5       = $0500
    7 X& Z; Y5 j+ g3 Z: G) E$ Y, ]
  117. Sound_Ram_Addr_5_Size  = $40
    # J- u3 q8 L4 m2 ~

  118. 0 k! \+ g8 i; p  p
  119. OAM_TEMP_ADDR   = $0300
    - x! j3 W: ]- f
  120. , l. v0 J/ Z1 n- J# d
  121. ;==================================================
    ! T4 c! Z2 Z% {  i- h' Q/ ^* W
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器9 I: h+ M) P- B) `: o; y6 f
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器) _6 B+ ?; _! f0 `" Q
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位" u% D  |. f3 h6 _# O3 y% j
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加1
    . z/ ?% F4 ~) M! X' _+ ]" H) l
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加1/ R- y. I, b" m8 z+ y
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器
    , D4 G2 u' Q; N* P: l
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加' `, V2 q& |* v) R8 C
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32 / `1 \& h' f' n9 S2 l  ~, y
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存
    1 l1 I. p3 m" a) N: R8 f+ b- N7 p
  131. APU_STATUS              =   $4015   ;声音通道切换
    2 M; K$ o1 |$ E
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通1 _: l$ D  l: a& t
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通
    & Z0 w; }5 Q- J; Q! Q, y) E' v3 X
  134. ;==================================================6 u0 ?( o5 e3 |0 k1 `
  135. MMC3_BANK_CTRL          =   $80003 e3 i* q. m! q$ f; p
  136. MMC3_BANK_DATA          =   $8001
    ! d4 b1 e. k" f3 B' d- Y# w
  137. MMC3_MIRRORING          =   $A000
    + P4 M) }7 N& W& o# ^3 n
  138. MMC3_PRG_RAM_PROTECT    =   $A001
    ( H- ]9 g9 J9 ]
  139. MMC3_IRQ_LATCH          =   $C0000 M/ a- }- J4 T  g2 [
  140. MMC3_IRQ_RELOAD         =   $C001
    ! d8 I/ E8 `5 W5 O5 h- d" w
  141. MMC3_IRQ_DISABLE        =   $E0000 b, x. q4 m. |! e5 y
  142. MMC3_IRQ_ENABLE         =   $E001: L# L! J6 o8 @

  143. ( n% _6 @: t0 a- j# \1 L; ^5 K
  144. ;==================================================
    0 u5 n# Z! b5 ]  y2 i' H8 l* b
  145. PPU_Addr        = $0200. o) A& r( L: n
  146. Palette_Addr    = $02C0
    9 ?0 Q6 N/ x0 c! Z( s0 A4 ]
  147. Sound_Bar       = PPU_Addr+$E0
    & S8 X* t$ N3 k7 ]
  148. ;==================================================( \' p  l3 i3 a  o
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D1 B8 @* k, P; l4 L! [+ |
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$11
      H: G* n) g( G5 Y4 E, I
  151. PALETTE_UPDATE_MAX      = $2C
    ) Z: ]  M0 ?  e9 q0 U& i$ e
  152. PALETTE_UPDATE_MIN      = $21; H; G, x7 H: @( E2 H7 P6 i
  153. PALETTE_UPDATE_INTERVAL = 60
    , H$ h# O7 f/ I$ z% V
  154. ;==================================================; v  J+ a' s3 B) s: b
  155. Sound_Bar_Cnt       = PPU_Addr+$F03 N4 e: v0 X) [% Y
  156. PPU_Cur             = Sound_Bar_Cnt+$02- f2 Q' s0 f" |
  157. PPU_Addr_H          = PPU_Cur+$03
    # A5 `5 U4 V( j3 _) _% l6 v& `/ b0 x
  158. PPU_Addr_L          = PPU_Addr_H+$04) w6 b* G9 s+ {* v% N! ~7 A
  159. Screen_Ctrl         = PPU_Addr_L+$01  m* e3 L4 @9 T
  160. Screen_State        = Screen_Ctrl+$01  E2 X% A( A$ h  H
  161. ;==================================================
    0 B+ e) Z; q: f9 ?: r
  162. Use_Ram_Begin       = $505 c, ?) Z! @) E, M
  163. ;==================================================
    # p6 T( a* y! V- s! E
  164. JSR_Addr_Op         = Use_Ram_Begin
    % S$ I* T) U2 f6 }
  165. JSR_Addr_L          = JSR_Addr_Op + $01/ T4 W+ |5 T9 j/ @
  166. JSR_Addr_H          = JSR_Addr_L + $01
    % {  g$ a' z; [  u9 L  P, N3 S
  167. JSR_Addr_Rts        = JSR_Addr_H + $01
    & _2 C: }& y5 G/ T6 m/ S; s  F9 L
  168. Data_L              = JSR_Addr_Rts + $01  d) [9 d$ L1 _6 {* L% [9 a2 O
  169. Data_H              = Data_L + $01
    " @. g$ g5 C; u- e  s
  170. Data_Cnt            = Data_H + $015 s  l. p) e4 ^) Z
  171. Data_Buf            = Data_Cnt + $01& o4 U* ]9 t* Z! a/ h
  172. Nmi_Time_Count      = Data_Buf + $01
    % s/ [5 r; v9 ?7 J. N
  173. Time_Wait_Cnt       = Nmi_Time_Count + $01
    8 k2 q8 y# I5 X( G
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $014 R. A# U8 _9 M0 h! g8 }

  175. . S' z& q- v: i" \
  176. ;调色板刷新标志
    ( `: F; j5 O5 l6 T  f- _# q
  177. Palette_Update_Flag = Palette_Wait_Cnt + $01) r) W& N; B$ a; o6 J

  178. % a% x" z3 J+ Q
  179. ;当前帧文本写入禁用标志
    " I2 ]8 M. E# D: x
  180. Text_Disable_Flag   = Palette_Update_Flag + $01! u' e# O6 c, G4 U0 J) @2 W& \
  181. & T7 [5 [; s, j* b5 R+ D* A7 S
  182. ;==================================================. t2 P% p" p# h4 W  q5 ?
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动. I5 P2 M2 y% S) t# }
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条, V1 @. b# o3 z# l
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间
    8 l2 Z- o) K& Z& W( i
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间
    " Y& G% q) [3 b4 {# a; ^
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间
    0 P! J1 L  \2 \* M) G+ B9 \
  188. ;==================================================
    ) N8 e$ ~5 v! t2 j/ m$ W! [
  189. Key_Keep            = Text_Disable_Flag + 1
    6 A6 n/ F6 G$ M
  190. Key_Once            = Key_Keep + $01$ c5 d' d7 @. [4 Z
  191. Key_Kemp            = Key_Once + $01
    1 ^7 @; U+ m- {0 d6 E7 ?/ v7 g+ P
  192. Key_Temp            = Key_Kemp + $01. ~, H$ E; L6 Z
  193. Key_Getv            = Key_Temp + $01
    : w0 @. y; s. B5 s  w  Z& h
  194. ;==================================================
    7 Y$ r' G8 ^3 X- C
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集
    2 _: M; a- s% K2 q5 h1 q' m& \
  196. Music_Item_Last     = Music_Item_Cur + $01
    5 Q6 o) h" H* d- t3 p
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集0 y8 I$ B" P9 T+ i5 _; c- q
  198. Music_Cur           = Music_Total + $01  ;当前曲目
    ' p1 z2 v% `4 q* D0 h) B
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目1 V2 l5 {$ i9 M& D
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态
    1 z# |. v2 s1 q
  201. ;==================================================
    1 U% L0 w* @& i
  202. HEX_Data            = Music_Stop_State + $018 k9 W  Y) b. x
  203. DEC_H               = HEX_Data + $016 i* `0 B, @1 V
  204. DEC_T               = DEC_H + $01
    ) P0 K& i( |4 D* s- D* d
  205. DEC_L               = DEC_T + $01
    % C2 {$ E0 }6 H8 ^/ ], g
  206. ;==================================================) r7 ]6 j# u# h3 f0 d1 g8 @
  207. Time_S              = DEC_L + $01
    % A/ e2 z3 s% @7 w4 D; A7 i# u$ C. @
  208. Time_M              = Time_S + $01
    4 H; h/ h; u. Q; @
  209. Time_H              = Time_M + $02
    8 c2 Q2 J4 T) N8 N
  210. Time_Cnt            = Time_H + $036 S! H$ P3 L" y, U
  211. 7 k6 W7 y7 g, B, K# {. e
  212. ;==================================================
    0 f" M  L8 u2 y* P( z
  213. Music_Bank_8000     = Time_Cnt + 19 ?$ s) n# D7 d4 g$ Z
  214. Music_Bank_A000     = Music_Bank_8000 + 1! o% G6 w) r' O+ S' H  F3 K. A/ g
  215. ;==================================================7 r3 R# b- p% C  g+ K# k) q6 ^
  216. Scroll_H            = Music_Bank_A000 + 1. j2 i: E6 H) d" B; L4 j
  217. Scroll_V            = Scroll_H + 1
    + h: R% x' c; o* V
  218. IRQ_Process_Index   = Scroll_V + 16 |( u0 B. M& g& ]* k3 U
  219. ;--------------------------------------------------3 x& E6 g7 G7 B, Y7 K1 c6 l
  220. Page_Cur            = IRQ_Process_Index + $01! b4 d+ R7 m" [* b# N0 a
  221. Page_Cur_Index      = Page_Cur + $01
    7 x: L3 b( H# w3 e
  222. Page_Cur_Cnt        = Page_Cur_Index + $01
    6 C( L! r" E0 e% @
  223. Page_Last           = Page_Cur_Cnt + $01
    0 i% T7 d( G. `, X, _" b
  224. Page_Last_Index     = Page_Last + $01! R2 R2 E+ c. R' N
  225. Page_Last_Cnt       = Page_Last_Index + $01% H# B! v7 a6 U/ G! d" w
  226. Use_Ram_End         = Page_Last_Cnt + $01# P5 s% L3 E, l/ L" Y/ @
  227. ;======================================================================( P: {. N8 l% [0 i
  228. ;音乐数据块
    ; @, N, S8 G1 m; e! E7 L/ v$ a
  229. & \( K# c! V5 A( k6 d* V$ a
  230. .IF SOUND_BAR_SHOW_ENABLE, W' L! z" l7 O  @3 U7 {3 Z" D5 \" x
  231. , @3 f3 N7 H0 v: @* z: b; `( @$ Q
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK# P& }2 Q7 K' Q3 j! i
  233. .ORG $90000 @' E9 U5 w2 J- O& N& c
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"
    : b  Z& `4 K6 b6 |9 r  z% X

  235. % r6 v# ^' M, m8 o/ c
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    7 O- o' X+ Q& j" Z' l& h7 @+ F
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"; K. ~' a: l7 t. v. r2 b& \

  238. # L! G+ e. O. n# G& l/ x* @" t1 W
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    ' O7 p$ F$ g) ^; r/ k# p
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"
    ; _: b3 v$ r, H2 K7 w

  241. , H" f! `$ G; n/ o2 u$ k2 F: o
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    ( o0 P8 {# G% z4 F  J+ [) W' w
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"4 S! q& r; C( T' j; V

  244. + s2 }( S& E9 j0 M: R7 B% M' p
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    # v8 T" F) p) r+ p3 n8 ]
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank"
    & w8 A& @  @0 f; H3 j( j

  247. ( \* \/ Z: w$ p1 j9 X2 J
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
      @3 U+ Z9 I% N3 P7 Z8 N8 b
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    2 ^! Z+ g/ j) c7 ?! c# r1 \, P

  250. % d* F3 o% f) |; B" O" y
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    # P7 t, a) s! Y9 X9 w( I8 ]
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"- i" A/ T% x7 E+ o7 z

  253. * D& C- J, Z  E# g" [+ j, F
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK, J! x  b+ G8 E2 x/ U+ j
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank"1 C" [  \3 v' s5 u6 N. Y' Q! _3 u

  256. 6 U; b- Z& @8 S
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK3 l' Y) Q8 `/ c2 I+ e6 }/ Z3 _
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank". _8 L& [9 g) w( Q6 `7 n0 j
  259. 4 W$ |! z/ W( J* V1 d
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK8 p. q. n( n5 t4 a" G, j9 Y5 m, c
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    " q1 y4 p: K( X
  262. ( ^1 A! ~% J) ?: H) [' ~7 ?
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK9 x' [3 w2 t9 V% S' U& `
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"
    3 s5 h9 M# o5 ^

  265.   E3 {' B8 ^) J, [) p4 ~+ K
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK
    " n& ^% e& ?" S* z- z
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    , ?- W% L- B/ H0 v2 l  U3 J

  268. - i; s( ^+ G1 E  O# Q0 u1 N
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK& u* {$ }! t- f) e: t
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    , H# l+ b2 |8 T6 \. F/ w. U* l5 o

  271. 0 v( y& s& i  a
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    2 C2 c! }+ p4 m
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"8 N4 y) l5 s0 G/ C
  274. 9 W  h' |/ X& m3 L5 @* C8 V
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK  ^  }8 M  u9 A$ N; r
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"
    " H' l+ O7 Q) u% N6 f, `: E
  277. 3 P% v4 h9 Y( v6 t$ r, t6 B; o" K
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK' d. n7 h2 y) x  p# k3 l" e
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    & }1 Q  v7 a6 n
  280. 6 y& G, H" S3 }* `
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK  Z+ j- M5 d2 b) h8 a
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank"
    " S0 Y, E) O4 P4 W" }) p
  283. , A  n6 o" u$ U6 Y, U: x( i
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    , e! L, t- U- `( f6 }, C
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
    $ O. a: q6 p3 {; R  @; o% e3 K
  286. 0 |, ?2 t! Z$ o8 F
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK& S8 v1 a& I' I/ B: p& B
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank"
    + J+ W  y9 a- Q' [; n- [- F
  289. $ N( w! A' @+ C9 c4 C9 [! ^
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK9 y# j4 w* ^! O
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    9 E- {) d) f8 }6 l

  292. 9 U7 T* R/ K, n1 G: }0 ]8 D
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    6 Q9 Q) s& k+ D8 d$ Z1 w
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    # K5 r  t' a% d, \& u9 z0 |9 l. @
  295. % l1 p+ o4 B9 b' r' k$ E& }
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK6 R, t* g. D4 ?9 V! K3 v
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank"
    / A' U4 Q/ y' j2 K" R: B  g, {
  298. 6 p+ G% f  _$ d1 Q6 `
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK  b2 Y  o: E& D9 ]% w
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank"
    4 E. B; n* C. j# X
  301. # ?% |6 B* c1 U: n+ Q: I
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK9 E5 {5 \( R2 P! \, }3 G: K
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    8 a, d* `; q* \" |, [
  304. $ ]; n! |: w# J5 C: ~9 {" }0 l$ x) J
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK+ h+ ~# Y3 ]( O. L: j
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank"7 U. ^. E& B7 L. b5 Q0 H$ e0 `: c6 J

  307. . e- P# L' E  y: W  m+ P' j: F
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK; h& w" Q) X: U# ~- v/ ^$ a! }' S
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"2 W4 v" W+ m6 i" b  M
  310. " `/ V: Q" h( A5 l- g
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK
    9 y: k! A7 s% r$ t9 E! o
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"
    3 v0 p. Y, H% a+ @* O& q; W9 m
  313.   L) Y1 ]9 i0 m$ V5 r2 ^* q# ~( R
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK
    % L$ T9 m% F1 E# t
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"8 I9 t: K8 e9 j3 k
  316. ) d! N; Y1 m9 ?0 M" K9 R7 N& C0 z) G# {
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK; o$ |* C6 J+ G: z1 H5 V2 ^+ f% |- S
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"1 E7 E8 p  W/ W  R, [2 ~/ e
  319. & U% G3 j. a; l- N, A4 y6 r) }. a
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK2 K$ ?" ~9 n- z+ H0 ^8 X% R6 q
  321. .ORG $D400" e5 J- N9 N' X8 N- Y  P
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    ! {2 x& X9 i5 F$ b' p$ d
  323. - T% K6 G$ Z' A. \' Y" ~) z, W/ n/ |
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK, k+ O; i, O6 B! C' h) M0 l5 n- b
  325. .ORG $D800( x  u4 C6 B7 C2 g
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"
    ( g/ |7 r) F, E1 ?; z; s4 P& c) V
  327. - C+ R4 j5 ~( F# g/ c8 R

  328. , y' B. f+ ]! @' d! R2 w
  329. .ELSE
    0 `8 S1 x! R# D. m$ t
  330. / z  P7 i  N+ R1 b, b
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
      `3 @+ r4 w( v1 n3 O5 j9 F7 ?
  332. .ORG $90003 U8 ]! |/ s: |0 s+ C* h
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"
    $ q2 r! k8 k  K

  334. , M9 }8 X1 d; Z/ z3 X* d$ B2 ^$ f8 ]
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK2 X1 Q* q% ]" j+ i/ f0 @8 L
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"# p1 y& v: A7 H, Y8 x/ u/ a$ H  n$ c
  337. 5 b8 B7 i# E+ u
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    7 @- z5 W/ o. H* C7 F9 o
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"
    * e8 v, ?) B: c/ Q

  340. - _1 V6 m+ B$ v  e3 G/ H1 @- e
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK2 F2 d1 t3 M5 r9 t7 S: l1 S( T
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    - k1 \. ]5 {9 K  y" @* u
  343. % t. R5 C# y4 J+ ]
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    : v. b( ^9 D6 h' \
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank"7 {! S2 v  R! k. @6 C3 ?; g! T

  346. . ^9 e4 r, U" i+ O
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK5 W" @$ O* P, _, ~
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"9 z8 L$ y7 z9 d& W" d. r2 F# X2 R

  349. 6 u. V- }* w6 Q4 K/ w
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK) I/ C& S6 i+ k
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    ( b( I/ L/ P+ h$ E8 W9 r( q. g
  352. / T) x" B% W" s2 p; q% O$ o9 I. S
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK! o* d8 `/ R" Q7 u
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"
    ; C& H& g, E+ q0 x6 o5 h  V
  355. 3 \. M% N. |3 ]6 ~7 P0 q
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK
    ! r/ i) h% v1 Y+ z6 C/ }
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    : p3 C, p/ U1 \8 S/ J7 y
  358. ' m0 ^1 [& m/ Y: ?. M7 K8 b0 q
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK2 w" P% y7 I$ M+ q' o8 K
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    7 n2 M& P: q, O' b

  361.   U. R& K" ?0 V! r, j
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    + T/ p% Y/ j' x
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"* u. e: Q4 X" p3 ]

  364. * G, u* \. @4 r  d
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK
    2 k; P9 N5 M% f0 X: Z" m8 @
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    6 Z* M( H' B6 `8 @* o( R0 {

  367. ( W' o9 w3 z4 n# c- ~
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK$ o( w8 z, E2 ^4 K( J% t
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    2 L4 K7 L* V  H) p7 l7 x9 c; ~: L
  370. ' U. b1 {  y, N% p, F& T
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    # t! Z* e$ `' K0 A4 ?* d
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"
    ( u0 |1 `. g7 ^6 E. h6 w+ c
  373. ! }& L$ ]' W' G1 j
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    , [5 ]0 Y9 G9 v$ k; l( Y# F  q7 V
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"0 z7 B6 v8 b/ M5 H2 a

  376. & q  _8 S7 I* J
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    % w; {* T9 f6 B0 e! J5 o
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    ; o# I* @) B2 M: e  [; D4 X; y

  379. # q2 p: K! M2 J1 z! |' n
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK
    9 Z8 V: f: A# C/ b( W/ j
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"
    5 Y: B: X5 ?+ f
  382. : b: J, e0 p* |+ F5 k, P' S  h
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK, X# W( J7 r# Q
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
    $ d: Y) f2 l  S) X8 G0 t  r6 E! h2 @

  385. # k8 k6 V+ z% b+ r# ~
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    7 _$ _4 S3 s/ P- E# v
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"
    2 C/ h: O; V2 i$ t, h, |

  388. 1 O/ q8 E& e7 s/ J/ t6 s$ ^; v
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK8 K7 F4 A: y% X8 O" h
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank": l- g% s; K2 b# D# T

  391. ( X  x; G  ^0 J9 E1 m. Y7 K# c, a
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    / z9 U) V' D2 F
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"3 S8 a2 z# [$ {. D2 D7 B

  394. 5 r: Y- u! v9 A6 _/ q0 a
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    $ E! H3 Y& V3 m0 o$ j4 F# l
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank"1 Y5 l" r6 z& \! ^) \7 R

  397. 5 Q& g/ N( _" j
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    ' }# L' m: h8 z( V1 c: ^
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"' Z4 U# @& w8 Q3 Z0 K
  400. % ~' U5 C) g* K( o5 S1 B0 U
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
    * f+ z( n7 K3 k7 E. G- H" b$ g/ O8 D
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    5 J( v) R) w; L: R: L) s& y! H

  403. : Q9 T& o* m2 R  q" _' d
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK- B, A7 ?1 |( d% G: Y0 ~
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank"
    ; j% e9 o" N- P: T
  406. ! T% b2 }  O2 F' l/ ]. \: z
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    : ?- Y$ Y9 n1 I
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"
    & B# H5 }# ^) W/ M* o' L3 R

  409. + e- x) b; B" C) Q+ z, `& B
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK+ ?8 a* @6 \5 u- m7 ~! P
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"6 x1 {  }9 I; |! N& v7 r9 q: r

  412. 2 D; w& I. L1 ~3 ?8 Q) o5 ^- V( q
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK
    5 d. _; F" j- w" W3 b0 y
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"
    2 Q2 N- s% ]! F; H7 Z  G

  415. ' K0 W+ Y' k# V! B/ a( _
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK, E& |7 k0 K: Q5 s
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    0 w1 R# E  n4 ~* N# K

  418. * n7 v4 F  m" d: b: W" j
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK4 }4 d. T$ s! a; e2 p* H
  420. .ORG $D400
    ! w+ y* ^/ |7 y4 o6 Z
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"2 K% G  L1 \3 C5 w
  422. . |6 w+ N9 G  C8 `' o' R$ U% D& u
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK# b# H3 G  X6 I0 c5 l
  424. .ORG $D800
    & e0 }2 H# G, O* y' m$ @
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"
    " A- K6 E$ D* Z

  426. 7 P% ?) q5 D0 R
  427. .ENDIF" k% @- u' N# W5 D  j9 W

  428. ; _+ W; k2 h& L, h
  429. ;CHR图形数据
    # \( k+ ^/ H3 o+ |8 Q
  430. ;======================================================================
    6 v& T0 x2 Z) \0 J( w: X
  431. .BANK CHR_DATA_BANK- T( J) |4 e1 W9 x% M' [# g
  432. .INCBIN "chr_bank/chr_data.chr"
    , G! Z$ q; N8 w1 D7 W# [
  433. . h  u3 e! _/ t
  434. ;======================================================================' A, s4 w! t2 _
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK; x: @! T6 h$ T/ N  V
  436. .ORG PROGRAM_ADDR1 l0 ?+ i5 v$ A2 W4 k
  437. , B6 p* u9 N3 o% u2 @
  438. ;==================================================
    & t7 L9 f7 R/ u% G
  439. NmiProcess+ a; k, {2 z. S+ x

  440. 6 @) ^: S1 R1 b1 r  S) m
  441. ;关闭屏幕控制
    ' t% x" a; d0 h! X
  442. LDA #$004 e% y4 g* K6 P
  443. STA PPU_CTRL5 A' t) z7 O& z5 U6 t. C) y1 i7 G

  444. , ]2 I  C3 v: }1 B
  445. ;没播放音乐就不需要触发IRQ
    5 l4 J2 N4 @4 j6 z# w# k
  446. LDA <Music_Stop_State
      H" X5 Y! i( T0 g' _: B
  447. BNE NmiNormal3 A- `2 @- K: d9 H- r

  448. 1 d$ A4 k" {" u5 y; Q8 s, }
  449. ;重置IRQ索引
    0 I; u; A0 J4 X& D
  450. LDA #$00& u# j; ~2 @  T0 _/ j& \" c' B7 p
  451. STA <IRQ_Process_Index6 Y* l/ d" H( h4 P& \

  452. 6 u0 x- z, q- f, p* Q2 A' @
  453. ;时间秒数为空则跳过
    # d# H6 K% K7 X+ ]: P# ?; t
  454. LDA <Time_H2 L" y: E8 p4 o5 S  E$ k: G
  455. ORA <Time_M
    - T0 {2 j7 U, u! X
  456. ORA <Time_S# U( `, M/ o, L) I# J" @4 q+ w
  457. BEQ EnableFirstIrq
    ! R( D- k% Z+ k5 ~4 e0 v! k6 ]+ H& m& d+ i

  458. 6 v8 i! @( F$ ]2 [8 m0 N
  459. INC <Scroll_H7 F& ^6 ~  ^' `( [3 l

  460. : F  |# w' l" c: X" l
  461. EnableFirstIrq * K4 u. f6 d" a5 Y  t, w/ e* J
  462. ;80条扫描线后触发IRQ
    + Q- s% d3 t/ X
  463. LDA #IRQ_SCANLINE" E1 D  ?' W  A: [7 i* v0 V5 i
  464. STA MMC3_IRQ_LATCH
    # h: o* U! w3 H3 h6 T: @
  465. STA MMC3_IRQ_RELOAD
    8 f* t9 a# z- X& q" Q5 j/ r+ N; v
  466. STA MMC3_IRQ_ENABLE/ C  m6 F7 i- j( L
  467. CLI
    5 P0 \7 _+ n  h8 C. u, j
  468. 3 V* a6 m$ r4 m$ v+ Y
  469. NmiNormal
    5 X/ d- u* t9 B+ @

  470. 4 a# |( W' p2 A$ u/ O
  471. ;处理PPU图像' b' v- _. q4 M. p' q
  472. JSR PPU_Proc
    6 v# ^+ [8 h" l& J+ H- n& b7 N

  473. 4 U% m  [( X, f+ t, w
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化)8 ?4 B  {8 [) c, m
  475. LDA PPU_STATUS
    ; T: i: q: }  y
  476. ;LDA #$00' }( h* [. `; X/ C: y! [
  477. ;STA PPU_OAM_ADDR$ G" g% M. r0 H' [5 `: K/ @
  478. LDA #OAM_TEMP_ADDR / $01006 V/ F7 g* G, S8 [
  479. STA OAM_DMA
    ) k: U) N* E, c+ |( Z
  480. 4 l5 n) \  }2 Y3 l# J& S0 g
  481. ;启用NMI中断
    9 q( ^8 y. k5 M0 I  ^7 X+ l
  482. LDA Screen_Ctrl- [1 b- ^6 E* \' G  V4 S
  483. STA PPU_CTRL
    1 ~! H0 G9 [8 W/ H% e3 w4 H& \' B
  484. 2 m3 `! u( O, F% R8 D
  485. LDA <Text_Disable_Flag  T5 [# }( W& p- i' s6 H0 r
  486. AND #TEXT_DISABLE_RAM
    - E* c2 N$ I1 N+ {6 \
  487. BNE Nmi_Sound_Play
    4 c" E+ H, _! g0 x- P

  488. # b% v. i1 g2 j# P. J0 q
  489. ;处理手柄输入& l; N; \* Z2 [  v: v
  490. JSR Key_Proc& O  L/ u/ X/ e& U6 Z

  491. 5 Z) N1 o* }$ q3 E0 |/ j
  492. ;切换音乐(手柄触发)% U! j9 _; _/ \8 G0 C
  493. LDA <Time_Wait_Cnt
    * w1 w& Q' H1 |6 E$ A# c
  494. BNE Nmi_Cursor_Arrow
    : a" x( T2 i# c. Q6 G; o% q6 e& g
  495. JSR Change_Select_Item4 K. r' s3 D0 a
  496. % I- d$ `  Y6 P% u
  497. Nmi_Cursor_Arrow8 Y5 }) G0 f$ R' V

  498. $ S/ M( m  }( L
  499. ;处理光标箭头
    ) z) n, _; K9 J  v& x% U" k# q& P
  500. JSR Show_Arrow
    6 u: z  A" Q: M' {8 \- T' V
  501. 8 g2 e) R5 a% \% V
  502. ;更新调色板  m) I; k$ w3 ^
  503. JSR Update_Palette_Data
    + k* u# I: Q3 C
  504. ) W, y; V4 P% ^2 ], J
  505. ;显示时间(缓冲)2 U% p2 k5 f' _5 m0 C  }$ S
  506. JSR Time_Show6 M% M4 V+ \& P% x

  507. 8 I: O, s# s. {6 W* b* g
  508. ;音乐显示(缓冲)
    , \" T% j7 i" ?  q
  509. .IF SOUND_BAR_SHOW_ENABLE
    5 H( p# |( f6 t# e0 d
  510. JSR Music_Vision5 P! \% T; k4 ?( q6 M8 K
  511. .ENDIF
    + V3 F' g4 |) r$ _  a
  512. 2 K, o$ ^' e) V- @1 M( L) C
  513. Nmi_Sound_Play
    8 u! ~, h, A  B& ~8 ^' u" o3 X' Q
  514. ;播放声音) [' t/ x8 j6 x1 H9 R
  515. LDA <Music_Stop_State5 B2 W, Q2 H  a
  516. BNE Nmi_Time_Wait_Set. u' T; T; |7 @; ^) F0 Y( T
  517. JSR Sound_Play_Proc
    6 G- G# H2 A7 N8 g+ E5 ]$ ]
  518. 1 \# f) a" k7 Q2 L# L1 R& D0 z4 D
  519. ;播放计时! \5 s- d; k5 \$ a: H4 ^7 i
  520. JSR Time_Count# L( q7 ^& o/ E: S, I6 e7 \  Q

  521. ! f" z, i( a' [3 X6 c( y% t" u, \3 R
  522. Nmi_Time_Wait_Set6 f5 r6 I* Q, k6 F3 ]3 N( x6 z' }" |; c
  523. LDA <Time_Wait_Cnt
    ; F7 E) b2 \- @  A
  524. BEQ NmiNormalProcessEnd# ^1 _; H+ z2 Z0 P5 ~' I
  525. DEC <Time_Wait_Cnt
    " ?7 P! Z: ~8 n% i! R
  526. NmiNormalProcessEnd
    ; e& e$ R1 A3 r( r5 `* a9 Z- r
  527. % U$ v/ M! [/ a% `
  528. INC <Nmi_Time_Count2 P3 _0 F9 X' g

  529. - `6 A% {3 r& p8 w
  530. RTS0 Z* [3 N9 t% p( [

  531. $ M4 \0 T: f& w; O
  532. ;==================================================  y) x9 p( Y7 S5 a- C" X3 t% T
  533. Init_MMC3
    3 E$ a" t/ y8 p$ X9 y
  534. ;==============================
    ) h& z  d! G# c, L$ v
  535. ;禁用IRQ& F: I* L; y; @) j+ \
  536. STA MMC3_IRQ_DISABLE
    3 L! ~+ m6 B% a! c0 N$ A
  537. : c. l/ U7 V0 x0 h6 I- ~6 A% a3 f
  538. ;水平镜像! M& q. m& {: v$ d2 j
  539. LDA #$01
    4 F8 {& O: o1 R8 O. e
  540. STA MMC3_MIRRORING
    8 l2 y3 a+ P1 r: {9 \$ j* r

  541. - y+ U, C. [8 |  I; ^: P8 z
  542. ;初始化图形bank- B' L$ l- w! I/ b. p3 I
  543. JSR Init_MMC3_Chr_Bank# Z. ?" p* @$ C+ s% h' t
  544. $ C. r& m4 ^( Q+ T
  545. RTS
    1 B. s3 D6 R- @1 s8 X
  546. ;==================================================
    . _0 m$ e; ]+ W4 G! ~
  547. ProgramBegin;主程序! A8 B# w7 R/ H; A" b
  548. LDA #$00
    5 b) S' s* e) J
  549. STA PPU_CTRL
    ' E; z! }8 j. b( I' a5 Y$ F4 a: o
  550. LDA #$002 j3 r9 S& j3 _6 |* n5 w( ]
  551. STA PPU_STATUS
    & G$ B$ @' y" S5 X3 U- V
  552. STA PPU_MASK2 j( @- D; {% Z" [4 q3 s
  553. STA JOY2_FRAME1 c9 h+ f( `9 w, {9 P$ z

  554. $ z" u2 E1 e9 Z2 ]. P5 q& D
  555. STA PPU_SCROLL
    ; y7 N  g" A1 J" f) Z% c
  556. STA PPU_SCROLL1 X' o* n( n% _" q1 s9 E& c
  557. " w/ Y3 p( h4 M7 [" s
  558. ;==================================================8 G5 O! o: s( L+ r7 O( U; d
  559. LDX #$FF
    % q' O; x% P' t  M
  560. TXS
    - W2 {: g( X5 g4 v6 {
  561. ! a3 O. k0 r- o' e; i! F
  562. JSR Init_MMC3" X# M& ]* M5 z) b# G6 J+ H5 }
  563. 0 u) C$ f9 ^9 P
  564. LDX #$020 \+ q; z  E4 j; X2 e$ R, h" g) M
  565. Check1+ i9 n# }) N% c+ ^
  566. BIT PPU_STATUS
    ' x! ~1 S5 f" N8 w
  567. BPL Check1( t! V3 U7 B; k  f" `# x  m6 f. Y
  568. Check2* s- q& Q; L1 d& z* i% N9 ~$ ]  T
  569. BIT PPU_STATUS
    7 S) x( G* S) F% t
  570. BMI Check2* W5 o" a9 @3 |, W
  571. 1 B, F9 m* n8 W3 O( d# E' ]
  572. LDA #$0F
    / o: K9 w5 M! h' s6 H! g5 f
  573. STA APU_STATUS5 R* Q: f$ S" {" V/ Y
  574. LDA #$C0: R& e, Q( k5 R6 L+ \7 a( l
  575. STA JOY2_FRAME9 ]; v. r% e* a# V4 M

  576. 8 E" H' |+ _" V5 R% M' h. W
  577. LDA PPU_STATUS
    " S  n4 _# K8 Y9 C2 L$ K
  578. LDA #$10
    $ t& o4 ]2 }4 f* u" X" H
  579. TAX" u7 k: Q3 y+ ]
  580. Check3" |- j! t& F9 |; `
  581. STA PPU_ADDRESS1 V( y  e% p; S% e
  582. STA PPU_ADDRESS' o1 ~" k" u" s: k
  583. EOR #$00
    4 ^- y" G2 l0 k: J2 t
  584. DEX
    4 H) }) B- ]' J" O) j9 S
  585. BNE Check3
    : ?9 T6 F0 |  |9 j- o
  586. ;==============================
    ! j0 p- X- g3 b
  587. ;调色板清空
    ! K1 y' Y$ H1 U- o, B9 K
  588. LDA PPU_STATUS
    ( [5 M2 L# A0 ~+ e
  589. LDA #$3F8 `6 W8 i& t/ D( l3 S7 b& ~/ R1 `
  590. STA PPU_ADDRESS
    ( N8 n7 _5 l  v$ q7 r
  591. LDA #$00# ^( K: r. l' g. B1 o) _: ^. f7 n
  592. STA PPU_ADDRESS9 |& ?6 W0 i, e/ y
  593. LDA #$0F
    5 O( A+ {; V+ L5 J
  594. Palette_Clear2 P7 C$ Z, R+ g: \; [/ b8 A+ p
  595. STA PPU_DATA9 @; Q7 @+ V: R3 z7 G2 U, \
  596. INX
    ) j6 q3 L2 ~4 v7 U. m0 y% ?# j
  597. CPX #$20
    * v" m8 T  \. Y( E& i, `3 j6 B
  598. BCC Palette_Clear( `6 M2 k3 A% R9 k9 W
  599. LDA #$00; w8 n6 L, B* \9 O6 ?: h) h
  600. STA APU_STATUS1 `8 @2 E5 A& ~1 h% V4 f+ F

  601. + P  m2 s9 f3 T% S% F! }% @
  602. ;==============================5 b; @$ m& ?; n* r
  603. ;RAM初始化
    7 d6 y  g; ~- O+ Z( J
  604. RAM_Clear_All0 d6 T5 V- j' D. [- C- ], m6 N
  605. LDY #$003 o/ N7 S9 m2 ]$ |: s
  606. LDX #$08
    " i1 r! U; ^$ m/ }) h. {2 N
  607. LDA #$00( M5 G# [# t  r) H
  608. STA <$00
    1 {7 o" C  x" {8 m
  609. STA <$010 p5 ?1 Q7 }3 a& x
  610. RAM_Clear_All_Start
    8 M* X' b, c0 D8 K, B$ w8 c# M
  611. STA [$00],Y
    1 e" E  e: y3 {6 L
  612. INY, L* n, D9 ]$ T. q* R
  613. BNE RAM_Clear_All_Start, i) x- g: ~: x' x$ x' I- t
  614. INC <$01( O& |/ d1 T+ `7 B
  615. DEX
    & n4 i  E1 [9 @9 T
  616. BNE RAM_Clear_All_Start+ D7 b! c) A- \( W

  617. , x5 g( g/ S( u! f! o. f' I6 E4 w, K
  618. JSR VramClear. g$ ^7 N& Z* l! w
  619. JSR VramInit
    & u! D* D: N1 d5 L! c9 w
  620. JSR OAM_Ram_Init* [+ s* u* V3 e4 \
  621. JSR Init_Palette_Addr
    0 z8 z# s' x: o! T: B
  622. ! @7 x: m2 N, I8 u5 U+ P% e
  623. LDA #$FF
    7 r3 a) d! w0 `+ O: R9 z7 X6 {
  624. STA Use_Ram_End. m8 l  Y2 V" x1 |( N
  625. ;==============================
    1 O: G. o  K8 ~
  626. ;初始化背景调色板
    2 v# I! M- f8 P) {, h8 i
  627. JSR Set_Palette_Color5 W% L9 v- T! W* F& b
  628. JSR Set_NameTable_Attributes
    2 p& V3 L8 L5 b8 M  J- v
  629. 2 `7 q; N8 A1 F+ A3 ~8 x2 {
  630. LDA #$00+ u5 C! ^, t0 k
  631. STA PPU_OAM_ADDR
    4 R6 X4 h: |4 ?
  632. LDA #OAM_TEMP_ADDR / $0100
    % i% f' A) M& W
  633. STA OAM_DMA9 E& z4 E" M) [: h- p5 z

  634. " z" j4 b5 X( U3 B6 f9 {
  635. JSR Sound_Reset_Proc8 Z2 a: f' `- i1 o  S" ?4 g8 z
  636. JSR Set_Sound_Total3 X- R: C. R: t1 t6 Q0 l

  637. ' i4 j2 [( e9 D3 B/ {0 S4 ?
  638. Init_Start_Music
    $ Q0 A( l1 H, }) B) d
  639. LDX #$00
    # @5 g, N8 z8 x5 u4 ^, ]! h$ E7 S
  640. Init_Start_Music_Write5 h4 |( }. l0 g4 s. o
  641. LDA Sound_Start_Port,X
    9 `2 C  k$ @) a- K! B" R
  642. STA <Music_Cur,X
    ; b+ O, D$ L$ F# F# R6 H6 c
  643. INX9 e: h6 {6 J: r/ Z* [+ z3 r2 p' g
  644. CPX #ITEM_MAX_SIZE  z, k9 Z4 p$ v
  645. BCC Init_Start_Music_Write8 e: J2 _/ |% v) o/ d% _

  646. # q% J8 O- E  o5 P! S! |6 A. g
  647. JSR Show_Music_Text8 z# B& a7 S. Y2 X5 P: L3 A9 b

  648. ( n: b% \# a8 e. J. n
  649. .IF SOUND_BAR_SHOW_ENABLE# G' i( H* t9 x0 t* y( @, _
  650. JSR Sound_Bar_Text_Set
    + \% F# \3 ^7 ?8 e& w9 d+ X
  651. .ENDIF4 H& _9 t6 F7 f+ K8 W
  652. 3 t5 {( x- U: ~
  653. .IF Track_Name_Pos
    ; t  b, Z4 t; N, @5 f+ S( D
  654. JSR Show_Track_Info
    ' h9 D7 I/ Q# s0 k7 W4 i' Y* b, ]
  655. .ENDIF, w  H0 Q2 L/ r. O% ]3 j1 A) g

  656. 0 ]/ O9 J3 J, M" K3 D3 @, v
  657. JSR PPU_Proc6 k3 m; q# V6 ]! V; M

  658. 1 ]. Q' ]$ Z6 F$ L' i' `* [/ R
  659. ;==================================================
    & b  [" O9 {6 b
  660. ;音乐bank初始化
    $ }! b, Z) i9 b
  661. JSR Init_Sound_Bank6 |& _& b. y6 e& a7 x- f

  662. . E) R9 S- y& b. ]
  663. JSR Music_Show
    # P* ?  h0 W; m2 S( W0 Y
  664. JSR Time_Show4 {* D$ a* d! Y: H3 F, H* b
  665. JSR Music_State_Show; t7 @  X$ j7 ?) Z/ {5 u
  666. JSR Time_Delay' E2 x* I& y$ q, \; K/ g

  667. # z# C# y8 v1 a! x% i1 i
  668. LDA #$01
    ' ?* j; X' Q+ {9 Q+ ^- W7 c
  669. STA <Music_Stop_State% _+ G9 \2 k$ p. m( f

  670. . E/ ^; `. O& P
  671. LDA #$880 S1 F1 R3 l3 [. i4 x7 i7 E2 H
  672. STA Screen_Ctrl) U) K, Q! l# @# a
  673. STA PPU_CTRL
    ; ]. [' i8 i% L  c0 \
  674. 6 o/ c& _! y4 T1 f& a& }, a
  675. JSR Show_Page_Text) ~! L+ J# L( e' x" w) _
  676. * K  M  N0 ~) S2 Y7 _2 C! V& Q
  677. LDA #$10
    ( W  e% o/ S2 f; W
  678. STA <Time_Wait_Cnt
    , H  @! j; b& _" }  I  Q- G
  679. 5 ?7 U: t: G+ V+ X5 k: h
  680. Wait_Time_Over! o8 L2 J' w% p: O/ O9 \$ O% X
  681. LDA <Time_Wait_Cnt
    ) K! i4 b/ h4 \% l
  682. BNE Wait_Time_Over
    1 I9 q0 @# ^5 J9 p. G4 T8 Z# \  K
  683. ( B! G& Y% d7 [3 f+ h
  684. JSR Show_Arrow  T# U& t. W) n" D6 X
  685. LDA #OAM_TEMP_ADDR / $0100
    - F2 r- O" F1 X3 t
  686. STA OAM_DMA
    ; h9 w; w6 }6 V3 n
  687. : t. I, \) w3 w3 K
  688. LDA #$1E
      ~% G+ Z4 R6 c# W9 M" ?8 _$ h
  689. STA Screen_State% R! X5 \3 e, z& p! n4 H5 O
  690. $ B( q/ y: u8 R4 r$ O3 d+ U
  691. LDX <Music_Item_Cur( N* X/ j# {: C+ `7 x
  692. LDA <Music_Cur,X% R" _8 Q& L9 o+ g, M! v
  693. JSR Sound_Init_Proc
    , |4 h1 C+ ]4 Q) a5 D* S* M. F" ?" j& g/ g

  694. & B1 f0 y' W8 a" K) V
  695. CLI) t  H8 z1 m  [6 r8 ^
  696. JMP MainLoop! y% a% m0 r# C# O4 h% ?/ b2 C5 d$ x
  697.   ?; i" P# Y. }8 F
  698. ;==============================
    # N3 b' F: G* V' @8 x5 z0 W
  699. Time_Delay;延时等待
    & U* ?% D9 D2 \- V
  700. LDA PPU_STATUS
    ; j1 E( t( ?2 V4 X
  701. BPL Time_Delay
    , G% {+ u6 T" f/ [; b, G$ J0 ?
  702. RTS
    * a: C4 c! \) w2 o! y% U/ x& K
  703. / m6 @( t9 `9 @) j+ F! L. e( N
  704. ;==============================
    0 {! A9 T& }; B2 x: {
  705. OAM_Ram_Init;初始化精灵内存. v0 v" K3 @" e
  706. LDX #$00% y+ s0 ]# D2 p8 ?; k' Y9 }
  707. OAM_Ram_Init_Write
    ! U2 _" L9 ]7 K5 O) u
  708. LDA #$F85 O  D" l& O4 S. L/ f
  709. STA OAM_TEMP_ADDR,X& P+ l* _+ k' v% ~
  710. INX
    ) J* i" d# v/ S0 X5 K7 r. _0 w( n
  711. LDA #$F8
    0 I" K* C8 p% q5 t1 W
  712. STA OAM_TEMP_ADDR,X
    8 o1 P3 l! o& w  e% }
  713. INX
    ; F! q* C- |2 t5 {
  714. LDA #$00
    ' F" N: S0 L3 o" [: M' T' I
  715. STA OAM_TEMP_ADDR,X
    , R2 o, z4 `: \3 f
  716. INX
    # ?5 K( Q' N; _$ k- a
  717. LDA #$F8
    - _' v0 T# Y" t& M' J
  718. STA OAM_TEMP_ADDR,X: Z" Y$ W5 k- w/ O3 V: p5 R$ p+ J
  719. INX& _$ T9 u" d$ q/ I3 c
  720. BNE OAM_Ram_Init_Write
    3 w+ m- J4 G0 I; t5 w( H; d5 k
  721. RTS
    ( h5 `2 ^2 F+ W: |; c) S

  722. ) X. C( `4 ~) S3 v+ v! [
  723. ;==============================
    7 E9 D) `0 Y: k6 `) c; Z, M
  724. VramClear;初始化图形内存
    " A6 m* x& k' m, x
  725. LDA #$20
    ) v9 a, v  F' V( z
  726. STA PPU_ADDRESS8 b8 _- p& j6 U: b
  727. LDA #$00
    " H: \8 y" F  B2 a
  728. STA PPU_ADDRESS
    1 D& |4 }0 f, N; }, S
  729. LDA #$004 r0 D" s6 m  n6 d) K0 _
  730. LDY #$004 q1 r" E# L% Q5 I7 ?! z, ^* H- d
  731. LDX #$10
    # k0 Y9 Q5 H. e& ?0 o
  732. VramClearWrite
    # A( k3 z# h4 Y3 d& m# T. g: o# @
  733. STA PPU_DATA
      n8 D) r$ \/ J2 \/ ~) c6 s
  734. INY( d$ q4 D- A9 [
  735. BNE VramClearWrite
    * h/ a( ]" }/ U4 Q
  736. DEX
    ; {, q6 i  q# w& v7 b0 H$ H
  737. BNE VramClearWrite) f& _0 d3 Q  c2 a! `
  738. RTS
    ( b( I  ]; y9 L  d* Y5 ?; k" y

  739. " u. s4 i( B6 U6 T+ O2 u/ z* L
  740. ;==================================================; S+ F6 {8 s. C/ y! k
  741. ;设置MMC3图像bank% E9 V0 l9 U7 S8 F: _
  742. Init_MMC3_Chr_Bank
    # j; e! p" p% ]/ Q9 j  C
  743. LDX #$05$ O' E6 F5 f$ M/ r9 a8 C" @2 v! s
  744. Init_MMC3_Chr_Bank_Write
    - V8 c6 j, e- _. C0 F
  745. STX MMC3_BANK_CTRL6 @2 w9 V8 B& T2 H" Z# {7 d
  746. LDA MMC3_Chr_Bank_Data,X
    ; @/ q$ a9 F/ \  \5 k- D3 C
  747. STA MMC3_BANK_DATA
    5 G8 L: I) u8 f6 L& t
  748. DEX. y- Q) d( d8 j# ?
  749. BPL Init_MMC3_Chr_Bank_Write/ }) N. \3 w- x, u1 d" P2 h, q. D5 ?
  750. RTS9 t$ M+ L& t* D% a$ i* L& U: g
  751. ;--------------------------------------------------
    ! d7 e0 B. I- }( C/ t# _
  752. MMC3_Chr_Bank_Data
    & o, C& L4 g- g, }2 q$ U
  753. .DB $00,$02,$04,$05,$06,$07
    % b' T3 n' x5 I/ F

  754. . r4 b7 ~$ n; X" N/ q4 W3 c+ R
  755. ;==============================
    9 a% `2 t. U4 A: |
  756. VramInit;初始化图形内存7 ?3 |1 y# y+ U
  757. .IF CHR_RAM_ENABLE% `' A& c* E% R0 l- u
  758. LDA #CHR_DATA_BANK9 p9 g+ s6 E) B! q' I! a
  759. JSR Switch_Bank_A000
    7 ~: w; s; D1 \( }
  760. LDA #LOW(CHR_DATA_ADDR)
    ! l2 Z+ }( M* g6 S1 p. S8 d( X( d
  761. STA <Data_L9 W  a- M/ ]9 y( G
  762. LDA #HIGH(CHR_DATA_ADDR)& _6 t" Y2 y# }. |9 G1 @4 W$ b- u3 G
  763. STA <Data_H
    ' m7 K3 y& i* f& A" D. Y, k
  764. LDY #$00
    3 n: E) p9 K$ w* L6 e
  765. LDX #$20, V" b/ }4 e9 M# f
  766. LDA #$00
    + s. v' W& X+ l- S3 R
  767. STA PPU_ADDRESS
    . @& J( z( H) v( C4 o
  768. STA PPU_ADDRESS& r0 M9 d# e: @' S" y
  769. VramInitWrite" |% V1 ?4 r4 G) m8 A0 x" {
  770. LDA [Data_L],Y1 H# v) O7 Y$ \' e" r
  771. STA PPU_DATA+ M/ [. s1 Q4 g* Y7 S3 J
  772. INY
    & `7 P; e8 ?! I, ^  x+ v, I
  773. BNE VramInitWrite* o$ T( c% u& }
  774. INC <Data_H
    7 R6 N9 e+ X" E- s
  775. DEX
    ) t& S  H- T/ p' Q
  776. BNE VramInitWrite; F% G/ F0 p( T5 y3 k
  777. .ENDIF
    ; a8 p7 A! P% s; P9 G5 t9 [) v
  778. RTS6 H5 a/ ~- a$ m7 |4 Y9 D: ?) \2 l
  779. 1 C5 x2 {! h5 t* z
  780. ;==============================
    ' j' ?2 J5 z0 Q8 {$ Q
  781. ;音乐切换7 }9 A6 F7 V% T$ t+ X5 t, p/ T4 u
  782. Music_Play_Change
    + W- L* j: S, O$ k( g  [
  783. LDA <Key_Once
    1 h7 e- h% v; H! [7 R7 B
  784. AND #$FF
    : w4 k) Z2 P& J+ ^0 ]! J
  785. BEQ Music_Play_Change_Check
    " L! H# B1 b6 i; R6 K0 A

  786. ( J  Q& x2 x) |( [- z5 q5 C1 g
  787. ;禁用音乐条刷新0 p  `! V; p/ n! p; w( t; r% f: i  m
  788. LDA <Text_Disable_Flag  K& M& I$ Z% \
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    / [' [. S. ^; ?
  790. STA <Text_Disable_Flag- ~& h  N% s2 g9 _3 U. E1 c

  791. % V- q, v6 [8 v
  792. Music_Play_Change_Check: C1 _( d, S* R' z/ I3 y- S. o
  793. Music_arrow
    4 T; Z. N2 L' D( ]
  794. LDA <Key_Once
    6 E/ j; f1 ^# Q7 i* e( @
  795. AND #$0F
    - ?: ^4 D/ G/ J) y4 ~! u
  796. BEQ Music_Play_Change_End4 D" E: V, |$ e1 U6 {& @
  797. JSR Music_Track_Change2 n9 m- a  p5 F
  798. JSR Sound_Reset_Proc
    0 A: d. S5 O9 S) Z( i- B% y8 F
  799. JSR Music_Show; x7 K  A% {% {! N
  800. Music_Play_Change_End# s& |* k9 P* _7 Q, i# h7 K
  801. RTS, u% O) Z) M$ x8 K0 t

  802. / C- x" C2 h1 P5 p# V
  803. ;==============================3 D, g  g6 Z& o0 L+ l' R4 U0 t/ Z* ~
  804. ;音乐曲目切换. a' Z: \+ K6 n! ]3 H; T; G: A* G# y
  805. Music_Track_Change
    5 Z% x$ O, j" q, o' K- g! ^7 @
  806. LDX <Music_Item_Cur
    , q1 d2 V& n$ s8 h) n2 Q5 f5 e
  807. LDA <Music_Cur,X
    4 I7 s+ n* T1 t9 H* A+ m" l
  808. STA <Music_Last
    4 c( p2 i. {/ m0 j5 R# V  f$ F/ S$ h
  809. Music_Decrease
    2 U2 ^8 Z" O% m. V
  810. LDA <Key_Once
    $ b1 ~- a1 `# U
  811. AND #$42; @6 ]0 ?' \' t  u& _& E8 P
  812. BEQ Music_Increase8 u% [8 z2 P# D/ v# g0 g
  813. LDA <Music_Cur,X  }% t0 N% p& R2 D5 G! m& ?
  814. BEQ Music_Increase
    1 m+ s% h- l- V: c4 X+ m
  815. DEC <Music_Cur,X; \5 O; I# s: g7 g
  816. Music_Increase5 j# b. l( H; [) ?% Q
  817. LDA <Key_Once
    1 o4 a! N0 x7 o5 t
  818. AND #$81; O  C5 K% I- H6 F$ c
  819. BEQ Music_Decrease_10* {/ v8 t7 c# g/ g
  820. JSR Set_Sound_Total
    4 D1 ]. h+ w; E$ W- I2 w1 ^
  821. LDA <Music_Cur,X
    ! T2 @0 r8 d5 ?7 k2 M0 m$ I
  822. CMP Music_Total
    ) W( |# c9 H6 Y0 J
  823. BCS * + 4& ^* ~  ^  U  z7 ]
  824. INC <Music_Cur,X
    , W% G3 @3 I, k4 q  W
  825. Music_Decrease_10' q6 d! a9 y8 W/ Y5 B2 ~* ?
  826. LDA <Key_Once
    8 ^$ v' Y5 e  U% L& [" b
  827. CMP #$043 P$ N! n3 D1 V9 C+ m7 G* p7 y
  828. BNE Music_Increase_10, y, ], A7 w8 f: s: D* Q) T- w
  829. LDA <Music_Cur,X+ B1 W& Y1 M: B3 R- `( k
  830. CMP #10
    2 p$ q0 _" J: Y) f; X3 k1 y
  831. BCC Music_Start_Song_Min$ x1 d  G5 m: m8 f4 p3 V( k
  832. LDA <Music_Cur,X- a8 O4 t' w7 s; b* f+ i( s& x
  833. SEC" `# o) s" j. `  B; D+ `' O
  834. SBC #10
    1 p! G) p, |) K/ w, R  v
  835. STA <Music_Cur,X5 ]3 Y8 ~) |/ m5 k% {
  836. LDA #$00- {% ?1 u# x+ y: R( O* w& e
  837. BEQ Music_Increase_105 L& R$ R: H- J, @' p
  838. Music_Start_Song_Min
    / M: Q/ G+ j( v: T
  839. LDA #$004 V3 u' p8 C: B
  840. STA <Music_Cur,X: Y. R+ ?" Y* r. g/ @# P4 R- t
  841. Music_Increase_10
    4 U4 J$ p9 f3 i4 s$ S
  842. LDA <Key_Once
    # _1 m/ B. Z6 j: a! ?
  843. CMP #$08
    ' B( D3 V5 X4 O* I9 U) e& P4 y( B
  844. BNE Music_Track_Change_End) y* a: L7 ~: ^1 ^
  845. LDA <Music_Cur,X* W, {) \4 S- W  ]
  846. CLC
    ) ^' [3 F: A7 Z+ K* \# Q( s
  847. ADC #10$ ~0 Q7 e7 S: @" V$ R' I0 ^
  848. CMP Music_Total# z4 M; m+ M1 D5 I9 b2 {
  849. BCS Music_Start_Song_Max
    1 M! c, n2 [$ k! O: {  ^# ^
  850. STA <Music_Cur,X8 L, L9 V$ S0 r+ R+ Q, @" E
  851. LDA #002 c* r* I* F3 f9 H8 y! T! U
  852. BEQ Music_Track_Change_End+ R! k; k9 G7 P
  853. Music_Start_Song_Max. A3 B$ o( f% U, C) U  t3 N
  854. LDA Music_Total
    2 y9 l" w% u5 @6 t$ y
  855. STA <Music_Cur,X
    / s7 y5 v7 @+ M0 x, t5 H
  856. Music_Track_Change_End
    * j( o6 O/ \: X" x& n& p
  857. RTS
    / x4 J6 j- W  G! U5 `
  858.   Q/ c% I- G: T& t9 Z3 W0 e: z
  859. ;==============================* S$ I( U6 C/ y+ g9 r
  860. ;按键处理
    * C' ^- X) M& U( S* T3 a
  861. Key_Proc+ F6 {! Q1 f" N9 q9 a
  862. JSR Key_Scan
    ! I- A& e  o) G$ Z
  863. LDA <Key_Keep
    5 K  F' W; V' N  B9 ^
  864. STA <Key_Temp
    . W. N! h! U, E" r! p9 D- O
  865. JSR Key_Scan
    8 l, @. S) h9 I; T' Z9 V
  866. LDA <Key_Keep
    . p+ S1 X8 K; l/ Z0 X: D
  867. CMP <Key_Temp
    1 `3 Y* [8 ]+ [6 b
  868. BEQ Key_Get_Once
    ! H9 G0 l2 @# d
  869. LDA <Key_Kemp' B4 ~! ^9 X9 J% k
  870. STA <Key_Keep  O  ]7 }% @5 I' a( U' s7 }8 W
  871. Key_Get_Once
    ( m. Z( w! H+ Z; V0 E
  872. TAY3 V- s. q7 L) }. a8 C$ g
  873. EOR Key_Kemp# _" G- J! G& _8 C) }
  874. AND <Key_Keep
    : v# h5 |( e+ K2 R9 E7 l9 t
  875. STA <Key_Once
    + l: C9 }4 i' O+ C% s
  876. STY <Key_Kemp+ R, F' E" Q  @. p$ q2 _& F
  877. RTS
    + R3 p+ i0 P9 B  ]' |
  878. ;------------------------------2 v" _9 ^& q+ X% @7 b5 v7 d+ p
  879. ;按键扫描
    6 `) H5 ~/ u7 b6 o- R: ?1 h  c
  880. Key_Scan1 b" O; @+ @9 c; y( O+ z
  881. LDX #$01
    1 z+ S7 j' s0 l  B$ Q
  882. STX JOY1_FRAME
      f, t- M* c3 [4 w3 M4 E# q9 @% R. S
  883. DEX0 h. `8 [& K" [+ k" ~+ @2 F& G
  884. STX JOY1_FRAME  O4 @" @0 L  d7 e0 o
  885. LDX #$08
    5 N" @. G9 z: B' p& G" n
  886. Key_Value; p, O* J8 Q' B" I) }
  887. LDA JOY1_FRAME
    9 \5 I* F' b% M2 n6 X2 q8 J
  888. STA <Key_Getv
    + _: |/ r. {7 x
  889. LSR A
    , e' B5 F' k% U7 M% F; }8 \$ t# m% a
  890. ORA <Key_Getv( `8 J2 E2 B4 x5 R2 t
  891. LSR A5 A  X$ w; j8 i* q* s
  892. ROL <Key_Keep) x8 j7 r7 G0 r4 B
  893. DEX6 l9 j9 u+ M- L5 D5 j* ~. u
  894. BNE Key_Value
    & K1 q5 l  e" d) B% x" O
  895. RTS2 K" t6 W" p2 a& h

  896. 0 R7 h0 H- q" }; \8 k8 y3 K1 ]0 J
  897. ;==============================
    ! H/ [* u8 ~. h
  898. .IF SOUND_BAR_SHOW_ENABLE
    $ [" D0 I/ [; u8 l# M
  899. ;音乐条显示1 ]  d' b% s: S$ C6 M
  900. Music_Vision8 E( A" Q2 i% w0 ]+ Y
  901. LDA <Text_Disable_Flag
    . Q8 {+ L7 u9 R, D
  902. AND #TEXT_DISABLE_ITEM
    8 `, N3 L1 x; [9 w' N
  903. BNE Music_Vision_End
    & W" G" Q0 T; S4 m6 O9 a
  904. AND #TEXT_DISABLE_BAR8 m* O/ v& c& w$ p2 N+ J2 F
  905. BNE Music_Vision_Set
    2 G/ e  N3 Z0 ?: K
  906. LDX PPU_Cur
    . {; K) i5 v$ o- s! N, C
  907. JSR Music_Animation' ?3 ]; H5 o: X$ A8 `
  908. STX PPU_Cur
    8 r; Y9 h1 ^; A$ E4 S! F. e
  909. Music_Vision_Set
    / t8 `! O5 q/ l# p
  910. LDA <Text_Disable_Flag
    ) F0 P1 V7 }! V# }
  911. AND #TEXT_DISABLE_BAR ^ $FF8 j# w  y, r: s7 y6 `
  912. STA <Text_Disable_Flag* p3 b$ q8 V1 o
  913. Music_Vision_End
    / v4 n; U/ ]; ?" c
  914. RTS
    - p5 S  L! Y4 Z, o
  915. ;------------------------------# C* D* B& N8 \/ W- |- ]+ j8 ]
  916. ;音乐条显示处理
    8 g8 `4 H& j3 \' E9 n  z- a( d
  917. Music_Animation$ c( X! z6 f) H* i0 F5 h8 V
  918. LDA #PPU_MODE_CNT_LINE
    7 U  |. \' V' v+ {; ]( S
  919. STA PPU_Addr,X
    1 g; n3 I1 G. D$ V7 q0 k  A8 V6 [
  920. INX) U) [/ Y' U6 Z8 Q$ a1 a7 w
  921. LDA #HIGH(Sound_Bar_Pos)
    + k# k+ @$ {' J& O# E+ g3 ^
  922. STA PPU_Addr,X4 k: k; u* j8 _4 P
  923. INX
    $ G5 r* ?6 j6 O/ [; N
  924. LDA #LOW(Sound_Bar_Pos)' q6 v* O. E8 L3 F# O
  925. STA PPU_Addr,X+ q$ x5 J6 L2 w$ W. J
  926. INX
    & z" ^2 d# |3 ~2 E
  927. LDA #$08
    " R: C  @; b0 g. t& ^" D
  928. STA PPU_Addr,X
    / a% w- j5 a5 q3 u1 M9 Z' g
  929. INX) V8 ^4 A7 I4 ]8 M+ p7 J  B  G
  930. LDA Sound_Bar
    ( P. K/ N9 a+ V5 [) [
  931. JSR Volume_Convert: \# W& s! k, b

  932. 9 _2 y5 P. B. o* ?  G' y: w
  933. JSR Volume_Set_Cnt9 S2 P$ f2 }2 F* o' V0 n
  934. LDA Sound_Bar+$40 v' z* u3 E0 x2 t1 e0 d
  935. JSR Volume_Convert' A9 Z# _0 I# [) G& E6 ^7 i# m

  936. 2 f) ]# a+ A  n( T! H
  937. JSR Volume_Set_Cnt2 w: W* i6 F# k, U- B* Y5 P
  938. LDA Sound_Bar+$8
    & j0 i( J% \$ E; m* G; x
  939. JSR Volume_Convert2 V% U$ R3 l1 O5 J5 G/ D
  940. $ T3 f3 a* [% j" r
  941. JSR Volume_Set_Cnt, ^/ F2 _. {' ^/ ?! w- _
  942. LDA Sound_Bar+$C
    ; Z! Z+ }  W4 X' U) Y  c
  943. JSR Volume_Convert( D' b, ?4 L* K: @

  944. 1 E+ y3 X5 r* z3 `( r
  945. JSR Volume_Set_Cnt
    ; ~: }( o: G8 q. D$ h5 r
  946. " b$ a( i$ m4 N  u% y! V
  947. LDY #$10& J' o4 u- G  q
  948. LDA APU_STATUS; D; W6 ]8 P) l% {! P& J
  949. AND #$10
    : }: |# O7 \4 r* ^8 V  f
  950. BNE Volume_Count, v+ c7 D( N" i8 ?' H
  951. LDY #$00
    9 r. X* X) Y/ b6 j1 J8 N
  952. BEQ Volume_Count
    , g; b9 @# }9 [2 z/ o

  953. 6 W; g8 f) q* F
  954. ;------------------------------+ _+ l' p9 G! a
  955. ;音乐条处理
    " K% X4 ?. [# I3 _- ]
  956. Volume_Convert: W5 G9 }) m  C$ h& _* Y) a' D
  957. AND #$0F* f% F6 F/ H2 \7 I
  958. TAY
    4 g! g, H1 Q$ H6 r
  959. Volume_Count
    1 e' L: l6 D4 @  {: s; l* g  }; L
  960. LDA #$082 Z) n9 w4 X8 _* L7 S9 r
  961. STA Sound_Bar_Cnt
    ; Y& d" k' u* s9 Z5 Z* a7 P
  962. Volume_FILL& |3 ]0 P3 ], a% G
  963. DEY
    8 X/ I' K% E. H7 {, R
  964. BEQ Volume_Half
    % Y  \' }6 [; e6 i  M$ e) s$ P2 X
  965. BMI Volume_Empty4 x( d3 u* A/ j, F
  966. DEY
    # ]4 \7 V  Q) y
  967. Volume_Full
    5 U4 D3 r5 h6 a7 W! J
  968. LDA #$16
    $ D8 c* b1 a6 D$ A- ~6 A2 n* `
  969. BNE Volume_PPU
    ( b4 F( w# h" W2 b/ V
  970. Volume_Half( t2 Q0 U' q  q6 Q" u5 C+ X
  971. LDA #$15
    7 A3 F! A6 l  f2 c( [& ]
  972. BNE Volume_PPU
    ) T" X; F" U: M1 K3 M! u* Y
  973. Volume_Empty
    9 l) _) Y- o1 g
  974. LDA #$146 G- _* Q- o2 W" p
  975. Volume_PPU
    - S1 ]9 k/ G& O! k& v; D
  976. STA PPU_Addr,X7 d# \# J1 X; E! ~/ B
  977. INX
    2 j5 F* M" L7 c% w" g
  978. DEC Sound_Bar_Cnt8 G' s1 t" ?  |7 U3 e7 H
  979. BNE Volume_FILL
    " K8 Q+ P: a; y
  980. RTS
    0 @7 F8 P' T, V8 v$ o' ^  n0 y
  981. % ~1 s0 J# g+ T- |* E. b
  982. Volume_Set_Cnt7 r# u2 @0 H# C+ u' @0 ^0 v
  983. LDA #PPU_MODE_CNT_LINE_NEXT* l3 l9 S& y+ k
  984. STA PPU_Addr,X9 z) E& Q' o) Q
  985. INX
    ( G# ?2 e" R1 p8 F% R  \2 j
  986. LDA #$08( G- o% @  \9 U- h" t7 y- r' S$ D
  987. STA PPU_Addr,X
    ; _3 u3 R+ o6 O# l5 I
  988. INX1 t# O* |/ j1 I0 W
  989. RTS+ n3 X( k% V( k; \; X6 y7 m. Y

  990. / p7 j- T$ _5 K  L; }, H0 l
  991. .ENDIF; D" Z! H+ E( M7 F* F1 q; \

  992. % S6 x# H7 h9 i  Y
  993. ;==============================: q2 _7 X- u/ E2 |% _# [
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入) R( ^6 F. [" p9 P6 Z" V
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式
    . L1 }- Y) Y' _; D
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除
    ! y7 i5 y* h/ }
  997. ;------------------------------6 W5 I$ J- B' E0 a& \
  998. ;PPU处理" J8 m- ]; j$ o
  999. PPU_Proc: _, ]1 u! r% j4 x; g
  1000. LDX PPU_Cur; D3 R( g0 e% e
  1001. LDA #$00, U$ j+ s3 {' X1 I* F8 I2 F  I
  1002. STA PPU_Cur- Q0 O# x- V: e: S( w
  1003. STA PPU_Addr,X
      ?0 C: [+ n+ _- t0 T# u# g
  1004. LDA PPU_Addr
    5 t" S' s7 T  K7 [
  1005. BNE PPU_Proc_Beg
    ) q. l0 t  b: T& \
  1006. PPU_Proc_Ret
    ) c1 x( t& F5 m  z
  1007. RTS! r; ], E+ |. X8 I

  1008. * {, ]) G. u) s2 k& k+ f
  1009. ;------------------------------
    6 M/ f5 ?0 @5 Y9 z1 \& L+ Q* i4 f) o
  1010. PPU_Mode_Return_Cnt  ;转下行模式
    # Y3 U$ a+ o; ~/ `
  1011. INX/ C' l+ n  E, M& w3 {* S
  1012. LDA PPU_Addr_L
    - O+ c" f. o; _2 S" H8 l
  1013. CLC# b! i" |9 b  X. S3 `
  1014. ADC #$20! V, p( C$ y' `) Z! j* _% l+ j# |
  1015. STA PPU_Addr_L& G9 N/ H- y0 N/ U' p6 y
  1016. BCC PPU_Mode_Return_Cnt_End
    2 G" e, u2 k5 q. I8 J+ @
  1017. INC PPU_Addr_H  \+ O/ D& w/ B% E* S! K/ o8 t
  1018. PPU_Mode_Return_Cnt_End, n/ F$ C& M3 ]8 y7 K
  1019. LDA PPU_Addr_H
    # a! E  D$ U* O! m
  1020. STA PPU_ADDRESS
    ! i& h8 r, P$ C( u  D
  1021. LDA PPU_Addr_L2 D$ |+ k& G, R  s9 t
  1022. STA PPU_ADDRESS
    , `' F6 [- ]  P) J6 s8 I9 Q
  1023. LDA PPU_Addr,X
    7 A0 H5 O5 X0 |9 z7 P$ \8 w# i+ e
  1024. TAY$ T& q2 A5 O$ `7 ?3 Y. A( ^
  1025. PPU_Mode_Return_Cnt_Write6 ]5 {  z3 B" F. M7 q
  1026. INX
    % v" b- `3 K- u: U* ?. m
  1027. LDA PPU_Addr,X
    % f. X$ q' S: l. J/ N! q4 f8 V
  1028. STA PPU_DATA2 @! v0 l! ]  R
  1029. DEY
    ' K$ M* I+ |0 h( J) g; }
  1030. BNE PPU_Mode_Return_Cnt_Write6 E% V, o2 Y" d
  1031. JMP PPU_Proc_End" C! u; z0 e0 X) l

  1032. . L. y! x" }8 z
  1033. ;------------------------------
    5 G8 b9 K( T6 }* ~4 p2 K3 r$ T
  1034. PPU_Proc_Beg  ;处理开始
    & m$ e2 g7 ?4 s( i
  1035. LDX #$008 i3 g( e  j& _
  1036. STX PPU_MASK
    * r7 ^& g; I; A
  1037. ;------------------------------/ b2 e" V. x, l. K' R  R+ K
  1038. PPU_Mode_Select  ;模式选择
    , o5 v% }8 n" |! ?8 L
  1039. LDA PPU_Addr,X
    . O% s% K4 i5 H& F3 Y7 c
  1040. CMP #PPU_MODE_CNT_CLEAR8 a. n& a" N: m& z* O8 {5 `! Z
  1041. BEQ PPU_Proc_Clear
      i- c) d: |0 }& F' e1 f" L
  1042. CMP #PPU_MODE_CNT_LINE5 E& a" {. U; t$ N
  1043. BEQ PPU_Proc_Cnt_Line/ C) K! {/ ]. [  n9 D  k
  1044. CMP #PPU_MODE_CNT_LINE_NEXT
    * S+ R# c1 C( w- N
  1045. BEQ PPU_Mode_Return_Cnt* a0 h- p! m9 r
  1046. JMP PPU_Proc_End_Write! B  Q. H* M9 ^# ^- R
  1047. ;------------------------------
    * G7 G' k2 ?* Y* l% G+ F( ~
  1048. PPU_Proc_End  ;单行写入结束. ~8 ?$ N1 |( x
  1049. INX# g& T: a5 H  \% F$ W4 E+ o
  1050. LDA PPU_Addr,X$ ~, L& O3 s  [8 K5 X) s2 ~' A# p
  1051. BNE PPU_Mode_Select
    & C7 N9 h$ o# l  }( [
  1052. STA PPU_Addr
    + }( T5 t) J$ s( i- S, L
  1053. JSR Update_Palette_Color6 B! f% ~  |4 I/ I& B# d
  1054. 1 M2 [: ?8 ?9 W. a/ J6 @+ I( p
  1055. PPU_Proc_End_Write# [* J% ]% b, q: {% y# S
  1056. LDA #$00; X( [# g: W+ Q5 j
  1057. STA PPU_ADDRESS
    ' m4 l9 R5 L$ m" H: ?1 v1 G
  1058. STA PPU_ADDRESS$ d7 M( ]/ e# |# r; f; H. L! Q
  1059. LDA <Text_Disable_Flag" B: p! @+ Z& K2 n, m
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF
    3 U% [, p. A; H. m- Z: h8 z
  1061. STA <Text_Disable_Flag
    2 T3 ]1 a& `4 g! h4 Y5 ]+ @6 A
  1062. LDA #Scroll_X
    . U# G  c- P( i0 {! Z4 x- d/ Q; y* E
  1063. STA PPU_SCROLL4 z0 S9 @7 ]$ L4 }
  1064. LDA #Scroll_Y0 Q8 D. R' I) q3 [( l
  1065. STA PPU_SCROLL
    6 q7 y# r) M  u/ j& x5 X( c$ R6 X
  1066. LDA Screen_State& j* _/ @* U4 p$ P- m. R# E
  1067. STA PPU_MASK
    0 C: M. y' O9 p/ i" X, {2 q
  1068. RTS& |' b7 n. F+ K" e
  1069. # |; h7 K3 I% b# z% b
  1070. PPU_Proc_Clear  v5 Z8 k# R7 b( I. U
  1071. INX4 {# h) n* J! [  v
  1072. LDA PPU_Addr,X
    0 N/ l# {+ A# y3 `7 L0 ?
  1073. STA PPU_ADDRESS
    2 O6 V6 m& B1 l. G, P  N5 Q* b
  1074. INX6 O9 p; B) Q+ G8 j# D
  1075. LDA PPU_Addr,X: S8 b+ k% `! C6 @
  1076. STA PPU_ADDRESS
    . Q  d* B6 y1 o5 G1 Y
  1077. INX
    2 @+ n7 s/ W7 N9 f2 ^% S: s' w
  1078. LDY PPU_Addr,X
    9 ^, \9 P% V: U3 _% V6 N' {
  1079. LDA #$003 t5 L& f. A: e4 u" `1 k8 a! F8 \
  1080. PPU_Proc_Clear_Write+ G2 |: N6 D+ a' R8 r' V- J+ E
  1081. STA PPU_DATA4 t( g3 S9 s7 M2 K5 [! {; d
  1082. DEY( Y$ ]# c( u$ P) j
  1083. BNE PPU_Proc_Clear_Write3 F/ I0 _& E) ^! h( I+ P/ U
  1084. JMP PPU_Proc_End
    3 P: \" c' C  A1 N9 I2 j

  1085. 8 T; [- P1 C( B- Q6 s. m
  1086. PPU_Proc_Cnt_Line
    ' J2 |2 B& J1 J$ @- y
  1087. INX
    1 c3 @- L* K2 }; q3 Q7 Y3 `. b
  1088. LDA PPU_Addr,X- a% c' X8 H9 o7 n3 Q* x: {
  1089. STA PPU_Addr_H& }4 {: l+ R* D+ \( _
  1090. STA PPU_ADDRESS- L+ L" o8 N; j2 w& b
  1091. INX
    % S5 ]  ~9 q6 [8 X
  1092. LDA PPU_Addr,X8 f- O/ d8 j9 y  p6 x
  1093. STA PPU_Addr_L. i$ V7 q: H9 O8 H' Z
  1094. STA PPU_ADDRESS
    - D& _8 N$ a( z0 ~- F
  1095. INX
    % f' x6 F" Z3 s. b9 e$ ~/ t- U% @$ w
  1096. LDY PPU_Addr,X
    3 g  C! c" A. Y( ?. D6 e
  1097. PPU_Proc_Cnt_Line_Write
    6 I# A4 A& a$ V' f
  1098. INX
    4 J% U3 p" j3 \0 U1 \6 p
  1099. LDA PPU_Addr,X
    2 ]7 I* d8 r* |
  1100. STA PPU_DATA
    ; Z: D2 {2 N3 m! F
  1101. DEY9 G0 v! G% t' y% L' x6 j
  1102. BNE PPU_Proc_Cnt_Line_Write0 T) I+ g& I/ a8 @+ m$ n4 w+ I, D
  1103. JMP PPU_Proc_End0 T: Z$ h) @8 O% K: u0 c
  1104. 6 n' J& R( ]6 b
  1105. ;==============================* }/ f# v0 f, r1 w: ~; @0 n
  1106. HEX_To_Dec;十六进制转十进制
    ; }2 a. J3 u$ x9 D/ f8 b
  1107. STA <HEX_Data$ ~2 Z. |' Y6 s. h" g* k
  1108. PHA( x) {- O7 p. R/ s1 N
  1109. TXA
    6 G' ]( E4 t$ R4 _. B
  1110. PHA1 V' E$ o2 e8 G( t
  1111. LDX #$00) a0 z  j9 M, G  C
  1112. LDA #$00
    2 z5 f" _# s& {/ |* g  \
  1113. HEX_Cln
      g( x( i! {+ g& B' I5 w# U
  1114. STA <DEC_H,X' T% ]) \6 Z5 ]; N# T% i
  1115. INX
    8 d5 M6 t) O5 z1 G, ^! D4 C
  1116. CPX #$03* a/ g/ {* X9 h, V) E' }
  1117. BCC HEX_Cln7 r6 U9 Z3 {- }' o; d0 h# M
  1118. LDA <HEX_Data
    ! h1 d; I/ S6 v/ Y1 m) S5 ?
  1119. ;------------------------------
    4 w; m* v8 y) t& c$ T8 x' M. [1 U0 c
  1120. HEX_100: ^# x* p2 x( h4 X3 a! Y7 v. v% `
  1121. CMP #100
    ) M  b, P, F; [% C
  1122. BCC HEX_10! D* S4 `9 D8 ?1 g" r
  1123. SEC7 H" [! V% C8 \" {
  1124. SBC #100& ~7 A: R7 F5 P2 z8 X) Q( t, [- m
  1125. INC <DEC_H
    0 p4 E$ D! j3 j1 r. k4 [) L
  1126. BNE HEX_1006 `" M* ]5 i: F6 h: k
  1127. ;------------------------------5 b7 U) W% w* U, a" B0 ^( P7 C
  1128. HEX_10
    " j1 U4 G0 o- }% Z1 j- O0 o# C
  1129. CMP #10" v6 B! J1 f8 |7 _( E( K
  1130. BCC HEX_1
    ) P  M. u  G! b7 {: q
  1131. SEC7 M# p% A2 x$ L. ]* S4 H4 h5 H
  1132. SBC #109 b; |* v& {  r0 A% ?! H) d0 e
  1133. INC <DEC_T
    - \7 [! `2 a2 J/ n% o; U4 Q
  1134. BNE HEX_10
    0 I, L$ W3 R! I5 F) V# T# w
  1135. ;------------------------------
    " y4 W& d' z8 U% u: V6 L5 B1 ?
  1136. HEX_1
    & X$ z; r( n( O6 \, P$ d* x
  1137. STA <DEC_L
    $ m, N, \7 G# r  N
  1138. PLA2 V) F2 }  e6 }& W' s
  1139. TAX
      E6 _1 ~" x! F# l7 A
  1140. PLA
    2 @+ l0 \1 ?; D# l7 @4 l9 I4 D
  1141. RTS: D/ ~- J& o8 c
  1142. $ }( B' P" ~" x  @' E
  1143. ;==============================- p) ^4 h3 T9 r% i4 L7 e+ L
  1144. ;音乐曲目显示
    + P6 T, }: U, n2 v4 w! p4 ~
  1145. Music_Show
    0 t; v$ D4 s: g& M1 V9 o
  1146. LDX <Music_Item_Cur4 b8 q" S" x6 Q5 X1 w0 g# C- S
  1147. LDA <Music_Cur,X
    : _9 Z1 e2 u$ G6 L
  1148. CLC- Q8 P2 W/ w% ]- Z
  1149. ADC #$017 z& T! I) E/ g$ m% P  g
  1150. JSR HEX_To_Dec, P& ^5 |' R2 B" I+ H
  1151. LDX PPU_Cur2 W4 y( v5 |2 k1 o; J6 w0 x3 P
  1152. LDA #PPU_MODE_CNT_LINE
    . k# T' j3 [: u! `3 U4 F7 z
  1153. STA PPU_Addr,X8 x; S; g5 A$ ]! E% V; |) T
  1154. INX- c% J2 |3 w2 A
  1155. LDA #HIGH(Play_Index_Pos)
    & O: y8 {$ ]2 L7 a7 D
  1156. STA PPU_Addr,X( Z' e4 A# m' w
  1157. INX
    8 i6 p- s0 d4 n: d' T
  1158. LDA #LOW(Play_Index_Pos)
    ! {, _' b7 [8 s9 r' J& l8 a
  1159. STA PPU_Addr,X
    $ l0 t& S' A2 B
  1160. INX; @3 A2 V. F( T8 s' h
  1161. 0 \+ C  y! f, h- p: S4 x2 q
  1162. LDA #$07
    & _: F9 E; B6 _) i" |1 q  x
  1163. BNE Music_Show_Length' ?4 q3 b4 j0 K5 K

  1164. " ~+ y9 k+ H6 R. T5 U
  1165. Music_Show_Length
    , b2 c8 j, h. T% y
  1166. STA PPU_Addr,X
    ' o6 T# g8 f7 T3 h- f  \6 ?
  1167. INX) ]# `# j* U1 U: A5 J! ^& U; p

  1168. 1 l- N( T6 n$ ?2 p
  1169. LDA <DEC_H: d- `! l+ ~% q! S; D; x# Q% e+ y
  1170. ORA #'0'
    4 g, [' p9 F; A( m! m7 N5 p: j
  1171. STA PPU_Addr,X
    + {2 q1 e. ]4 X) Q
  1172. INX+ V/ {3 h& F. Z
  1173.   Z+ r  T6 B1 @! J$ `! Z8 c) g0 A5 @& \0 L
  1174. LDA <DEC_T
    # S& k" O. j1 u0 `
  1175. ORA #'0'# o5 {8 _/ Q7 t8 k
  1176. STA PPU_Addr,X
    2 _6 i3 y7 H* C0 r. K7 K
  1177. INX
    , a4 M1 z, D& p/ v2 p/ ]

  1178. ( V1 L4 `4 T' b- l/ r
  1179. LDA <DEC_L& e% y" M8 ^: N1 n  d0 D6 j7 ~
  1180. ORA #'0'
      U3 l4 H2 _3 k6 [# A
  1181. STA PPU_Addr,X. b" O2 {6 i6 x% L
  1182. INX5 I. y* z+ w2 F/ p5 \4 c0 j# |
  1183. + Z9 K* k- W% _' c0 x
  1184. LDA #'/': U& V% p0 k5 [1 |& e1 S+ J
  1185. STA PPU_Addr,X
    3 P! y+ c- j; ]7 s8 w
  1186. INX
    5 g' t# T+ O" }. v" w7 [
  1187. Music_Show_Total
    ' s' z5 l" R4 u* O; P$ C, H% A: N
  1188. LDA Music_Total
    6 l0 g8 P* G& A3 k7 g  @
  1189. CLC3 E4 t" j$ E* T4 v9 K
  1190. ADC #$01
    ' d, g' j- Y  ?6 {: W8 i/ @
  1191. JSR HEX_To_Dec
    4 k; M) f9 N# `2 Z7 c
  1192. # ?4 j* \) o9 J
  1193. LDA <DEC_H4 c! e; s( U7 T0 f- O
  1194. ORA #'0'
    9 r9 f& p" l' }% k
  1195. STA PPU_Addr,X2 c$ b, I! s& F& ?
  1196. INX$ U! C) n! e8 w  ^
  1197. 4 a2 h9 l; i. b" r7 {; l
  1198. LDA <DEC_T1 i. w( w, N0 _
  1199. ORA #'0'
    # J0 i: m& J$ b" ?
  1200. STA PPU_Addr,X
    & s2 ^- T! R8 b0 L
  1201. INX
    8 w# [, _. E$ U% _! i- |8 f* l

  1202. * s' W: r+ o  l( v6 I; Q3 z% m* Z7 W; A
  1203. LDA <DEC_L* K6 s/ ~, X5 z
  1204. ORA #'0'
    1 O6 a1 W: p+ x. W1 X8 P$ w
  1205. STA PPU_Addr,X
    3 g# _6 T0 c' z: g
  1206. INX
    9 h. B  ]- w- g' n- N
  1207. 0 w3 j- s  C3 J: u
  1208. STX PPU_Cur" W) b! b0 J+ S. F5 L
  1209. Music_Show_End
    " J/ ~- m+ U( g! e2 k; d4 g1 r
  1210. RTS
    # `+ y- f# I+ t! U6 E7 E& ~
  1211. ' E$ Q$ M" O, f& S1 P+ X
  1212. ;==============================
    5 Y3 d, r- w" M9 x+ Y& F; j
  1213. Time_Show;播放时间显示
    . l" _$ f4 X. \+ H' U! f. `% c8 F
  1214. LDA <Text_Disable_Flag
    & {. _" z. d- ~2 N$ X
  1215. AND #TEXT_DISABLE_ITEM
    . C! b7 I. W7 V. j
  1216. BNE Time_Show_End8 ?# N7 w3 J# ~/ X7 g  g& i
  1217. AND #TEXT_DISABLE_TIME
    4 B* R2 n* X# }0 Z2 t  z- n' u
  1218. BNE Time_Show_Enable; b. f& F7 V; a3 c8 ?

  1219. 9 U) j8 x3 z) s( i9 F
  1220. LDX PPU_Cur  z. A* S& G* k% R: X5 l
  1221. LDA #PPU_MODE_CNT_LINE
    ; E$ M" m+ S# m5 a  o( F. E# A
  1222. STA PPU_Addr,X
    + C: [* `" G% M% ~. W7 s" o
  1223. INX
    # ^* z" A" t1 `3 p+ v1 U6 X. O1 A
  1224. LDA #HIGH(Play_Time_Pos)- t  V* o" G, a, F5 H$ }
  1225. STA PPU_Addr,X
    & u& p  j, J0 X9 j  e* D" O
  1226. INX2 o# z- L; M! T( V+ B
  1227. LDA #LOW(Play_Time_Pos)
    ( R2 Q& c/ d" c9 V3 ~7 T
  1228. STA PPU_Addr,X
    # l6 ?! \. u. I- R, L6 s# f2 Q
  1229. INX
    7 l2 e+ A1 r( x
  1230. LDA #$08
    3 Y. l/ g$ {( |
  1231. STA PPU_Addr,X
    / V# e- _3 t- p+ G: \; R5 b- R
  1232. INX
    $ v9 X- c: w3 W, T" h
  1233. Time_Show_H
    8 A: B8 z# W9 i% H$ b, P$ t
  1234. LDA <Time_H
    - v/ |: w1 z% D) d
  1235. JSR HEX_To_Dec# C9 Y& l6 D$ z5 W8 D& R
  1236. JSR Time_Digit
    ) t% i- q* V# Y+ [$ f$ c1 R
  1237. LDA #':'
    9 J; u5 ]7 Z$ K0 M" k/ ~$ {
  1238. STA PPU_Addr,X
    : C  x# I, w( s( U8 }
  1239. INX" Y5 r; E& ]' S. N* w! k" l
  1240. Time_Show_M
    & \, ^% J. [! z8 w! t
  1241. LDA <Time_M
    6 ~9 D- G* v3 {# R2 }/ E# M0 H( r
  1242. JSR HEX_To_Dec! ?( t  ?: ^5 j; [6 P% n
  1243. JSR Time_Digit
    $ d% n, M, ]' M! {$ z* S% S
  1244. LDA #':'8 ^9 A7 G9 ~9 K) I
  1245. STA PPU_Addr,X4 J% B) s" V( h! S) U* W
  1246. INX
    ' ~5 h' ]" V# Y4 p
  1247. Time_Show_S
    3 _& A, @2 [6 o% K. {4 f  h% _# \
  1248. LDA <Time_S
    9 s# O; {/ _& f6 G% z
  1249. JSR HEX_To_Dec
    5 W+ o3 I# t  c- h. P5 C# ]9 b
  1250. JSR Time_Digit4 d  O2 s# [, L0 _
  1251. STX PPU_Cur1 Z9 B! D1 w' {/ N: R& w; j4 r
  1252. Time_Show_Enable
    : l! F& t, S# O( r
  1253. LDA <Text_Disable_Flag
    ) V9 a# `! B. \% I5 \
  1254. AND #TEXT_DISABLE_TIME ^ $FF; ]' x& A/ f4 Z; U3 e
  1255. STA <Text_Disable_Flag8 E1 M$ s  }4 A5 u8 J
  1256. Time_Show_End
    : X2 h6 C0 ~2 l& `+ R2 j# l
  1257. RTS
    3 C5 M6 s9 v! `4 r1 R
  1258. * E* k1 w+ l2 P0 o% b4 o: Q3 q
  1259. Time_Digit  x) v+ U3 a, y0 l8 l" X
  1260. LDA <DEC_T: f9 m3 R1 r+ n# j  M8 |" e
  1261. ORA #'0'
    , w6 J7 F( E: {' ^( a4 l
  1262. STA PPU_Addr,X, ^! M/ F4 k% q) H% ?5 @
  1263. INX
    * O4 n( O! O2 E* g
  1264. LDA <DEC_L3 Q/ U5 u+ a$ Z' b9 J
  1265. ORA #'0', p1 O6 G6 O8 N7 z! p$ U; i8 [
  1266. STA PPU_Addr,X
    , W/ q( Y7 f3 a
  1267. INX
    1 u3 @9 `" b  j9 l6 c; y5 x
  1268. RTS# s6 T4 a& C7 |) h5 s

  1269. 6 G- v' C5 B! ]4 ?
  1270. ;==============================
    3 H& X  N0 [9 k' L1 {
  1271. Time_Count;计时8 u- I/ L. {5 u# Z- ?& H% x$ @: l
  1272. LDA <Music_Stop_State
    * h3 v! J# P- C! Z% h3 ~( j
  1273. ORA <Time_Wait_Cnt* |: b! E/ m% o. @2 `* J$ s9 q
  1274. BNE Time_Count_End7 U7 ~, v# X9 H
  1275. INC <Time_Cnt
    0 M& B6 s" G* p/ M# y+ I
  1276. LDA <Time_Cnt
    / A1 D! T  X0 M4 r0 j0 ~
  1277. CMP #60
    5 G) j; o: }6 ^2 H: z
  1278. BCC Time_Count_End
    0 L0 J: l9 X5 t) u
  1279. LDA #00
    1 d2 L: A8 Z3 v/ o3 y
  1280. STA <Time_Cnt
    2 T) r& z+ e0 c
  1281. INC <Time_S+ J) a0 O: a6 l; D: Z- ]4 L7 h% l

  1282. 1 w4 \6 ^5 v3 {! x* B
  1283. Time_S_Cnt
    9 S7 ]6 ^* n% N2 A
  1284. LDA <Time_S5 K. x( V$ j9 K1 {
  1285. CMP #608 E5 V# |2 u$ W; G' \, G
  1286. BCC Time_Count_End
    0 k( P0 U( V6 I! C; h
  1287. LDA #00+ p2 E* |, A+ t& q% D) W4 ~# W+ E7 g
  1288. STA <Time_S7 h- z5 T( x. r4 r' N, u
  1289. INC <Time_M
    2 H4 _7 Q2 g- D2 E6 i
  1290. 1 ~9 v7 S% @+ ~7 J% N# _  `4 |
  1291. Time_M_Cnt/ ]* Z/ F( p( F/ I4 i& r" k
  1292. LDA <Time_M
    & R$ f+ C% H' w$ u
  1293. CMP #604 \: G: g; r$ ]3 Q* L
  1294. BCC Time_Count_End
    7 Y; F. v# K$ C! c6 d
  1295. LDA #009 W6 ?% {3 |& A1 W7 W
  1296. STA <Time_M+ M. H4 S2 e- X7 e  N
  1297. INC <Time_H2 R& H3 a) t+ p% |' ]( Z
  1298. 0 r5 i' I  u; P
  1299. Time_H_Cnt% |* W! e7 u, ?% C2 M: S
  1300. LDA <Time_H9 ?' X8 e0 Y% a2 [- ^0 T# D
  1301. CMP #240 W* U8 u) U6 q  k' ^
  1302. BCC Time_Count_End
    4 Q0 U+ g) l9 T% g; [$ l  G8 O( Y: e
  1303. LDA #00/ L; L: {2 }; x- d" s
  1304. STA <Time_H/ F# Y+ V  }  z+ h. [
  1305. : h. {/ Y' Y# P9 e
  1306. Time_Count_End+ b2 `: s7 Y9 l
  1307. RTS; `& I5 b% l' }4 L% G2 y2 l7 R, u

  1308. ( S, w0 r3 a: ?
  1309. ;==============================
    0 e: u. v4 n0 ?! G& |
  1310. Time_ReSet;播放时间重置( A  I3 }* R( Z, B
  1311. LDA #$003 ]/ g( E1 i9 K& P$ H" C
  1312. STA <Time_S
    : T; k8 K9 d( x4 p- A4 K! p
  1313. STA <Time_M 4 q3 J% c) L' j8 Z2 z& I% I
  1314. STA <Time_H
    1 U1 N5 q5 o1 m2 k7 {
  1315. STA <Time_Cnt# @8 U* K( ~7 a
  1316. RTS
    2 M: N2 y1 {, l
  1317. 9 a* Y: M! o; x7 p/ \' M& {' u
  1318. ;==============================* H# Y$ R& X- b% ^5 y6 T) r& Z
  1319. Music_Bar_ReSet;音乐条重置# @% z* S; S! E' F/ ?
  1320. LDA #$00' T3 H$ G( \# R  L
  1321. LDX #$00* M$ I8 |, L& S! s3 c& d
  1322. Music_Bar_ReSet_Set
    6 U  y4 d. Q. c- }1 H3 H
  1323. STA Sound_Bar,X
    7 L/ J6 k. {" B3 f0 z
  1324. INX* b: p8 D" _6 G3 r
  1325. CPX #$10
    " `6 a6 \3 \0 r0 v1 P7 s7 d8 ~
  1326. BCC Music_Bar_ReSet_Set
    $ y! |# s  f3 C, j3 P7 }, Q) K
  1327. RTS% [; E2 @* A+ o( b
  1328. $ S& ?. q8 {% Q. t4 D6 N, e  R
  1329. ;==============================3 L& i. _  Q. _8 B6 Q  |4 t5 Q! T- F0 [
  1330. PPU_Data;PPU数据写入4 Y, c5 r/ x* M
  1331. STY <Data_L
    & v6 s  ]8 l! `& l6 t
  1332. STX <Data_H
    ; L# r9 d+ s: ]$ H+ E; C7 j* Z
  1333. LDY #$FF
    8 c  L8 |" A) w( O4 E& |" w% @
  1334. LDX PPU_Cur
    + |5 e* i/ b+ z/ p0 E, x5 I
  1335. DEX
    , k& P! M% e% E2 P) ]2 m* O
  1336. PPU_Data_Beg- y& u8 j- f' E6 i0 y6 L
  1337. INX& R$ A  I8 S) c
  1338. INY9 A2 j8 z, P- L8 n8 y
  1339. LDA [Data_L],Y" n- I0 L% _% I0 ?  P
  1340. STA PPU_Addr,X
    " `, ~: C* V9 o' w; X( E
  1341. BNE PPU_Data_Beg$ r1 r; X- X( C6 A+ \8 C& x
  1342. STX PPU_Cur/ n  V4 J# S" x: N
  1343. PPU_Data_End
    $ e5 Q% {% F; W; O$ Q
  1344. RTS; D* p% N0 D7 j4 Z
  1345. 9 p0 A+ Y" R6 N" I) _3 V
  1346. ;==============================
    / Y" @" w$ E: x4 O" T
  1347. Music_State_Show;播放状态显示
    ! N  Z/ b# C" W
  1348. LDA <Music_Stop_State# `. L) l2 e( h/ c
  1349. BEQ Music_State_Show_Play
    8 B! a2 h+ Z4 \. g5 {: C
  1350. Music_State_Show_Stop
    3 u2 Z( C8 C, ?) S! U. \2 ?
  1351. LDY #LOW(Music_State_Stop)4 `( {4 D! a: F  S/ Z7 z" A
  1352. LDX #HIGH(Music_State_Stop)
    ) O4 U- L2 J6 u( }2 c. l& }
  1353. JSR PPU_Data
    + v) j4 d: l5 p# ^& f4 q- R* T
  1354. RTS: C) _1 N. E- b: p
  1355. Music_State_Show_Play- _. v# S+ a$ F: Z
  1356. LDY #LOW(Music_State_Play)& }  ^+ L1 J( W7 B  N3 [4 `
  1357. LDX #HIGH(Music_State_Play)# m$ N8 X. K! F4 R
  1358. JSR PPU_Data
    * m. D5 b3 A. {9 C  e) ~; B
  1359. RTS# b7 @; u; G- v4 d8 w/ `. Q
  1360. , M$ g3 G& U/ M' ^2 L
  1361. .IF SOUND_BAR_SHOW_ENABLE8 w  x2 ^9 L# P- t% m
  1362. ;==============================
    1 M, r  B& t0 @+ v) _3 J" p
  1363. Sound_Bar_Text_Set;标题与音乐条初始化! @* y) p9 I3 W' J- q6 [
  1364. LDY #LOW(Sound_Bar_Text_Data)& ^% w1 `) ~  B2 R" M7 F2 J8 ?( l& [
  1365. LDX #HIGH(Sound_Bar_Text_Data)
    + v' x  q, D3 [
  1366. JSR PPU_Data+ q6 M% i2 h* B+ D
  1367. RTS
    - F- i) E  P% I& ^0 e) r
  1368. & z1 y( \5 z  t& [) G. ?/ v- v* h
  1369. .ENDIF% m8 \" m8 C5 l3 Q7 f, S

  1370. + E1 K+ V1 A2 @' R# K& V* g+ p2 F
  1371. ;==============================7 W3 A6 L( n& S8 h; \
  1372. Set_NameTable_Attributes;设置命名表属性
    # p( x5 n$ u" i" ^* i  D5 X
  1373. BIT PPU_STATUS
    6 l; ?8 ^! N/ C8 b
  1374. LDA #$23
    ' w* R9 n% d0 I& G
  1375. STA PPU_ADDRESS1 Q4 I1 I# v: q4 u0 {
  1376. LDA #$C0
    # F* N" J1 `0 C2 P3 B- ?
  1377. STA PPU_ADDRESS
    % V! u+ n/ I& \: p, a" P* c+ K
  1378. LDX #$00
    2 n" A6 F5 j0 ?' n/ H2 w" g
  1379. Set_NameTable_Attributes_Write
    ( ?; u- G' K' t1 U9 A2 a8 i
  1380. LDA Palette_Attributes,X
    ) r. s4 y) S1 \! D! i
  1381. STA PPU_DATA
    1 K; [" G' s" I0 }  Z9 O) ^
  1382. INX
    9 B6 i! ]0 W/ i& j+ P( o: N
  1383. CPX #$40
    $ t" K) g: x' l& H4 g" X
  1384. BCC Set_NameTable_Attributes_Write
    ! T, f( }0 @% V0 H" o
  1385. RTS
    4 R5 h% o- a' W2 o7 ]

  1386. ' E/ y# C; @: J- ?0 C1 g7 ~
  1387. ;==============================
    ' Y# }, z6 s1 E
  1388. Set_Palette_Color;设置调色板数据( s$ ^  G) P9 S$ M
  1389. BIT PPU_STATUS0 B) V# p& \1 o! m
  1390. LDA #$3F; U% U6 |; E3 ]
  1391. STA PPU_ADDRESS
    . r* W' ~  b  n( s9 j
  1392. LDA #$00
      h+ F5 u) X, w# c& N# t0 ?8 x& h
  1393. STA PPU_ADDRESS% n, @$ q/ d% [1 P$ _: J
  1394. LDX #$005 y& E/ m. f9 O
  1395. Set_Palette_Color_Write
    & x! i/ y: Z$ h4 _) H$ z: i
  1396. LDA Palette_Data,X
    2 `" V4 N, i/ k5 k6 E" t
  1397. STA PPU_DATA# }2 m2 H" t! y# e9 \% a# b
  1398. INX* a8 M* d1 h. m* V! J* i9 Q
  1399. CPX #$20$ a* m/ S7 F9 M
  1400. BCC Set_Palette_Color_Write
    0 G, }# Q  p. g) ^
  1401. RTS$ _! K1 _4 j! L! u* ]! j
  1402. & g: z8 S  T4 E7 X8 W
  1403. ;==============================; |4 h* H4 l" ~- c! f, A9 ]3 Z/ l
  1404. Init_Palette_Addr;初始化调色板数据! y% j* K, s/ x/ ^. G
  1405. LDX #$00! K. H, a' S# k6 N
  1406. Init_Palette_Addr_Write
    0 L7 c* A  f, P5 b1 a2 O
  1407. LDA Palette_Data,X
    ; t4 E5 i$ H. j# z$ ^' h0 e
  1408. STA Palette_Addr,X
    # }, V/ i: ]- c* E2 ]- b
  1409. INX
    / B8 O% Q0 c% |4 m
  1410. CPX #$20( i6 |3 A: y( t
  1411. BCC Init_Palette_Addr_Write% V6 Y5 V8 V$ E& \; u5 |
  1412. RTS
    + N  Z! y# J: R9 T9 U
  1413. 1 t7 Q2 v/ j% a+ m
  1414. ;==============================
    / P  Y+ m# q5 @: w+ Z
  1415. Update_Palette_Color;更新调色板颜色
    ' b* ?0 X) E5 T& V
  1416. LDA <Palette_Update_Flag
    ' y# g' l0 L# K* V! M& o
  1417. BEQ Update_Palette_Color_End
    ( T  P$ l* V/ d
  1418. LDA #$3F
    # @' f) M' b5 ~
  1419. STA PPU_ADDRESS
    + o: Z% ^: E, O( N2 r2 w: I2 G
  1420. LDA #$0C5 d9 ]. b3 X! P6 J3 P8 u0 _
  1421. STA PPU_ADDRESS- Q, H7 u. _& l! @. E  r
  1422. LDX #$0C
    - i8 D/ K; b1 z' b
  1423. Update_Palette_Color_Write: q: _$ @5 M: _2 r9 h+ d
  1424. LDA Palette_Addr,X
    8 v$ ]1 k2 @" ]/ N
  1425. STA PPU_DATA
    . ?5 Y4 J5 b) O& f, t
  1426. INX
    ) v! L# `2 p/ m3 V
  1427. CPX #$143 U- H$ q# b5 l. Z. Z, Q
  1428. BCC Update_Palette_Color_Write
    7 _3 }6 h$ i, U; E4 f
  1429. LDA #$00
    3 {: b& Q3 e% n: `8 V! X" J) v
  1430. STA <Palette_Update_Flag9 ~& T) e2 L1 H+ {+ G# c
  1431. Update_Palette_Color_End0 `  _! Q' q$ r7 \# C: G2 y6 [
  1432. RTS. U3 C  e/ W* b* X0 m) |
  1433. - F9 s  ~9 ?  O/ P0 J6 X6 G3 h
  1434. + P# ^( ^. y7 p3 y1 D
  1435. Update_Sprite_Palette_Data
    3 F2 z  _# z$ A; F/ l
  1436. .DB $21
    $ t9 U3 d) m% e- C( P* t
  1437. .DB $21. Z4 X2 y% Y# M! Z& k. o
  1438. .DB $11
    / R4 n4 n* |  r
  1439. .DB $01) N3 P2 }7 O: x0 `  x
  1440. .DB $01
    $ K7 ~; d$ J  H- w  S4 F
  1441. .DB $11
    " ?, X8 {. K2 h. L& Q& R
  1442. .DB $214 R' H( f' Y) N1 f
  1443. .DB $218 @' o7 f; }! c9 i5 t4 D" ~9 {8 m# w
  1444. .DB $114 a& t7 M" z0 d; z
  1445. .DB $01
    3 F; m* p: {! n! E- o$ j! [& V
  1446. .DB $11
    . ^: M) l2 [2 `! l+ E
  1447. .DB $21) k0 `  A! f% U4 B7 C3 R  c( |
  1448. .DB $21, h; E; P( A0 b* j. N8 @
  1449. .DB $116 a  I! D6 r3 \  v% M
  1450. .DB $01: ~) |* J/ z7 }* x4 m) x" j$ t
  1451. .DB $11) G- }/ m# g* k5 t  B# v1 r2 E8 T1 [
  1452. ;==============================2 q" x/ D6 l# d2 B, |! m' s
  1453. Update_Palette_Data;更新调色板数据7 ^1 q0 V1 p+ a5 h# V
  1454. LDA Nmi_Time_Count
    , _, V$ P- k3 K6 N, B) O" {
  1455. AND #$08
    5 Y6 `! p( ^$ t- L/ H. a. @# R/ o
  1456. CMP #$08+ W! i( |+ D. T' k" w
  1457. BNE Update_Bkg_Palette_Data
    2 c! p8 z' d% G4 `! x' I1 v
  1458. ) ?: y+ `% K: B6 A( w& i
  1459. Update_Sprite_Palette_Data_Set
    % ?' b9 b* _6 f" \
  1460. LDA Nmi_Time_Count; o4 b5 P' h$ S2 [, {
  1461. LSR A1 @' K; s6 ~4 c  y5 Z8 m4 e
  1462. LSR A+ W, W+ x& e" l3 E2 z
  1463. LSR A: z3 ?  S0 @, b8 r
  1464. LSR A
    : C% O2 |1 N; X; |; ~) d$ t
  1465. AND #$0F/ G4 S) o; h; i6 x" i1 o5 u  o; @
  1466. TAX
    6 I# A( U2 Y' i% [
  1467. LDA Update_Sprite_Palette_Data,X) X' x2 m7 z0 }6 @! K9 r
  1468. STA Sprite_Palette_Update_Addr$ ^( b3 n! B2 R
  1469. LDA #$01
    4 \2 @9 D! }+ z/ P8 V5 Y
  1470. STA <Palette_Update_Flag
    . n5 {  Q# }+ V  [
  1471. 6 `7 @! Y2 D; G6 r
  1472. Update_Bkg_Palette_Data. {# w* A9 J. T% L2 y
  1473. LDA <Text_Disable_Flag
    7 w7 v  ?# ]# H6 v$ E
  1474. AND #TEXT_DISABLE_RAM
    7 x" K! [8 ^4 Q: R& D1 h4 z  x
  1475. BNE Update_Palette_Data_End
    % o2 g* B0 B* R$ _* T% O/ F: I0 |
  1476. LDA <Music_Stop_State. J) W+ {0 V0 }: q: x' t, I
  1477. BNE Update_Palette_Data_End
    1 [1 T! d& s+ g, X0 y" V

  1478. # X$ W; d6 r$ ]) T
  1479. Update_Palette_Data_Check- f5 w# m  S& @$ f6 ^- W. i) e# X
  1480. LDA Palette_Wait_Cnt
    8 b  z& d& ?$ P
  1481. BPL Update_Palette_Data_Check_Over- `3 A' {. f' J, V
  1482. LDA #PALETTE_UPDATE_INTERVAL! i" t$ q, s4 G( o0 O3 X( S1 T- c" U/ y
  1483. STA Palette_Wait_Cnt
    5 f1 g8 O5 U8 x! m$ O4 V" t1 b. a
  1484. Update_Palette_Data_Check_Over9 r& m$ Y( a+ \8 n3 V, O! c) F) Y9 f
  1485. DEC Palette_Wait_Cnt1 w1 C* o/ f2 y. t/ v4 }6 X+ b$ g3 f/ F
  1486. BNE Update_Palette_Data_End( q* b8 u3 `8 }' f. u8 R( C  Q& b

  1487. 5 r: m+ k2 Z2 s* d
  1488. LDA <Text_Disable_Flag
    " @- L6 O  L2 M) E
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    , i, A$ h: T7 c' i! C+ R6 I
  1490. STA Text_Disable_Flag
    % |0 u/ c! N/ a( L# r9 i( Y
  1491. INC Palette_Update_Flag& ^7 ~5 D+ ~/ J: z% h9 G/ g6 \
  1492. ; v0 ^8 @$ {2 I! F; @# `
  1493. LDA #PALETTE_UPDATE_INTERVAL
    0 v) d0 _$ o2 b7 ~. m0 |: V
  1494. STA Palette_Wait_Cnt
    + u" ?+ B! L+ m7 [8 _9 O5 N* o

  1495. 1 q" g+ G, o' e3 p; l
  1496. LDA Bkg_Palette_Update_Addr
    6 ^- G& c  c- B8 s' N
  1497. CMP #PALETTE_UPDATE_MAX2 \6 z" P2 r+ J1 K! v
  1498. BNE Update_Bkg_Palette_Data_Set
    2 G9 @* e& F( p: b! y+ X
  1499. LDA #PALETTE_UPDATE_MIN - 19 s* ?1 w+ Y1 |$ s) m5 p8 r- _
  1500. STA Bkg_Palette_Update_Addr
    3 F8 H0 _0 y: X( [& N: j3 Y! F
  1501. Update_Bkg_Palette_Data_Set$ C- z* [7 }; U" ]
  1502. INC Bkg_Palette_Update_Addr) \( J* a9 v: W, h& h" R- t
  1503. ; _* ]% U- Q1 M0 A7 o
  1504. Update_Palette_Data_End
    5 q( n0 t/ a2 e$ }, a4 k' M
  1505. RTS# x) I# c' J. y1 S7 Z" D
  1506. $ R( Q0 F6 s2 X) I5 U
  1507. ;==============================
    ' D! G5 G/ r; ~; \% ?
  1508. Show_Music_Text;显示静态文本( j# z8 L6 u# q5 |4 _
  1509. LDX #$00
    , l& N7 ^1 p4 v# Y/ r3 Y
  1510. Show_Music_Text_Set/ e* O# j+ u2 i; _
  1511. LDA Static_Text_Data,X
    * h( B7 e: ?* Q5 g9 c
  1512. STA <Data_L
    % K% C7 O; ^: e) d( W
  1513. INX
    " |$ l9 t1 l% O$ f- @
  1514. LDA Static_Text_Data,X
    " Q  A- H& X* R; q1 ~4 X
  1515. STA <Data_H
    3 j$ i( B; ^( J6 W4 B; M- U, S
  1516. INX
    : `0 A' m' A8 s' ]) j- |6 ]/ d& J& `
  1517. LDY #$00% f( Y% e& b- r$ m
  1518. LDA [Data_L],Y
    . ~5 ~0 j& m& O# q$ D$ E: L% T8 ]
  1519. STA <Data_Cnt
    3 f: d0 {5 Z- c0 t3 {( S& ?
  1520. DEX
    3 x0 P; G: C8 \
  1521. DEX
    . `( P" |5 d* G: q1 S6 G
  1522. LDA Static_Text_Pos,X& r% v2 [0 G6 F' K
  1523. STA PPU_ADDRESS
    & f+ b9 j- c/ ~( k0 O* n. O7 K
  1524. INX
    ! z% J; o5 t& T# @4 R
  1525. LDA #$20
    & K& @! a) L& T! c( b, L
  1526. SEC. r6 {* |; @5 r) k0 |! Y
  1527. SBC <Data_Cnt+ ]% e$ k/ B9 g9 s% d( e1 H
  1528. LSR A% U$ v$ T, J$ ^3 Q: A' P& z6 ]9 V4 G
  1529. STA <Data_Buf% i& i5 x- R4 L2 ^* H( T: \' I
  1530. LDA Static_Text_Pos,X
    7 t9 W0 J5 q5 l( R  ?, }: ~
  1531. AND #$E05 I' L) g3 f! ]
  1532. CLC# K, \  ]* A4 s( z3 c
  1533. ADC <Data_Buf& Y& a( Q2 @# r! F/ ?) h# m: b
  1534. STA PPU_ADDRESS, }& c( |$ n3 O6 o5 ]3 w/ o% U; b
  1535. INX
    9 w* y. S; ]& C: E2 k& f1 i
  1536. Show_Music_Text_Set_Write" w4 b2 p* e* w/ Z, i0 N
  1537. INY
      R8 z; w, K0 B" K  R
  1538. LDA [Data_L],Y
    $ q; y7 e$ b& N3 q8 Q2 [5 \
  1539. STA PPU_DATA
    0 N3 o" Z1 ~( ~; ~) Y6 @- x' `: R7 V
  1540. DEC <Data_Cnt
    ! |0 Z) `' H5 d/ D# O2 ?9 b2 _
  1541. BNE Show_Music_Text_Set_Write) P2 v' F- ?5 R* n# W
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos/ z, _. }  y/ t5 c/ P2 |. [% J! `( ?
  1543. BCC Show_Music_Text_Set, K; O9 A  y9 t- }  n' ]( M
  1544. RTS
    * `- `+ n8 c# F. t" \# P) I4 [0 w

  1545. 8 W, x5 t& e  o% G
  1546. ;==============================
    3 v  \  e2 a: P: R% ~
  1547. .IF Track_Name_Pos;显示曲目信息
    % p6 r( Q& ~3 v

  1548. : I1 c- J; o' A/ S/ B# v6 F1 ~
  1549. Clear_Track_Info+ `; D3 ?7 G# F5 f  _9 K9 ~8 \
  1550. PHA
    - {% c; L3 h! H9 W5 w
  1551. LDX <Music_Item_Cur
    / e2 D4 p( W# X, R+ U
  1552. LDA Track_Name_Addr_Flag,X
    4 B9 n# n6 R0 J, l8 D
  1553. BEQ Clear_Track_Info_End_Ex. g5 f/ e5 @# i. k6 O  N+ N
  1554. PLA
    $ u9 C& k8 u- _5 L2 {
  1555. , O, u$ x1 T/ Y8 U
  1556. LDX PPU_Cur3 Q, {( v; k( l5 m! I) L; P
  1557. PHA( t1 }1 w, }  D3 j
  1558. LDA #PPU_MODE_CNT_CLEAR% c+ L0 E6 J/ p: K0 m/ y
  1559. STA PPU_Addr,X
    + E4 I/ l: ^; x; z+ P' ~
  1560. INX% G6 O2 M& Q) M  o& G" E) c) a
  1561. PLA
    + c9 b: B! ^, R3 Q* ?1 K
  1562. JSR Show_Get_Track_Name_Center_Pos
    - W- b9 \/ W2 I0 y$ n' g; D
  1563. STX PPU_Cur2 H6 _  J% j9 n3 d9 `0 u$ M* \
  1564. Clear_Track_Info_End3 u7 z8 T  ~7 D" B. z5 L
  1565. RTS# p9 P, }; ^, n# P4 T
  1566. Clear_Track_Info_End_Ex3 q9 C$ M$ y7 ~4 x% j+ l
  1567. PLA
      W/ o9 F! T5 X8 M# s
  1568. RTS" a5 J( E* k5 q% e( O# F) p

  1569. / M, y6 M3 ?2 [( O) ]
  1570. Write_Track_Info  t) w7 q& N2 i0 w2 u
  1571. PHA
    : {$ ^  G9 F- T: Z+ p3 E
  1572. LDX <Music_Item_Cur
    ' o, J! t/ o1 Y% k7 A. e9 ]
  1573. LDA Track_Name_Addr_Flag,X
    : D+ t' [) u& |' R/ v
  1574. BEQ Write_Track_Info_End_Ex
    " h3 d& r) s* c& i/ ~$ w
  1575. PLA
    7 \. _: D* w- K; o. p

  1576. , _6 g0 L4 H+ B
  1577. PHA
    ' I) ~% m# ^1 L& N& e
  1578. LDX PPU_Cur
    ) w3 |' Q. V7 m3 X7 U$ P4 _
  1579. LDA #PPU_MODE_CNT_LINE8 j4 v4 \. Y7 i- f) d4 l) c; U8 U
  1580. STA PPU_Addr,X# L, S( c+ c4 M( b7 ^9 h* \+ v
  1581. INX
      d% `* D+ ^7 J/ p' G
  1582. PLA$ {- x' |+ `  ~# [4 V* |
  1583. JSR Show_Get_Track_Name_Center_Pos. R7 q9 t3 M# m# i# g
  1584. Write_Track_Info_Data
    " n1 y3 [( @7 M6 y! y6 P( Q
  1585. INY+ {' |* d6 |4 M) M# R
  1586. LDA [Data_L],Y: n7 V5 x& o4 m7 l5 D+ Y/ A) k
  1587. STA PPU_Addr,X: `; a/ u' I- w0 n
  1588. INX
    6 c3 I2 q7 D6 E. F4 @& m8 D% A9 a- K
  1589. DEC <Data_Cnt, V. p9 K* u8 Q8 X, h) U
  1590. BNE Write_Track_Info_Data
    3 F0 p$ k4 Z3 |0 E" {. @  V8 P
  1591. STX PPU_Cur
    % B4 k$ L( v- {* Z& X2 D
  1592. Write_Track_Info_End
    , @8 p3 f( Y8 M7 ~4 |
  1593. RTS1 G7 V# l/ f3 Q. j4 H! H; L: }
  1594. Write_Track_Info_End_Ex
    : I2 c" P, \: X
  1595. PLA! S3 \" {$ S1 q) e) e& c  \- U
  1596. RTS; W) ?+ v2 z2 y

  1597. 5 O: l. u# j, U6 f
  1598. Show_Track_Info; d  _3 E9 Q6 z( M. r9 E+ q) U
  1599. Show_Track_Info_Clear
    : b- P7 K/ s! R0 j2 ?1 T
  1600. LDA <Music_Last
    # Y8 ~1 S- i6 v' O# _3 ?7 B
  1601. " ?) b! a  I$ I# \2 ^5 m
  1602. JSR Clear_Track_Info
    - p4 p% P; X+ C# Z. N/ }$ c" z$ X+ l# _

  1603. & H% h  Y: I) b4 D* @/ P
  1604. LDX <Music_Item_Cur, L( U: }  w: m- @& l3 ?2 K
  1605. LDA <Music_Cur,X" O/ Q$ S9 X! ]8 Z# v" Z! {; V3 D3 e
  1606. JSR Write_Track_Info
    - ~  ?6 Y+ s: s2 w! H9 F2 q, i
  1607. RTS- a5 x% @( h$ g. k  R! ?
  1608. - c: X. i1 D) q4 U( C0 i5 U4 |
  1609. ;==============================. v0 Q$ Q" l) N2 ~! O# f4 s. q
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置
    ( B! C4 R: T+ a7 x6 o* Q
  1611. 0 `. d3 b5 K8 _3 u* U$ C0 g
  1612. ;取出集合名索引
      W4 {7 B1 _1 \5 ^- I" H
  1613. PHA: C8 m9 u2 M2 ?7 p) ]7 A
  1614. 8 \2 f. f- O8 d5 v
  1615. LDA <Music_Item_Cur# h9 {1 {2 V* l; ^1 n) }& f3 Q
  1616. ASL A
    3 |- r# `. d, s# R1 t, P+ L% G
  1617. TAY& Q0 v9 J3 W" R! {& F" s
  1618. LDA Track_Name_Addr_Port,Y
    ) X3 Q, }  @( f
  1619. PHA$ K; _$ J+ X9 _: I1 ~+ l( W2 C
  1620. INY
    * M" H% Q: p( c
  1621. LDA Track_Name_Addr_Port,Y, j1 m) d% r% h' p
  1622. STA <Data_H
    1 v" E+ x$ @( c* F' \- T8 |
  1623. PLA4 u6 ?3 T  [+ P& Z0 U! c, j" ?$ D
  1624. STA <Data_L* |: P0 o6 D/ c5 i  V
  1625. 6 H6 {/ u+ a$ U, I+ r
  1626. PLA
    $ E( E' T# `% Y; t9 ~* f# j
  1627. 1 r# Y( G" D/ [
  1628. ASL A
      W0 e" U$ R% e9 G* d5 `
  1629. TAY# t3 B0 ^; C, G. s. b: P9 F) o
  1630. LDA [Data_L],Y
    , I7 H6 ~8 e8 P& a6 T2 j
  1631. PHA
    : G1 w6 ]/ C( j5 ?
  1632. INY
    1 Y( O1 P" x+ |1 ]& I8 t; E, ^* {
  1633. LDA [Data_L],Y7 ]. y% i0 {/ K, p
  1634. STA Data_H
    : U5 M7 M  M% R! Y* Y
  1635. PLA; x" g* }+ L: i3 M
  1636. STA Data_L
    ( _+ ]+ d/ R5 J/ J, I

  1637. * `: _) o& L/ z5 e$ t+ p
  1638. LDY #$00. ]  \: m6 q2 o% O
  1639. LDA [Data_L],Y( I7 m8 o* A* e  v! X2 d- Y" T0 N
  1640. STA <Data_Cnt* z' H, e$ V) ~
  1641. LDA #$20
    % E# \0 {5 u' ]( W6 C
  1642. SEC6 C/ g- ?+ |- F+ `
  1643. SBC <Data_Cnt
    1 Z# W. ?8 y) t- n
  1644. LSR A9 X) {- b4 |" x( F
  1645. STA <Data_Buf
    0 H4 s# G- X4 _! }) o: ^: S
  1646. LDA #HIGH(Track_Name_Pos)+ a: e# v/ s5 J0 B/ v; l& f
  1647. STA PPU_Addr,X/ s" _' _7 Y2 l1 k% X0 s" r, z% s
  1648. INX
    ) P  i/ @" s2 l
  1649. LDA #LOW(Track_Name_Pos)
    ) C! V+ r8 f  `+ @/ X1 U6 d
  1650. AND #$E07 O% t% n7 x3 U0 t  h* o4 }
  1651. CLC" o- o. g$ i! W- r
  1652. ADC <Data_Buf
    . G- c; R# G: X" Z- I5 m  x4 |( h0 S
  1653. STA PPU_Addr,X
    % t, u. u2 ~: i2 }! s5 d* x
  1654. INX
    / q. I# U. ~; @
  1655. LDA <Data_Cnt
    # T: W( p  A) R! K8 L; f
  1656. STA PPU_Addr,X+ B$ c) N$ c" j' \8 k3 i* ?: W
  1657. INX
    3 R" z# |! w- {8 F
  1658. Show_Get_Pos_Center_End
    % u& f0 U' R' R2 D. n/ @& ?" z
  1659. RTS- I* L+ t) j& }  E3 u: m3 D* X$ K
  1660. .ENDIF4 j( U2 ~2 q9 _% m! ~# x
  1661. / P; B5 Z/ u' g! e0 n
  1662. ;==============================4 {' w" y( l7 Z6 C& }4 l
  1663. ;音乐端口清除6 J! r6 G1 e2 f: v
  1664. Sound_Data_Clear# g2 z* K9 a# Q( z2 o
  1665. JSR Sound_Port_Clear& ^/ p6 h% F( o- j
  1666. JSR Sound_Ram_Clear+ h  p! n6 I/ l& Y0 @/ }' A
  1667. RTS
    5 ], x# c" U; X/ l/ [7 F3 h

  1668. . Z9 o. s* L+ o' l& r  e% m# F3 Q
  1669. ;==============================' k( R7 v) U: ^# X( R- A" {
  1670. ;音乐端口清除6 z6 C  ^5 n5 R
  1671. Sound_Port_Clear
    1 [* g( v1 y3 u2 l
  1672. LDA #$00
    # x  V2 {1 w/ H; H2 E5 t  S8 W
  1673. STA APU_STATUS
    - a) u+ B7 p/ B, p- C* F/ o
  1674. LDX #$00% P7 \8 r! g. w0 f3 Q5 x# ~& v
  1675. Sound_Port_Clear_Write
    * M- J& \+ w' A/ l) f) o
  1676. STA $4000,X; f7 c5 p/ ^7 Q/ \0 K* V( w
  1677. INX. }* r4 b6 Q, x. N
  1678. CPX #$148 n/ y+ V# e5 ^+ S
  1679. BCC Sound_Port_Clear_Write
    1 S7 f; w' d% c# P& H% h
  1680. RTS
    % G  u- I) f- n7 c" j

  1681. : N9 [$ @, E0 B$ \
  1682. ;==============================
    ; A& Y( Y0 [0 K6 K
  1683. Sound_Ram_Clear;RAM清除" g+ g3 i4 f3 K. C0 k% Z; I
  1684. LDX #$00  [* b+ y. Q! x; D. P, p
  1685. LDA #$00
    $ k& V, V+ g& L! v* v" X: T( z
  1686. Sound_Ram_Clear_1' N6 D. {% H$ R, c* y1 D8 v8 N
  1687. STA Sound_Ram_Addr_1,X) V# z+ H& S( r7 U' ?9 l+ V$ J
  1688. INX
    ) `' g& N; ?) o- E
  1689. CPX #Sound_Ram_Addr_1_Size
    * j& E7 D5 N0 D3 d; D# E; _
  1690. BNE Sound_Ram_Clear_1
    ' ]& I! i  f7 C* l8 x/ M
  1691. LDX #$00
    ! ~5 N$ o# W' |3 d) a1 r# ?' e0 _
  1692. Sound_Ram_Clear_2
    7 F7 q+ p3 U7 r( h
  1693. STA Sound_Ram_Addr_2,X5 [" s9 ~8 X; i; p- |! f/ }' r
  1694. INX
    & v2 U3 I- {" G+ r) J# F
  1695. CPX #Sound_Ram_Addr_2_Size! Y  t0 j' u. _0 S5 F; n
  1696. BNE Sound_Ram_Clear_2, e# ?8 R3 V, g& G
  1697. LDX #$00
    0 t( M5 Z" c9 n2 R
  1698. Sound_Ram_Clear_3
    9 @- V5 t2 G* ~4 i" e5 P4 J$ m. {
  1699. STA Sound_Ram_Addr_3,X) F. b$ A( B! G- K; x+ p5 i" i
  1700. INX
    0 C: |% ], A% E, u" v- \/ M: b
  1701. CPX #Sound_Ram_Addr_3_Size
    / F/ Q# U( B# J4 i) x8 i; O
  1702. BNE Sound_Ram_Clear_3
    " C2 r7 N/ s4 L9 V( {% ~
  1703. LDX #$00$ m  R( _% F, H- S
  1704. Sound_Ram_Clear_4
    ; y# D$ T, s( X6 u7 ?, {' D
  1705. STA Sound_Ram_Addr_4,X
    8 p' p0 Q; F2 L+ s- g  ]2 K
  1706. INX- f3 M& e5 `8 g8 @2 U. M
  1707. CPX #Sound_Ram_Addr_4_Size
    9 M" |) s, r7 F/ b& {
  1708. BNE Sound_Ram_Clear_4! J; L. |3 ~( R6 F2 R3 b
  1709. Sound_Ram_Clear_5
    ! G, N  K( U: o1 \: Z( i
  1710. STA Sound_Ram_Addr_5,X5 s( [1 d; A% p8 ^! q7 ]
  1711. INX2 ]3 w3 Y" d, Y
  1712. CPX #Sound_Ram_Addr_5_Size
    6 I+ `# @0 s  z, H  u& ^7 T
  1713. BNE Sound_Ram_Clear_5
    ) A0 c* ^  w% A( G1 n( c
  1714. RTS
    / _/ _3 D# h8 ~) k1 J# Z
  1715.   O0 Y' m% E5 e- p
  1716. Get_Music_Collection_Name
    7 U& }; R  d: U
  1717. PHA
    * ^0 q0 U9 N! a7 s/ z( c; C
  1718. LDA <Music_Item_Cur
    0 }- s! z  X1 E4 r* E0 g+ S  d9 F
  1719. ASL A
    & f+ M+ C) S  ?) ?, V
  1720. TAY
    0 w: d5 S) h/ L9 Q9 g# m$ [
  1721. LDA Music_Collection_Name,Y. D9 `' D! ~* Z5 f5 A# P6 ]* ~
  1722. STA <Data_L1 j) y8 Z! P% W5 z) g7 {8 t; j# g
  1723. INY
    3 F5 ]0 x! f* s
  1724. LDA Music_Collection_Name,Y
      `5 g" o) ]% T; T( M( K1 Y0 W: s
  1725. STA <Data_H, I: O3 A1 F6 T# b9 b8 c
  1726. PLA7 ?9 U  C, u  X$ \
  1727. RTS9 A0 B1 `  |9 }  x, O; p& v

  1728. * A" `9 D: M8 [6 e- @: P
  1729. Set_Sound_Total9 t* U9 G, Q# z7 u
  1730. LDY <Music_Item_Cur/ b* V/ D. A" g, L2 ]/ O
  1731. LDA Sound_Total_Port,Y+ S/ V, t3 r3 D$ u. j6 h% v
  1732. SEC( O3 c( ~: R5 l$ Q
  1733. SBC #$01
    : ^& [- b& F6 H! k1 {
  1734. STA <Music_Total1 D" \+ t( P, |" }% V; F& b8 B& A
  1735. RTS5 j3 ^. `/ @6 C+ s# m0 M6 N# o/ b
  1736. % [5 |* C! m5 Q; Y. g/ u
  1737. Get_Sound_Start: j- W7 Z# ?1 w: p/ k. O% h, R* O
  1738. LDY <Music_Item_Cur5 ^9 J! W8 j1 K& L. I! n
  1739. LDA Sound_Start_Port,Y
    & F" ^4 Z) y7 q$ O0 ^# m
  1740. RTS, E: y( G' x1 X( \) w1 v3 a

  1741. , e0 c  ?" m7 k/ f! A
  1742. Set_Sound_Init_Port
    * N. M' @& b6 m2 e, s
  1743. PHA# g( T) ~7 R6 a2 k! \- m- V0 k
  1744. LDA #$20
    # B6 _) z2 ?; r% F$ R0 M
  1745. STA <JSR_Addr_Op* d0 e3 h* R. m. `& V
  1746. LDA <Music_Item_Cur
    $ h% M8 T& t/ ~% u" O' d  N
  1747. ASL A8 t: O+ M) G4 t0 |
  1748. TAY
    / \9 G; h4 W+ Q/ M1 Z% M
  1749. LDA Sound_Init_Port,Y1 i/ N; `: K% Q0 ~
  1750. STA <JSR_Addr_L! u) Y: [( r! l' x7 g  s
  1751. INY
    ! v8 F+ j8 V8 y7 G3 {% r% y
  1752. LDA Sound_Init_Port,Y7 ^2 d9 P7 R9 E( B6 J- m$ s
  1753. STA <JSR_Addr_H) X- C) n) g0 B3 ^
  1754. LDA #$601 p0 d4 b! g9 k7 `- y' c, }
  1755. STA <JSR_Addr_Rts5 H2 z; _0 X4 s. Q# l5 K
  1756. PLA: _8 H" S# \; v* y, [, K3 \  O$ l5 I
  1757. RTS) F4 ?  g" @5 h: ^" l5 |9 J3 y

  1758. 6 v/ c" @. q9 d  ?+ ^
  1759. Set_Sound_Play_Port3 }+ s8 d) e+ q9 I: ?
  1760. PHA
    ; P# L$ N/ W. o5 A* i5 O
  1761. LDA #$20
    . s$ w( c7 P. q+ C* w5 e
  1762. STA <JSR_Addr_Op
    8 ]4 ?7 B9 V$ ^
  1763. LDA <Music_Item_Cur
    ) ]- Q: {4 r2 q" P
  1764. ASL A
    0 z6 K" f  U$ z
  1765. TAY
    ( ?* ^9 ~: m5 k+ C3 ], W
  1766. LDA Sound_Play_Port,Y0 L; E+ M8 d, l! ^
  1767. STA <JSR_Addr_L
    + ^4 ^9 Z# B8 ^" n
  1768. INY
    5 a! {3 O9 r5 S) z; u
  1769. LDA Sound_Play_Port,Y( `. J# Y# U+ Y# {
  1770. STA <JSR_Addr_H' k9 u; b( s/ P- W6 n+ W# m' G
  1771. LDA #$60/ m, r- O. Y6 }7 o; x/ x' s
  1772. STA <JSR_Addr_Rts
    ; f3 _  m! N: M# _& N% D& o( O' Y6 w
  1773. PLA
    1 c1 F& X) J1 k
  1774. RTS6 }0 j5 j" x  q+ `9 {
  1775. / w/ t- q: j3 ~8 B2 I+ b
  1776. Set_Sound_Reset_Port( n" t; R2 E4 B! J3 A9 X7 B' F
  1777. PHA
    " ~& ^& H6 l& [2 W" Y
  1778. LDA #$20
    ; L# D# Z' d+ C) p2 u5 t8 v, ]
  1779. STA <JSR_Addr_Op
    : C, l* V. L, j2 Q" |# h+ n
  1780. LDA <Music_Item_Cur- v" N1 l; H" b# S" Y, N) g
  1781. ASL A
    , b' d8 ?' T" P9 {
  1782. TAY
    " Z8 _% d# C7 O7 R- N( W
  1783. LDA Sound_Reset_Port,Y
    ! A/ t* E. M8 U5 H" x! A
  1784. STA <JSR_Addr_L
    7 N- H7 B2 J  V0 ~+ }' F
  1785. INY
    - ~- g& |9 @) E: T# `# V
  1786. LDA Sound_Reset_Port,Y) _" [, A# X! a5 m, D6 l& F
  1787. STA <JSR_Addr_H8 x8 w4 n& V, `- K! a  ^) T. }
  1788. LDA #$60
    $ k, U3 p+ M; I
  1789. STA <JSR_Addr_Rts! o* t$ m- @5 \, ^0 M% {' H, u4 o
  1790. PLA1 s& ~) v# w# G8 Z
  1791. RTS
    . y- L! X4 h2 a. Z+ B

  1792. / \$ M0 j" `  f5 S' |
  1793. ;初始化音乐bank
    & S9 M6 h/ u# r; J9 q  R
  1794. Init_Sound_Bank( G" x0 d# X2 C7 M
  1795. LDY <Music_Item_Cur' U% l1 R4 L+ J
  1796. LDA Sound_Bank_8000,Y
    . k& n1 r1 ]; O. E0 d  w" U1 H
  1797. STA <Music_Bank_8000
    0 \: `7 F6 e% O3 j
  1798. LDY <Music_Item_Cur! l! {' r$ ~: ~' @
  1799. LDA Sound_Bank_A000,Y( d  ]/ z7 g9 o; R% t
  1800. STA <Music_Bank_A000' _& q  ?# i+ `$ w- m1 v) J- _# {
  1801. RTS* n5 P3 A  f# m. e  g( E

  1802. 8 c- ]  ~, v, u% F, X. q1 S
  1803. ;==================================================
    8 ^5 U! ^4 m8 k! p( S% O4 t. [
  1804. Sound_State_Reset;音乐状态重置
    , S9 @1 |+ k3 n+ c0 {7 g
  1805. JSR Music_Bar_ReSet        ;重置音乐条
    7 B; a) p" n* p
  1806. JSR Time_ReSet             ;重置播放时间' r+ V' k7 B. |9 `. g' z
  1807. ; _* n5 X$ v- A9 ]! N
  1808. LDA #$009 h3 _: r1 L( U7 p2 G% m
  1809. STA <Music_Stop_State" z% C  Q8 R: h- d0 v8 N
  1810. JSR Music_State_Show       ;显示播放状态" n9 l/ J, q' [( {* M  q  \
  1811. % Y, y/ {% `0 G* |1 U9 y& J3 ?( y
  1812. .IF Track_Name_Pos
    & N4 }6 S, R9 s; W
  1813. JSR Show_Track_Info        ;音乐曲目名显示! x1 u. x; P, X/ E  B7 y
  1814. .ENDIF
    ! o% i5 @% o" i1 z% G' V
  1815. & ]+ a5 ?3 }; Z; _1 |" h/ ~( l
  1816. RTS
    ' v2 \' H5 E% d2 ]

  1817.   S  X  B/ \: k7 ^
  1818. ;==================================================
    + H% u7 u# U3 A  o
  1819. Sound_Init_Proc;音乐初始化处理
    % M7 g- T" v; _7 X9 T8 b0 e! q! Y
  1820. PHA
    ! Y; f& T8 Q+ q3 f2 ~' [
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址
    ) P0 J" }" Y2 s( L  C7 C
  1822. LDA #$00- e  V% {3 X! _
  1823. STA <Scroll_H               ;重设水平滚动/ c/ E8 c! @2 @6 S5 y
  1824. LDA #$0F8 m" O! X+ K& u+ t+ v5 U! u
  1825. STA APU_STATUS, B, m- G; M& I) \3 _) z
  1826. PLA0 ]4 y/ C3 K2 h: x: G( S  @
  1827. JSR Sound_Init             ;音乐初始化9 g' F& [1 M; g2 C5 f# q
  1828. JSR Sound_State_Reset      ;重置音乐播放状态5 C7 z1 z: X* Y% s  j6 S4 j
  1829. RTS) h  E6 `& @% k6 P. j$ x9 J

  1830. : w; O/ A2 s: W8 _: ?* r
  1831. ;==================================================4 q! p8 e4 H3 b  A9 p$ @: [
  1832. Sound_Play_Proc;音乐播放处理$ v$ v: ?6 r. \5 \; ~. F9 A  h; u( D
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址9 C1 H: P. f+ X. h
  1834. JSR Sound_Play             ;音乐播放$ l/ a  z8 s8 L9 r
  1835. RTS: u5 V+ J! s% z2 W
  1836. % b7 }' W8 X% g% s
  1837. ;==================================================3 b5 L+ H/ i8 N9 [- H: Y* M5 V8 E& X* N
  1838. Sound_Reset_Proc;音乐重置处理
    8 c5 J! A3 \8 s- p6 T& b
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址
    ! }$ k  t- B) O: q5 P
  1840. LDA <JSR_Addr_L% j' ~) ?9 b( h3 a: q2 C
  1841. ORA <JSR_Addr_H+ l7 V  k  o1 z! @2 B6 i  L( O
  1842. BEQ Sound_Reset_Proc_Default
      s8 u6 C5 ?! o3 |3 {6 X
  1843. JSR Sound_Reset            ;执行音乐重置
    * Q$ S: ~! j) C) }6 J# n, ^
  1844. JMP Sound_Reset_Proc_Init_Sound% ]. X) V6 g* P2 \5 M- k3 A# b
  1845. 2 ^$ I. Y# F2 A* b6 K8 W# P
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理, a; H# O* N/ z& ~7 l

  1847. & U4 U0 G+ J0 K( s* d
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断
    - T- U! a* p$ b. R, h5 u! B
  1849. LDA #$004 ~5 \- W, ^8 _' h1 X5 w$ B
  1850. STA PPU_CTRL% h; a2 D% ~& V+ \# y0 n9 ~
  1851. $ S8 _/ j! c- f4 i9 d) b
  1852. JSR Sound_Data_Clear5 j2 F+ e# U2 A9 x- i' A
  1853. - H( e: ?4 [4 u, V
  1854. Sound_Reset_Proc_Default_Wait
    : }: M6 {  T5 F+ a, A9 K1 E
  1855. LDA PPU_STATUS
      I* V1 R8 `' P: R2 _
  1856. BPL Sound_Reset_Proc_Default_Wait, D) D" t8 I9 l$ Y) |8 S+ @
  1857. 9 ?2 s& R& ~2 ]- z& d
  1858. LDA #$00
    1 P/ w5 w. _5 }/ e. h
  1859. STA PPU_ADDRESS8 w5 R; b! {- `
  1860. STA PPU_ADDRESS
    & c: z: g0 t+ {0 S+ s) V# p& ^# n
  1861. STA PPU_SCROLL
    7 \; y0 H; a/ ]& Q: Z
  1862. STA PPU_SCROLL
    * ]" u' x1 H! R/ K

  1863. 6 A& o8 X- [- j
  1864. ;恢复PPU控制4 b5 {6 o# {. o* c3 q5 K5 i# r
  1865. LDA Screen_Ctrl
    8 u+ Z) J% Y$ ?8 h
  1866. STA PPU_CTRL
    $ O5 w. W* M$ B% o* i

  1867. 9 S! ^4 `% j0 |
  1868. Sound_Reset_Proc_Init_Sound  h: W; [6 ]3 Y' U# ^) }# C& }
  1869. LDA <Music_Stop_State
    1 ~% I% @$ ]" [0 J) q. K& E
  1870. BNE Sound_Reset_Proc_End
    8 k# ^* X# V( I9 f
  1871. LDX <Music_Item_Cur) e$ ?% P4 }1 _
  1872. LDA <Music_Cur,X
    ( \# T( o& c9 L/ y* X% U7 @
  1873. JSR Sound_Init_Proc% [" F4 `1 d3 X0 S
  1874. Sound_Reset_Proc_End8 W! E0 B0 h7 s5 B
  1875. RTS# {- ?; e4 k: Z  K
  1876. , b$ H  |3 x) B+ N$ E, X
  1877. ;==================================================" k5 C5 M9 W1 r
  1878. Clear_Item_Text;清除页项目3 I9 Z9 H4 {6 ^2 O/ A
  1879. LDX PPU_Cur
    4 g+ e/ [2 ^( D3 l. w
  1880. LDA #PPU_MODE_CNT_CLEAR
    + J, ^# h. i$ s" b4 v! t
  1881. STA PPU_Addr,X) D( s8 y- O( q4 `
  1882. INX$ r3 c' C; ?' X

  1883. 5 H5 |( F( g* G' ]; Q4 O
  1884. LDA <Page_Last
    ; q: R5 [. {0 c1 q% z2 O4 y
  1885. SEC
    # X# ], Z" }. y1 X+ C
  1886. SBC <Page_Last_Index: n& M# }1 k' P
  1887. ASL A
    0 V( b6 n$ U! {" A7 m% Z# U+ _

  1888. 1 n3 Q' d5 u5 E: \  G1 a
  1889. TAY9 o7 |4 U# F  T) ?  h, s! N( t; G
  1890. LDA Item_Pos_Data,Y, p( @/ V# e" o5 q- `
  1891. PHA5 ^6 e+ @3 j& I/ }0 A, M4 ]
  1892. INY
    ( K& h$ ^! W- L6 O7 q+ m5 E/ p: g
  1893. LDA Item_Pos_Data,Y* Y2 R- S- m1 m' ?' G
  1894. STA PPU_Addr,X
    , t7 X1 ?+ e- t! V  W4 s0 U
  1895. INX& j6 ~, k2 ^( k+ z/ O
  1896. PLA
    1 Z( G: S7 ^& y$ J
  1897. STA PPU_Addr,X  E; h0 J1 V  S
  1898. INX
    5 ~6 \6 g; k  _# O# O9 S5 g. H3 \. E# p
  1899. 6 u) U( W! z/ R& w+ F0 u
  1900. LDA <Page_Last
    # ~+ e+ x) S# {: }1 R
  1901. ASL A
    " K+ r( w/ L# b3 K
  1902. TAY
    + [  {1 t. c2 v% s7 n
  1903. LDA Music_Collection_Name,Y/ z8 `7 e, e5 k' D
  1904. STA <Data_L
    ) R) K$ o# x' Y5 d9 \
  1905. INY% M  c2 @5 U' f  r* A- z
  1906. LDA Music_Collection_Name,Y5 }+ q% y2 x! Z% T  |8 J
  1907. STA <Data_H
    3 Q& J8 K# m- ~
  1908. # R* L9 P" o9 N2 N% n0 }% a
  1909. LDY #$00- s, K) n, u7 ~7 }9 C7 O% _5 O% M. k3 L
  1910. LDA [Data_L],Y
    % H  f' y0 p5 _6 f2 z, X
  1911. STA PPU_Addr,X1 O, m+ Y+ n3 C$ G# I: J& _
  1912. INX) }, b) ^* Q; X0 Y5 B1 U' Q
  1913. Clear_Item_Text_End( o5 K. m; `7 j+ d' P! `) Q- ^
  1914. STX PPU_Cur% t! E- c& G6 e& _
  1915. RTS
    % y5 K! b4 O7 N3 ?

  1916. : d- L- a! T( X/ ?4 j/ O5 j
  1917. ;==================================================
    6 N8 K% i' Z$ E+ L! d
  1918. Show_Item_Text;显示页项目; C  @1 X& R! s
  1919. LDX PPU_Cur
    ; _) D4 J" T, t' k
  1920. LDA #PPU_MODE_CNT_LINE
    , D+ Y3 K* c* n' j. u/ b7 \, g
  1921. STA PPU_Addr,X1 v: q: S# ?7 l" D; i% y
  1922. INX
    , K8 X+ ^1 i" u# ^/ @/ \; @
  1923. LDA Page_Cur
    , r8 g+ a' K: \7 r# X
  1924. SEC$ d9 _- U# J$ z  o7 j0 p9 S, I7 Q
  1925. SBC <Page_Cur_Index* c6 |! d7 y: T* ^7 z1 b- A
  1926. ASL A% C9 Y- g7 W) _, U( a% q7 ^6 u
  1927. TAY9 W/ E: d& q6 ~' `; f: u
  1928. LDA Item_Pos_Data,Y7 v; Z+ h" w3 U3 A3 h& o
  1929. PHA
    * A% p6 p* i) F3 a4 j' s# ]! R
  1930. INY" x$ N* q7 ~' n) ?  ~
  1931. LDA Item_Pos_Data,Y
    & }( [: Y/ _0 n- r' T! ?. f
  1932. STA PPU_Addr,X
      g5 t4 h3 ^# r* Q$ @- U: B# o
  1933. INX) x( ~) S+ D$ V2 z) x
  1934. PLA
      s  O/ R( H7 U$ x# y$ q$ z
  1935. STA PPU_Addr,X# w9 q# Y' A4 e. p7 q$ ^9 o3 H
  1936. INX5 X6 u* |7 t8 K$ u2 r# s
  1937. 4 j- w, {9 h6 ^  J$ `
  1938. LDA Page_Cur
    2 `3 U4 a( L- r  _9 O
  1939. ASL A
    - M( v& [, G. q4 [8 k3 X
  1940. TAY% o. V. H9 z& F" z( r1 \
  1941. LDA Music_Collection_Name,Y
    4 C; H8 P0 S* W9 ^- G
  1942. STA <Data_L
    - m! N' o5 Z* l7 d
  1943. INY
    & \, D( Y& {2 P5 H, t5 @
  1944. LDA Music_Collection_Name,Y
    / U8 `$ p+ \  c- [4 }! `- h' ^! |
  1945. STA <Data_H
    & X" W0 _8 i; q# c( P; |

  1946. 6 \9 Y2 U9 l& ~' Y/ P; J) i' _' d* h
  1947. LDY #$00, P' I. L. }! A* J
  1948. LDA [Data_L],Y
    % f. V7 Q  g' o5 u+ z9 P
  1949. STA PPU_Addr,X. M. \# ]5 M/ O& J' |8 G6 {
  1950. STA Data_Cnt2 K) R/ }: b4 ~% F; B6 W
  1951. INX1 T4 u% k# O( ~/ X- {0 U, X- a' V7 D

  1952. 9 V5 j- {4 B0 e: e
  1953. INY
    - u0 y$ ~* t$ O9 L+ T$ E
  1954. Show_Item_Text_Write
    8 E+ ?+ l) C+ C7 v) ]
  1955. LDA [Data_L],Y6 E" a6 t( v, p& t& d3 b7 I
  1956. STA PPU_Addr,X  J2 W8 y) x% l4 d- m
  1957. INY
    3 W0 O; `* N7 D  t/ e+ {
  1958. INX
    # {2 Q) i4 n; L- N4 o  O) n  U
  1959. DEC Data_Cnt
      l4 Y8 d; H  b# Y
  1960. BNE Show_Item_Text_Write
    ' d8 E. J1 e- U7 }" c' ]

  1961. $ M( q0 o( Z9 \3 w
  1962. Show_Item_Text_End
    7 J) K% r) P0 P6 A
  1963. STX PPU_Cur
    6 g6 N% [5 ~& o/ a8 A! `: `
  1964. RTS8 S4 K" }, Y  W

  1965. : {* P* j+ D: e" t% U
  1966. ;==================================================) Y2 C1 @# V2 W) F- d
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量
    0 R/ D: X% a: z# ]  d; p
  1968. STA <Data_Buf4 T* n0 @! T7 C+ f% Z3 [
  1969. LDA #$005 l" X- m. W8 O$ ]) i& t$ A! \
  1970. Get_Page_Index_Calc5 j: ^$ Z  [7 G" U! b$ O. ?. Y
  1971. CLC
    & b! F2 G) Z& W! E' w- f: r. ?+ u
  1972. ADC #PAGE_SIZE
    ; Y  p: J2 ?& A" [. w4 e  D1 l
  1973. CMP <Data_Buf
    . t- _: W# [  @" ^. z% J4 ]
  1974. BCC Get_Page_Index_Calc$ E/ p1 d7 q+ n% c. b
  1975. BEQ Get_Page_Index_Calc_End
    6 E% E  @8 d3 O
  1976. SEC7 B9 a9 ?5 Z( f0 |& w
  1977. SBC #PAGE_SIZE
    9 b1 ?( v7 Q8 I' d/ r
  1978. Get_Page_Index_Calc_End
    + u2 c& ?* r) _/ @( O  m8 w
  1979. STA <Data_Buf
    1 R- x3 D8 @: h( m- b, f; E6 l
  1980. Get_Page_Index_Cnt3 y# f2 e1 c/ e5 h
  1981. LDA #PAGE_SIZE, I+ R( R6 y  I( L0 n/ q! R4 V
  1982. STA Data_Cnt' r' K+ ~: E5 v* Z( U4 Z
  1983.   W5 C! G% F  \& l0 m) N, J8 l
  1984. LDA <Data_Buf
      F/ D0 W; h3 U9 t- `
  1985. CLC
    1 C8 W/ F' I, G$ c: `
  1986. ADC #PAGE_SIZE5 c: U  J+ O6 O4 K& C
  1987. CMP #ITEM_MAX_SIZE
    ' i2 V0 i2 C: {- |+ g3 \1 G
  1988. BCC Get_Page_Index_Cnt_End  D( l" d- M$ m/ }/ j' d- V, d

  1989. 0 ^8 i( M+ j* P
  1990. LDA #ITEM_MAX_SIZE- E; d7 i! O7 c; b
  1991. SEC' [" @, @0 m7 M# y; F, g- P* G
  1992. SBC <Data_Buf
    - S& h* v: ?$ \1 _0 }
  1993. STA <Data_Cnt
    ; l  `. r' [* q: E# G( z
  1994. % a6 L5 m+ z6 w
  1995. Get_Page_Index_Cnt_End
    ( l1 C$ l+ `8 {. ], }3 g+ B
  1996. RTS
    - ?7 p  M5 C# \+ Y

  1997. + a: _$ ^2 ?) }/ N9 h; O1 V
  1998. ;==================================================
    6 C7 K' G' |* Y5 Q! I* P- Z- V" l
  1999. Get_Last_Page_Start_Index/ j9 Y8 d' Q) F
  2000. LDA <Music_Item_Last* U/ k0 ]! p9 I' r; ^' @% L! e/ [
  2001. JSR Get_Page_Start_Index
    * X" C4 o% m9 p7 f
  2002. LDA Data_Buf
    * P$ y; ?3 s5 E
  2003. STA Page_Last
    : t  G: J. {0 l% O
  2004. STA Page_Last_Index  \% D1 K) V0 j8 C1 ?+ t
  2005. LDA Data_Cnt
    9 i$ k+ o' i4 H8 H% M5 n
  2006. STA Page_Last_Cnt
    & \/ K8 _: ~' g5 }9 l: w$ {/ Z6 W5 ~) ^
  2007. RTS
    + y0 W' z4 @7 T* w1 T

  2008. & d* `* Q7 o, X, F  }9 i
  2009. ;==================================================3 e) |. U0 s" O  W, M2 I. p
  2010. Get_Cur_Page_Start_Index: \) D/ m3 s' t2 v
  2011. LDA <Music_Item_Cur
    / z5 X2 F, T% Q  @! ^; k
  2012. JSR Get_Page_Start_Index5 y# T' H7 p  Z! P3 `
  2013. LDA Data_Buf
    + E7 _# i- Y% z0 N
  2014. STA Page_Cur
      E. J0 T! U( j* Y
  2015. STA Page_Cur_Index
    + G: `0 W4 n6 `. D5 x; h* ~
  2016. LDA Data_Cnt' A/ R+ R0 U* A" y& v8 n9 o) }- T9 @
  2017. STA Page_Cur_Cnt
    7 Q2 L; B# n0 ~# q' U' g; @9 t( a" ?
  2018. RTS
    # n$ Q" H7 ?3 l2 N8 {; Y5 r6 M
  2019.   Y& v$ Y% J2 Y* X: M
  2020. ;==================================================
    & j, f5 J( ~2 g0 I: c! ~
  2021. Show_Page_Text;显示页文本
    + {5 e+ E9 d  r  D
  2022. LDA <Text_Disable_Flag( T5 x5 K  x! r7 F! i$ l
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM
    ! ^4 M: `7 ]- j9 x4 `$ E! g( [- a
  2024. STA <Text_Disable_Flag
    % M) X3 s' _3 H

  2025. 8 _2 K5 y- R1 Y, Y* `
  2026. JSR Get_Last_Page_Start_Index
    ; `4 x- d  f1 x& j/ F
  2027. JSR Get_Cur_Page_Start_Index3 Z, p  U4 Q& q8 p

  2028. 0 e# m# _# Z; T1 n& M
  2029. Show_Page_Text_Set% a9 v9 w( p, V. D. q
  2030. 5 |# `' X: n; i
  2031. Clear_Page_Last_Item;清理上一页+ g* U/ X/ O# e; x9 F4 E
  2032. LDA Page_Last_Cnt7 C- n4 h. t+ d% N8 ]
  2033. BEQ Clear_Page_Last_Item_End5 I) D2 e. G" x- d* N
  2034. JSR Clear_Item_Text: d! n$ k4 ]  F
  2035. INC Page_Last
    / n0 U  O3 A* ?# ^+ W
  2036. DEC Page_Last_Cnt
    1 r/ k" J9 i# d
  2037. Clear_Page_Last_Item_End
    - ]0 U" w) J: A8 E4 W8 G
  2038. 4 z' ^3 w, y3 i
  2039. Show_Page_Cur_Item;显示当前页0 C/ a0 M( h7 }7 q
  2040. LDA Page_Cur_Cnt
    1 J6 {. N$ ]/ a/ `; y: q
  2041. BEQ Show_Page_Cur_Item_End
    ( j# R7 l9 c  K
  2042. JSR Show_Item_Text$ w$ X/ c% j; P
  2043. INC Page_Cur" E1 f6 p9 W9 I4 c& j2 o) k
  2044. DEC Page_Cur_Cnt
    2 W0 i% l! o- ?, P8 `/ h
  2045. Show_Page_Cur_Item_End
    9 z6 y: c  o, A+ D6 I
  2046. $ z2 ^9 J2 C" h0 o( R
  2047. INC <Time_Wait_Cnt; @" e7 T  T! X0 j/ X
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作) |& F6 u3 n/ Z; V7 `8 g
  2049. LDA <Time_Wait_Cnt% {! w. |& S9 z" q% M
  2050. BNE Show_Page_Text_Set_Wait
    8 Y( G$ b" j5 k( p

  2051.   D2 F: ^4 N5 f; Q
  2052. LDA Page_Last_Cnt
    % c8 X  G' b% `6 l9 p
  2053. ORA Page_Cur_Cnt6 H" m4 _6 @! }, o- N6 b& q( E
  2054. BNE Show_Page_Text_Set
    1 [0 U* h% F1 ]$ N% D' N
  2055. LDA <Text_Disable_Flag
    / w" g8 G! o% G
  2056. AND #TEXT_DISABLE_ITEM ^ $FF+ g' G1 `9 R& {% J' n8 R- U# V
  2057. STA <Text_Disable_Flag
    . b6 z' O, W& h8 U) |
  2058. RTS
    : y( s$ d) h4 @& s+ i

  2059. 4 \: F/ b# N0 H: ?( N' d4 ^$ J
  2060. ;==================================================3 r1 s9 D+ B1 [+ V% C! i
  2061. Last_Item;上一项" F. L3 f6 C$ h5 Y0 l# g3 s' C% {1 h8 x
  2062. JSR Clear_Last_Track_Name
    7 V: d& S+ H0 i+ `* M7 u1 F) ~
  2063. JSR Disable_Text_Draw' l7 ?' k" a7 @8 r; |

  2064.   J# X- A7 @* n5 R/ Z! J- O
  2065. LDA <Music_Item_Cur# ?7 N7 D  @3 [2 h9 }' Z3 J# x
  2066. STA <Music_Item_Last
    - E/ o' E* c1 n! p9 R
  2067. 4 F! w6 @# t" G# J6 N7 K7 i* x
  2068. JSR Get_Last_Page_Start_Index4 ]3 O; X! M! M
  2069. ( p, }0 C8 r5 t2 T9 I
  2070. LDA #$00
    6 K1 M1 M2 j8 C
  2071. STA Data_Buf
    6 F0 g( |- }1 ]9 \2 t3 s, ?3 a

  2072. * ~0 l1 p) N9 x0 z  n- a3 t1 P
  2073. LDA <Page_Last6 I" @* y# b) ~+ [6 n, I% S; Y* [4 ]
  2074. CMP <Music_Item_Cur
    9 A& C/ }: Y% l: Y. s! z  Q9 I( s8 I
  2075. BNE Last_Item_Begin+ P' [/ ]* p" m8 }
  2076. ( S8 i2 A- @( r1 Z+ `3 _8 W/ Y
  2077. LDA #$018 h4 @( t/ v) l; J
  2078. STA Data_Buf; `; f: U& k! g$ e# q
  2079. Last_Item_Begin# q: f8 t5 e9 R1 e. B' h, o, C
  2080. LDA <Music_Item_Cur5 V, b& N) R' z% E; H& |, |, ^- F! U0 f; \
  2081. BNE Last_Item_Set
    # V! R6 G1 k2 m& y0 m; v
  2082. LDA #ITEM_MAX_INDEX + 1% ?/ X7 X% N" e
  2083. STA <Music_Item_Cur! _- }( ~6 u1 m5 U4 Q4 U

  2084. : E( W6 x/ Q) y
  2085. Last_Item_Set+ ~; z1 h$ H' C8 E4 k
  2086. DEC <Music_Item_Cur; E7 P- T4 A7 J1 K; v% G2 r
  2087. LDA <Music_Item_Cur
    ' x5 w$ R( X4 ~( b: {. j- I$ {
  2088. JSR Reset_Current_Music. q, C. W+ U# Z. M
  2089. / R* g, H8 ^) t& a! @& B' E
  2090. Last_Item_Play! |% S" o4 d$ r7 |+ d9 u
  2091. LDA Data_Buf. t7 Q/ w/ l" d5 w- f/ G6 K( G2 {' {
  2092. BEQ Last_Item_End
    / \8 y$ D9 w* v6 q' }3 S% Q
  2093. JSR Show_Page_Text
    2 y; n1 a# S! l3 A
  2094. Last_Item_End
    + Z! _7 H% u: P8 F
  2095. RTS
    - g8 B7 A2 E0 t. @. q, X
  2096. $ k9 k& E& e4 J* t+ Q
  2097. ;==================================================3 ?0 I8 @$ Z7 E8 D2 p! F/ \/ C6 ?" A
  2098. Next_Item;下一项
    2 h, S% u* @9 W% H+ u( w' \
  2099. JSR Clear_Last_Track_Name
    2 a: [+ q$ ^, P6 I+ G1 ~; p* d
  2100. JSR Disable_Text_Draw
    ' Q0 x+ H" S$ |* ~, I
  2101. ; v4 G# l3 O9 e! R* y$ [
  2102. LDA <Music_Item_Cur6 g* y1 i6 A7 @8 Z; U$ u
  2103. STA <Music_Item_Last
    6 p6 j: _" t1 g( @3 C; n

  2104. . Q6 s, O5 b* P' @6 C0 A8 V, |4 J/ [
  2105. JSR Get_Last_Page_Start_Index$ l4 ?9 C/ m6 a) B7 T$ K- Z  k

  2106. + f9 u. ~% [2 P2 h& Z/ E, W
  2107. LDA #$00
    1 X/ r- e2 z* j9 a
  2108. STA Data_Buf! y: D% h$ [+ F
  2109. , B# c. g8 z5 J: d" I# n& U7 L
  2110. LDA <Page_Last
    5 O( O8 A9 C* j3 K$ I+ P
  2111. CLC
    : ?% F" A# N" J/ ~7 F& F+ u' y) K
  2112. ADC <Page_Last_Cnt3 I1 M3 Q6 @( v/ \
  2113. SEC
    & q5 c2 ]5 ^5 @$ c
  2114. SBC #$01+ |0 D. K# ?, w: c3 }( X7 I4 T9 ]
  2115. CMP <Music_Item_Cur6 t# r$ D  X2 r4 @
  2116. BNE Next_Item_Begin/ o! A) B" b0 `7 j8 x6 s. [
  2117. + w7 P* t: u) @# P- N
  2118. LDA #$01
    ; ?  ?. Z& P0 o! {
  2119. STA Data_Buf
    2 Y4 |9 @( G; R  R
  2120. Next_Item_Begin
    - s' C% `5 y9 W& h# N% x
  2121. LDA <Music_Item_Cur
    3 F4 P4 N  O5 Q( g
  2122. CMP #ITEM_MAX_INDEX  s5 \9 m* P7 F% h* D' A
  2123. BCC Next_Item_Set; u- v7 w9 h0 I: a
  2124. LDA #$FF& E$ j1 x" a9 O: Q
  2125. STA <Music_Item_Cur
      [6 `, |/ h0 R! Z2 [* q6 ~
  2126. Next_Item_Set
    / U, K' ]$ c0 j% K
  2127. INC <Music_Item_Cur
    ) v, \- e3 W6 P- e1 J& J* I* Y
  2128. LDA <Music_Item_Cur
    # Q: x: {9 `2 c7 A
  2129. LDA <Music_Item_Cur" W% @. d) U  @# ?$ k
  2130. JSR Reset_Current_Music# F9 D, b/ P& A3 s$ P' y
  2131. Next_Item_Play# r6 j8 J) F9 K9 H& y. N
  2132. LDA Data_Buf
    ) V# B# N* x  ?1 D
  2133. BEQ Next_Item_End( h5 s9 |- F$ l1 k: [0 u& t3 B
  2134. JSR Show_Page_Text, R& h6 D: p, E# ?. y+ [/ M
  2135. Next_Item_End
    2 }- @' d* j+ R+ s+ q& H
  2136. RTS- [3 e' N/ m1 c) z
  2137. 2 ^) D" i! i* H% n
  2138. ;==================================================; h( [* K, }- O% K1 _* B' s) X4 I
  2139. Last_Page;上一页2 r6 W5 f( r8 F
  2140. RTS# J, ~% d7 @7 q" E7 M

  2141. $ b- d5 ?+ F' v, ^  `; c. L
  2142. ;==================================================6 p- v+ X0 m$ V. Y2 F
  2143. Next_Page;下一页
    & w' Q8 d3 S3 {' A7 W
  2144. LDA #PAGE_MAX_INDEX7 x3 c2 y% a; o2 a9 m
  2145. CMP #$01: s3 W' u9 m2 ?% a
  2146. BEQ Next_Page_End
    ( F6 G2 {4 W" Y4 |+ e

  2147. - S1 S& P% f6 F
  2148. LDA <Music_Item_Cur3 p; c- Z* t+ N5 n
  2149. STA <Music_Item_Last
    7 o* ~' k5 _' h7 L4 g

  2150. 6 E: p' m+ M" M6 n0 i
  2151. JSR Get_Last_Page_Start_Index$ B# x+ J1 o0 X
  2152. ! _6 D7 y) F; a; j( ^" q
  2153. LDA <Page_Last_Index! u! w" k  m: j# y
  2154. CMP #PAGE_MAX_INDEX  _7 m& y- w7 _; E$ v) n/ i
  2155. BCS Next_Page_In_End_Page
    : ]% i: Y3 i- }  N

  2156. % ?; d% R- H7 [. [- S
  2157. Next_Page_Not_End_Page;不是在最后一页
    0 V" C- B" y, l2 W7 g8 X/ B
  2158. LDA <Music_Item_Cur3 w2 T* A) A  @1 P2 T& j9 A: y& A
  2159. CLC0 z7 f! E& h; a* O# X6 G
  2160. ADC #PAGE_SIZE$ ?) h) J% j: P0 {$ p; ?" E4 {
  2161. CMP #ITEM_MAX_SIZE
    0 ~5 Z% Z; j. x5 ?8 k
  2162. BCC Next_Page_Not_End_Page_Less5 u: V) J& `' [, D! C
  2163. LDA <Music_Item_Cur- C8 A# {  b* D; c# @* ~% t
  2164. SEC
    ' ^; l1 Q; d8 k& B5 N, T* \
  2165. SBC <Page_Last_Index3 F' C: P1 ~7 G9 J: d9 k
  2166. CLC  z# c: q6 e" L/ g# X
  2167. ADC #PAGE_MAX_INDEX, s( @& C+ V7 G$ J
  2168. CMP #ITEM_MAX_SIZE
    + u/ a- S6 P# E- ^$ Z% b. i
  2169. BCC Next_Page_Not_End_Page_Less
    8 i) E- ]* J/ P; l8 @% |% \! g1 N$ r
  2170. LDA #ITEM_MAX_INDEX
    ( o4 Q2 j: I1 H  j5 w) W2 ^0 H
  2171. Next_Page_Not_End_Page_Less
    & m$ b  n1 f; ?. }# w; B/ v" q1 v& `
  2172. STA <Music_Item_Cur) u' U- V- W- F7 N# c: z
  2173. JMP Next_Page_Reset* {; J! [3 a! O8 T

  2174. ) u% x- _" ^$ {3 t9 y) X7 L5 Y- @
  2175. Next_Page_In_End_Page;在最后一页
    ( @* s" t+ Q5 t8 @. [2 ?) U/ R
  2176. LDA <Music_Item_Cur* ?1 P9 A2 H2 u; V3 X) H
  2177. SEC6 N1 {" D$ M( n5 w; z
  2178. SBC <Page_Last_Index
    + g- |: g- r3 t! K# N
  2179. STA <Music_Item_Cur2 x0 F+ S9 B# Z6 ?
  2180. 7 i. A, k. W1 r6 K; J4 I
  2181. Next_Page_Reset
    9 q' R2 S# X, E
  2182. LDA <Music_Item_Cur+ I9 W  Q- L9 n4 _: d& f
  2183. JSR Reset_Current_Music
    ( W5 N7 n8 h7 t4 X& A' ?3 B
  2184. JSR Show_Page_Text! l0 _3 s0 Y' e1 ^/ P
  2185. Next_Page_End
    0 y! Y- l6 T  @% S6 c
  2186. RTS- g2 ~  m- t( p
  2187. / t1 g, ]# K) i& {1 |- M; H
  2188. ;==================================================
    % ^2 ^$ S% w- i7 j; p# g
  2189. Disable_Text_Draw;禁用音乐条刷新
    + y) X" k6 Q( F7 B( V, N
  2190. LDA <Text_Disable_Flag
    ( c5 Q4 z) E3 a6 E- v& g
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME0 X# f9 _) ~4 _# Y6 U9 a, k
  2192. STA <Text_Disable_Flag
    9 t; r! ]3 P/ q! I
  2193. RTS
    + }* g+ e8 _7 S& n

  2194. : Q, X% V4 L; B* z  L0 d
  2195. ;==================================================
    2 _7 i* S1 x0 T/ P
  2196. Clear_Last_Track_Name;清除上次曲目名; G9 q6 I: c- s8 ]7 h& p/ k
  2197. LDX <Music_Item_Cur+ Y4 D% W8 e9 n2 u/ ]4 ~
  2198. LDA <Music_Cur,X! `9 K9 ^6 W7 T$ \1 }
  2199. .IF Track_Name_Pos
    4 a0 r+ {  d8 R
  2200. JSR Clear_Track_Info- ^7 C$ W3 y& f3 C. I$ K, G
  2201. .ENDIF
    / X% b. s. E8 b: p/ N$ P+ ^
  2202. RTS& V, a6 O& {; d4 K- Q
  2203. * K7 f1 C' w5 }- j9 x% L6 L, W
  2204. ;==================================================
    " x, j& D2 c+ V$ g& C% `1 |1 g
  2205. Reset_Current_Music;重设当前曲目
    0 L  ~3 I# e4 F' ]* e4 b3 F
  2206. " Y5 U4 n. N& c8 v  L% {
  2207. ;写入当前总曲目" d8 J! }: t- s! u1 s3 @8 `
  2208. JSR Set_Sound_Total
    ! P1 C; Y0 g- c0 L5 p6 N
  2209. LDX <Music_Item_Cur
    : m2 z& T7 k& M

  2210. ! r' H/ r/ M9 U3 N5 D7 N) i
  2211. LDA #$00
    : }- R# ^0 d6 V% ]  s# Q
  2212. STA <Music_Last" E% k( W' R' N! M+ G8 @
  2213. $ @+ q# }* o" `
  2214. JSR Sound_Reset_Proc
    9 ^0 b% G' F( D  Q! k. W+ L& R
  2215. JSR Music_Show2 z9 N) n5 z4 ~
  2216. RTS1 |) e) y0 A% H( g

  2217. + ~; N$ Q( Y6 Q
  2218. ;==================================================. |* P8 o) w+ y
  2219. Music_Song_Stop;音乐停止
    $ D6 S8 O7 R7 b' \- Z1 S
  2220. LDA #$01& a$ M' U2 C" E
  2221. STA <Music_Stop_State
    * c) T2 V, {- @
  2222. JSR Music_Bar_ReSet) o3 U* J% \2 v* C, b
  2223. JSR Time_ReSet5 {: {  d/ m' |  O0 X: P. U
  2224. JSR Sound_Data_Clear' \9 L6 W% u) W/ @- z0 c0 F! s; m
  2225. JSR Music_State_Show
      ?* y$ l( E+ e; {, M3 k
  2226. RTS
    : p* A& F1 e$ L2 W3 r1 ^

  2227. 7 O0 _! b: e% N
  2228. ;==================================================
    ! l  Q  `8 v2 K* @) [; a- Y
  2229. Music_Song_Play;音乐播放
    , {7 @! d  u/ ]
  2230. LDA #$00
    . r% Z2 E% ]: W+ s
  2231. STA <Music_Stop_State
    8 l: |6 Y3 @* F8 \2 {% T
  2232. LDX <Music_Item_Cur' E1 z3 G( S# T! y5 n; S8 f
  2233. LDA <Music_Cur,X
    ! `# b% X. F# H! E0 z  i
  2234. JSR Sound_Init_Proc
    ! v" U' }2 ?' f: F# S) x0 L" u
  2235. RTS
    ) t& R0 O) t5 p$ X" e" K
  2236. ( E) e1 V3 G7 N: T% h5 G6 ?
  2237. ;==================================================
    & }: n/ S7 Z5 @* ^+ N. b; h, k& [
  2238. Music_Song_Last_10;上10曲7 I- _3 }! Z0 ~" z0 u$ d
  2239. JSR Clear_Last_Track_Name1 n! c6 i( }( X) Z2 H3 b+ {5 I- x
  2240. JSR Disable_Text_Draw- L; k8 C: t/ D" e8 \
  2241. LDX <Music_Item_Cur) u* R6 @0 B3 H1 A
  2242. JSR Set_Sound_Total; H; `9 F# ~- L7 ^- R3 i  M2 U
  2243. LDA <Music_Cur,X
    8 h" V  ]3 D) H5 s2 z
  2244. SEC3 Y* U4 S$ u. s5 F7 y
  2245. SBC #10; Y# {+ r9 D; M
  2246. BCS Music_Song_Last_10_Set' A+ Y! I1 j) @9 O. u
  2247. LDA #$00$ u% S3 ^  x  V6 t5 @; [; c3 j( Y
  2248. Music_Song_Last_10_Set, q+ z9 ?/ n# A
  2249. STA <Music_Cur,X
    / c" a! L8 m: e& R3 G% Y
  2250. JSR Sound_Reset_Proc
      r$ e$ c" E3 g
  2251. JSR Music_Show' l: [# l! B7 f% }0 n0 b) y% i3 ]4 v
  2252. Music_Song_Last_10_End
    # O, E$ B: w5 \; @: E0 P) _. Z- p; [
  2253. RTS
    0 L5 p: f; b, C9 c% h* R

  2254. . h/ I* F; e6 z3 H# T
  2255. ;==================================================
    # F6 W' N  V- E! w. O' C
  2256. Music_Song_Next_10;下10曲; E4 P1 v, \8 j" d5 p7 A
  2257. JSR Clear_Last_Track_Name
    & G& G* ~$ N4 g6 |6 h$ k, ^; Q5 j
  2258. JSR Disable_Text_Draw  H* K$ B$ G. k" v$ Y
  2259. LDX <Music_Item_Cur* L6 [/ R: V- ^3 G1 Q9 k* O
  2260. JSR Set_Sound_Total
    * ~" X- I' i- Z& `% ~2 P3 H# ?- K
  2261. LDA <Music_Cur,X7 d0 ]! ?# E% G7 e" t
  2262. CLC
    ; R6 D+ i) L! q& w5 l
  2263. ADC #10, s  n; G& r* X9 s9 U4 l0 z
  2264. CMP Music_Total
    # m5 L1 Y8 s0 @+ E  I9 j
  2265. BCC Music_Song_Next_10_Set4 ~$ l4 t9 c9 A' L' \) j& S* c
  2266. LDA Music_Total
    ; A) y* T) F+ Q0 m. |6 Z
  2267. Music_Song_Next_10_Set
    - v9 h0 B! F# U3 r
  2268. STA <Music_Cur,X4 K; O& q0 ]" Z/ x( `# X7 x
  2269. JSR Sound_Reset_Proc. M$ e! y: T9 r/ K) I9 H$ [0 {: @/ H9 d+ i
  2270. JSR Music_Show
    & ?( F: }3 z% f0 t! E! o7 g
  2271. Music_Song_Next_10_End
    3 t/ i* i6 `5 W
  2272. RTS
    , g6 T4 A" ^4 J- d1 i6 I! Z

  2273. / n# i. ?- T' C! `6 ]
  2274. ;==================================================
    $ `7 u0 x: h4 c. T9 l3 l8 }. k2 b
  2275. Music_Song_Last;上一曲
    : w! Q  W" f: b- N- r
  2276. JSR Clear_Last_Track_Name
    2 g  l1 l+ R' i) d8 F  j
  2277. JSR Disable_Text_Draw
    - r4 n. ~% F% B  w. i
  2278. LDX <Music_Item_Cur- \( a( J  j* G9 n( L0 U4 a7 w
  2279. JSR Set_Sound_Total) D9 S1 {- A" O; N" P
  2280. LDA <Music_Cur,X
    ! O$ w  i4 n/ N% q
  2281. BEQ Music_Song_Last_Set, W& y- \- R7 v" l$ j. ~' O
  2282. DEC <Music_Cur,X! A! `9 ?) l  w+ _! m" i
  2283. Music_Song_Last_Set
    9 t# F3 i, Q1 v
  2284. JSR Sound_Reset_Proc. f" n5 P1 ~* S1 Y* V! ?4 O
  2285. JSR Music_Show
    1 l$ n& G1 \1 E/ T/ T7 r5 ~
  2286. Music_Song_Last_End  [+ H$ K7 P9 s
  2287. RTS/ L6 k% V0 W- W3 z$ h
  2288. / @2 \3 }. |( {7 E* O& o
  2289. ;==================================================9 h! F. c# Z1 U1 q' ]
  2290. Music_Song_Next;下一曲
    ) I+ A( x- B/ A4 {2 f" _7 ?
  2291. JSR Clear_Last_Track_Name
    1 v1 q8 D  I+ L$ g
  2292. JSR Disable_Text_Draw( M! i1 m3 }' q' l. m$ e# W
  2293. LDX <Music_Item_Cur$ i, \. v% l' J8 k7 ^7 w+ ]
  2294. JSR Set_Sound_Total' ]  y# x0 w9 I- {
  2295. LDA <Music_Cur,X' O4 ^# b3 B/ A; B4 R4 o- N. F
  2296. CMP Music_Total" i. b2 j' H4 C& P' G3 i& p7 P0 A5 h
  2297. BCS Music_Song_Next_Set& @; B' L  @) b: A4 Z5 c4 @
  2298. INC <Music_Cur,X
    0 O( u+ |* u1 I# I" }
  2299. Music_Song_Next_Set
    0 @5 Q6 _% l( R
  2300. JSR Sound_Reset_Proc. c* V' ~' \6 C% V$ e& O9 B5 r
  2301. JSR Music_Show
    9 G2 }% y- V, k% h
  2302. Music_Song_Next_End0 y* o! W" {7 I) j. l  [
  2303. RTS
    * @3 {6 i" h+ @$ K# a

  2304. ' w5 O$ A: B; k/ L" \) c5 r
  2305. ;==================================================$ U% Q' ~* s2 Q8 x, M: d4 [
  2306. Change_Select_Item;改变当前选择项6 m: g& I; B3 \- N. P
  2307. ;--------------------------------------------------$ w. T& T8 s9 \( n  t8 B
  2308. Change_Select_Stop_Play_Item;停止/播放# w; _/ [& }5 q+ B
  2309. LDA <Key_Once' a5 D% e; D$ B
  2310. CMP #$10
    . D6 L* e. E" M5 ]5 {; w
  2311. BNE Change_Select_Last_Item  R& S. c) O3 N4 ~5 K6 l' u
  2312. LDA <Music_Stop_State3 T. T% {% h6 E  m" ^
  2313. BNE Change_Select_Play
    7 o1 ]3 G/ R+ Z) }/ E1 ^
  2314. JSR Music_Song_Stop! d4 Z# L8 K; J* U: [+ K8 c
  2315. LDA <Music_Stop_State6 ?" B5 w* U0 l
  2316. RTS: F7 e7 Z+ `" ~

  2317. , D! W! K8 b* C6 K6 f/ O) L
  2318. Change_Select_Play
    # B* C( q% w4 p
  2319. JSR Music_Song_Play* c* Y8 n- ^( v' Z% e
  2320. RTS
    2 b3 ~. n# [' J2 u6 D

  2321. ' O! g6 p$ Y6 f, ?
  2322. ;--------------------------------------------------  Y. n+ w& t6 E0 ?% n1 {: f
  2323. Change_Select_Last_Item;上一个专辑
    ( d8 Y7 @, T2 P! o
  2324. LDA <Text_Disable_Flag" F. [2 F4 v' h: e
  2325. AND #TEXT_DISABLE_ITEM4 k$ M( m* M2 J% Q
  2326. BNE Change_Select_Item_End
    : F7 T6 \; `* M. _
  2327. LDA <Key_Once' U5 H- c* h  X* S% Q1 K' [: C
  2328. CMP #$08* |% u: T2 \& |; l" G
  2329. BNE Change_Select_Next_Item
    8 C0 t& l% q. T0 x
  2330. JSR Last_Item3 Q1 k. i# x7 s
  2331. ;--------------------------------------------------) @8 ~* \% A% N# T
  2332. Change_Select_Next_Item;下一个专辑7 g' p( ?( L% O# ?
  2333. LDA <Key_Once- `9 h4 D  k4 B+ n+ `
  2334. CMP #$04
    8 a, p3 \& U* e( `* r
  2335. BNE Change_Select_Last_103 _4 S9 c+ H% c& O
  2336. JSR Next_Item
    1 D, }6 F% g$ c% Y- Z
  2337. LDA <Music_Item_Cur
    ) {' U# ]- T2 s: s' M0 ~; t2 X
  2338. JSR Get_Page_Start_Index
    , n) ~) M( ]1 o9 Z1 W$ Q5 o0 }
  2339. ;--------------------------------------------------' n& \4 K3 f1 {1 ~
  2340. Change_Select_Last_10;前10曲
    7 ?# ^" H. C# g
  2341. LDA <Key_Once
      [8 F& O6 w6 E4 H
  2342. CMP #$40
    $ s; m3 [  _, A5 ~/ n6 W% A& B3 h8 I
  2343. BNE Change_Select_Next_10$ v% Y% j0 v, G3 u. K- w" x9 V
  2344. JSR Music_Song_Last_10
    / M2 A5 K  k4 m9 w
  2345. ;--------------------------------------------------
    ! F: T% C0 [! o: c3 Z
  2346. Change_Select_Next_10;后10曲
    % `* r! o  K* d$ ?. t/ S
  2347. LDA <Key_Once
    7 ~" Z( ~6 c! @, t# u0 g) `
  2348. CMP #$80  s+ b6 E5 x% b6 [" _& j7 O
  2349. BNE Change_Select_Last$ W5 c% t" r1 x- c, o0 P
  2350. JSR Music_Song_Next_10  ?: v2 F# L" w3 a) `5 u1 ^" `" S3 w: i
  2351. ;--------------------------------------------------
    . b( W" r3 [) s4 D0 r
  2352. Change_Select_Last;上一曲
    4 U! B/ V" E8 U% T2 w2 m# [( I- s
  2353. LDA <Key_Once: Z, c. m. @/ i, {, ]
  2354. CMP #$02
    5 N( v) U" r# Q& \
  2355. BNE Change_Select_Next: d' ]/ B, A/ X
  2356. JSR Music_Song_Last
    1 r, x. {/ b4 F' ~
  2357. ;--------------------------------------------------
    2 T3 h2 v( M+ H- F7 _% o. K& h6 w5 i
  2358. Change_Select_Next;下一曲7 r1 A* P& x: f1 ~* z1 T( s
  2359. LDA <Key_Once2 _  q1 r8 y1 n, b+ K# F7 J* O# u5 s
  2360. CMP #$01& s+ a3 y: o: c( v
  2361. BNE Change_Page_Next
    ) Z$ T, n5 m3 W
  2362. JSR Music_Song_Next9 z" O. K( k) ]: B3 }4 }. W
  2363. ;--------------------------------------------------) |6 o& Y/ C( I, M: e
  2364. Change_Page_Next;下一页- o3 X" [" \$ ]
  2365. LDA <Key_Once3 T3 L1 }3 l& K
  2366. CMP #$20" b5 Z* w! _- t- p+ x9 R
  2367. BNE Change_Select_Item_End4 `5 d5 ^( a. m9 L% n6 `
  2368. JSR Next_Page, G- h* K3 V: l) W6 O5 M
  2369. ;--------------------------------------------------
    + n) m2 g: X& R0 ~' a, Z8 C) w
  2370. Change_Select_Item_End
    " g8 D- u! Q4 s1 _
  2371. RTS/ ^3 t: q2 U3 S$ l! n9 x! F

  2372. 4 z6 y# X4 \; |! L. T8 B5 q
  2373. ;==================================================: h( ?: J4 t( ?  [. L
  2374. Show_Arrow;显示箭头光标( w* \( Y3 p' k% l' E, R- z
  2375. LDA <Music_Item_Cur
    ( w" f- o. e* E4 d* `3 t
  2376. JSR Get_Page_Start_Index* |( r$ ~" a: g. V, g) }0 O" R- v& O! Y
  2377. LDA #$00
    ' |# Y7 I7 O- `" `6 p$ e  j; _
  2378. STA PPU_OAM_ADDR
    ' M8 C5 t% p  H; ]9 I2 n, ~
  2379. LDA <Music_Item_Cur
    $ f  t4 r8 f% b' V7 U
  2380. SEC. ?8 A0 k' A5 H& X+ G& l5 n
  2381. SBC <Data_Buf
    % u$ l; P6 E  ?
  2382. ASL A
    3 J$ Q$ V2 I. m9 x
  2383. ASL A
    + m% [) n$ U/ R
  2384. ASL A
    / k& ~7 g$ H& B7 p7 K/ ~4 K* o1 G
  2385. ASL A
    ! I2 n. k5 k1 r. N4 x3 y- }# d
  2386. CLC$ \' m- p, ^) o7 S! Z: F5 j
  2387. ADC #ARROW_Y_OFFSET
    " h3 c* U- Y7 d* V& ~
  2388. STA OAM_TEMP_ADDR + $00. h& `& R" w* u
  2389. ;STA PPU_OAM_DATA" |& ^2 @9 ^0 L
  2390. LDA #$1F
    . j: x4 b# r4 A: D
  2391. STA OAM_TEMP_ADDR + $019 h: W' q; \! C1 |
  2392. ;STA PPU_OAM_DATA3 f1 \# ~6 D1 t
  2393. LDA #$00+ S; S/ T+ M8 w# G7 j
  2394. STA OAM_TEMP_ADDR + $02
    9 V8 h4 V4 R+ |) U/ ~, J
  2395. ;STA PPU_OAM_DATA
    ' H8 `8 @' H1 F# F+ S5 P. q
  2396. LDA #ARROW_X_OFFSET
    * Y5 d$ {( D6 l# J. c) ?; C. v/ R' K# N
  2397. STA OAM_TEMP_ADDR + $03
    4 l4 g1 A8 R. F) _1 D. e- @
  2398. ;STA PPU_OAM_DATA" j: Z; A  G8 K# M- q- G4 l2 ~  d
  2399. RTS
    & W2 s) \5 d$ G+ H
  2400. ( I8 @2 q9 @" L
  2401. ;--------------------------------------------------8 Q8 @4 C* E) d: q. M
  2402. ;命名表数据
    9 S5 e* D# m( i$ t, b9 ?' ^+ k4 l
  2403. Palette_Attributes( F# `4 i+ B! X4 b1 d. S
  2404. .IF SOUND_BAR_SHOW_ENABLE2 E( G" [2 T4 C: h6 S& j
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55/ r" _- x/ |- f$ N
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    * _, I, z$ D; h1 o; J+ Y9 Z- B
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    / s$ [7 H; I& o+ P, C
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA) v0 G7 D5 E, V9 E% N: X& H# k
  2409. .ELSE3 c4 H  f. q- f; y* m7 ]& M
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    $ T) c% I1 o+ W6 y! e6 S2 }9 h
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55$ [0 ]) \' ?6 t$ N$ S% w0 g  D. l9 r
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    4 Y! q3 w% P' F1 q1 [$ B
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
    2 t" ^0 @# z2 h& Y
  2414. .ENDIF
    + E/ @7 z# ~7 c
  2415. ) F. ^4 F7 y9 v7 t1 w
  2416. ;--------------------------------------------------. e; ^9 f  s* t2 P+ H
  2417. ;调色板数据
    * j; x8 A2 p" U
  2418. Palette_Data+ H/ Y$ Z3 K/ W9 L4 x& y
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F
    " o3 H1 D7 O* u: C3 `
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F! I6 |' \1 z* S2 Z/ Z

  2421. ) v* }6 V2 a; `, j$ W" ?
  2422. ;--------------------------------------------------
    ) O  ]" A: V; ?. ~. ~
  2423. Static_Text_Data
    ; P9 ?0 \  ~1 i# P7 ^: Z0 _; S
  2424. .WORD Static_Text_Caption_Data$ r+ {  T# k& F( Q0 I
  2425. .WORD Static_Text_Author_Data. x( b- ]- V0 p
  2426. .WORD Static_Text_Date_Data3 l8 T5 ~/ D7 m4 m3 v
  2427. Static_Text_Data_End: \' K: V9 S( m5 R

  2428.   z: e1 d1 i2 B
  2429. ;--------------------------------------------------
    & T: @, M0 e, M
  2430. Static_Text_Pos
    1 V6 ~) @# X) |8 B" H
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)% v/ y9 S2 {& x. ^1 P8 J8 |' F
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos)
    ) R% z: D+ W$ e3 q& N5 _
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos); e+ i+ K" g; u# Q
  2434. Static_Text_Pos_End5 c" M0 p/ x- ]+ H
  2435. 9 a7 ?. t* j. \
  2436. ;--------------------------------------------------
    : D7 I9 G! F* {: x2 V+ T
  2437. Music_State_Stop
    0 ]$ M, n5 W! Q" @' j0 _* q
  2438. .IF SOUND_BAR_SHOW_ENABLE
    8 x8 Z1 u% X- ~' V& U* S
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    % l- S% T( _+ X" X! `1 L. Z: k4 g
  2440. ELSE
    . f- X/ j3 \" x+ b( X( t) w! |
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    5 g2 a, f7 y# F0 `9 u. g* q
  2442. .ENDIF2 D* O: T& c- w' o  M8 D# T
  2443. Music_State_Play3 @  W' J- ~  o0 U9 N# o
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$00: ?0 o, u& e: D! S
  2445. $ H+ T2 F7 s$ F% v1 |% V
  2446. ;--------------------------------------------------; t. a8 U8 ?$ F* X# D$ i
  2447. Sound_Bar_Text_Data;声音类型文本
    4 C0 i+ x. P% }" h0 p2 {3 O' j* l. l
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-"7 {" }4 M5 S+ c7 F9 N  I( b9 U8 y
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-"2 @) Y6 \2 [- O" U+ A
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-"
    : K) a% H4 V" a9 N7 Q! N
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"6 S  P+ A# G7 |
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00
    / _/ j; ?6 l6 i9 e

  2453. ) G& K  H/ h. h1 F( U& R
  2454. .IF Track_Name_Pos
    - Z  z  ^/ \$ A) T4 f. a! c; I: D6 M

  2455. # Z% L2 q) Z  }6 G3 \# f# _
  2456. ;--------------------------------------------------
    1 O) j0 A+ @* P* F  C/ K) U. Y! F
  2457. Track_Name_Addr_00;曲目名地址索引) e8 t: C: S3 _6 c  [
  2458. .WORD Trackr_00_01. K! F! i( d8 {' Y

  2459. * E/ C" M; A9 ~& j( l5 d
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"
    $ U$ G* D7 D( I" z5 g, t( ]; q
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"
    3 v, s' o# ]; B& f3 J3 o
  2462. , Q+ J6 |5 S% r. x
  2463. ;--------------------------------------------------
    7 {2 f0 v; \% U+ e$ n) S( W9 D7 ]
  2464. Track_Name_Addr_01;曲目名地址索引* j5 S) ^; ^$ m
  2465. .WORD Trackr_01_01
    9 z! D# g1 I) [
  2466. 3 A% A! X- X( j3 d0 a% @0 H/ e
  2467. ;==================================================
    % d8 f( B8 h0 Y3 `( j# G
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1"- Q) N4 K  d$ |) f" U, I
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2"
    % L( e8 T# g; n/ K+ b# \) I
  2470. : g3 ^# k8 I2 M  x; N) t% y- P
  2471. ;==================================================
    4 W! j* D% b6 g# B% ]0 p  w, E3 E
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引( h3 I1 c& G0 X8 j( j# n
  2473. .WORD Track_Name_Addr_00
    % r& o% n. G1 L2 t# \3 q
  2474. .WORD Track_Name_Addr_01
    / d' O) D* `* V8 `# y) S
  2475. .WORD Track_Name_Addr_018 |$ \4 |0 r" r% O
  2476. 1 }' H& Z# B: v* X2 N  s( u
  2477. .ENDIF
    5 n, h2 c! @+ x! y

  2478. / G* H) X$ J. Q- |
  2479. ;--------------------------------------------------4 z6 Y) X7 G/ v+ a$ @( W! H2 m. @
  2480. Static_Text_Caption_Data;静态文本数据
    # i0 G5 S3 Y2 L) |5 k
  2481. .DB 16$ }) T# Y, L- [7 v$ W2 w
  2482. .DB "FC MUSIC 12 IN 1"# h' j# m- I( {: O) ?: q' @
  2483. Static_Text_Author_Data( y& j6 s$ p' _! B
  2484. .DB 25
    3 E' D0 g" T5 j& r5 S2 j
  2485. .DB "EXTRACTED BY FLAMECYCLONE"6 `6 {  E' W1 W2 g4 H
  2486. Static_Text_Date_Data
    * i; V5 j7 t9 A( e2 p) x+ Q0 T
  2487. .DB 10' |9 T* S. D5 F  n! B; q- K' I
  2488. .DB "2023.07.23"
    # Z2 o' h! y) \3 D2 ^

  2489. 3 |8 a8 b8 B' Y3 h% V, O
  2490. ;==================================================
    . I. u  }- H% \
  2491. Music_Collection_Name               ;专辑名间接索引2 o8 G5 _) @5 ~6 |6 @8 _$ ^2 A) A: B3 w
  2492. .DW Music_Collection_Name_002 K& u% i# D1 i" [" T$ m
  2493. .DW Music_Collection_Name_01
    # n  U2 t! N5 P
  2494. .DW Music_Collection_Name_02, V1 y% f) l% d2 t- q
  2495. .DW Music_Collection_Name_03
    ! |1 k! q, O( d/ ^  A6 D5 c
  2496. .DW Music_Collection_Name_04
    1 E: m9 w7 B7 n& j& j
  2497. .DW Music_Collection_Name_05
    $ R6 H- J( |+ c3 X
  2498. .DW Music_Collection_Name_06
    * y" h4 e1 q& {1 }# ~
  2499. .DW Music_Collection_Name_079 |  H' E7 @! s* w4 N! z- k
  2500. .DW Music_Collection_Name_08
    7 V. Y4 ]5 R# G$ [$ m
  2501. .DW Music_Collection_Name_09
    8 e* a6 ]. m3 j2 f& K
  2502. .DW Music_Collection_Name_10% c/ y% ]' y7 a! V, X8 P8 g2 U
  2503. .DW Music_Collection_Name_11( ^) _, z- D" I) B- V3 d% F

  2504. ( Q; g/ h% k2 b8 `1 E' I% V( ?
  2505. ;==================================================3 d! z1 ~/ G, U& ?
  2506. Music_Collection_Name_00            ;专辑名文本数据
    ) K( ^9 p; D5 J, f8 k, e. }
  2507. .DB 11,"1.RAF WORLD"0 e2 i6 H1 @5 ]$ B) ?+ j
  2508. Music_Collection_Name_01
    5 y5 l& C9 U, H& }# i6 u
  2509. .DB 15,"2.FINAL MISSION"( }  M) ~1 I, r8 _" e% @: Z* y
  2510. Music_Collection_Name_02
    / o* U  g8 w7 c9 H: l
  2511. .DB 06,"3.KAGE"
    0 D7 I5 O6 h8 y
  2512. Music_Collection_Name_03
    - p: M' m! I5 ]2 ?
  2513. .DB 16,"4.DOUBLE DRAGON"
    " H* F1 P/ ]. k* V% }& |4 D# ]! p( Z
  2514. Music_Collection_Name_046 A: y  X% W* o% M: a* y2 r1 {. O8 X) ?5 I
  2515. .DB 17,"5.DOUBLE DRAGON 2"
    4 ]& p9 i- }; l) z7 [- e2 v. v
  2516. Music_Collection_Name_05( n  M2 |4 m9 a! l0 C1 @
  2517. .DB 17,"6.DOUBLE DRAGON 3"
    ) Y) S( t# T, k% A3 Z
  2518. Music_Collection_Name_06
    2 d8 L9 ^1 E$ t  A7 d
  2519. .DB 09,"7.ROCKMAN"
    1 }8 V" K& W5 `8 J0 H0 i' v
  2520. Music_Collection_Name_079 K# S1 G' b3 T9 Z3 m
  2521. .DB 12,"8.ROCKMAN 2"+ H: \* D0 V" Z. B/ F: x
  2522. Music_Collection_Name_08
    0 p% P7 X5 h! w2 v( P) @
  2523. .DB 12,"9.ROCKMAN 3"
    + k0 e& x5 B! A3 r1 [
  2524. Music_Collection_Name_097 o5 O. s8 U5 Z/ f* q& @
  2525. .DB 12,"10.ROCKMAN 4"& ?, ?4 e/ e# q( r% ~
  2526. Music_Collection_Name_10
    1 I6 y7 a: p* D- H5 k9 j. j9 {
  2527. .DB 12,"11.ROCKMAN 5"1 e) K% d+ M& I+ w4 E
  2528. Music_Collection_Name_11- T1 E+ X7 t/ \! r7 @: I
  2529. .DB 12,"12.ROCKMAN 6"
    ! m6 U$ h( c: C7 E+ R
  2530. 5 M- e( \* ?2 ]2 i1 M7 y
  2531. ;==================================================
    $ Y2 E( l1 _) f
  2532. Track_Name_Addr_Flag                ;显示曲目名标记2 N$ r3 ^+ ]$ b7 i$ g0 l' K; h% c
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,0
    , [2 v  e4 V' t$ m. \* r9 J9 V9 X
  2534. 8 G' l; T7 r9 _  D+ F% v: B
  2535. ;==================================================- }/ K; Q- Y, P# Q% {
  2536. Item_Pos_Data                         ;光标箭头位置$ v) b; L$ S6 {) q
  2537. .WORD ITEM_SHOW_POS! j) y/ j/ W' K% L' c  t' h8 h
  2538. .WORD ITEM_SHOW_POS + $0040
    + S1 G) Q" ]5 r3 W& K
  2539. .WORD ITEM_SHOW_POS + $0080
    , Z. a' N$ v* _1 |
  2540. .WORD ITEM_SHOW_POS + $00C0
    4 I* j4 E; F$ d. L; k, Z
  2541. .WORD ITEM_SHOW_POS + $01003 J+ ?2 ^, p4 `$ `. V
  2542. .WORD ITEM_SHOW_POS + $0140! b8 u8 p. {0 _3 }7 L; B0 I( r

  2543. . O. l4 ]  a- ?0 Q2 T5 n- @. \+ S. t
  2544. ;==================================================+ V/ Y2 [  D3 B# x  P3 v2 E
  2545. Sound_Init_Port                 ;音乐初始化入口地址
    / }4 ?3 Q) z* H2 [/ ?  Y  b6 q
  2546. .DW $BFC8
    , V, s- g) E. }4 @! }' z
  2547. .DW $D7F0
    6 D# V' |6 G7 c4 l
  2548. .DW $9FC0
    ) R! F6 v6 N' L( [) ]) {% K
  2549. .DW $BF70
    8 C; U; z6 Z: l, X6 I" i0 W
  2550. .DW $8003; b1 F3 Z: T0 A' A5 c7 X  h9 [
  2551. .DW $BF30
    % m4 N2 _, i% P* a
  2552. .DW $9003
    7 w9 h- F8 F$ p4 W6 L/ A4 b
  2553. .DW $8003, z# `# A# o. X% q- ~
  2554. .DW $80035 L) i3 h( F; H
  2555. .DW $8003
    1 G. ~% M+ B2 X" E0 q- L
  2556. .DW $80039 f: l8 `) @# [4 B5 j9 O0 N* p
  2557. .DW $80032 N1 w3 T* F. B& v% z) u1 m
  2558. 2 W9 k/ L( i8 _( K& u4 i! f+ j5 \
  2559. ;==================================================' R( L( d) p/ r! G- v
  2560. Sound_Play_Port                   ;音乐播放入口地址( j: b6 d# s* W" T8 a6 Y
  2561. .DW $8000
    $ b, w- o% O4 u4 n& |  j
  2562. .DW $8001
    3 f- R7 w* w" r  G0 A! d
  2563. .DW $A000
    ( f7 r  S1 O$ d, G
  2564. .DW $80030 D/ O/ D* j  }; D" i! N. k9 Y% j
  2565. .DW $8000
      \: Y3 p4 [5 {# u6 r% m
  2566. .DW $80033 V  g  H7 n0 o7 [$ Z! B6 \$ L
  2567. .DW $9000
    8 Q" j, @4 Z8 G, y& Q; ]
  2568. .DW $80008 F1 N! Z, ]# `
  2569. .DW $8000
    & l7 f7 ]: Z7 ]* W$ r2 `5 r
  2570. .DW $8000
    ! `& j+ Z; v) }0 L* J
  2571. .DW $8000: Y) }% X0 j$ M0 @/ Z- Q, j/ [
  2572. .DW $80007 x; U5 I2 A; c: b4 v( p  p! [

  2573. ! |( A2 [* G" S+ f3 h
  2574. ;==================================================
    * k" u: d/ i' h/ s( A
  2575. Sound_Reset_Port                  ;音乐重置入口地址$ z5 ^- O$ c5 g( z
  2576. .DW $0000
    ; O. K0 G( u3 |) h8 B
  2577. .DW $0000
    % @& P6 ~. t8 a  f" {
  2578. .DW $0000
    ; t: j, P7 a* c' e
  2579. .DW $0000$ v; e( @; I( {
  2580. .DW $00001 c( l9 D% [2 D" R
  2581. .DW $0000
    ; g+ ^7 |, L0 i, s1 o' u' R( t
  2582. .DW $0000
    ( ^: l. n8 n& s* |( D! v7 s" i
  2583. .DW $00003 v3 M* o. _. f5 Y* f/ W
  2584. .DW $0000+ A- n( _/ a4 e8 t1 n5 c+ H! p
  2585. .DW $0000" R) U2 V) e0 {# `4 G" h
  2586. .DW $0000, T8 ?& Z$ H8 \0 e  _7 ^; U
  2587. .DW $00008 r% l4 r3 U# M- R0 k  u

  2588. / Q7 Z1 T* ]. z6 O0 i
  2589. ;==================================================: s5 `+ y# H, k1 F
  2590. Sound_Total_Port                          ;曲目总数  g% n/ E% v1 S1 o1 d. f
  2591. .DB 38
    * X# b( l/ J' s- T  p
  2592. .DB 33) n$ u2 w9 `7 H. L5 P
  2593. .DB 49
    - Z3 u9 F1 w  z
  2594. .DB 41
    7 B$ c* S5 j! D2 C
  2595. .DB 830 ~& u9 X0 ]8 ~
  2596. .DB 70$ _. U: I" }2 \9 D5 c
  2597. .DB 50
    / E9 l# |0 }* Q- h* C6 |
  2598. .DB 67! l% D9 u% n# z' ~! M( I% W
  2599. .DB 57
    ; E: J: _" ^2 h" E) V4 x' l, u
  2600. .DB 71
    : P0 C- Q% g) ]7 F$ C! T
  2601. .DB 76% W$ m: }9 ]4 j1 G. G" \; H
  2602. .DB 102
    # ?5 t  u/ }5 s! d/ R. V

  2603. ( k  O3 o5 C( ~. ]1 f
  2604. ;==================================================: C: D# H( F% ~6 d
  2605. Sound_Start_Port                      ;起始播放曲目
    $ A& W8 c. a( `# J$ G( b
  2606. .DB 00
    ; d  f+ l! w9 i& {
  2607. .DB 005 G! T3 f  c% W- E
  2608. .DB 00
    & E, [& S# M0 J$ c( g' _
  2609. .DB 00: T5 ?" o) n9 W
  2610. .DB 00
    1 V: R# O- t5 z- r& X* ^2 G& f
  2611. .DB 00
    - T1 }, C2 h3 W8 K+ r% T' k
  2612. .DB 00
    , M3 E  }2 k0 B) d. J* L- e
  2613. .DB 00( b. ?- n& ~  p8 @
  2614. .DB 004 x7 z8 K6 X9 L5 c
  2615. .DB 00
      ?& c, }9 {9 t1 Y, S1 o1 @" i
  2616. .DB 00
    9 l  T7 z  @$ e" C- {  c
  2617. .DB 00
    9 k9 v$ T- C$ T5 `

  2618. 9 j2 U+ M/ U5 C
  2619. ;==================================================
    ' B, o9 t/ Q4 q! Q/ M2 e  Y4 J1 U
  2620. Sound_Bank_8000                      ;专辑bank_8000
    , L  o% h% H3 I5 r) P6 {) x
  2621. .DB $10) k% q# c; L: g3 _$ M2 c, ]
  2622. .DB $12
    # F) C7 T$ Z# Y7 R8 r$ ]
  2623. .DB $147 A5 \6 U( v5 q1 m0 J
  2624. .DB $16* L- Z* u7 B4 q3 J
  2625. .DB $18
    + [" u4 R& w  X  e9 S
  2626. .DB $1A" m8 u  ]6 W* ?& D

  2627. - Y& j  l5 g- u9 S2 Q/ R; B
  2628. .DB $00  x3 U, F$ N% [7 V$ L  T0 B- Q1 t
  2629. .DB $021 r& O, L4 B3 l, d9 X; z
  2630. .DB $0D
    6 r8 Y3 p* N( g& d% ?. F0 Z0 U; u
  2631. .DB $04
    , c9 d6 W) j* o; s9 D
  2632. .DB $07
    - R4 V1 w( s% o  f& [( M/ d
  2633. .DB $0A
    ! K, k: L7 z2 q: F8 m0 G& ~

  2634.   t: i; i# r0 P6 M0 J

  2635. 0 j% v# b7 n2 u( C0 i* n
  2636. ;==================================================  N$ T! f3 f, r& k  n
  2637. Sound_Bank_A000                      ;专辑bank_A000/ [! B+ w+ J6 C( G0 [% @+ F
  2638. .DB $116 ?' `/ D+ S& Z) X1 k4 N' D9 W
  2639. .DB $132 C- r/ ?$ t, a8 H6 e& d1 S* r
  2640. .DB $15; q- {" H! x( `7 s7 J# r
  2641. .DB $17
    6 V8 v! S2 D, B1 I' M
  2642. .DB $19& b( D. o* w. Q- f% h5 \
  2643. .DB $1B
    ! S- e$ ?1 U. r+ }) M' K
  2644. 8 ]* y) n/ Q' w1 \: I
  2645. .DB $013 H; E5 f8 F: r& c, n
  2646. .DB $033 k, v) H! c9 V( k5 p
  2647. .DB $0E
    % l/ O( R3 P" @8 t" k
  2648. .DB $05
    6 {9 {2 S, r; X/ Z
  2649. .DB $088 b% U& U% _7 Q: Z* e) K
  2650. .DB $0B
    % n; I+ ?0 X' p( x5 V
  2651. 5 t$ \! G) S# {$ W; }

  2652. ) O; [# W; @+ S1 f
  2653. ;==================================================3 s: ^' V. I9 D. g
  2654. .BANK RESET_BANK & BANK_DATA_MASK  `* w! q) S$ b8 U- f! t4 c
  2655. .ORG RESET_ADDR
    8 U- I5 _8 @( `
  2656. 6 V. o$ e: K1 x9 k0 o0 F
  2657. ;==================================================
      y3 N' o2 C' w. Y
  2658. Switch_Bank_8000;切换bank到8000-9FFF# e8 p" ^6 h# w* B: a
  2659. PHA
    0 `& @& O5 X0 l9 Y
  2660. LDA #$06
    % C& `) x, I' e, s  H
  2661. STA MMC3_BANK_CTRL5 R8 H( L# A$ b- N2 v9 z6 n
  2662. PLA
    6 H) w5 f: k6 V, L( V0 t  Q4 o
  2663. STA MMC3_BANK_DATA8 s* |* E' T4 r. F1 A8 S
  2664. RTS; B/ ]8 r1 E0 y
  2665. " c! z: w9 N$ f) _
  2666. ;==================================================2 ~) \6 S* c  I& R* f! V2 P0 x* @
  2667. Switch_Bank_A000;切换bank到A000-BFFF; b" `' \/ G- g* E" J% g
  2668. PHA! }  B% q+ Y9 Z8 l7 x
  2669. LDA #$078 `* K1 `7 h  s8 n; P/ f8 \
  2670. STA MMC3_BANK_CTRL
    " Z. a$ ~, l3 G1 C
  2671. PLA
    9 @2 Z8 ^9 i$ e# H  f
  2672. STA MMC3_BANK_DATA
    % M9 O3 Y0 p2 v+ `9 `" l* l6 Z
  2673. RTS
    / O: S0 x0 r/ V  e9 g4 y0 j

  2674. , ^. P  d0 W. j3 m5 L" T, p3 Q
  2675. ;==================================================
    + L+ w' u  ^% D# a9 t. H4 Q4 J
  2676. Switch_Main_Bank;切到主程序bank
      @. F1 c: p# Z* j- \3 x8 X
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK
    8 w8 s8 k) e7 ?4 J8 H7 G9 F
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank1 P% L0 r9 i" m4 R2 l; O
  2679. RTS
    " J0 Y. c; f  V1 N/ i

  2680. - T9 }3 h/ w4 c8 O/ x9 R
  2681. ;==================================================: S  ]  v7 Z7 I  @0 F
  2682. Sound_Reset;音乐重设(如果有的话)
    0 m* y6 U5 M0 |7 I, B( E
  2683. JSR Switch_Music_Bank  ;切换到音乐bank
    ( p4 I* `* f: |
  2684. JSR JSR_Addr_Op        ;执行音乐重置
    5 M& r1 t" }4 X& f
  2685. JSR Switch_Main_Bank   ;切回主程序, }+ b* X$ k" O0 @; Q) U
  2686. RTS
    " o( u8 `) W. T5 w8 {* h5 _& _
  2687. 3 M, R! W1 p% e  Z. X% l
  2688. ;==================================================! M0 E( P( H/ Y" m0 r2 C
  2689. Switch_Music_Bank;切换音乐bank
    2 f9 \! w  o6 w* {
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号" w5 d/ W) S) X
  2691. LDA <Music_Bank_8000
    2 X, D% Q' M5 a- D
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank
    ' b0 G. }  C. n6 m3 V1 Q% U/ z: c
  2693. LDA <Music_Bank_A000
    : m8 r. ^/ f& B/ C7 g- ~5 R6 P
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank' i  f- F' W. y+ i8 J* @
  2695. RTS
    + _' x( W) m& @1 N
  2696. % \6 |; |0 |6 g: ^
  2697. ;==================================================) V6 k7 Y) ?- [  S3 @
  2698. Sound_Init;音乐初始化
    7 W2 `& ^; a- |. Y3 G( \
  2699. PHA6 M" |* L7 D! B3 @) S. w  a
  2700. JSR Switch_Music_Bank  ;切换到音乐bank2 `' i3 F' v0 |( L$ W/ r/ {
  2701. PLA
    $ }5 ~/ a0 I, x
  2702. JSR JSR_Addr_Op        ;执行音乐初始化4 ^8 T4 w4 n3 n. ?9 C) Z
  2703. JSR Switch_Main_Bank   ;切回主程序
    % M1 c3 l8 C' s2 }- o
  2704. RTS
    : \/ L* F) C4 c/ V

  2705. 6 h. q5 {2 D" ~" v) `. q
  2706. ;==================================================
      A* w" z  U6 y2 l
  2707. Sound_Play;音乐播放! q* u4 h2 ^; a3 D
  2708. JSR Switch_Music_Bank  ;切换到音乐bank
    / \4 O6 v. Z+ r/ a
  2709. JSR JSR_Addr_Op        ;执行音乐播放
    % L% k0 v8 Y8 [9 t
  2710. JSR Switch_Main_Bank   ;切回主程序
    # O7 n' n* t  p" f6 u. B
  2711. RTS
    0 X9 T) {4 {8 O& j: M5 ^3 E

  2712. , r9 F& d/ S( Z3 }2 ?
  2713. ;==================================================
    ! q% D5 |/ D/ G
  2714. MainLoop;死循环
    7 C) Q: e- d* B( H( o
  2715. JMP MainLoop( D% y" Y6 {1 R% `" D

  2716. 4 B" d+ h& Z% A. P  Z- g5 J  s
  2717. IRQ_SUBPROCESS_JMP = 0/ y2 P, B( Q( q# b% v
  2718. 7 q: v$ \$ H, {# N  O
  2719. .IF IRQ_SUBPROCESS_JMP
    , Z0 I# Z( Z2 s$ Z9 O
  2720. ;==================================================  N4 d. l: l# ?- e
  2721. IRQ_Process_0;IRQ处理过程03 X. @/ h" n+ C3 {
  2722. 0 F0 v) m& y9 r7 L: V, x4 }
  2723. ;15条扫描线后触发IRQ
    1 l2 _! n& T1 l. U8 C
  2724. LDA #15
    9 |( m: Z, v6 q- H+ f" f+ W2 K
  2725. STA MMC3_IRQ_LATCH
    $ i7 M6 E; g. M: n

  2726. - L5 P0 X) X! _( z+ B( q9 i: `9 q
  2727. ;设置屏幕滚动- h  K' T9 R9 H
  2728. LDA <Scroll_H2 D3 I% q) l1 z- m5 N% O! P1 P* j2 t
  2729. STA PPU_SCROLL" P4 s5 i  N$ k$ A' O$ @
  2730. STA PPU_SCROLL# \# D& U7 o7 p

  2731. / b& y1 R4 d& Y) U  Q# l
  2732. IRQ_Process_0_End3 v/ @$ x# c" r
  2733. INC <IRQ_Process_Index" G7 v9 X7 s/ G5 E. M
  2734. JMP IrqProgramEnd
    : R) S9 g0 \( m3 o9 a
  2735. . N& L+ _1 |  Z% }3 ]0 f0 H. M
  2736. ;==================================================- Z# V$ D3 [# q) i2 H+ O: x" m
  2737. IRQ_Process_1;IRQ处理过程1
    & p/ K1 L) I+ O7 x4 q( a4 E: }

  2738. 3 G0 L& g1 N  b9 `( M2 H
  2739. LDA #555 J4 |7 ~1 _6 m; S* V6 R
  2740. STA MMC3_IRQ_LATCH  `/ d* D/ h% M( Y; k
  2741. * Q$ h2 K( O6 }5 M. t
  2742. ;设置屏幕滚动
    $ F3 i/ z$ J- f
  2743. LDA #$00
    ' y9 D3 L/ ]( D; w7 X, N2 P
  2744. STA PPU_SCROLL5 c! Y: j3 B5 W0 w& M! l
  2745. STA PPU_SCROLL
    8 P) U/ [0 H' r* }, B  @. F4 q* `

  2746. * ?- B7 s5 g! r# L0 R! r/ n
  2747. INC <IRQ_Process_Index+ i! v3 S; J4 M- q
  2748. JMP IrqProgramEnd
    ) g9 Z* @9 v: E0 k0 T$ L0 K" Z

  2749. 0 I4 b6 _! [: k" B5 H9 k
  2750. ;==================================================: r1 M4 }! c/ X% |. G
  2751. IRQ_Process_2;IRQ处理过程2' J- F+ f' b, M0 l1 E' ]

  2752. 3 Y, s3 ^5 @/ c1 @
  2753. LDA #15
    ! t. j* e2 H9 \! t* x
  2754. STA MMC3_IRQ_LATCH
    1 V- f0 V& h8 j& ]

  2755. 7 c. G& A' d+ h0 ~- T# C( Q0 y8 O5 @
  2756. ;设置屏幕滚动
    ' i; C6 {" K/ b1 x/ {) Y
  2757. LDA #$00* r6 U8 J: Y, [8 o+ `+ ~
  2758. SEC
    0 f' v* M( m  t6 N8 n' K4 H
  2759. SBC <Scroll_H& z5 v6 ?0 r6 e6 O7 Q0 R" ^
  2760. STA PPU_SCROLL
      O5 Y) g; y. y0 z7 m2 z6 }
  2761. STA PPU_SCROLL6 @& ]1 u# A' b. R" W
  2762. 7 A: [; b" Q; f2 I0 d
  2763. INC <IRQ_Process_Index
    $ ~5 ]% w) y& b
  2764. JMP IrqProgramEnd" {6 u- h- V0 V4 |2 M2 L
  2765. - a1 e  h+ Z: K7 @7 X; y
  2766. ;==================================================
    7 S# r8 f2 Z" c; E7 u0 e" E
  2767. IRQ_Process_3;IRQ处理过程3
    / M" p1 R. ~  p& q9 K- `# E1 U/ Y

  2768. + c( W" [( O3 W" p7 K( \
  2769. ;设置屏幕滚动
    ( j; A" F$ v( H: g9 O' B5 o
  2770. LDA <Scroll_H, X: N" i6 W; Q# l( f/ p
  2771. STA PPU_SCROLL
    - d% B' I: Q1 a; t) Z8 d
  2772. STA PPU_SCROLL
    ; f6 M) r1 W- ^

  2773.   G- {- }5 Q0 a6 N
  2774. ;禁用IRQ' L; ^+ T1 M, v" t
  2775. STA MMC3_IRQ_DISABLE
    * v+ Y: l0 b( V2 u( `6 ]0 q# U
  2776. JMP IrqProgramEnd
    1 @! j) ^2 [  \9 t

  2777. 6 K% S  p; ^/ D% [
  2778. IrqProcessAddr& f6 ~! R5 k$ l
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_3
    " G$ c  F+ [" h5 \  e& E2 S
  2780. + M, x7 w; u$ H+ Q
  2781. .ENDIF; R5 E: K' n- S% G1 \4 s5 h
  2782. ( S( u6 N. _( o! O3 g3 D1 z: @
  2783. ;==================================================7 Z4 o" ?  T% B+ C& B
  2784. ;IRQ滚动模式常量* t3 P  v9 w0 e
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动! A: b* Z4 g3 P/ a* ]
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动4 Y* t) k1 H* P
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动
    0 J0 B; t3 L$ `3 J+ T

  2788. : O; J0 S; J% Z9 W8 z
  2789. ;IRQ扫描线数据! ~# }$ P+ H, T0 I9 n1 ~8 T
  2790. IRQ_Scanline_Data
    , o- G* `7 I1 l2 U' Q
  2791. .DB 8
    ; M/ E8 g4 i- q+ V. D# {. x! W  |
  2792. .DB 54, o; u% G) k$ R% N$ u2 W
  2793. .DB 8! B' w( T0 G& \- U+ i8 I
  2794. .DB 00 ;关闭IRQ' o. A6 N# w/ J7 C* v
  2795. 8 k$ k# s+ _1 q4 K8 t. P
  2796. ;IRQ滚动控制模式& e' S: G/ P0 w  `( U
  2797. IRQ_Scanline_Mode5 ?' p5 Q3 A% u9 }/ E4 M/ U
  2798. .DB IRQ_SCROLL_MODE_ZERO
    2 u% o/ u6 ], C! J5 l; p3 [& p6 B
  2799. .DB IRQ_SCROLL_MODE_ZERO' k) m( [2 c- n
  2800. .DB IRQ_SCROLL_MODE_RIGHT
    4 [5 j8 a6 v, a7 \3 y6 R
  2801. .DB IRQ_SCROLL_MODE_LEFT
    7 R4 }+ s+ n) k1 @. U. S2 ?

  2802. 6 m, L" Q  v9 R
  2803. ;==================================================
    6 l% r; l5 R  q, U( N! d) l% E
  2804. ;IRQ处理
    4 q- V2 L6 q% S: W' ~4 [
  2805. IRQ_Process( i0 Z4 u: Z8 ]* U- ^$ D$ G
  2806. LDX <IRQ_Process_Index, U* P$ i) W* c2 P/ p
  2807. LDA IRQ_Scanline_Data,X
    . ?( a" k/ f% V& ~- ~
  2808. BNE IRQ_Process_Latch& Q; P( p/ U3 w) k! ]0 S, O
  2809. IRQ_Process_Disable;禁用IRQ
    . D% i; d4 R3 M5 d# n6 o. \
  2810. STA MMC3_IRQ_DISABLE! K& Y1 O' e( s8 d0 N, R( g
  2811. STA IRQ_Process_Index" u& e7 }9 Y" C: t3 b) H4 V
  2812. BEQ IRQ_Process_Scroll; w8 A4 K4 U7 L0 Z
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线$ X  ^1 s) j5 R, C4 y5 w  {6 g3 W
  2814. STA MMC3_IRQ_LATCH
    6 p# i# p3 ]1 d) b+ A7 r
  2815. INC <IRQ_Process_Index" q6 }$ `# B9 g$ P8 N
  2816. IRQ_Process_Scroll;IRQ滚动控制
    - }; M7 b6 H, e+ b8 v8 u0 `7 q' @
  2817. LDA IRQ_Scanline_Mode,X
      ~+ }+ L$ l% v$ {; i7 x6 ~1 I$ n
  2818. CMP #IRQ_SCROLL_MODE_LEFT
    , I, `4 A8 Y( i: y* I0 w: j
  2819. BEQ IRQ_Process_Scroll_Left1 x5 l( j/ R0 T6 h7 @" N, X. R2 {
  2820. CMP #IRQ_SCROLL_MODE_RIGHT
    # O$ L( z/ c5 S) u
  2821. BEQ IRQ_Process_Scroll_Right
    , C, _$ G2 E1 J
  2822. IRQ_Process_Scroll_Zero;不滚动
      Z# b% ?/ [" X8 l% |+ J
  2823. LDA #$00
    + L7 W& D( \4 H" ]  f* @$ z6 i
  2824. STA PPU_SCROLL+ P0 u: |* G+ b# y/ g2 I# Z
  2825. STA PPU_SCROLL
    # X0 i3 h8 s0 ]4 A- {+ p
  2826. RTS8 z' M9 \* U, E6 }* K4 a7 @
  2827. IRQ_Process_Scroll_Left;向左滚动
    1 W, q/ m* w& ~; t7 t  M8 K
  2828. LDA <Scroll_H8 |3 C" T$ T- \3 X4 u8 g
  2829. STA PPU_SCROLL
    3 z! k' _, P2 m; f- O) z- v
  2830. STA PPU_SCROLL
      h: n4 c/ G* c# Q. v' l4 s  n
  2831. RTS
    ) y+ ~, `% ~; h/ d4 m+ |# o
  2832. IRQ_Process_Scroll_Right;向右滚动
    ) x. @0 ^7 w! L5 W: B9 `/ M
  2833. LDA #$00
    # V& B1 k: }: p1 t
  2834. SEC1 d7 I8 l8 L# X' W% `0 j
  2835. SBC <Scroll_H8 M! D  B! F9 ]+ |
  2836. STA PPU_SCROLL  r; y4 r9 n$ |: P
  2837. STA PPU_SCROLL  }, X/ v. e( }/ I6 A( v
  2838. RTS% P0 d, n) W# a
  2839. + Z8 K8 U" \" I! G( G; q& E3 s
  2840. ;==================================================% b" V- M0 n4 S. v4 X) B; [8 I
  2841. NmiProgram;Nmi中断处理+ W5 M9 U3 u& X
  2842. PHA% N4 l4 r1 G) n2 y
  2843. TXA
    ; L% f% M$ v$ X0 E8 R
  2844. PHA
    0 ]9 `' L2 G( j( g- c* A5 S
  2845. TYA) Z8 A) U2 _  ]: f) u9 N
  2846. PHA
    : }9 k" k7 ~- b( n3 ^$ E( \6 `

  2847. & Y9 z; s- F& b+ w8 x6 C" d
  2848. ;读取清除Vblank标志, 防止重复进入
      T( \1 r. I  N! V+ ^- m
  2849. BIT PPU_STATUS4 R+ @5 C8 o" W* l8 E
  2850. , N# p3 P4 J; t* f) e; \$ c
  2851. ;切换主程序bank
    : K8 T) L) d% Y# |6 a/ [5 ?- s
  2852. JSR Switch_Main_Bank
    % P* {9 p6 N# s. M+ _

  2853. 7 q' D. }9 Q! M; ]8 y! b
  2854. ;Nmi处理
      D; P8 E+ V1 Q
  2855. JSR NmiProcess) |7 d. G- X5 F

  2856. " X9 p5 _9 l. D7 ~
  2857. Nmi_Proc_End
    " a$ \2 C" R% A! Q4 ~
  2858. PLA
    - h. b( m' n7 T  M; t9 e
  2859. TAY$ H& S  P3 h7 C0 G- h. J, f
  2860. PLA% M1 H1 @+ o( V
  2861. TAX( b2 v+ g' `( Z. z* \
  2862. PLA2 }1 A  o4 Z2 x$ W0 K
  2863. RTI7 R" `4 g0 i: S5 T& q
  2864. " C+ ?" X. V' @$ H
  2865. ;==================================================
    * Z7 H" N* i# @4 n& r( h
  2866. ResetProgram;重置中断处理
    2 _- w5 {" g- ^0 C( ^( n/ q
  2867. SEI: a1 q+ M. x; z6 X: _$ i. G* ~
  2868. CLD' E+ R  B" C' q# h' K3 H2 B; Z
  2869. LDA #$00
    / z3 B' [0 v; w2 U8 p, B5 f
  2870. STA PPU_CTRL
    / t7 {* ~( \5 ~# u" x) d1 {
  2871. STA PPU_MASK
    / S' P. r8 m& ~  X! T6 C% y$ H

  2872. 2 ^8 C/ Y  k9 m/ W
  2873. ;切换主程序bank
    ; x# {/ W* [- T! T$ q
  2874. JSR Switch_Main_Bank2 r: a; k" {! G; W

  2875. 2 k5 ~* E) q+ y7 n1 t0 _$ }" l8 m
  2876. ;程序处理开始! X0 _% v" [# l# ^* m% H7 e6 `3 Z
  2877. JMP ProgramBegin9 W6 P) ?" W% Y" X2 \9 A' x  [( ^* G
  2878. 6 r( r0 }2 O8 ?( j
  2879. ;==================================================5 \( C* [$ D# f, g2 e/ S6 E
  2880. IrqProgram;Irq中断处理
    . Q1 z* I) U+ q% X
  2881. PHA) P# a: S# Z& s  u5 ?+ \6 L( ]
  2882. TXA+ d8 M% f! G1 X# y& n
  2883. PHA
    7 N* y. h" V3 y. \7 M9 @- X
  2884. TYA2 f; m8 ]- M7 r, `  X
  2885. PHA& u; J0 \- @, x. r) E9 h, ~

  2886. - S' W0 L, P" C8 H# C, w- h
  2887. ;关闭IRQ8 x  E1 Z7 Q) a& u
  2888. STA MMC3_IRQ_DISABLE
      B" |. Q" b! m5 X5 _. [
  2889. ) F" @' J  c! o
  2890. ;允许下个IRQ触发: _" q; i5 f: e; c
  2891. STA MMC3_IRQ_ENABLE: O9 Z7 H1 u2 R  y
  2892. 1 U9 w) W0 ~; F
  2893. .IF IRQ_SUBPROCESS_JMP
    / k: ]; N* G: `  D8 }$ E
  2894. * ?; T1 k) H, g
  2895. ;执行IRQ过程8 o3 J! N/ k6 N
  2896. LDA <Data_L9 J3 z2 v. ?8 ?4 U
  2897. PHA- y' D" D9 j- \' C* ~
  2898. LDA <Data_H
    0 K3 |  a3 }1 w3 ~
  2899. PHA
    ; |/ U! z% |1 E% `: o
  2900. LDA <IRQ_Process_Index
    6 q- G( `( N# y1 q; ?' ?& e
  2901. ASL A3 j5 U  r( ^+ W7 S
  2902. TAY. I) b! x+ R. D
  2903. LDA IrqProcessAddr,Y' A$ E" W* g' X  N& v5 }# ~
  2904. STA <Data_L0 }7 K& ]8 ]. ], p
  2905. INY. ]( |2 [) H. f, Q
  2906. LDA IrqProcessAddr,Y" U' o, I0 B" T5 s3 Y* |
  2907. STA <Data_H! y7 S9 C$ W2 J1 k- z& U, N
  2908. JMP [Data_L]# C7 f! v2 _+ @

  2909. : S5 f# F: Z$ Z# x  F
  2910. .ELSE. M7 F& B4 i3 c; B1 N1 k

  2911. & \5 C; x( X9 G; `
  2912. JSR IRQ_Process
    ; g3 R2 W* I3 ~+ l
  2913. 2 S' W  ^8 y0 F+ g3 L3 \  i) E
  2914. .ENDIF! F3 p# f4 {; y) N( D
  2915. , c( @. ~! P6 o! p
  2916. IrqProgramEnd
    7 }& Q6 ?( x5 v2 |
  2917. .IF IRQ_SUBPROCESS_JMP
    1 `" d$ l) s6 |, v8 S* B
  2918. PLA, W" n7 x, ?/ X9 O# ?
  2919. STA <Data_H
    0 B" V$ {1 z: W5 e: N
  2920. PLA8 n/ ^' p8 l1 x
  2921. STA <Data_L- ^. m3 u+ I% C7 D. l
  2922. .ENDIF
    , {6 P5 o; k$ D0 M, t$ ~; X
  2923. PLA* t: m  C. e& C! d  ^; Z% ?
  2924. TAY6 K0 M1 N8 ^& f6 ?
  2925. PLA3 p. M2 b: X* }( G# s  b( H
  2926. TAX8 q3 e  L5 w. o" y; ?
  2927. PLA, v8 F$ F8 u0 Y# z# K3 K: V
  2928. RTI
      W- N0 g5 j# H% i( F/ f0 u+ X
  2929. 5 r$ w" D. L* Z5 {. W+ E
  2930. .ORG $FFFA
    1 {( a+ v& S( n( I- n
  2931. .WORD NmiProgram
    2 N6 E2 Z" z0 l! Z, E) N
  2932. .WORD ResetProgram
    8 q3 u2 V5 f; O  r
  2933. .WORD IrqProgram
    ' b: q2 C+ G: X* m

  2934. 9 U. w+ }1 E0 V+ X. {* u: P" e1 s
  2935. .BANK RESET_BANK & BANK_DATA_MASK+ l1 j: \( V, J9 J* u9 J
  2936. .IF SOUND_BAR_SHOW_ENABLE$ D" d+ z3 d& Y4 `0 G1 x
  2937. ) x: i- ~# s( A+ Z
  2938. .ORG $FE00
    . T( B0 [' ^6 c( i! U, i/ }
  2939. PHA& B: B9 n: [! I, E: |, `
  2940. STY $07BA' P! C- w, v2 z3 t( e
  2941. LDA #$8D
    2 P- s1 y4 y# o1 s4 y1 y
  2942. STA $07BC
    ' K/ A2 }0 p/ v$ T  }' n. E
  2943. TYA
    0 J" y0 Q  @: p, _0 o
  2944. CLC
    + ~# I+ F1 T$ J: X, D3 b4 A! M9 l
  2945. ADC #LOW(Sound_Bar)4 U$ _* u3 ~4 ^: E: H! T
  2946. STA $07BD" h! m  g0 Q) f: U
  2947. LDA #HIGH(Sound_Bar)
    " U  [) v, J  z% F  B; B
  2948. STA $07BE, C; ^) b6 ~. Q- T+ [+ A6 z- ?
  2949. LDA #$60
    . I( G  @" t$ N1 g4 q
  2950. STA $07BF
    + Y" S5 }5 `5 r& c/ R' ~
  2951. PLA
    6 s. t7 Y$ J  ]  E+ N/ k
  2952. RTS! z, [  R  j: C6 K6 e

  2953. ; ~5 E7 J5 D1 x0 M
  2954. .ORG $FE20, O0 f" W6 P: o6 D! U. p$ |
  2955. STA $07BA. r8 }+ }' h& N; S! M7 G
  2956. CLC
    * u8 I, O  F: F: f: ?
  2957. ADC #LOW(Sound_Bar)  c- ]2 T9 G1 y8 ^
  2958. STA $07BD
    3 F. u; }1 t: v7 V+ }# d0 c  r
  2959. LDA #$8D
    0 p7 ~! p6 H$ K1 I: K' c0 {) U0 N6 R5 C
  2960. STA $07BC
    - H+ [( i8 P$ c4 f
  2961. LDA #HIGH(Sound_Bar)
    3 k1 k- t% Y+ H+ M
  2962. STA $07BE6 s3 {5 L1 p" k4 M4 u4 T
  2963. LDA #$60
    / o& z0 v2 a# m% j
  2964. STA $07BF3 C- E! {/ N- F. ?( `7 n6 u6 o8 @
  2965. RTS7 m. v  }; D! F! P7 C

  2966. 1 d2 ^. i7 i3 x- Y6 Z; \9 }
  2967. .ORG $FE40
    ( x- R$ P  d4 |, v' c. @  ~2 `
  2968. PHA
    6 E- r) Y& a. @% r+ X; {
  2969. STY $07F1# M$ g( y' p9 E- z
  2970. LDA #$8D/ R5 S5 w; J& j+ U' n1 s
  2971. STA $07F36 }8 H, Z% k; l/ s3 O+ R% L
  2972. TYA
    / u# o& o* T5 h
  2973. CLC( T* d3 [. i7 y6 H! ]
  2974. ADC #LOW(Sound_Bar); Q+ P# C9 O8 D
  2975. STA $07F4" P" l. F: ]" R6 s% r$ _8 o) ^
  2976. LDA #HIGH(Sound_Bar)6 ^! W9 W0 O4 @3 Q
  2977. STA $07F5! _, c* V2 |% w5 _9 l! ]
  2978. LDA #$60
    * s5 l7 A' N( _$ S( u
  2979. STA $07F6
    ) T2 s3 F' ]0 Z  c3 }
  2980. PLA
    9 ^) A, r, V1 k, N. L" Y: d$ `: c
  2981. RTS
    . J5 u% @+ ^3 i' d
  2982. - S  U/ ^0 y1 C3 x5 K
  2983. .ORG $FE60( ?: H4 j2 X% b2 A
  2984. STA $07F16 q. ~. U* K7 |8 ?) l
  2985. CLC
    ( y& ^; j; h7 h9 O; `
  2986. ADC #LOW(Sound_Bar)
    2 O$ w+ A& r) I  Z3 V1 T0 d9 o3 M
  2987. STA $07F4
    4 l% @8 \+ Z) A) `- }$ Y; X
  2988. LDA #$8D' a# {7 I; }7 V" w" F& w1 U( V, b' Z
  2989. STA $07F3% @  [9 c+ z5 |! l- E: y. Z
  2990. LDA #HIGH(Sound_Bar)0 D, w# i" C" Q- `- @. ]' |
  2991. STA $07F51 C+ u+ r' R' }
  2992. LDA #$60
    ' O( g$ O. m1 W7 j. t" T0 S
  2993. STA $07F6
    + A% z1 Q" \# U* X
  2994. RTS
    / ~9 b' K; v% b4 \6 E% ~% E0 y

  2995. 3 U) W2 A8 v+ G# _
  2996. .ORG $FF40
    1 T* B2 Q3 D2 N8 [8 g: l1 g3 M6 V6 R6 D; ?
  2997. STA $4000
    / ]: l9 R# M3 ^
  2998. STA Sound_Bar + $00
    $ L. t( r3 |" q8 M& H
  2999. RTS' Q0 Y3 V6 z; v* r" e; X' D
  3000. * D9 ]7 ^& E1 @  S0 @- l
  3001. .ORG $FF48! c$ {: X0 d4 ]! R0 R6 M
  3002. STA $4004
      m0 G6 K# r* }/ g2 W, F6 V
  3003. STA Sound_Bar + $04$ c1 X3 T' B1 B0 `
  3004. RTS7 B" x9 z6 q9 {: r

  3005. 8 m1 t- o5 `3 w# ], e
  3006. .ORG $FF50
    8 o% O( e; z7 Q6 {) D' `, Q
  3007. STA $4008( Q; @' W9 F: F' k
  3008. STA Sound_Bar + $08
    - ?$ J3 o& {8 J; `; _! |0 H
  3009. RTS4 t+ {. B) j0 i0 v3 j
  3010. ! [& }. h6 o; V9 S1 l
  3011. .ORG $FF58
      ~6 N8 G6 z8 |$ L4 F, _! D1 @: B8 O
  3012. STA $400C
    " u. V5 U6 P% O: I* {% D2 ?8 D
  3013. STA Sound_Bar + $0C; O  J. S1 C- p  M
  3014. RTS% W8 U( k9 d$ O1 N& x
  3015. # G" J# W. H- R  z
  3016. .ORG $FF609 f6 W# L$ R, v4 p2 G
  3017. STX $4000" s% k1 G# h8 l% x  J7 h
  3018. STX Sound_Bar + $001 S: T- w0 p' G* F6 `
  3019. RTS
    ! x% A9 L" q8 Q% V' q' M
  3020. ' s. {* U, l2 s- _
  3021. .ORG $FF68
    % ?' V" H& y! x
  3022. STX $4004
    2 y7 j  }6 n9 L: z: P7 G$ }
  3023. STX Sound_Bar + $04
    ' S2 G6 w. H' U1 \6 t/ K
  3024. RTS
    7 ]6 `: c# L: ?) |8 y  ]$ `
  3025. % o( A( G( p: _1 ]! f9 i' J
  3026. .ORG $FF70: c7 q- Z$ V: c! Q3 V3 b
  3027. STX $4008
    9 f; R* `9 }% X
  3028. STX Sound_Bar + $08
    $ }- U4 `2 }+ y" L* {
  3029. RTS
    ( ?" c/ Z  G* Z9 o* z& C
  3030. . T( `. O1 I( m1 l" U- Y, Z
  3031. .ORG $FF787 N# S2 t# @; l& U) N, R* k; U7 ]
  3032. STX $400C4 f& F) U, v/ c( F. M$ T0 T
  3033. STX Sound_Bar + $0C
    ; P# B( `7 m8 z
  3034. RTS+ _6 K' f& o3 L) p, S/ l
  3035. - c) r* D" m( F# k. V1 `5 n0 p
  3036. .ORG $FF80
    2 G  H9 ?; U5 [) N6 @
  3037. STY $4000
    - F: x9 J& |1 o/ G3 h9 l
  3038. STY Sound_Bar + $00
    % o; Y7 v2 Z6 p) H
  3039. RTS
    / \- s  H# n" x6 [
  3040. 2 }4 F, X7 d+ \/ \
  3041. .ORG $FF88
    2 B! L/ W, s2 }) B! L% L* @1 S
  3042. STY $4004* j3 M- {$ L' V$ r$ U
  3043. STY Sound_Bar + $04+ w) y, ~/ u( {% Z6 Z$ E
  3044. RTS* F; [& }) A! Y

  3045. 5 y1 h) Y4 t+ L( N/ K& ?; o4 l
  3046. .ORG $FF905 h& r) R/ c5 E; _% ]# Z5 C  Z
  3047. STY $4008
    ( n8 P0 F" x# X5 Z
  3048. STY Sound_Bar + $08
    # `- U$ J* y# R* S- z9 G+ J
  3049. RTS" @" e8 v# l" _0 S6 e$ D
  3050. % s3 }/ C+ |$ U! X+ D
  3051. .ORG $FF98, Q* E9 r' B2 D
  3052. STY $400C: ]9 s  P' F+ [2 V7 J" Y
  3053. STY Sound_Bar + $0C# l* L5 g3 R! ?( q* C" S
  3054. RTS% {, W9 c0 H" ~; @

  3055. 8 v( M' G) }4 I- f4 A7 [! q
  3056. .ORG $FFA0& f3 A6 _8 K+ X! q+ u$ |1 U
  3057. STA $4000,X, a# I0 |- O: v& X: Y  U
  3058. STA Sound_Bar + $00,X
    0 c! G$ ]* }1 T$ a8 R: W
  3059. RTS
    2 _% Y6 k3 F1 K* C3 r- z
  3060. 8 Y0 R$ i$ e# S
  3061. .ORG $FFA8: s! f; U1 z- [$ K) u
  3062. STA $4000,Y
    3 ]9 c7 H, v2 t$ U, n) ?( ~
  3063. STA Sound_Bar + $00,Y8 ]$ X2 f4 `) e6 c* [
  3064. RTS- F+ J* W- o1 G- \2 E

  3065. 6 G, w  E; T( @6 l
  3066. .ORG $FFB0
    8 \0 N) K3 }: t5 |6 f( s
  3067. STA $4004,X
    9 ]3 Z5 B% I; C. q# e
  3068. STA Sound_Bar + $04,X
    ! b, G+ e: b* r: H1 X8 K; w8 H; n
  3069. RTS
    1 I& z& C( c2 m
  3070. ( L$ S: n. X) }8 `
  3071. .ORG $FFB8
    ; X& J. _' I* b. X
  3072. STA $4004,Y/ ~( |& W! z# C! S
  3073. STA Sound_Bar + $04,Y
    * f. i8 S3 x7 k7 X! ?' i+ N. u
  3074. RTS6 [. z$ Z5 c# K* Q+ f) S8 r2 o

  3075. 9 z; t7 t8 V( T, q0 Z" q* X
  3076. .ORG $FFC0) H, E, ]& p( j" q' x
  3077. STA $4008,X
      i" K# i+ I$ P9 _; F8 _
  3078. STA Sound_Bar + $08,X
    3 b2 L4 f3 l  b$ d" K2 q  i
  3079. RTS7 b  c( D- l# f  _$ G3 h- M) u7 ?

  3080. ) f: Z& |. B' f2 s4 e
  3081. .ORG $FFC8% f+ e) }5 K7 f- G2 |! f
  3082. STA $4008,Y
    7 {) u* }- k  y0 G/ h) R- X- t
  3083. STA Sound_Bar + $08,Y$ \. N7 h$ _& b; t4 {. b" {
  3084. RTS
    0 o/ c8 b% S' f9 y- L  _
  3085. ; i8 c+ {) j4 V9 H* O+ Y
  3086. .ORG $FFD0# o6 Q- d/ k2 x. l2 V; m+ r1 Q
  3087. STA $400C,X
    ' J$ X0 M$ l$ D
  3088. STA Sound_Bar + $0C,X
    6 A- q* p. E% ^* v& h/ ~0 Y1 t
  3089. RTS. w) ^9 G( c- H! v. _
  3090.   }) w9 j# g# r$ h; b
  3091. .ORG $FFD8, v. A6 A. G" M2 B; T  J$ v
  3092. STA $400C,Y. G7 k; \& I2 W
  3093. STA Sound_Bar + $0C,Y4 Q) A; u2 b( [/ h& j
  3094. RTS
    : R4 m& t7 M0 [0 U6 @7 {

  3095. * w1 t9 k0 O' J; r0 a' Y$ j  s% E, Q
  3096. .ENDIF
    ( B4 J* ]% [  }/ j( E
复制代码
2 f3 D+ s9 f* A0 c, z& O9 p4 O2 U- W* B
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

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

签到天数: 3022 天

[LV.Master]伴坛终老

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-17 00:47 , Processed in 1.109375 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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