EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑
6 p: x, F) `7 f# `: @7 x- @; `" Y* a, P
[FC][音乐12 IN 1]
: F) J  X" S5 {, p' Z" d  w* N时间: 2023.07.23$ T' |, I! n/ N: w& D5 t
作者: FlameCyclone% @& y* v2 x( [( |( F4 u

/ W4 [/ Q& z3 R5 F+ f* M收录音乐内容:
; y0 R: C/ j: X" j/ A1 y4 P1.Raf世界1 G3 [5 U* R0 O' j3 l
2.最终任务- N* C: m8 F' V+ n' k+ g9 {
3.赤影战士
% Y# w+ x! |, Z; W4.双截龙& m7 k8 w# O, F" F8 P4 Y- T  L, t: S
5.双截龙2
" }* J" S; Y9 U6.双截龙3& m& d, z& m8 u* c% H) w( E; X
7.洛克人- v/ t* ]9 g+ Y& r9 a/ a: o- Q4 A
8.洛克人2
/ L$ ^) v! c$ {9.洛克人3
/ y$ o, u3 ]/ P9 q10.洛克人4
( A6 @) X3 D9 T; [2 l* ^11.洛克人59 ~& v; P* L2 j- V4 {6 S
12.洛克人66 a$ d' C! u# A0 y
$ m" S5 K  P. J
操作:' b5 F/ ~! i3 h$ y5 G
上键:         上一个专辑8 l4 m& C, r- [& y4 ^
下键:         下一个专辑/ [7 h- Y' g* ]3 X$ j
左键:         上一曲- |4 M- q/ i% [6 j
右键:         下一曲
, l( c  A, t4 e/ `5 JB/A键:        前10曲/后10曲
9 b/ T4 k; }3 }; X4 p选择键:       下一页
" t5 S* b6 X# ]; i0 c2 [开始键:       停止/播放! Q: C/ \" ]+ Q- y5 h! l4 i9 T

; P5 z/ c# @$ C- Chttp://flamecyclone.ysepan.com/1 T8 T+ C! M7 r

; I4 Q: N9 q, Q
& u( X2 w( H9 _5 O$ Y5 j0 A2 A2 `2 [4 ~2 j  D( i9 T

7 A9 Q% l7 Y8 ^. h3 k
  1. ;[FC音乐][播放器模板]
    / O/ F8 M) J$ ~& Z
  2. ;FlameCyclone 20230710
    1 F9 u8 I% y5 C4 |' n* l3 ?

  3. 8 o1 s+ r' L3 V4 d7 f0 X
  4. ;文件头7 i2 k5 s/ M  q) n6 B! j
  5. ;======================================================================
    ) W" a" ?( ~6 E/ m8 ]" v
  6. .INESPRG 16                                             ;16KB PRG 数量
    4 f9 N* I# @) |# A! b$ q- F; B
  7. .INESCHR 1                                               ;8KB CHR 数量
    0 z: z" A. a, M3 _3 U' U3 c
  8. .INESMAP 4                                                   ;mapper 4
    5 c. L2 v- m, m1 S3 Z8 a
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直- W5 d; K/ t) x: _  ]$ U' a
  10. 5 ]6 o- L+ r$ w1 o" w
  11. ;==================================================
    - o) T' U" ~& X* ~$ p) T
  12. SOUND_BAR_SHOW_ENABLE       = 1+ @* o, O( h) i0 Z
  13. ;==================================================, W/ Y4 z: f3 U8 q% G9 l/ H: ^; |
  14. BANK_DATA_MASK              = $1F4 e+ \5 e: k$ p/ p) t8 m! Z
  15. CHR_RAM_ENABLE              = 07 r( \' l( R$ j) W  r3 S+ Y" _, o
  16. IRQ_SCANLINE                = 136
    % X$ S" t) l, f% S5 F* Q- G
  17. ;==================================================
    2 I2 l5 P: [/ |
  18. SOUND_DATA_BANK_00          = $00) ?5 P( V; r5 L% \7 |. y
  19. SOUND_DATA_BANK_01          = $01% `4 w: X$ h& _  l) q
  20. SOUND_DATA_BANK_02          = $02
    / m+ ], @4 ~/ p6 w, m, y  I
  21. SOUND_DATA_BANK_03          = $03
    $ Z# m3 |) C& C  b
  22. SOUND_DATA_BANK_04          = $04
    " G) R( A. C6 c' U: C& j0 T4 [! T
  23. SOUND_DATA_BANK_05          = $05) F5 d; x, a1 D+ S
  24. SOUND_DATA_BANK_06          = $06
    4 s; B  u- E0 k' ^* G+ j5 N
  25. SOUND_DATA_BANK_07          = $07
    0 }9 _7 D( w( J% M+ d( R
  26. SOUND_DATA_BANK_08          = $081 d  I1 z6 u  J7 |  V9 a
  27. SOUND_DATA_BANK_09          = $097 R- y8 m' D: |  |- G+ ^
  28. SOUND_DATA_BANK_0A          = $0A0 h8 `/ l$ k0 s' q( D9 t
  29. SOUND_DATA_BANK_0B          = $0B+ @. }) [  J7 P) ]
  30. SOUND_DATA_BANK_0C          = $0C$ N# ^, @- X, ~/ M: d8 ]3 H$ g
  31. SOUND_DATA_BANK_0D          = $0D
    : G, @* y1 v$ V+ o5 O
  32. SOUND_DATA_BANK_0E          = $0E  u6 K8 f& `/ G9 C
  33. SOUND_DATA_BANK_0F          = $0F
    ; R. _, F# L8 ^

  34. ! [$ I; b- C# I! ?2 d, \- H  `0 u
  35. SOUND_DATA_BANK_10          = $10
    7 m2 ~+ @& t) D& I7 Y4 y" C
  36. SOUND_DATA_BANK_11          = $11
    7 G& w: K) k: |4 V% G
  37. SOUND_DATA_BANK_12          = $127 s, x( g, _/ m: j: m- {1 p
  38. SOUND_DATA_BANK_13          = $13
    5 X8 q. n- d; ~' y. _. G- w: A
  39. SOUND_DATA_BANK_14          = $14
    5 K9 [+ t% t7 u7 t* `+ ~2 K' A: v3 O
  40. SOUND_DATA_BANK_15          = $15
    9 w; C$ w; n" \- d; f% s  A# ~; j: P
  41. SOUND_DATA_BANK_16          = $16
    ) y9 _4 Q$ f1 q- W8 W
  42. SOUND_DATA_BANK_17          = $17
    7 U7 l+ P/ U- I9 l% e' Z
  43. SOUND_DATA_BANK_18          = $18( T3 R' W3 V' c' C
  44. SOUND_DATA_BANK_19          = $192 |) r% q# p5 r
  45. SOUND_DATA_BANK_1A          = $1A
    " P; v" H/ E+ ^. G0 D$ [% Y( i
  46. SOUND_DATA_BANK_1B          = $1B
    " H9 ^7 {, P$ w) j8 C
  47. SOUND_DATA_BANK_1C          = $1C2 y; P0 c) Y& f, A( r/ Z5 Q
  48. SOUND_DATA_BANK_1D          = $1D& |& o5 ~4 T" o5 g( w. F
  49. - X- _- g6 P3 I+ {
  50. SOUND_DATA_BANK_C000        = $1E3 h. s5 |3 K9 ?# C
  51. SOUND_DATA_BANK_E000        = $1F. H- V5 z8 W/ g+ F
  52. ;-------------------------------------------------0 t/ H! V$ `: [, e
  53. CHR_DATA_BANK               = $20
    3 k) H7 P2 X% Z! @
  54. CHR_DATA_ADDR               = $A000# I1 u- H9 F$ Z1 _- R  z2 t1 h
  55. ;-------------------------------------------------3 \: s. @, i6 N) @" U5 N
  56. PROGRAM_BANK                = $00
    * Z) A& w! B& r& o/ R" ^
  57. PROGRAM_ADDR                = $8000
    5 N" g' ?: b+ |/ `, |3 ^% R
  58. ;-------------------------------------------------8 D, C, L& e: E5 X/ W5 {2 Q+ Z
  59. RESET_BANK                  = $1F
    ( \+ Q# q+ H) u0 G  p
  60. RESET_ADDR                  = $FD00* O/ {2 e8 L0 r2 W' x; q$ N
  61. 1 ?6 m1 N3 i" T3 R! r' D* c
  62. ;==================================================4 m, ]) b+ ~+ }" X" {
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数
    1 J" ]6 n( E; ^( u
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引2 }; j& s/ j1 p5 {" W' Z5 L
  65. PAGE_SIZE           = 5                     ;每页节目数
    ) A. y7 D6 k: V& o& G- k
  66. & p9 ?2 @/ O; }! b
  67. ;==================================================
    8 I* A& q8 x/ M
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除
    % @1 O  K3 D: ^) g
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数" H/ F; x# o, e" W5 d8 u
  70. .ELSE
    ) E: O# I+ w7 [: a2 j. u* H" b
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数
    0 C6 ^; K$ Y7 E5 p' A2 _8 v1 x
  72. .ENDIF# }8 s- {9 q" ~* O4 _3 n; E. f
  73. & O; W! H( P1 j: |. K- f
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引- ]! z/ D# s+ s8 x
  75. 8 T" \% v& x0 g8 H
  76. ;==================================================
    - v  ^: O4 W0 \$ ^4 k
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置! s) X6 x! y7 {* P' @; S
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 2
    % S: z1 C4 b8 |7 N  r. R. _
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;' q9 Q' f1 |$ u  F( t$ D. W
  80. ;==================================================' r4 n: o. A7 o/ y# ]
  81. Caption_Text_Pos    = $204D ;标题文本位置
    % F3 ]3 Z  [  R( B
  82. Author_Text_Pos     = $2324 ;作者文本位置
    5 u' D( G8 J: ~1 y- o( q
  83. Date_Text_Pos       = $236B ;日期文本位置- w" R" p" |7 C( U2 P6 F, d, J
  84. ;------------------------------, a9 y  \; ]5 v% S) v# {$ l
  85. ;------------------------------5 w. y/ B- d9 d
  86. .IF SOUND_BAR_SHOW_ENABLE
    : O) j9 y# ?3 S- V5 |0 w
  87. , ]7 J4 c/ ?, n" M" L! E
  88. Play_Index_Pos      = $2273 ;当前曲目位置: ?5 v  T2 \# O, y
  89. Play_Time_Pos       = $22B3 ;播放时间位置
    3 H* ?+ Y" K, S! Y& \6 }
  90. Play_State_Pos      = $22F3 ;播放状态位置
    # t+ q3 c, A" }+ |

  91. / Z' u1 V1 B2 W. s5 ^
  92. .ELSE4 b; \( t) |/ l$ K  n. f

  93. % ~; N0 A2 u& n  F% F6 q' \
  94. Play_Index_Pos      = $226C ;当前曲目位置
    0 Y, g" t4 \. T, `. F3 e
  95. Play_Time_Pos       = $22AC ;播放时间位置
    * ^8 P  g3 K+ x8 p" a( }
  96. Play_State_Pos      = $22EC ;播放状态位置
    / O* j* {: b4 [" N8 s
  97. + b. N# Z( {6 e4 G4 z' e# `. |
  98. .ENDIF2 G2 q5 W9 A) e' p: J% M
  99. ;------------------------------0 K# j9 H6 o! o- q
  100. Track_Name_Pos      = $222B ;曲目文本位置
    ! ]9 y+ G. S* g8 i1 t
  101. ;Track_Name_Pos      = $00 ;曲目文本位置
    + D' X) K  o  _5 y9 P0 B+ Z
  102. Sound_Track_Pos     = $2265 ;声道文本位置' w6 z; M% D  ]8 i7 B
  103. Sound_Bar_Pos       = $2269 ;音乐条位置8 K+ I% J9 v. A0 _- L
  104. ;==================================================; m/ Z9 a9 ?- M, @# I2 G0 o
  105. Scroll_X = $00
    3 J' ~- N" E4 O5 j
  106. Scroll_Y = $006 A8 ~5 B/ S3 C0 T
  107. ;==================================================5 A) f, ?  h2 P0 F$ w0 h8 q
  108. Sound_Ram_Addr_1       = $0100
    , p, K* v1 w% C3 q+ |, r
  109. Sound_Ram_Addr_1_Size  = $80
    ' n7 [% ?7 d0 S5 B
  110. Sound_Ram_Addr_2       = $0090; Y9 ]6 r: l& Z# G2 J: g6 a& m9 [$ b
  111. Sound_Ram_Addr_2_Size  = $705 C; f8 X+ C9 p& n2 B
  112. Sound_Ram_Addr_3       = $07007 Y( |8 |: F- g' h6 |2 F! T5 e0 @. B
  113. Sound_Ram_Addr_3_Size  = $007 J4 p; D6 V& ~$ k% a7 Z
  114. Sound_Ram_Addr_4       = $0400; `. c; ^5 {9 Y1 z3 {  x, u0 ^0 N
  115. Sound_Ram_Addr_4_Size  = $002 n" {% U6 v3 Q
  116. Sound_Ram_Addr_5       = $0500
    4 |+ d/ E+ D8 ?# E) Y# F! H: T
  117. Sound_Ram_Addr_5_Size  = $407 _; T% ?0 z( u, G' s
  118. " J3 ]1 t+ V3 e
  119. OAM_TEMP_ADDR   = $0300
    ) _: i- @3 D, ~& ?

  120. . @0 P3 ]7 ~$ ^& m& ?4 y
  121. ;==================================================
    ( q1 R/ k- y& H0 s; B0 ^
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器
    - h1 O; m$ d" S! @2 N# K8 Y% L" J
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器
    $ u: V) A5 \& q) u6 t. B9 t! ~. V
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位% a6 l; @# W: s# [
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加1' B0 x/ }' G7 M0 s
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加1  I- t, W8 p/ g6 V
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器 3 S. i5 k2 {' _5 b& D- o
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加
    # |9 ?1 z' l: o) T% O& O" s2 J7 j) \# d
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32
    * I4 z! c4 i+ I# h1 |$ V& E
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存0 V" S( w# s3 Q/ q4 ~) u' h
  131. APU_STATUS              =   $4015   ;声音通道切换. s: S6 S" D% ~% _& u! [/ ^( c
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通  ~7 ]/ `) \% m9 @
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通( a- w# o0 Y" S
  134. ;==================================================
    " b+ e- c4 r& G+ X& v
  135. MMC3_BANK_CTRL          =   $8000% t+ z" ?; D  i& B: _
  136. MMC3_BANK_DATA          =   $8001
    - v. Z* S1 p+ j4 Z
  137. MMC3_MIRRORING          =   $A000
    + d6 e# H$ L6 }1 S
  138. MMC3_PRG_RAM_PROTECT    =   $A001
    + I% E7 W8 k/ R
  139. MMC3_IRQ_LATCH          =   $C000
    1 k* l9 r1 y3 r) |  X, C4 p) ^
  140. MMC3_IRQ_RELOAD         =   $C001
    & T+ \/ f  Q. f( B2 V
  141. MMC3_IRQ_DISABLE        =   $E0006 A  c# W# h( q. B' B' x
  142. MMC3_IRQ_ENABLE         =   $E001
    ) J) u+ |' `% I2 V( k" ~
  143. ; t- r3 E5 N! R1 j7 f, L" G
  144. ;==================================================! {: t+ b/ A" h% p* {* k1 n
  145. PPU_Addr        = $0200
    + {( l7 _; G8 ]
  146. Palette_Addr    = $02C0
    7 `( r) ~# J! ~; q( ?, D
  147. Sound_Bar       = PPU_Addr+$E0  a$ |7 d1 e9 l( _- D
  148. ;==================================================
    / p: I8 g$ c  `  {+ G( }' b
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D
    # }# t" P8 C* C
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$11
      Z: _9 s; c; O" k) D
  151. PALETTE_UPDATE_MAX      = $2C
    & N6 S( A) X& V) x% ?7 A; }# z! E
  152. PALETTE_UPDATE_MIN      = $217 h2 \  Q. G! o' e. p) z2 o
  153. PALETTE_UPDATE_INTERVAL = 60; K. L) K$ j% V
  154. ;==================================================' B! S4 C8 o- ?  z3 {7 t
  155. Sound_Bar_Cnt       = PPU_Addr+$F0
    % x+ S  I) q6 n6 d
  156. PPU_Cur             = Sound_Bar_Cnt+$02$ u, d* F$ k& |7 z/ u
  157. PPU_Addr_H          = PPU_Cur+$03
    3 E; O0 g4 N! G* N' e
  158. PPU_Addr_L          = PPU_Addr_H+$04( a& a2 L' \# Y3 m9 `6 l! D
  159. Screen_Ctrl         = PPU_Addr_L+$01, Z, `" ~/ W# s/ C' a
  160. Screen_State        = Screen_Ctrl+$01
    : p) I7 H+ b: `
  161. ;==================================================  J0 u  ~: \' k" R0 U
  162. Use_Ram_Begin       = $50
    5 K5 v0 ]* i! l" K# y+ j0 g; E
  163. ;==================================================" Q7 c: g( _2 u! v0 v
  164. JSR_Addr_Op         = Use_Ram_Begin# R( H. W/ _+ i4 m, Z
  165. JSR_Addr_L          = JSR_Addr_Op + $010 H: U6 v& [' |- x, R4 t& G
  166. JSR_Addr_H          = JSR_Addr_L + $01' u3 |0 H  J4 {
  167. JSR_Addr_Rts        = JSR_Addr_H + $01; D8 y6 W. H5 u3 H( L) A2 \' Y0 @3 j
  168. Data_L              = JSR_Addr_Rts + $012 F' U; x4 ^- T2 t$ P0 [  w7 l
  169. Data_H              = Data_L + $01* S4 Z. e: ]8 r0 B0 Y0 i0 e
  170. Data_Cnt            = Data_H + $013 M+ D2 z& f1 J, {8 ?
  171. Data_Buf            = Data_Cnt + $01: R9 C, u% g; i2 D% P$ A, N
  172. Nmi_Time_Count      = Data_Buf + $01) V; w) _* M8 y3 T
  173. Time_Wait_Cnt       = Nmi_Time_Count + $01
    : l8 l0 W3 ~' q( }; @
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $016 S$ g% J& Z- V8 U1 y$ @7 z
  175. 6 Q1 ?; e/ u% R# b3 i- g. f
  176. ;调色板刷新标志
    9 A- a1 h& M" ^, F
  177. Palette_Update_Flag = Palette_Wait_Cnt + $01
    5 X/ }4 p9 j' t6 m" g& r! \4 b% [

  178. / M7 s- g/ T% j5 c7 w* @( _
  179. ;当前帧文本写入禁用标志: s: ~5 V3 i! V, _" D
  180. Text_Disable_Flag   = Palette_Update_Flag + $013 e0 T" \. M3 g' T7 ]
  181. ( x2 k7 i" k6 M. B( F! [6 }
  182. ;==================================================9 _. I8 {$ e7 U, q' s+ O# H6 G
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动
    . L. O7 ~9 U; J( b2 P; D0 F3 A
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条" z/ Q- }4 t6 l4 [( f
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间) Z6 r* M3 ?! I* W0 `$ Y0 M
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间. o) t6 t5 w* b+ P; |2 y! J/ u0 j
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间
    % W; a  H; w3 i3 v7 t+ k# w* G7 \9 r
  188. ;==================================================9 L' B4 n4 k  e% @# ^
  189. Key_Keep            = Text_Disable_Flag + 1+ c6 C6 m: e6 K0 n4 O
  190. Key_Once            = Key_Keep + $01
    4 M2 R: |1 I; l
  191. Key_Kemp            = Key_Once + $01
    0 d# ]7 o6 V& ^5 H: _% [! F; C
  192. Key_Temp            = Key_Kemp + $01
    0 M8 `) Z8 c! D
  193. Key_Getv            = Key_Temp + $01
    # }% y7 w7 K' u; s0 o' s; w9 d
  194. ;==================================================# k4 ]1 M8 P, s$ A, L
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集
    + J) E% D4 k2 y
  196. Music_Item_Last     = Music_Item_Cur + $01# P- u( n  B( @5 ]
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集
    1 t7 f+ h' u* u  ~2 u# o
  198. Music_Cur           = Music_Total + $01  ;当前曲目: l& `4 \9 \' w# A& o8 I
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目0 w5 W9 W/ I5 t" P/ i8 n% [
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态
    * h. t0 z4 f' M6 t. r
  201. ;==================================================
    0 z' E  B" n2 K2 ^# x7 s( Z( j
  202. HEX_Data            = Music_Stop_State + $01
    & ]1 [  w1 b& b1 ]! ^# {7 ^: k; D, L
  203. DEC_H               = HEX_Data + $01, y& b' v) Z  H  g2 w
  204. DEC_T               = DEC_H + $01
    + r7 l" ^% a9 k2 b8 j# \/ O0 B
  205. DEC_L               = DEC_T + $01
    6 F- R$ r" F/ ?9 }6 B0 @
  206. ;==================================================( |; M- M2 ]; S- g: Q
  207. Time_S              = DEC_L + $01& d+ a+ ^7 ?/ V. J: k2 w
  208. Time_M              = Time_S + $01
    9 D) G: S' b: E) y1 p+ ~+ j2 \& c
  209. Time_H              = Time_M + $02' P( f- A' _6 Q! p( m
  210. Time_Cnt            = Time_H + $03
    % F4 I' X( Z& P# k

  211. , Z* @7 o! p/ Q( ?
  212. ;==================================================8 l. q" F( `( ?9 J5 H* |) _1 W9 o
  213. Music_Bank_8000     = Time_Cnt + 1
    / q: _7 y5 e2 c$ H
  214. Music_Bank_A000     = Music_Bank_8000 + 14 B8 p2 k2 |' J" r* _: Z0 x- \
  215. ;==================================================2 |* q' \; Y) D4 P* [
  216. Scroll_H            = Music_Bank_A000 + 1
    ' H, _6 H. j$ G, V; T+ g# H/ f- z# }
  217. Scroll_V            = Scroll_H + 1
    ; _/ G( q, m) S
  218. IRQ_Process_Index   = Scroll_V + 1/ R0 a) [, V/ S0 _& j
  219. ;--------------------------------------------------
    . B. p- [) t6 @7 x6 `
  220. Page_Cur            = IRQ_Process_Index + $01! [7 t" X0 C# @6 F! S+ r
  221. Page_Cur_Index      = Page_Cur + $014 l) z" z" C. H
  222. Page_Cur_Cnt        = Page_Cur_Index + $01
    6 ]' c4 h3 f  K, o0 Y5 ?- I# E
  223. Page_Last           = Page_Cur_Cnt + $01
    * a* @! K6 g/ p9 e( Y/ x
  224. Page_Last_Index     = Page_Last + $01$ Q& _1 }+ a# E
  225. Page_Last_Cnt       = Page_Last_Index + $01
      @* }$ z; l. E" r8 `4 @
  226. Use_Ram_End         = Page_Last_Cnt + $01" [. j& u# u. }: p; V% Y; h
  227. ;======================================================================
    & C9 H: R  S/ R
  228. ;音乐数据块1 s( d7 u% z! p. g$ I. m( g

  229. : X2 F! O0 p; j! Z2 o2 g! W) z
  230. .IF SOUND_BAR_SHOW_ENABLE
    ( V' R2 D/ @8 M/ n0 @- {

  231. 1 H2 Z" V* y- d* _' `
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    , o# n& T; Q- d4 M! S5 K
  233. .ORG $9000
    % W! ]% |' q7 H; O! s
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"
    # D. j6 [8 b- P' _+ q; n

  235. + p/ p4 S1 ?- U  r8 X/ M9 o5 k. y
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK; d7 P$ B. P% E- Z6 e: }) m
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"9 g& u* s; w0 c9 Q
  238. 0 C: M# D  Y4 H& q* d% O5 G
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    4 u2 V7 P5 t2 P% \$ N  s
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"
    9 z8 ~4 b% [2 `- i9 Z+ c

  241. ) |# y7 _. r, j; v* P
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK5 _1 ~% {+ {1 @& @2 L, K. U- B* F
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"7 M! E# A  N. P: s9 }9 O
  244. , u9 r% L0 Y( m7 H3 k& J
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK' k7 x8 K  x$ |9 o: w0 ], `
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank"
    ' G  P$ ]2 v/ U/ m8 y! X: O% D/ ]
  247.   N6 n1 {% O6 A) O0 l* W
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK2 f2 y! @' N" ?5 c" e
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    8 \5 O4 H# \7 j- r6 ]2 q6 R

  250. 0 B6 n  R" Z. p9 @7 Z# }
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    % g9 ]4 h  k, d6 v, c9 S0 c
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    % B$ v9 }' O) C. h5 p, w4 ~/ ^
  253. 0 J& z5 G$ A) v' l
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK6 F9 _  {" Q# O8 p4 R3 c: J
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank"0 B! Q( v& z" ?

  256. 6 u3 v+ q* H0 d) y. h0 ^1 W
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK' T3 b+ k' a* w3 ^7 J0 d
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    9 ?% D, M: w! Q  C+ d1 P9 v7 x  q
  259. , I& L# t! a  A& O% p. R  A. ?
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK( N8 M3 N! k# O. e0 G
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"" A1 G+ F) J" F8 ^) j! K- Y7 v' {

  262. * C5 t1 U5 k: z' h
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK+ J5 \% r. k7 x& J  W5 _
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"
    ) @. H7 G) i. T! h5 Y
  265. 1 `9 f% j3 y6 j. H
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK# u- w9 o, d/ @
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    & A+ }$ n' `4 K6 _7 R$ ]
  268.   u( G, U/ A$ f, X9 ^$ k
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK8 @* ~* ~( p. P; h
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"1 g' L( `$ t8 M# @

  271. , m0 ~& N7 D' k" u& W
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK  V6 c! W0 A" P  r! I
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"5 i: A! b2 \- Q; g6 W0 k- S
  274. 0 t* ?& m1 w  t, k1 L3 C3 }
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    0 b, n) m- i/ f# N- U
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"" L2 T: ~+ d- s& s2 \$ }  G
  277. 7 U; b( W! }  s3 v4 E
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    ) p& [4 q( y/ L5 ~
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    ( D: ]2 G0 ?% z" F: [! v9 S. a

  280. 0 i, r! [: ]; G2 M- a" q4 G( L
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK  f7 d# b' ~6 P7 L, g
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank", C; @% M  e/ _3 r+ {2 F) Q

  283. : e$ v& P( i" s% K2 L" U5 S2 O
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK8 H4 X0 ^: A+ V9 _. e
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
    : T/ K/ p: C/ G
  286.   ]. o3 `; C$ ~6 o7 r; U* U& g
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK, \. r; \& q/ L
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank"
    " i1 E0 R; N2 s( R3 U

  289. 0 ^: T2 O0 m; g) C6 v
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK' w; U# ]9 [: G' o! a5 J
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    0 B+ K8 n. }) X$ \; _0 s! H! R" ^, R

  292. : m( t2 L( e) M6 U9 j, [0 F
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK) I6 ~. Z* J5 i4 v8 w
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"; Z/ m; P" Y" O, w
  295. & L! ]" Y/ h6 n+ Z
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    9 Q6 n8 R9 J! Y( U2 G) m2 E7 ^" F
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank"6 p" q( T3 U/ P% P# D: {9 [- T
  298. 2 P8 I- m( z2 p: w2 H
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK7 r: u2 v3 E3 Y, w+ B8 A1 G& {
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank"- f6 P$ Y% L5 w) A4 X
  301. - }* b4 ^& @0 s' y8 @
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK5 ?3 D+ V% W( G( }5 ~6 |, |
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    + x0 n/ W% G3 W7 g/ |' p: S

  304.   ^% Y/ J3 N6 E5 x2 h
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    , w! z0 }, v8 Q/ g; [7 Y$ y4 b
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank"
    9 N# K5 U( T. E: m5 w& _" K: {: Z
  307. & g" t8 A$ I8 \. r3 N
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK* c9 H! J4 [' g8 [+ W& ^+ W7 C
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank") R; J0 k; B, G. E" S; U

  310. " p5 w7 s) j% n' T' C
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK! C1 x0 ]! V2 @, P
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"
    9 `4 K2 o8 F( D8 }. c. P$ l# K' P
  313. . ?( D) L6 R9 b$ u  b$ v% h
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK2 ]% V' l8 S+ k- w& ~. }
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"/ D8 P& J- c  I* x) l4 y& F. _& ~
  316. $ c, D9 v0 v5 O
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK% X( A0 W% }; }( s4 G7 \! d2 j+ S" ~
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank", t: C! U% A1 p9 x0 T+ `

  319. ; _2 m6 z) |. m# K4 A
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    - A+ g+ D% a# P$ K  d
  321. .ORG $D400! ]0 G1 ^2 A2 P9 M  C# G) j
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    1 d% q3 Z; k1 d- b  I) h& v6 [
  323. 6 s' O2 A& l: U5 ^/ I- `# F
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK9 V2 f+ l; `) M, z
  325. .ORG $D800
    , m! d+ \1 H  v/ `8 i: y; A2 U- m% n
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank": }) i& O+ n9 S9 l( k) T- w: o

  327. 9 g" @6 I, x( m0 h1 G& y- W. B
  328. * a# r2 \  ~( j
  329. .ELSE
    7 J  `$ e) S! D) h5 W& Q6 c- z

  330. 5 V! u! i& t' ]" R1 k8 f
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    ; b5 T6 T2 \7 k: Q. M' J/ X9 x
  332. .ORG $9000; ^: o7 u( H" {) Y# ]9 h
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"
    2 p( K$ g/ j! T- J7 F+ P
  334. ' V# n2 O  M7 d7 c
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    / s7 A& B8 e, }
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"
    # N* m# ~8 D; J$ N
  337. * w- e9 u2 _  V+ ~/ ^; P3 Z4 ?6 o
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    8 |3 S/ s% n! J; X& W& P
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"
    3 {& m& Z; n% @5 v

  340. : e: B+ w% H; [1 {3 c
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    . u3 }! B) e0 d  B5 j; M; u# c
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"! X) _6 f# H5 S  x3 u! R* T
  343. 2 l5 t* B$ q; k5 Y
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK8 f7 O' V7 M+ O) n" A) q
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank": r7 [7 `% r, a+ |- r
  346. , q1 O; S  o' t/ ?  l) }3 v8 G1 K  D
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK5 L  V5 ^6 H6 c$ r; E% l
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    0 e6 |- v9 \9 j3 D& o! V0 a! Z
  349. 9 ?& Q. o& b* c) Z6 l! {" n9 G% Q2 z$ [
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK+ I+ |5 P5 J! D5 u2 R6 t7 ^
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"" ~, o9 n* d( c; i- f7 k
  352. * W" F( Y, C& v2 J( }; D# `
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    , \' N% ]2 ~# l, [4 \( w
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"
    / @* F0 w9 s* T8 c3 y" O+ N
  355. 5 N$ q$ V* m8 _* i  K; W4 C
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK
    ) L- ?7 ~: `8 n" ]9 z6 a0 w
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"5 {1 ?+ ]# N' o" i0 V, w3 ]2 i

  358. ! h/ l4 k& P/ j* C7 E4 K
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK8 Y6 v* X2 M/ K& a5 s- m/ H8 {6 w
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"! N7 S- s6 t' r! B( q
  361. & \9 J4 [6 A% D# [# z
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    / G7 G! r; m( {! i% m: R9 M& g
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"' ?1 T, L1 {* s
  364. 5 g1 Q( F' t3 D% k5 l2 [( q  b
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK1 j' ?/ B7 Y3 b' @3 S4 t; x
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    3 W# \, J, i3 y4 R$ f( _

  367. & |, F1 V2 `2 N1 E- A
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    ! F  k1 z2 @& E: y
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"$ m$ A  T  L1 ?* g/ n) V
  370. ) T. ], H2 [! E" J. P* J0 i
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK3 \: K% l, k1 {1 P5 W( f
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"
    7 ]- v- Z, i& _/ z* n5 F

  373. 2 J8 {& }8 P  u& f3 d2 `$ C
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    / Y+ s3 L9 x# e; O0 I2 j
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"  L0 u2 F( G2 o7 Z' C1 Z  ?6 u
  376. 5 l2 h! r2 Z  p8 ~1 ^% k
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    0 ?" J; a$ x( ]' P3 Y6 T
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"% j0 t& y% W! V
  379. 0 R& X  n, d* k! W; ^
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK
    8 m, J$ u" q1 J
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"' z: P+ o/ B7 M, q1 p& z
  382. / T: ~9 X" P6 ?+ A$ }
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK5 G! P3 y+ `0 L' u0 n8 D
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
      d# B4 @; V# t8 ?7 C
  385. 1 S. |$ ?) I( o7 R% W* U
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    - \, t2 i. Q3 p2 P$ r+ o! f
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"9 T, K: d! D( d: f7 p
  388. % \! b+ W5 _9 ]
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK& O$ H/ C. Z) z8 }
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    6 S5 H9 M  D$ Z3 O( ?$ E2 e

  391. 9 m6 ~  k5 r: ~
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK. T7 ~0 f) J: N: O' _+ J. ]
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    - n' J& g4 E( \5 y  F6 p
  394. 5 C7 w$ F0 {% k) ^- O# r
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    ; V" `9 J; c" M8 {% {. ?
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank"2 i3 K5 @' g& z. e5 w
  397. 5 E: Q/ L- `7 M; X
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    + a* u% h: D0 w$ _
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"$ v: D/ U/ n$ a- Y

  400. $ q- L7 q5 _7 t" x0 R( |8 g
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK* e2 S0 v' ^, j5 K& _5 |
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
      J/ `( E9 q# [

  403. $ X) K5 O  d6 }* E
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
      ~+ C  g% u& F5 y$ O$ j
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank"
    & |" j9 _: S( W1 [  p
  406. 5 C: U" U  L, d( ?7 ^
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    # |  R  ]: ^# [  s7 O, m/ L
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank": y" u" @4 Y) K% I3 B) x

  409. 0 V: y, q/ W% w' J/ R. o# n
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK
    $ }" n9 g1 [% k! I; M
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"6 x& {7 V2 i! P8 W) `" r6 v+ ]$ i1 F

  412. / V& P5 [& g3 O. K
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK
    + W9 \* O' U5 l% \+ x6 [; j+ O/ ~: c2 X
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"" S) m0 M: R( B- {1 a8 S

  415. & Y+ Q; R# G; g$ x0 h
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    + V5 ?7 @; d5 R6 [9 e- l) {
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    ' ?; c. q6 M5 z% f+ T' _
  418. 8 t5 E) @' X0 f$ ]! B0 J5 H
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    $ X$ u6 V' r& s1 Z# J. B
  420. .ORG $D400
    : ?( m& f6 B0 |1 D
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank", t# @3 R3 R) \3 c
  422. . F6 E! i4 e8 M- d* A8 c8 y0 S
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK: I, s. X' S# R6 _+ q1 Z0 p! G8 r0 u
  424. .ORG $D800
    7 p5 k8 v. m4 x2 j
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"0 b: n, Y( g& o( Z3 ^, o

  426. % h7 j% U. T; o+ [9 Q' ~/ F! I
  427. .ENDIF  C: i+ K) t6 w* ^& w9 ^
  428. 6 S- J( O, c3 R4 y) \
  429. ;CHR图形数据, i/ t  B; {6 e  O( ~3 g
  430. ;======================================================================( D0 m. L  u2 v: S$ L7 o
  431. .BANK CHR_DATA_BANK
    * a1 o7 x4 `6 d! T. ^7 z2 W4 |
  432. .INCBIN "chr_bank/chr_data.chr"6 w: ~' j; j( D# E
  433. ' z& w8 y5 M* z# e
  434. ;======================================================================& q3 S$ y2 M! i- v& p+ ?
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK
    2 j7 G0 N% ~8 T0 u% r. Y; y
  436. .ORG PROGRAM_ADDR1 F: K+ c1 K- W$ j% Q

  437. / x3 V1 S3 q/ O' q  N8 A( l9 P4 |( r: K& i
  438. ;==================================================
    ; V9 ^. t: B1 d% _) T3 S0 O
  439. NmiProcess$ k0 b* E: I: |5 a5 [

  440. ' ?# l) T+ I$ x0 }
  441. ;关闭屏幕控制
    # D. M0 t- X+ }) [; l3 Z9 V
  442. LDA #$00
    - l# i, c* D. F& B- g; B+ a. e
  443. STA PPU_CTRL) B1 K  ^' ?; J9 U2 z- o4 p

  444. : K( k6 B+ n$ x/ C" L
  445. ;没播放音乐就不需要触发IRQ
    7 X/ M" b$ A5 ^/ u* [
  446. LDA <Music_Stop_State% _2 K. G9 K( K
  447. BNE NmiNormal. ^  {5 O, ?- ~) D* f
  448. 5 F& x. H7 W* ?; I* h
  449. ;重置IRQ索引
    % j! z. S/ Z  H9 X1 V+ U; e( z8 U
  450. LDA #$007 j5 `; e. [( Q; k' J
  451. STA <IRQ_Process_Index% ?3 B5 r; Z  d9 Z
  452. 1 N1 a" o# e1 |0 L
  453. ;时间秒数为空则跳过
    : d+ t+ s, t$ F6 Z! w8 U
  454. LDA <Time_H
    + [; T4 f8 `7 Q" v3 t( [) {: r
  455. ORA <Time_M' @: Q( Z' s: G- S& g6 M- A  S
  456. ORA <Time_S
      l) C3 j7 I9 K- E+ ~( l
  457. BEQ EnableFirstIrq" B$ u% a! C, F! O2 D

  458. ( X8 J+ k8 q! w$ Z( L6 X+ U
  459. INC <Scroll_H; m# p8 d; O; X1 E' e

  460. & q6 K$ S9 O0 t, [: A7 p
  461. EnableFirstIrq
    , n9 B% @' T% v/ Q! g$ c
  462. ;80条扫描线后触发IRQ6 w* z6 ~8 o2 ]& [
  463. LDA #IRQ_SCANLINE
    1 C! W. r$ C& J5 K$ F* ?) u
  464. STA MMC3_IRQ_LATCH& V2 \8 S5 ]% F& f" a! H. [1 h
  465. STA MMC3_IRQ_RELOAD
    2 Q: _% B: l: @9 y# ^: G
  466. STA MMC3_IRQ_ENABLE7 u  v3 T, E, y) ?) u
  467. CLI: ^: z8 g* w) o9 d& \( ^3 B

  468. : e: i* V0 F( m+ X& D$ B* n: z; C
  469. NmiNormal8 @' l( D6 Z- a6 L- U
  470. ' p  I: N  X) c/ j7 ~' f
  471. ;处理PPU图像) s# d/ Y$ L) L; N: n" k
  472. JSR PPU_Proc- Y! z6 w+ y& h0 U* G" A
  473. * u1 M6 E6 j# B- _2 [3 }, Z# I
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化)
    ! z: r' W2 u3 {1 M
  475. LDA PPU_STATUS
    " e* I- @; D6 S/ J( u
  476. ;LDA #$00; E' ]# v  |+ [3 @
  477. ;STA PPU_OAM_ADDR+ S* f, |- R* N, P$ r" u
  478. LDA #OAM_TEMP_ADDR / $0100
    3 Q" f0 _% R- F6 `8 Z
  479. STA OAM_DMA
    8 J# X0 R' S5 \' I8 h

  480. ) }+ D5 b; `7 p; k! `0 F. J
  481. ;启用NMI中断4 W2 u9 c* H% f% ]9 E3 E
  482. LDA Screen_Ctrl
    ' l7 ]% G: y+ u, R/ t
  483. STA PPU_CTRL, E2 l# n! ]7 t

  484. 0 Y4 O, N: a' D
  485. LDA <Text_Disable_Flag3 ]7 R  A; J# O, m* k& i$ M
  486. AND #TEXT_DISABLE_RAM
    & P4 g, g* L! K
  487. BNE Nmi_Sound_Play' o8 I/ f) r; S" U3 O
  488. : c* v0 k+ p2 F/ n
  489. ;处理手柄输入9 H7 _* h$ r- J0 k: c
  490. JSR Key_Proc9 W3 f+ D+ l7 I# P6 h" z$ P  E
  491. 8 p$ \- ], `  V6 C. K
  492. ;切换音乐(手柄触发)
    # d. z, A$ d' x( l3 @4 O4 l
  493. LDA <Time_Wait_Cnt" M) j" }' x8 g4 P$ P
  494. BNE Nmi_Cursor_Arrow: L8 J& C7 z5 h2 b
  495. JSR Change_Select_Item
    $ Q1 C7 _% `/ o7 W! ^' G
  496. " I. t1 [/ b1 e1 c
  497. Nmi_Cursor_Arrow; I3 r+ ?( r! o* C+ L. E: z
  498. 8 m: L; A/ E1 [' _# y1 V/ A
  499. ;处理光标箭头
    6 x0 J+ b% \4 q+ G/ g! [3 ?2 X
  500. JSR Show_Arrow: T1 p( e* G/ v6 ?% }1 M7 K) R
  501. ! E0 Z: b) \* U4 X
  502. ;更新调色板; h# P1 b4 X3 ?5 C! R! M+ T- r" _
  503. JSR Update_Palette_Data3 @( ?/ K9 @1 W6 m

  504. 6 _# ?4 f4 ], C4 X6 l* U# U
  505. ;显示时间(缓冲)
    8 M+ F/ k6 i: U. g/ B
  506. JSR Time_Show
    0 h3 f% U' m- M# x) w# N
  507. 6 m" G9 c2 m( G: U# @. I
  508. ;音乐显示(缓冲)6 e3 m/ K( @  K
  509. .IF SOUND_BAR_SHOW_ENABLE/ h8 D) A% K( ]
  510. JSR Music_Vision
    * @9 u3 c$ B( P
  511. .ENDIF
    8 \# i5 k8 w; h4 [
  512. 9 R( U" @) H* F( O- u  }) v
  513. Nmi_Sound_Play
    1 S' F+ Q' T( ]
  514. ;播放声音
    1 k& V- W' Z& Y1 J$ H/ ?) |
  515. LDA <Music_Stop_State. M1 E( w% t2 S, ~5 y( U: f* g5 s; R
  516. BNE Nmi_Time_Wait_Set& C& c! F9 C& z" g
  517. JSR Sound_Play_Proc. j3 l1 p: T% v; F4 o

  518. $ G9 u2 x/ V% ]* Z6 G; ?
  519. ;播放计时
    / y. X0 C" m: n  R8 @
  520. JSR Time_Count4 e' M3 Y" e! k8 ^; s, u% C
  521. ; n+ A! h- o, d5 g
  522. Nmi_Time_Wait_Set
      H8 w5 I# X0 \, D9 I
  523. LDA <Time_Wait_Cnt
      ~! L' G! D) {; [1 F6 s/ z. j0 H
  524. BEQ NmiNormalProcessEnd
    # H, i$ e4 m& ^  a) i3 O" t
  525. DEC <Time_Wait_Cnt
    - R3 g% m' G, m/ G# i, @
  526. NmiNormalProcessEnd
    9 L. I. H, n- h1 T0 p- e: _: N

  527. 7 r& B. }5 S, R2 y! L' P2 s+ z/ d  X
  528. INC <Nmi_Time_Count, R+ Q+ N! W4 ~9 E, f) j% b/ R
  529. $ M$ W4 o# A  u
  530. RTS
    ' J- Y2 b& p, {9 {3 |8 v
  531. * Y7 X$ ]1 [8 U/ x/ P6 y0 g9 q
  532. ;==================================================
    8 H. n" }/ B' f, g/ T: O+ n
  533. Init_MMC3
    . H8 |9 G  R% @5 J! X; Y
  534. ;==============================5 \  q8 [/ J: h$ H3 X3 e& P
  535. ;禁用IRQ# Y2 E4 D) |* w, T* X9 V
  536. STA MMC3_IRQ_DISABLE) D5 Y6 y( g7 t" Y# i
  537. 1 F/ B/ T- A* Z% q. \& j1 m
  538. ;水平镜像+ _7 ]& H- {! [# E0 p0 o
  539. LDA #$01
    2 T& d4 S8 K9 l) D5 ]( I( F7 g: w
  540. STA MMC3_MIRRORING
    3 w2 \% T3 d( Y' j* F

  541. : m: S5 {5 d. r) ]
  542. ;初始化图形bank
    / d0 M4 ^. Y- y6 ]5 {
  543. JSR Init_MMC3_Chr_Bank
    $ ]3 z( e& W5 N8 I' m. J. o- \' {

  544. 8 ^* z6 n8 a, G1 s  T8 F
  545. RTS8 C+ K* ~8 h. i1 p0 S3 q
  546. ;==================================================2 R8 b; ?) U; v% P+ i
  547. ProgramBegin;主程序1 A' K( D: p1 t  i' s
  548. LDA #$003 O, u) i  b2 N0 _- B
  549. STA PPU_CTRL
    ( T& [) w3 ?+ V
  550. LDA #$00
    ! x. t2 Z+ O4 a! p5 y  L4 I: Q& U
  551. STA PPU_STATUS
    $ c" Y9 J; k5 i/ d. g% R1 w
  552. STA PPU_MASK
    : ?6 s" z5 c; q; o
  553. STA JOY2_FRAME  p) H" O/ m5 f' g

  554. , I7 s. p- R$ T4 ?
  555. STA PPU_SCROLL
    0 G7 k* L% i, A8 S; {  V3 _
  556. STA PPU_SCROLL7 V/ z0 s( C4 C9 k3 T+ N$ M$ f* I
  557. - k3 C4 |$ t& M7 T  F8 J. E
  558. ;==================================================2 S3 `5 C9 Z! @) \% Q. o. Y
  559. LDX #$FF- n1 X& S# K# q* B
  560. TXS7 B' F8 k. l7 i9 ?- S

  561. 2 D" r1 y3 }+ q. \' H
  562. JSR Init_MMC3, n. X9 ~* P8 G

  563. * }" B5 M7 u( M! z6 {! a
  564. LDX #$02! F- m1 q* h1 ^: r* {
  565. Check1! h5 o5 X6 J# [
  566. BIT PPU_STATUS
    ' G6 c9 x- @) P& y) q5 A# e
  567. BPL Check13 G, l1 {! `* e7 C" E$ A
  568. Check24 c# S2 ?; b0 k9 n# _; i2 X
  569. BIT PPU_STATUS3 H: v- y- I/ m
  570. BMI Check2* Z+ H) c3 U! Y: h

  571. * b. I" g. V6 U, [! H
  572. LDA #$0F# K& e+ y( V! N5 l( @
  573. STA APU_STATUS
    , T% e2 |; A$ G. n/ \/ }. C1 b
  574. LDA #$C07 X# k) m0 e- l0 ~% Y5 c
  575. STA JOY2_FRAME
    # o0 K9 Q8 d( |
  576. - K! O! U6 H/ k
  577. LDA PPU_STATUS
    & U' K% W7 G* t: e7 a" g
  578. LDA #$10, [# }$ q* s: a3 c
  579. TAX3 h. f6 t2 N2 ~5 {1 ~! C
  580. Check3' J( t" m! \- B2 i" U$ }1 V
  581. STA PPU_ADDRESS
    ! k+ @4 I8 ^# c
  582. STA PPU_ADDRESS
    2 X6 t* n  y* o0 Z' u! `3 s- d1 V
  583. EOR #$001 ^+ L" l" k: J8 _
  584. DEX# F% [5 U  k6 N4 C
  585. BNE Check31 d9 ^0 O- _) I, F
  586. ;==============================$ p' M, Q' }- ~+ [1 V$ ~
  587. ;调色板清空8 c* D# l- j$ o$ Q3 D2 d) r
  588. LDA PPU_STATUS
      f+ E$ F  }$ ]5 g& n4 E% w* d4 _
  589. LDA #$3F
    % q! h9 E; O- U! I4 Y3 Q; V
  590. STA PPU_ADDRESS
    * I3 \) K  P0 K- z1 W1 q
  591. LDA #$00; J/ ?+ s; @/ |* a4 G# ]
  592. STA PPU_ADDRESS! ]* f' e" x# U! _( `
  593. LDA #$0F
    3 _) q1 R0 I/ a5 R
  594. Palette_Clear+ U3 w; `6 C0 o' [1 G' ~
  595. STA PPU_DATA# Y* U$ A# W! K; E
  596. INX5 e4 Q$ b9 M+ a7 W8 k4 G% `  l7 E
  597. CPX #$20" @; k' s, ]8 `( ?5 l
  598. BCC Palette_Clear
    * w0 ~4 x# ]; _; T2 ?# e, p1 N
  599. LDA #$005 d/ M/ F! v9 T4 Y. j
  600. STA APU_STATUS
    / z% {. b% S. S; G1 H9 R
  601. ; K: q' _) Z4 a1 f
  602. ;==============================* Z: T  o: v2 M8 _
  603. ;RAM初始化
    # C1 X. t. a" t' p$ E' J7 @
  604. RAM_Clear_All5 g0 J/ b" D& b9 F, q* n- a# I
  605. LDY #$009 W0 D" A: c1 f- q/ z6 X
  606. LDX #$08
    ; d+ i$ q+ G3 S1 M0 b  D
  607. LDA #$000 O& Z2 O- @, x" Q
  608. STA <$00
    + T! G, q! }4 _; m3 ^; q3 x* h) x
  609. STA <$01
    # o  w$ w% v9 E/ S$ a- Q8 H2 F7 x, e
  610. RAM_Clear_All_Start
    , Y( c' Y2 B( u- o' l, T. \, T
  611. STA [$00],Y" f& e% a) n; X( C+ J7 W5 C8 m9 X
  612. INY
    3 K) D1 R4 C# \% ?
  613. BNE RAM_Clear_All_Start
    6 `" ]" p& q; b; F0 m$ \  [
  614. INC <$01
    , o8 |  k; ]( @
  615. DEX' G! N* q  L6 j
  616. BNE RAM_Clear_All_Start
    + v8 }+ q! D  {8 S4 H& \
  617. 2 S' P0 q) B, b8 F
  618. JSR VramClear
    6 K5 O+ U# E) {4 `* K% u/ f0 d3 ]
  619. JSR VramInit
    $ @0 W& ^. R( E% C( T, i9 e
  620. JSR OAM_Ram_Init
    : ~; r$ f' {* o3 P8 _) s1 U
  621. JSR Init_Palette_Addr
    1 g" X4 Q) m9 T- x( E# }* Z

  622. 1 z" X+ m' L6 y0 m$ Q( J5 \
  623. LDA #$FF
    ! Q, Q8 R3 f7 }2 @$ ^8 j. @" {! L
  624. STA Use_Ram_End
    7 U8 Q4 E. l5 A/ x2 @" |
  625. ;==============================
      ]. v( S! D/ k- i
  626. ;初始化背景调色板$ b; r. w: Z: `* t
  627. JSR Set_Palette_Color
    3 M# w" S6 e5 E: D4 c2 l0 S6 y
  628. JSR Set_NameTable_Attributes. M& ^2 f% z3 g$ y4 e
  629. - v* [. s4 o5 J! n( Q" X5 T# r
  630. LDA #$003 }+ C3 q6 T* C* }: g: T5 i
  631. STA PPU_OAM_ADDR  N; `: L! S; s5 H8 o" F
  632. LDA #OAM_TEMP_ADDR / $0100
    * _' `5 k: y+ R" W: ~
  633. STA OAM_DMA
    # `" I$ G0 K4 Y# a1 v2 I- z* N

  634. . K4 A, _$ ?9 z# y' W* G% T
  635. JSR Sound_Reset_Proc
    6 h& B% p$ q3 {
  636. JSR Set_Sound_Total9 o( z/ w! [# J; q
  637. 7 K4 z7 ~0 E6 [$ M
  638. Init_Start_Music* {# _7 ^2 K5 i$ \. D
  639. LDX #$00
    + a2 M. A' U3 Y# v* D$ G4 Y) D
  640. Init_Start_Music_Write
    ; _$ X8 s3 l1 g% t6 X2 T
  641. LDA Sound_Start_Port,X
    " l, d) b2 u& [& b5 \" n8 d; j- C
  642. STA <Music_Cur,X; n# N/ S" D2 C1 {
  643. INX
    + X- O4 Q: X: f- s) a9 A9 x& n  Y
  644. CPX #ITEM_MAX_SIZE
    ; M: q1 F0 w% S/ x( B1 v
  645. BCC Init_Start_Music_Write
    7 u: P% s; z5 ?/ H) t
  646. 2 L  b  ?! W& Z( c
  647. JSR Show_Music_Text" L7 [# W' [' c( P2 G4 G
  648. % W/ @: [! V" _7 M2 z# j
  649. .IF SOUND_BAR_SHOW_ENABLE  Z3 p8 j$ B; I2 @) N) m
  650. JSR Sound_Bar_Text_Set: D' {8 j( f& X
  651. .ENDIF) {% e# h8 z; ^* C, W- ]8 S
  652. + x- L- k2 x) o* ~: d
  653. .IF Track_Name_Pos
    . `9 c  u# l; `( {
  654. JSR Show_Track_Info6 E( `4 [5 s+ a1 G
  655. .ENDIF8 _) k3 K4 z7 e2 j' o5 n, n
  656. * p/ F* f* ^. O* }$ d' Y( i
  657. JSR PPU_Proc
    5 r1 G0 H* i" E0 ?+ U3 i  a" J

  658. 9 N$ V& l2 H" |. L2 f3 M
  659. ;==================================================1 S) e: C# T6 K: a& p7 ~) D# A
  660. ;音乐bank初始化 ' x" ]/ ^. v0 Y2 w5 ~3 N% O" A! A
  661. JSR Init_Sound_Bank) e) Z% E- X4 D

  662. ( a& G& p0 \7 N6 Z9 O. x0 B
  663. JSR Music_Show) ^" \0 R) s( [5 Y; G8 W& ?, n
  664. JSR Time_Show. U1 M: [9 H; F6 M+ b8 A
  665. JSR Music_State_Show
    6 n8 c/ J0 n; q* a4 T* r: J
  666. JSR Time_Delay
    . `# f1 l# [& N' D- a* J: D9 z; C
  667. ( D  v: ^' a. h& M6 z% \
  668. LDA #$01
    # F) d- r7 T; C; [
  669. STA <Music_Stop_State+ {3 G7 G2 G2 t& {4 i

  670. + \2 e2 W3 @# h7 w; C, E# ~
  671. LDA #$88
    ! K8 F2 q  `0 B( T2 u
  672. STA Screen_Ctrl
    ' m0 X0 p& N$ O7 ]- F! j
  673. STA PPU_CTRL! T7 }* J  q7 b- D

  674. ; z9 O. \* {/ O
  675. JSR Show_Page_Text
    * p3 X( z8 H0 g. q# q

  676. 0 r, N( T0 |  z
  677. LDA #$10
    , S' `' Q, I4 b9 P* f3 |4 s
  678. STA <Time_Wait_Cnt- z5 s1 E* p  b5 s% m
  679. " {) _6 U: g2 y8 ]. k# }
  680. Wait_Time_Over2 n/ Z, b' [9 p4 b4 T
  681. LDA <Time_Wait_Cnt
    6 N, ~+ u) k8 Q* r
  682. BNE Wait_Time_Over6 A! j$ C' W( F

  683. 3 E: H% J( P/ n2 j. f5 T1 k) k
  684. JSR Show_Arrow$ y. P! m% V# N# C1 R# e3 w# e
  685. LDA #OAM_TEMP_ADDR / $0100: d$ X. I( E( T3 p8 u
  686. STA OAM_DMA
    6 k* T/ R; o; O. ~8 M7 e' n0 p

  687. : R) [0 ~/ Y/ \  q9 C
  688. LDA #$1E
    $ J' H  C- R" U
  689. STA Screen_State8 ~" f3 W" R5 h7 b

  690. 4 ]: q: ]9 X  S2 Z7 I
  691. LDX <Music_Item_Cur
    & o% |  B, s  A6 ^* O) e" e
  692. LDA <Music_Cur,X
    - K9 |+ H1 [% ?8 A% x8 X
  693. JSR Sound_Init_Proc
    . f  Z4 C, z: I0 f6 g$ k
  694. 4 ^  r# c1 R' p0 x9 p0 r
  695. CLI: L0 A: Y  a& k5 Q
  696. JMP MainLoop
    / I$ x% F( o# j$ t! |8 C
  697. 0 ^% d- V4 Q! O
  698. ;==============================
      t: X/ m; M3 K+ m) P+ i
  699. Time_Delay;延时等待& |: Y0 `2 P1 N
  700. LDA PPU_STATUS
    4 f8 ?" Z% E) q2 @+ ^+ P
  701. BPL Time_Delay3 \9 l. ^! q6 n7 d* I  E
  702. RTS! ]. y/ Z  D+ ]1 F6 c

  703.   W! T7 {  g: c$ ]0 X, D8 J: c
  704. ;==============================- _" L* n7 r7 V4 b- @
  705. OAM_Ram_Init;初始化精灵内存9 a( ]" a6 g' |' x' O2 l- N9 S
  706. LDX #$00& l- o* G( \( y( Q- |$ N
  707. OAM_Ram_Init_Write
    8 G; L& A# J2 q
  708. LDA #$F8+ G( p& @, U- `7 ~) \# l
  709. STA OAM_TEMP_ADDR,X3 l- t! C3 i- f7 @/ x+ {$ L# N
  710. INX) ~8 \1 D  g% B' D
  711. LDA #$F8" f3 _+ J/ I6 P
  712. STA OAM_TEMP_ADDR,X% T! U. d" Z9 N. X/ E) M- v
  713. INX0 g6 D( C* C& |* r' F" h  H
  714. LDA #$00
    # v" u7 {& Z& S7 o' r
  715. STA OAM_TEMP_ADDR,X
    + F2 f' O( E7 z
  716. INX
    / H* P3 G. r0 }; S* @6 y$ q' X
  717. LDA #$F8
    : i/ c& y% e- _: C) l- J
  718. STA OAM_TEMP_ADDR,X8 v" p5 m) D. D2 d6 m, g
  719. INX
    ' C: A. M$ \; T. O2 |5 G
  720. BNE OAM_Ram_Init_Write
      B( y5 K  h/ D: O# f8 g: ^
  721. RTS* \$ U4 w$ K/ J" x" W& P; @
  722. 2 c$ Z+ Y- z7 c2 S7 ^. y% N
  723. ;==============================
    # V* z" Y+ J5 k
  724. VramClear;初始化图形内存* \  R7 m0 g( H; k+ `$ H1 z
  725. LDA #$204 i2 `) V- B# b/ P
  726. STA PPU_ADDRESS2 D! W5 `; ]9 e5 w8 K7 d
  727. LDA #$00
    # Q* l7 E# f  W% U( m" u
  728. STA PPU_ADDRESS
    . v* X+ ^" N, L5 {7 U/ m& T. g
  729. LDA #$006 V& r- |/ F2 Z7 k6 h4 d; M
  730. LDY #$00
    0 k3 t9 ~) J9 S& H
  731. LDX #$10
    # s0 u, ~8 W8 `$ z! u7 r4 p5 q
  732. VramClearWrite
    * D8 m$ h% z6 F8 k) q- s
  733. STA PPU_DATA
    - s. F4 i9 j: S: C3 Y% p( h" H2 R
  734. INY
    ( }5 H& ]( ~6 x& N  m4 B; H
  735. BNE VramClearWrite. X8 b. k3 ~. E5 K
  736. DEX# r+ j, b' ~& T' \
  737. BNE VramClearWrite9 \0 X9 r. T6 U. ~9 R
  738. RTS& k4 N5 r1 }4 n- o) o" g
  739. , N& D" r8 c5 V# A
  740. ;==================================================
    : o5 v7 K. q9 b
  741. ;设置MMC3图像bank
    ! f+ P; t# j' @
  742. Init_MMC3_Chr_Bank' ]+ m' a0 G& t2 X
  743. LDX #$058 @* [3 a1 d$ X
  744. Init_MMC3_Chr_Bank_Write5 l- K& `- d/ m
  745. STX MMC3_BANK_CTRL
    + y8 {3 J+ B6 D9 U. c; r- r
  746. LDA MMC3_Chr_Bank_Data,X+ Y; X8 u0 b7 B; G
  747. STA MMC3_BANK_DATA; N$ r3 G0 g! {% o
  748. DEX6 e: [5 f3 O- C& T* v( y
  749. BPL Init_MMC3_Chr_Bank_Write
    / }. z/ d% ~. E
  750. RTS
    ' _" w4 \- o: F( z
  751. ;--------------------------------------------------& J7 x. {0 l, ^7 P' x( I
  752. MMC3_Chr_Bank_Data
    5 L) C/ b, n) L3 V2 B, R) J5 A
  753. .DB $00,$02,$04,$05,$06,$07, N5 h; v7 r* a
  754. 0 x) R6 i* J, h, d+ h
  755. ;==============================
    9 t. O4 X9 O7 Z' v( o: y
  756. VramInit;初始化图形内存
    1 I# ]) @3 z. o4 W( t  p! x
  757. .IF CHR_RAM_ENABLE
    9 C/ k; _7 ~8 W
  758. LDA #CHR_DATA_BANK
    ; e" C2 ]* G( p5 `& c
  759. JSR Switch_Bank_A0002 e. B& l( L7 X( x9 z0 q! }+ h
  760. LDA #LOW(CHR_DATA_ADDR)
    + n/ z  Z  e* i4 k; Z7 I8 A8 k& @
  761. STA <Data_L
    7 M" j0 ]; |$ p/ z1 U: X5 ?; M
  762. LDA #HIGH(CHR_DATA_ADDR)
    * A1 l9 U' D  f' j
  763. STA <Data_H
    7 b3 p; B5 r3 A. }
  764. LDY #$00
    / Z. b  |$ p- z$ t# e
  765. LDX #$20
    ' x3 r1 r( f( M1 M, p7 [
  766. LDA #$00
    * a% P7 w5 s1 T# w" Q
  767. STA PPU_ADDRESS- N& n9 {% I/ ^$ a1 v; }
  768. STA PPU_ADDRESS
    : L  @' W( E3 ]- g8 h0 l' m
  769. VramInitWrite- E' T* l9 j& J  _0 X
  770. LDA [Data_L],Y
    . ~4 k6 N( _: F% A& m6 I+ N
  771. STA PPU_DATA
    , b1 D( s5 f" q' d  U7 `* e
  772. INY
    - l6 r' D& W! d7 g
  773. BNE VramInitWrite
    & y+ v1 H4 g$ m) p. a
  774. INC <Data_H
    + A0 z6 R$ P6 v4 l! H
  775. DEX1 o/ u$ `* h: O' W# f/ K# p
  776. BNE VramInitWrite
    + h& I6 ]' i5 L# H' N
  777. .ENDIF. P  T% k7 `3 x2 @* S
  778. RTS6 D5 u/ ~0 T+ R, x& \. T4 Q
  779. 7 y: j1 c6 c) y( D, i
  780. ;==============================! C6 z' ^: v* R! }& r# R. F
  781. ;音乐切换
    7 |- g1 B; F9 h8 t: x- A
  782. Music_Play_Change
    # X* G8 s+ y, l# t5 t) j7 r) k
  783. LDA <Key_Once6 n/ H! k$ B# i% i, f
  784. AND #$FF
    ' j3 g2 a: [+ Z
  785. BEQ Music_Play_Change_Check
    4 X) K" S3 d7 l0 I! ]3 B1 q

  786. / F3 @8 b. p6 |1 I- ~" d# v- G
  787. ;禁用音乐条刷新
    2 z& b9 D; s$ V  D, s) O
  788. LDA <Text_Disable_Flag
    : ?: o' V8 {/ L( L2 c, z0 y$ A
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    % `" R5 V6 r! O! F  r
  790. STA <Text_Disable_Flag0 m) g' g- J* b# }, o
  791. 7 \; ?! H* A4 V$ n- a7 s) d4 R5 l$ w) [
  792. Music_Play_Change_Check1 F$ g2 b7 f$ E7 u& h  s
  793. Music_arrow9 T. E6 O- X% O: y- i
  794. LDA <Key_Once
    6 m( D" z: l" r" s% B2 W: d7 I( }
  795. AND #$0F
    6 I. i8 ~; ]) U/ q. h$ A
  796. BEQ Music_Play_Change_End, M: N0 s6 @& X) _. ^
  797. JSR Music_Track_Change
    % Y5 Y9 s! K, f2 r$ |1 c! A
  798. JSR Sound_Reset_Proc6 {( T3 x( o/ `2 e  _" u" _+ x; S
  799. JSR Music_Show; \. z1 z% {1 ^& X" y
  800. Music_Play_Change_End
    7 r  R" {# A7 e. G2 ]! n
  801. RTS
    & C5 X% h& t2 ?5 ]! u
  802. . v, r3 Z+ w/ m1 g0 m5 G
  803. ;==============================8 z& B5 a9 w$ r7 X8 v' j
  804. ;音乐曲目切换6 S0 I- J. m  S, c% Y5 u9 q. z, I
  805. Music_Track_Change& w& i' i. m' {9 S5 {
  806. LDX <Music_Item_Cur
    8 h* u- j: ~3 E7 K
  807. LDA <Music_Cur,X" L- I4 ], |$ H1 a% [6 V* y
  808. STA <Music_Last. P# F! K! L  o& ?% W1 R, j# X
  809. Music_Decrease9 E& [5 G; X: L# m
  810. LDA <Key_Once
    7 a, S1 T; H" k
  811. AND #$42
    & k- E: I- e& t( h  C1 N
  812. BEQ Music_Increase
    / V- Y& {" x' `4 d$ Y* d- r
  813. LDA <Music_Cur,X
    8 n( H7 Y  m5 y, k( Q) c' U- v9 U
  814. BEQ Music_Increase* f: H' f/ }/ L, H$ r/ W2 A
  815. DEC <Music_Cur,X# [8 k8 C2 ^# w. F+ Y
  816. Music_Increase+ m$ w$ }8 V  ]; X0 K
  817. LDA <Key_Once
    + o- W6 e4 r+ _7 ]6 D. M  e9 N2 R
  818. AND #$81
    4 k2 L$ U& w8 X& Z7 I$ I' s( S
  819. BEQ Music_Decrease_10" i4 e4 H8 z- u4 {0 G5 c, @0 [7 x
  820. JSR Set_Sound_Total
    6 ]" p  q3 A0 G7 w7 O. B: G. }2 G. ~
  821. LDA <Music_Cur,X
    ) S, ?: j0 K# v0 D; V$ r: S$ F
  822. CMP Music_Total
    2 A4 `# o: g2 f4 @. [
  823. BCS * + 4/ _: l; N9 e9 D8 Y7 N  d9 C
  824. INC <Music_Cur,X
    - m) p. Y2 i+ O5 b- A& ~
  825. Music_Decrease_10
    " h; D# \. ]: z* P0 p0 s/ d
  826. LDA <Key_Once, z. J1 d0 M  D* c- w. E
  827. CMP #$04
    ( b; i+ z& h; n; `" y
  828. BNE Music_Increase_10
    . X- E- V, b* v7 V4 ~6 G
  829. LDA <Music_Cur,X! I: U" c4 o" f+ L. p& ]/ A+ o  U
  830. CMP #10, z, |  Y# y$ u' ~
  831. BCC Music_Start_Song_Min, }. w! `" I' T* I! N; ]/ Q0 z, W
  832. LDA <Music_Cur,X$ _6 c* e+ o$ E) ^8 E
  833. SEC; B2 k4 C7 m7 Q& p, [1 Z
  834. SBC #10
    + l. A3 V4 n  g
  835. STA <Music_Cur,X  F9 X$ V& R) a7 d, y
  836. LDA #$00
    9 d9 g2 Y, `$ E1 ?1 o
  837. BEQ Music_Increase_10  v6 Z& Z# D+ p. s# `* i- n
  838. Music_Start_Song_Min
    , F) S* K1 W( Q" z
  839. LDA #$00
    : G+ V) n1 g, n  q
  840. STA <Music_Cur,X0 a( {  F! P! y+ g7 m% W! n+ e6 F
  841. Music_Increase_10
    2 h9 m# B, G- T2 X, p
  842. LDA <Key_Once* M" C3 X# `$ w0 w. B$ w0 v! U
  843. CMP #$082 Z+ a8 c! G$ ]! \* h
  844. BNE Music_Track_Change_End5 n9 C/ Z" Y. l( Q
  845. LDA <Music_Cur,X
    7 _( o" f$ w0 G
  846. CLC9 Y- G: A3 w+ P' {4 N0 @
  847. ADC #10
    - X! e/ Q* M2 B7 K: C
  848. CMP Music_Total3 z0 e* ^+ t. P. U; {
  849. BCS Music_Start_Song_Max' M$ T: d/ V# S+ @' |" f. Z
  850. STA <Music_Cur,X7 u! O2 t- ^9 z/ O% m0 U2 T
  851. LDA #00
    . e& u- j& u1 T# L9 l: {! ]4 e+ C7 l
  852. BEQ Music_Track_Change_End
    , ~# u6 q1 U! N: `# u
  853. Music_Start_Song_Max- I7 ?/ Y" R( h. j+ _& V( S) c3 l
  854. LDA Music_Total
    2 Z! L$ p+ L$ J
  855. STA <Music_Cur,X" O9 }/ |/ ~" d7 O
  856. Music_Track_Change_End
    + H1 N1 t4 |( H% p" p! X6 z
  857. RTS% ]6 X5 Q) `; |3 ?3 b- b
  858. + L  u7 a. j! j. M0 a
  859. ;==============================; u" }4 a" n# ]: K! k
  860. ;按键处理& |, p$ [4 M0 C7 s& W! g
  861. Key_Proc( i3 e% C2 @3 x" Z
  862. JSR Key_Scan4 u% t  o5 ^& e; ]! \8 H3 O1 r, h, G
  863. LDA <Key_Keep
    $ j0 J8 ]: p3 ]9 _
  864. STA <Key_Temp
    1 e3 B4 l3 O8 Z* I5 r
  865. JSR Key_Scan. \, O* u. I' n) Y. c5 y6 x
  866. LDA <Key_Keep
    ) f( [: K& Y2 [5 ^: X" H
  867. CMP <Key_Temp& y. A: `8 J  e8 B# K7 m
  868. BEQ Key_Get_Once5 p4 f2 c& e( E/ v4 a$ [1 O! A! J
  869. LDA <Key_Kemp+ j# t+ j7 r: L" Y" k+ H
  870. STA <Key_Keep) j+ ~# }% v% F" C6 z2 a
  871. Key_Get_Once
      I$ z9 |; v5 b2 [4 ?
  872. TAY4 o: K( ?4 n' J3 Z7 b$ x& s
  873. EOR Key_Kemp
    7 |% r! z' j$ x0 A# a
  874. AND <Key_Keep
    : X' L4 k% f1 {5 z* x' x3 v
  875. STA <Key_Once& d% K2 Y+ p$ ]* U7 A4 B- N; E0 @8 k$ [
  876. STY <Key_Kemp- V: g& ?& @5 X5 z
  877. RTS
    " G9 y. J6 ~" C/ X4 g+ E& ^$ M
  878. ;------------------------------: B, e' q- K  y
  879. ;按键扫描$ T# H! S$ d5 S  u! }
  880. Key_Scan
    & K* v+ _* H5 g7 x
  881. LDX #$01. A" `2 h1 h) l  y" V2 E
  882. STX JOY1_FRAME
    3 Y1 b  D5 l  Z5 X& C* R
  883. DEX
    3 t# p, i9 D5 z2 H; P; {
  884. STX JOY1_FRAME
    1 d0 [- S4 I; W! W* }) o4 o
  885. LDX #$086 G# N9 ^! ^/ x2 @
  886. Key_Value
    + r5 X& ~, O' s1 p; r3 v+ v
  887. LDA JOY1_FRAME! p* ~$ [* |3 T2 N
  888. STA <Key_Getv. ?. ^" \; O2 U& u( |
  889. LSR A
    - |5 U) U1 z2 b
  890. ORA <Key_Getv* _! w) W2 a# B; F
  891. LSR A" b! {* {* J6 V- g
  892. ROL <Key_Keep" ?& C4 o- s5 k5 |' e3 Q+ M$ q
  893. DEX
    0 x1 ]# q/ N- k, ~- G( ~! b
  894. BNE Key_Value. _7 X6 N9 C  a; E* H
  895. RTS- }7 c" n' I8 F0 u
  896. ( m, K+ F1 [* y
  897. ;==============================
    - M9 T3 `5 i6 u( _* I+ J' O! i& S
  898. .IF SOUND_BAR_SHOW_ENABLE
    3 R6 X2 h4 w1 K
  899. ;音乐条显示
    5 R0 p5 O3 Q% Q7 e, s" |
  900. Music_Vision9 U4 ~2 c+ z! F: ^- |- b# Z. ]
  901. LDA <Text_Disable_Flag
    8 ?; W9 R( k8 Z
  902. AND #TEXT_DISABLE_ITEM
    * v/ C) W3 X( D& U& j9 U
  903. BNE Music_Vision_End
    * \, ]6 R  `% P
  904. AND #TEXT_DISABLE_BAR
    5 Y7 U: r9 n  z+ s' R, e# B" z
  905. BNE Music_Vision_Set! M( L: J3 a+ m- d  y, V
  906. LDX PPU_Cur8 ^. F" y" k7 ~8 a. Z
  907. JSR Music_Animation
    . \$ f& b8 D7 |, H6 B
  908. STX PPU_Cur
    6 ?) D" `3 {- W. ?+ C
  909. Music_Vision_Set! K( Q7 K% O2 h: V
  910. LDA <Text_Disable_Flag
    & u. R& o+ i4 {" _8 s% @
  911. AND #TEXT_DISABLE_BAR ^ $FF
    , I# m+ i* n- u
  912. STA <Text_Disable_Flag& d% n( f$ q, M# f6 A8 D. l& E4 ?
  913. Music_Vision_End& g" q2 Z) [1 x6 P$ }: e
  914. RTS
    + e3 G" i- M& j, m) w( `
  915. ;------------------------------
    7 ]- ], G/ F4 D) O; J/ k
  916. ;音乐条显示处理
    # d- ]. a( q8 b. ]3 H( O7 k
  917. Music_Animation
    7 C, z0 i0 a9 K2 R' y
  918. LDA #PPU_MODE_CNT_LINE2 `1 Q, X1 k1 _4 ]( m
  919. STA PPU_Addr,X" h: F* R' u- Y9 }5 |4 L
  920. INX
    ' b* D/ W  I# g6 {
  921. LDA #HIGH(Sound_Bar_Pos)
    7 B- f& ~+ E& H
  922. STA PPU_Addr,X
    ! {$ ]3 Y( d+ O; X* N* w* |0 g& J& a
  923. INX
    ) ~# B/ a8 d; T8 z- b9 O/ W, ^
  924. LDA #LOW(Sound_Bar_Pos)+ B& x' A4 `9 I" L0 f
  925. STA PPU_Addr,X$ I2 w# x1 X; k- f' a8 f
  926. INX% A. \  G# S- {# H$ {) V1 {
  927. LDA #$08
    " |# C# j1 x' @$ n' A; \: x
  928. STA PPU_Addr,X. P6 {- K% [% X
  929. INX
    - \4 X2 Q5 e0 @' B0 x
  930. LDA Sound_Bar
    ; X( @& A4 K: Z' h
  931. JSR Volume_Convert
    ! j4 b, L/ E9 j  s7 a$ H- U
  932. 2 a- @/ ^* @% q7 v6 m7 s
  933. JSR Volume_Set_Cnt8 u/ B5 Y: M- Z
  934. LDA Sound_Bar+$4
    3 l5 _" B% g) k2 [
  935. JSR Volume_Convert/ ?* Y- ]5 c; Z2 C

  936. 1 y  r+ N9 U3 k5 J" q2 I& ?
  937. JSR Volume_Set_Cnt2 j1 [2 D& d6 Q3 w8 e, n- ?5 c" ^
  938. LDA Sound_Bar+$8# k9 g( _( x. \! {+ K
  939. JSR Volume_Convert
    ! y4 O9 J0 }2 L/ @, \
  940. 6 i, y9 X% L2 z0 k; n! b& w
  941. JSR Volume_Set_Cnt
    8 t2 Q1 \2 e: h" c7 j6 ]5 d% D
  942. LDA Sound_Bar+$C
    ! |3 \$ W1 d! g$ w) v' W
  943. JSR Volume_Convert% e9 P' J/ k' p

  944. / }% z  f: P7 E" D& ~
  945. JSR Volume_Set_Cnt- K* L7 N" L, [' X! M) q6 ?
  946. ( O! t) ~% S# X& `
  947. LDY #$10; V' G6 {- Q. o3 _
  948. LDA APU_STATUS
    ; a+ p' z/ a5 F1 V8 S* ~
  949. AND #$10
    # R2 ]" r' D* k7 X/ f
  950. BNE Volume_Count
    * l: E. |" z: X* u
  951. LDY #$00
    & A) m6 P( E9 {: d
  952. BEQ Volume_Count+ U3 E: @( y; I4 Y
  953. 8 d4 S4 u, u' M3 h$ k9 H$ U
  954. ;------------------------------
    / J$ F4 T9 d9 u; k1 I/ {
  955. ;音乐条处理
    ( Q0 O- C: p: h2 a' T: o, B
  956. Volume_Convert! Q0 ~9 i2 C' m+ d
  957. AND #$0F
    % R8 b" Q$ p$ p, d+ Y- C5 K# ]$ m
  958. TAY7 K% i! R0 Q5 Q6 C  }) h) C" q/ D
  959. Volume_Count4 T/ X3 d9 Z6 ?7 J" \
  960. LDA #$08
    / u, w% H' ?/ o. Z9 ?; Q( k8 A
  961. STA Sound_Bar_Cnt
    - w: Y& W1 Y, Z- X) Y
  962. Volume_FILL
    . R8 y+ k0 ]( o" W
  963. DEY
    3 b: z6 q8 [( L9 y- ~/ z
  964. BEQ Volume_Half
    8 K3 K. ]# R4 J0 H4 F( D# o! }/ ^& k
  965. BMI Volume_Empty9 ?9 ]5 h& W$ R4 U
  966. DEY6 }2 m2 I  ~& A( ^
  967. Volume_Full
    , s5 z9 M3 E; H6 W# f
  968. LDA #$16
    * o9 F/ b) y: j- b$ |
  969. BNE Volume_PPU
    + {# V3 k7 r5 ^
  970. Volume_Half- O( \4 W0 K  c3 {# e
  971. LDA #$15( k0 j+ }: ?. w4 u
  972. BNE Volume_PPU
    4 G3 j. O5 b* Y8 f8 X% E  }
  973. Volume_Empty: Z1 ]3 J( k( e7 S  X
  974. LDA #$14' x3 g5 K1 a+ ^
  975. Volume_PPU
    # B) P4 O5 o+ ]3 k- K8 I$ R9 I( D( q
  976. STA PPU_Addr,X
    ! B% ?/ h$ Z% @9 H# w
  977. INX
    $ p5 t" C: x) X: i, H( \9 l6 O1 k
  978. DEC Sound_Bar_Cnt
    + t* Y" j' e2 b+ o6 ]2 x1 h
  979. BNE Volume_FILL- ]% t& y/ _$ u! z- ]. c
  980. RTS5 X8 [( A4 U% q# [' `: U& o( z

  981. 9 h* f8 l3 f3 T
  982. Volume_Set_Cnt
    . B* G: S) H6 M" Z
  983. LDA #PPU_MODE_CNT_LINE_NEXT
    6 E  D# o# `6 U2 R0 B+ R# \% F7 k
  984. STA PPU_Addr,X6 o" C' ]9 q* h5 ~
  985. INX* Y7 `2 l  C5 h
  986. LDA #$08
    . X1 W( d$ [7 s0 Q; F/ y0 S+ K
  987. STA PPU_Addr,X$ L* |! l8 v) K& }
  988. INX, g* b7 x% T3 R; F, q( t. P" N
  989. RTS
    : R$ ~0 M/ i! o6 K5 W
  990. 7 W8 L9 @. w- ^
  991. .ENDIF* ]4 R' E* J" L: m, g" F* l

  992. 8 d" _: Q6 T0 q7 B4 d2 o: p
  993. ;==============================
    ) F4 Q3 p. F& _. m% B1 E# N2 E6 v
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入. F" ?% J# k% G4 O3 d9 h! `: K
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式$ A( C$ J2 F; Z5 c  j# _- r
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除
    , E  V" x( M0 ~4 E6 A0 [
  997. ;------------------------------
    ! Z2 q4 V; k5 i2 U  t6 _
  998. ;PPU处理& W8 f+ G2 W$ \7 `
  999. PPU_Proc
    1 P& T4 K# S' y9 L4 y1 N/ N7 a
  1000. LDX PPU_Cur" \! N' y; Q/ {; P
  1001. LDA #$005 ^; X- [, O# l$ H# @
  1002. STA PPU_Cur
    : U' m# o( ?5 l& t4 C  {) ~
  1003. STA PPU_Addr,X
    ! ^) K4 S9 T% h4 j; N& _
  1004. LDA PPU_Addr2 K* E/ q; S3 m
  1005. BNE PPU_Proc_Beg
    # B- O, W& T1 ]- F+ N
  1006. PPU_Proc_Ret: R  r& K, S3 b# ~" G' S
  1007. RTS
    $ k) J; i% G) t: i

  1008. + x2 k4 Y4 F. E
  1009. ;------------------------------
    8 u) D' y2 q; Z* j$ `
  1010. PPU_Mode_Return_Cnt  ;转下行模式
    & b$ S# ]9 A  R1 J9 m
  1011. INX( r( u0 f/ Q1 p0 a% Z
  1012. LDA PPU_Addr_L
    4 t$ K0 ]7 ]9 i* y5 q2 u  B
  1013. CLC. w( W4 z* V. \( W% }2 e5 _
  1014. ADC #$20
    * T8 L0 u, q6 \; N- C
  1015. STA PPU_Addr_L+ I: y6 e- p! `- O, y
  1016. BCC PPU_Mode_Return_Cnt_End3 G: d0 J4 R* `2 M# L
  1017. INC PPU_Addr_H
    6 x; m* q% R: L/ `. H
  1018. PPU_Mode_Return_Cnt_End( V3 V' P1 u2 r
  1019. LDA PPU_Addr_H3 k$ d  j6 ~+ \
  1020. STA PPU_ADDRESS
    ! ]1 X+ `. G/ z; ?
  1021. LDA PPU_Addr_L  R$ [+ l0 j" G9 z- S, }. E/ ~
  1022. STA PPU_ADDRESS! C  m8 i- Q  A$ H* W* C' ^
  1023. LDA PPU_Addr,X& x( G9 }0 G& S% ]( R; Z3 q
  1024. TAY" z- C8 p! N3 E- O1 k
  1025. PPU_Mode_Return_Cnt_Write
    5 \" i* d( s! N2 P
  1026. INX$ n0 v0 s: s% r4 O) x
  1027. LDA PPU_Addr,X
    1 S; Q+ o: {: }; p" E
  1028. STA PPU_DATA9 i& x( K! Z( O. j
  1029. DEY
    - [; |' _! X+ h2 }9 k
  1030. BNE PPU_Mode_Return_Cnt_Write
    0 e8 \0 T& {1 v3 \
  1031. JMP PPU_Proc_End
    + \, w  t3 ]! o, K

  1032. " C, G/ C" f7 M" H
  1033. ;------------------------------
    1 \2 f2 d* \! r2 ^0 Z
  1034. PPU_Proc_Beg  ;处理开始4 H1 X, a' @1 _$ {, u
  1035. LDX #$00
    * D# n, a& {" F3 ]) ?' k
  1036. STX PPU_MASK" ?+ Z* B0 d: z- h) s& ]# b  g  o9 E
  1037. ;------------------------------
    % M% R- e3 \4 S2 _
  1038. PPU_Mode_Select  ;模式选择% a) B% K. a4 L6 z
  1039. LDA PPU_Addr,X
    - n. V' V, p! n# c" @4 _+ w) M
  1040. CMP #PPU_MODE_CNT_CLEAR: r# Y3 o4 G- d+ @
  1041. BEQ PPU_Proc_Clear: z- l# r$ R( h; M) H
  1042. CMP #PPU_MODE_CNT_LINE# n$ O5 F5 L/ C0 _5 O
  1043. BEQ PPU_Proc_Cnt_Line
    3 B" @. V* ^4 K0 `# _  p: H& b" T
  1044. CMP #PPU_MODE_CNT_LINE_NEXT5 P1 l* f9 M3 s2 A7 X) ~& a: ^
  1045. BEQ PPU_Mode_Return_Cnt) C0 z& k- X6 S: H- \# c
  1046. JMP PPU_Proc_End_Write' N+ D: q; l( M& W. i1 ]
  1047. ;------------------------------
    / g2 i, Y& f8 \; A' P* F
  1048. PPU_Proc_End  ;单行写入结束
    4 \% B2 w4 H6 t. L
  1049. INX
    ; u" J7 b% E5 F! F) U8 O1 h+ m& {( P
  1050. LDA PPU_Addr,X. ~; Z0 x7 F4 E3 Y6 U8 I! M
  1051. BNE PPU_Mode_Select3 ?6 y) d4 D* ]- S5 `( I
  1052. STA PPU_Addr
    1 F: Q/ Z2 b8 w9 t7 i! _
  1053. JSR Update_Palette_Color
    2 s& P& X4 F. \# r; t& `

  1054. + e( Z8 L8 e' O' x1 A
  1055. PPU_Proc_End_Write* p4 U$ C1 R- S6 x3 K4 H9 p
  1056. LDA #$00
    0 J) O9 |$ H- f% N1 g
  1057. STA PPU_ADDRESS
    ; z! V* D  I. E% C, G- H$ e
  1058. STA PPU_ADDRESS  p1 g1 S6 X) }: R0 `+ a
  1059. LDA <Text_Disable_Flag( x; c# k2 p/ m0 {
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF+ h; ^9 h; h9 e. y# A" A* d8 q
  1061. STA <Text_Disable_Flag* L' }" }8 J8 p( q
  1062. LDA #Scroll_X
    % ~) K5 `1 B% G& ]' z* Y
  1063. STA PPU_SCROLL
    2 ]9 c! ~+ @# {( t
  1064. LDA #Scroll_Y
    0 f) s" v2 T$ l1 T4 @  `9 j
  1065. STA PPU_SCROLL5 r# W2 B! }' o9 m0 F* i' @& i
  1066. LDA Screen_State+ C. J! h2 N. C; [9 }/ S
  1067. STA PPU_MASK6 x" ^% A2 k4 H) ]% K+ m' Z
  1068. RTS
    ' X. l6 t4 Y3 h; }; K7 m- c& _

  1069. % o  {" J" A& J! N0 A  z( a
  1070. PPU_Proc_Clear
    1 a( ~" i! ]" d7 C  a& S
  1071. INX$ `4 V2 A) o- |: H1 I) ^
  1072. LDA PPU_Addr,X
    & W$ f: E* P- ~# l. z! C! [
  1073. STA PPU_ADDRESS
    3 [7 K  X6 M+ Z. [& ?) k0 b' Q- x* p
  1074. INX# w, {" X: l3 |* p
  1075. LDA PPU_Addr,X3 {9 W" V6 x% [3 Y
  1076. STA PPU_ADDRESS
    9 k, t: F/ X: |9 R, i" J' a9 R
  1077. INX- s; |, u0 W4 P
  1078. LDY PPU_Addr,X3 @+ e, u4 V& Y* w0 R, W
  1079. LDA #$00: j1 q, j+ D& s6 w9 {/ V: O
  1080. PPU_Proc_Clear_Write
    % ~" l' o1 f! W' }
  1081. STA PPU_DATA
    ; [* O( Y. I& k! J* v# C  D
  1082. DEY
    , J9 x! \% N' _0 _
  1083. BNE PPU_Proc_Clear_Write" P4 b. {: U1 c2 y6 L% ]
  1084. JMP PPU_Proc_End  h, c; f  n, |, D7 A

  1085. 7 B) \; _% A5 g3 C+ h9 w, @2 t
  1086. PPU_Proc_Cnt_Line
    - H; S$ W" J. z- s% Y2 w1 s; t. [3 v
  1087. INX+ W9 t2 @) W5 `. s( a' i
  1088. LDA PPU_Addr,X+ g* E7 J+ w. U" q
  1089. STA PPU_Addr_H2 D& h& X* V0 l- u5 d8 {" N% _# l$ m
  1090. STA PPU_ADDRESS
    6 ?& ^" A) x7 h7 c# R! u6 V
  1091. INX9 H6 |, \6 I4 o8 Y" C7 O8 x6 p# V
  1092. LDA PPU_Addr,X7 S9 z! @! h5 u* y2 N
  1093. STA PPU_Addr_L3 O' \' |" l! w* N2 j
  1094. STA PPU_ADDRESS
    / q/ Q3 V9 ?( G2 y" e6 ~8 B
  1095. INX. h, o6 f) R' m+ u6 X: R# C
  1096. LDY PPU_Addr,X0 C0 i& A+ R3 D! W" u( r' C- F" b- o5 U2 h
  1097. PPU_Proc_Cnt_Line_Write' y9 a; `" v7 t3 X( L
  1098. INX# i; \4 \# l- S. T
  1099. LDA PPU_Addr,X
    1 d$ h& k. R" R6 V1 K
  1100. STA PPU_DATA6 t% H  [$ F: m" E
  1101. DEY% W4 R* X* u- @- m( n0 R2 O
  1102. BNE PPU_Proc_Cnt_Line_Write! p* z5 f  Z1 F5 L0 j( W- v# @
  1103. JMP PPU_Proc_End# q( ?; q$ F, h* B) K' N

  1104. 3 C. ]$ y0 R5 T" c+ [
  1105. ;==============================
    8 ~( r0 B  T( @8 m0 J" J! C* F1 r
  1106. HEX_To_Dec;十六进制转十进制
    ! L1 K8 T( p8 y7 v' L: q2 f
  1107. STA <HEX_Data
    : n2 T* w- ?6 \
  1108. PHA
    ) \4 h/ k; A" m9 C8 A
  1109. TXA0 j0 v* t' Y9 B) S
  1110. PHA
    ) Y6 A3 B' ~7 W; _, j
  1111. LDX #$00
    + s# t1 K. C' D0 x( {3 f9 i. w
  1112. LDA #$00
    6 P7 }) e- A: o2 `' M% ?# X8 v
  1113. HEX_Cln
    , [2 q8 q7 G$ w9 P4 H4 Z- B
  1114. STA <DEC_H,X
    9 z* ~7 h% {/ X3 e" |& Q+ ^
  1115. INX' O: D8 g, ]4 }' y2 U8 |& J
  1116. CPX #$03- w% g8 r7 G5 k& F+ V2 T5 P* L
  1117. BCC HEX_Cln
    ( L: F6 B4 m: S7 ?' Q* a. s
  1118. LDA <HEX_Data+ I  J1 U) @) R6 k) x* P
  1119. ;------------------------------
    * [+ k1 X9 ]& t2 H+ O2 L# B. v3 D7 g
  1120. HEX_100
    ! a' j, F) c/ ~! I0 V, L" B
  1121. CMP #100
    & z" v  p* _8 m7 C* O
  1122. BCC HEX_10
    0 d, C) h- L# [& i
  1123. SEC
    4 _5 U% w( E# [& _3 P3 _" V4 L
  1124. SBC #100
    : G3 R3 H/ g/ E: s% [# [  ^
  1125. INC <DEC_H
    3 G$ t! {: T* `+ x3 J0 H  I
  1126. BNE HEX_100
    5 |8 c$ O" k! N. a: m
  1127. ;------------------------------) T: {% O1 w, X; O2 o  k, i
  1128. HEX_10, L% [! A  M+ p) W) s
  1129. CMP #10& A5 s& N9 Y( C2 ]2 e5 n! ?9 Y4 U
  1130. BCC HEX_1( F! l- [( D6 E( }$ \0 z
  1131. SEC
    - M2 M4 m- R& Q
  1132. SBC #104 r& G  H" ^5 A1 R) Y0 x) e
  1133. INC <DEC_T* ]3 A- L9 x: N& e) C
  1134. BNE HEX_10* l1 h- j. p( s/ i
  1135. ;------------------------------6 b. @( c" H1 T4 H8 \
  1136. HEX_1
    1 I- l; E( r6 [9 X7 i( ?
  1137. STA <DEC_L9 O- G4 o  u; f6 G5 k5 G9 v
  1138. PLA: P+ v( C. y7 K
  1139. TAX$ \; ~) ]! C6 \# v6 A; X
  1140. PLA: V7 p4 ^% x& z. t# k
  1141. RTS
    * u% A# z) ^& c
  1142. 7 ?- k) T! u1 g) I' U
  1143. ;==============================1 @2 K* \! q+ E
  1144. ;音乐曲目显示
    : {+ ^, U! r( I
  1145. Music_Show
    9 E! P2 v. X/ F8 d; q6 S& @0 `6 T* F; D
  1146. LDX <Music_Item_Cur
    % t) q& r  w" w
  1147. LDA <Music_Cur,X8 z, Y: q: y; {# t4 c& v4 s1 l
  1148. CLC
    # z; P; K8 j. n( D# A1 E! Q' j( ?
  1149. ADC #$01
    / P" g7 W1 k( Y. v. e0 g
  1150. JSR HEX_To_Dec$ B4 z  N1 x& W- Q! j# ]; {7 x, }
  1151. LDX PPU_Cur: _; K  k# b( z* F+ f
  1152. LDA #PPU_MODE_CNT_LINE
      Q7 Y  f) g! x8 P
  1153. STA PPU_Addr,X
    8 s/ \  a1 J- w: l+ R2 }; V
  1154. INX1 D' i5 K# a' {/ w4 v1 A6 T' v
  1155. LDA #HIGH(Play_Index_Pos)0 [& _1 T! A, W, G* j" y3 d1 c
  1156. STA PPU_Addr,X' h  `3 ]& u- ~) h$ b
  1157. INX
    5 q' Q8 \1 |- W9 Y$ w
  1158. LDA #LOW(Play_Index_Pos)
    ! N* x; r" V4 ?! o) z( ^
  1159. STA PPU_Addr,X
    & B/ V7 V9 q* F( S4 B* X! }
  1160. INX, F, E) t" G) y# @
  1161. , s3 ^: H* Y; M$ V& D, B6 m
  1162. LDA #$07; {7 d8 V8 K- ~/ t
  1163. BNE Music_Show_Length
    ! b" R% [& h4 J1 F7 U; q1 d7 `/ W

  1164. 3 J- V* _" C- v( U* }) V- |
  1165. Music_Show_Length! L4 L: o- J7 H3 r  a
  1166. STA PPU_Addr,X6 Q2 j: ?: ~# A: K, Z
  1167. INX  P, t! u' l1 S/ K1 ?9 o& R
  1168. 7 L, y$ y/ d3 u* c3 c7 e
  1169. LDA <DEC_H* A# S' o8 b4 ?  b- H8 Z
  1170. ORA #'0'
    - u  n) a8 T5 d: ^- K& ?/ Y6 b+ _
  1171. STA PPU_Addr,X. m0 P; s; }$ L" v. w
  1172. INX
    9 L8 j; V. y' Q* i1 _0 F$ C# F' x( n

  1173. . u4 D/ h, A+ @/ k
  1174. LDA <DEC_T
    1 l3 h. U8 c/ E; E0 Q% H. ~' m" m
  1175. ORA #'0'7 \# m! B# U' n) z7 F% b
  1176. STA PPU_Addr,X
    2 {7 c$ T/ O( q+ |0 p5 ]4 v3 _" E4 v
  1177. INX
    6 i+ b7 }1 E5 A+ P2 b# o

  1178. - y" J/ s* F6 X+ T9 `* F  G
  1179. LDA <DEC_L
    / e. Z; ?( N/ g2 t3 c
  1180. ORA #'0'
    % `0 j; S9 p9 e1 s
  1181. STA PPU_Addr,X
    0 L) N2 n& Q& L* M- {
  1182. INX
    # A' a/ W' h3 Q# V; h" _) r  ?
  1183. ' ^+ j% i) E  j9 V/ h( ]7 _- p* L+ e8 W
  1184. LDA #'/'
    7 y# j9 X" b+ o$ J6 f
  1185. STA PPU_Addr,X
    3 z7 l& G7 q* g0 @1 y5 M
  1186. INX, Y7 I  B: p' ?) s: t
  1187. Music_Show_Total
    ! a- \* N9 p( J/ N& ~4 G7 o
  1188. LDA Music_Total
    $ V6 H8 L$ R( ^; T
  1189. CLC
    9 S* c, V- n+ H7 v
  1190. ADC #$01
    ; M4 {' Q' R4 k% O, j% t" P
  1191. JSR HEX_To_Dec! k1 H7 {0 M7 I$ o6 V( X

  1192. 8 a  a9 A6 \4 w! H. x
  1193. LDA <DEC_H9 D+ M6 s3 x4 f, p9 @5 l
  1194. ORA #'0'- ?0 t# I7 C" P" a
  1195. STA PPU_Addr,X
    $ \3 q! ]4 l7 x
  1196. INX
    & e5 K: y( G% r( J$ t
  1197. # w7 f! t( n6 O$ y
  1198. LDA <DEC_T
    1 Q, G2 H% f: |' z
  1199. ORA #'0'
    8 s1 a9 `; D0 f0 g# s; O
  1200. STA PPU_Addr,X
    7 ?$ C' M% d  f6 r8 [
  1201. INX
    / I! |/ w  v% w  o3 o& h9 Y  `
  1202. 3 N/ m4 K* h0 m5 F3 Y
  1203. LDA <DEC_L
    * p( u/ t! O" y2 L2 u
  1204. ORA #'0'  X' `8 G( d. z2 u
  1205. STA PPU_Addr,X, d4 J  r' y3 [, K9 ~
  1206. INX8 j: Z2 L5 ]' c5 U- s; }% K. A
  1207. 9 _* a$ f& J, `. v/ f, L- M4 T- E0 k
  1208. STX PPU_Cur9 L4 [2 P; ^' n7 r3 ~9 ]' ~
  1209. Music_Show_End
    ( j) j- D# X0 O, W& B: N
  1210. RTS
    # c. B1 n4 g& X5 `9 _9 G/ D
  1211. ! l9 A9 K1 E6 C0 Z* J
  1212. ;==============================
    + h% Q2 D; @$ s$ P
  1213. Time_Show;播放时间显示
    9 T/ d) |3 ]4 q( @: a2 v  o; s
  1214. LDA <Text_Disable_Flag8 e5 g/ n! F3 R9 ~/ S
  1215. AND #TEXT_DISABLE_ITEM0 h) D1 D. y' ], O
  1216. BNE Time_Show_End
    6 m' j" _# o% i' h1 n! U+ M
  1217. AND #TEXT_DISABLE_TIME
    0 K4 Q( |8 Y$ p) r
  1218. BNE Time_Show_Enable1 k$ Q% U2 k: g2 g! M

  1219. : h. \' `# F7 k) i5 d
  1220. LDX PPU_Cur" _4 X1 N7 i( n3 f; M4 m
  1221. LDA #PPU_MODE_CNT_LINE
    7 P9 u/ g4 c8 y7 w, X, J
  1222. STA PPU_Addr,X
    4 [$ c( ~9 G" X% U7 n, r) M, i
  1223. INX/ I! X( e$ D$ M$ I7 A6 L
  1224. LDA #HIGH(Play_Time_Pos)
      |7 T) F, y. g6 M8 c3 G5 U
  1225. STA PPU_Addr,X
    ! I3 x: s% z+ q7 U$ P. c  z9 Q
  1226. INX) a. c3 `% ~7 ~1 l) T
  1227. LDA #LOW(Play_Time_Pos)
    3 L  ?1 K/ R/ R  p& D
  1228. STA PPU_Addr,X; K) r/ \" I: e$ e  Y" C8 ]
  1229. INX  u: p& |7 ]' f( I
  1230. LDA #$08* G- ^- F- x  a  Y1 O
  1231. STA PPU_Addr,X9 w: a7 ]. F- N3 R% C- {
  1232. INX% q4 q; C2 T9 l: D
  1233. Time_Show_H6 @" X) }! ~  v* O
  1234. LDA <Time_H# m7 }1 H8 z9 V; Y' \8 J2 B* S
  1235. JSR HEX_To_Dec. D" [# r, b% S
  1236. JSR Time_Digit
    # q' w+ k0 r# o* B
  1237. LDA #':'9 M8 r7 u2 w* D$ D
  1238. STA PPU_Addr,X8 h8 ^$ S( \" t- N4 R# |  M
  1239. INX
    + V/ I" Y3 b1 r" Q2 C/ \6 {
  1240. Time_Show_M
    : s# m4 N1 Y0 p+ E
  1241. LDA <Time_M0 B& Y2 Y3 V0 ^
  1242. JSR HEX_To_Dec
    ; G2 b. k- c/ f5 S4 V; y
  1243. JSR Time_Digit0 k5 {6 E; N. i- K
  1244. LDA #':'+ H, T7 j# D! |( j1 a" ^8 l$ p
  1245. STA PPU_Addr,X
    $ f; J, G  _7 @1 ]  d' c
  1246. INX
    9 J9 ~# h. U  s
  1247. Time_Show_S
    0 m7 q0 @% a+ j8 e  S2 d
  1248. LDA <Time_S
    1 T2 Y5 ^% v* H3 |4 K* i9 B
  1249. JSR HEX_To_Dec. o3 f' g- r$ a( b
  1250. JSR Time_Digit0 U/ D; q9 p  W3 `+ j! L
  1251. STX PPU_Cur
    % G$ K. Y8 ]( r. _4 |4 g5 P8 P! N
  1252. Time_Show_Enable* ~" m" h7 ?3 E* I. f/ Z, p6 w/ P
  1253. LDA <Text_Disable_Flag1 @9 X  o% d8 v# v- R8 ^; V8 X
  1254. AND #TEXT_DISABLE_TIME ^ $FF$ v( H) C: M' D4 k3 W. p
  1255. STA <Text_Disable_Flag
    1 h& S% e* e! S, q& K/ l
  1256. Time_Show_End
    ; P9 U: q0 R2 l; F3 U) Q* w
  1257. RTS
    / |' c) X9 r* U3 V% X2 m
  1258. 4 N' ~% q; U3 u( q5 M
  1259. Time_Digit
    : V2 w# Y, X' M+ v5 F
  1260. LDA <DEC_T
    ; N( m0 ?6 I. c7 q* a- g0 Y5 S
  1261. ORA #'0'
      T! S- q; O6 U0 n3 z) R
  1262. STA PPU_Addr,X7 \& O) S3 V- Y/ I+ O0 ~
  1263. INX' A$ s8 T7 O' e/ s
  1264. LDA <DEC_L
    : i9 k) b  }& X2 p; |9 p0 y2 N( c* |
  1265. ORA #'0'
    $ h) Y0 w  r8 ]3 u& F2 M- J
  1266. STA PPU_Addr,X# M" w% e* ~" b) \/ N: u
  1267. INX/ ]  f- G6 y0 i& n
  1268. RTS. j* ~/ k/ B" ?" b' T2 N8 N8 n: @
  1269. 5 i- w4 v" D1 X, S% P0 e, i2 }8 {( J
  1270. ;==============================
    ; u# _( v, G3 L% |+ ?7 T9 [5 {
  1271. Time_Count;计时
    8 T% J" L2 I0 }& b0 N& K
  1272. LDA <Music_Stop_State6 M& O" t/ e; U
  1273. ORA <Time_Wait_Cnt; a7 A( b$ T. _1 k2 \0 `( y
  1274. BNE Time_Count_End
    ! f$ q) J8 C. w7 y# F  l6 r
  1275. INC <Time_Cnt
    " l  R5 s7 `& r" L6 B4 V
  1276. LDA <Time_Cnt! z' G  H5 T, h/ K
  1277. CMP #60
      t; Q- \  u& T) _2 i4 o
  1278. BCC Time_Count_End# w. _5 f$ l# d6 p" ?2 U3 C
  1279. LDA #00. Q" n$ o. c! [0 K1 _6 a2 e
  1280. STA <Time_Cnt
    ! {) p* R9 {0 [8 J3 j9 K2 f
  1281. INC <Time_S/ U" u8 ~8 E) D6 [% m, T8 W7 F

  1282. : v; u( v3 f  Q6 J
  1283. Time_S_Cnt
    ' Y' J9 ]0 v; f" B; {3 b4 e
  1284. LDA <Time_S) Z) Y; N4 b9 |/ T9 m4 x
  1285. CMP #60$ q( @5 W9 J0 p( u- ?% _+ j, `
  1286. BCC Time_Count_End
    0 i$ D/ A! T/ I6 C0 c$ i
  1287. LDA #00
    4 k: j' Q$ u! j" ~. Y5 v
  1288. STA <Time_S
    2 N7 L; T5 c. I. t3 S0 Q8 X1 I
  1289. INC <Time_M- e+ O( D& X. i* w: M
  1290. 3 ]# a0 d+ Z1 a1 D
  1291. Time_M_Cnt
    3 _) C6 A& y) D4 o2 v4 q
  1292. LDA <Time_M
    ) p' @  m. B/ m# n( N0 B$ f# f
  1293. CMP #60
    : G' [/ P( y3 e, Z$ K4 G# J3 g
  1294. BCC Time_Count_End% l+ j$ r- Q. T) h  ~& `
  1295. LDA #00
    ) Z0 U1 r* q* W* T
  1296. STA <Time_M3 K! |% v, K% I& e2 u
  1297. INC <Time_H
    * I9 |' }: a9 @8 q* r

  1298. 3 u0 w  ~6 k& F( e, c, q
  1299. Time_H_Cnt
    3 ^( s* u' t% {  N' P
  1300. LDA <Time_H$ m# R4 U  y- Q  ~9 l  {' I% A
  1301. CMP #24
    & n0 W5 Q6 F+ e+ Q( _# t
  1302. BCC Time_Count_End- f$ S( i" N0 C
  1303. LDA #00
    - B/ b/ j" m; e* e1 I; g5 m  g
  1304. STA <Time_H6 Z) p, K7 K/ s. t# M- T

  1305. . p. [, Y% Z" {% R% k# y
  1306. Time_Count_End
    0 b7 v/ _% T! m: Q7 A- W( a7 @
  1307. RTS6 P  a. k$ f% x; S
  1308. , {, z- Q5 v& m: m" P0 b( J
  1309. ;==============================( D" |$ O1 t! m8 ]6 {( g- s
  1310. Time_ReSet;播放时间重置1 y: X/ b  _) E$ s) m* A; N
  1311. LDA #$00
    * B2 j* }, p" k$ K3 c
  1312. STA <Time_S' O4 m9 i! @2 T7 L7 i
  1313. STA <Time_M
    2 O* W* E) N' M6 v/ e: B9 q! @( \
  1314. STA <Time_H1 N- y6 T4 `/ {
  1315. STA <Time_Cnt
    , Z' K$ r9 Z. {* C" u) N
  1316. RTS9 @) t% W! m. j0 l2 h/ b! h

  1317.   O2 z+ r5 _5 u) ?' k  f/ M8 C
  1318. ;==============================- F! S6 u) t; w$ H
  1319. Music_Bar_ReSet;音乐条重置
    ; W- G6 m/ p/ H# x7 E
  1320. LDA #$00* _* v6 p2 |. a! m4 _  T4 @
  1321. LDX #$00  h3 R: e" c2 f, f5 _7 L
  1322. Music_Bar_ReSet_Set
    4 n* B1 V% Y4 o8 m3 H* J6 h
  1323. STA Sound_Bar,X2 f. }+ ?$ o, @+ B, {
  1324. INX
    ( \, q/ m! X/ T% e: Z9 Z' J  d
  1325. CPX #$10
    / n. D" \3 o3 ^- N4 A; |
  1326. BCC Music_Bar_ReSet_Set
    6 R# ^: V1 W+ @/ d+ y
  1327. RTS+ t1 Y% N: b1 @; Q

  1328. ! Q3 {8 x% H5 q  o1 M/ ?+ W; G. W8 d% o  q
  1329. ;==============================
    ! K; [! X! q+ m* {( g
  1330. PPU_Data;PPU数据写入
    - R% G* Y# A+ q" M& W
  1331. STY <Data_L3 v" c' I/ S; M8 l
  1332. STX <Data_H( w; E. O* }2 @. p' J( _+ I" M
  1333. LDY #$FF
    - R7 y. R9 W4 S8 D. q) ~' f. X
  1334. LDX PPU_Cur
    ( d3 Q3 m" E6 }! `% e7 u) K
  1335. DEX9 `( v9 e" m% i( v5 ~7 ?6 V
  1336. PPU_Data_Beg
    $ W1 U1 ?0 e& x! F
  1337. INX
    , k0 M0 }) K! I& W( ]0 ~
  1338. INY
    4 T/ ?! x% v* U+ S/ n
  1339. LDA [Data_L],Y
    # [$ w' |1 w7 H( T; O5 G0 N8 a+ y
  1340. STA PPU_Addr,X
    " Q9 ]6 c+ N! I; r* V- ~4 s# o
  1341. BNE PPU_Data_Beg
    . y$ Z" H! x& Y" _! H
  1342. STX PPU_Cur
    ; ^1 |( S1 p. T0 C# k/ A' O
  1343. PPU_Data_End5 U8 x4 K# g" [' Z  k0 U" f. P$ q$ f/ q
  1344. RTS8 Z- |4 B' j2 Y
  1345. & x1 N& _# A9 r; b
  1346. ;==============================
    1 Z7 J9 e6 V* w) ~
  1347. Music_State_Show;播放状态显示
    0 v, y) j& L; Y3 f% V8 E8 j
  1348. LDA <Music_Stop_State
    + L' Y2 E1 l9 Z: P, I" Y) k1 T9 V5 N
  1349. BEQ Music_State_Show_Play
    ) l! W, }' F2 @, W6 m
  1350. Music_State_Show_Stop
    $ o. @* \3 n+ Y- Z9 b
  1351. LDY #LOW(Music_State_Stop); D: j: x( P4 \2 ?0 D7 v
  1352. LDX #HIGH(Music_State_Stop)
    & A! n4 P8 Q0 z
  1353. JSR PPU_Data
    / S( O% R2 W- t4 h1 C
  1354. RTS
    1 r+ y- U1 I" m) W8 D
  1355. Music_State_Show_Play; i" {  |6 j( p- f
  1356. LDY #LOW(Music_State_Play)
    0 J6 c1 E& `8 b" C1 k3 C
  1357. LDX #HIGH(Music_State_Play)
    8 @5 @* ]  |1 C  h8 s" n
  1358. JSR PPU_Data0 o, A( f$ @0 }1 c6 j2 [
  1359. RTS% N# l, R  b. l& r" D  O0 J0 i! w
  1360. $ P: G# `& ~; }% @
  1361. .IF SOUND_BAR_SHOW_ENABLE
    8 @, f, R1 F* O# b" F- x  j7 E) _
  1362. ;==============================
    0 c1 \# F: i# w) T0 |
  1363. Sound_Bar_Text_Set;标题与音乐条初始化
    6 v% u& `) x4 Q. |4 ?& E
  1364. LDY #LOW(Sound_Bar_Text_Data). \$ {9 N! G5 [- @5 j7 K
  1365. LDX #HIGH(Sound_Bar_Text_Data)' u) j# c# L0 p  ]
  1366. JSR PPU_Data/ F" M$ j, ]6 B
  1367. RTS
    5 j+ ?2 b1 W# Q
  1368. ' \: F, h0 C7 _+ W: L
  1369. .ENDIF
    " Z3 [- r! y6 P" X/ a

  1370. 4 u$ {1 }6 g$ |. H
  1371. ;==============================& K) e% V$ P2 _/ T: c
  1372. Set_NameTable_Attributes;设置命名表属性
    $ C5 [5 f4 {& Q1 a6 H# Z
  1373. BIT PPU_STATUS+ I- W: [" v0 D5 u& _8 g% ~
  1374. LDA #$23' \: t# W0 N2 l# P. h
  1375. STA PPU_ADDRESS7 V9 c' Q1 _! ^) Z: ~: a
  1376. LDA #$C03 w& a* l8 M* w* ?" r6 J5 r1 P
  1377. STA PPU_ADDRESS
    ( S2 g' L" d+ `6 ^  n
  1378. LDX #$00
    5 t/ [. x( }2 ^7 ^
  1379. Set_NameTable_Attributes_Write1 W  B8 H3 ~7 k5 S& k
  1380. LDA Palette_Attributes,X5 e5 e! ]4 D( ^$ A* g
  1381. STA PPU_DATA+ @: o! m; N+ M* {
  1382. INX* t9 z5 j$ Y  C9 h% L4 o. j& x" a. t
  1383. CPX #$40' S0 d" ?$ h( Q* M: R/ N
  1384. BCC Set_NameTable_Attributes_Write. T2 Z) y- a5 P; q5 f
  1385. RTS
    2 ^2 U, E; X( J+ [1 V

  1386. ) r  P( O  o* G7 ~1 h- z$ E
  1387. ;==============================) L5 V& T; a9 e& ~) f
  1388. Set_Palette_Color;设置调色板数据: y  f6 q$ g: k4 _3 n' w$ A8 n  q, r
  1389. BIT PPU_STATUS6 Y& x) o# }4 _5 Z) n. _
  1390. LDA #$3F
    ) \, }' x* u. w: u" D
  1391. STA PPU_ADDRESS" y2 `; e9 P* z" y3 J
  1392. LDA #$00! V$ B* @8 i% h' Y) T
  1393. STA PPU_ADDRESS
    2 A' [& w; Y. f7 |7 e
  1394. LDX #$00
    # e( m* ~" [9 n2 O' W
  1395. Set_Palette_Color_Write
    # t/ ^$ V1 [1 G, V
  1396. LDA Palette_Data,X, W  T& ^- k, l+ c  r6 t
  1397. STA PPU_DATA
    & D2 U$ p# L5 K0 s$ n
  1398. INX" F# H' d' i5 B; X
  1399. CPX #$20
    + [& C) A+ d2 k& a
  1400. BCC Set_Palette_Color_Write
    3 U0 {5 d& P; A3 X2 M% y% {
  1401. RTS
      p. i+ L4 \- S5 H$ ]
  1402. * [! Y6 ~. {# q" j
  1403. ;==============================6 F, m2 B) f* V! v1 l- j
  1404. Init_Palette_Addr;初始化调色板数据
    6 j* M  ^. `7 w$ H% ^
  1405. LDX #$00- d  S! K9 ]. h% U8 m5 Z* F
  1406. Init_Palette_Addr_Write
    9 o' l! V+ j1 C+ G
  1407. LDA Palette_Data,X7 s0 z5 a$ f  v! n3 _# w1 U
  1408. STA Palette_Addr,X. A# d' s# o7 b
  1409. INX( r# s: m- l( j3 E& {) ]
  1410. CPX #$20
    2 L/ i5 T' r* z, v; z* ~
  1411. BCC Init_Palette_Addr_Write
    ! a% ^) \% s: a9 ^0 k
  1412. RTS/ L% m" X% o3 D& `! Z: }
  1413. ' J' [$ ~; Q, a3 w& q- z
  1414. ;==============================+ c, _8 Y! P& z# Q$ R
  1415. Update_Palette_Color;更新调色板颜色! ]' M: f+ d4 Q" d+ A" }
  1416. LDA <Palette_Update_Flag
    & \5 K: n& t9 g8 o" J0 X2 u, H) p
  1417. BEQ Update_Palette_Color_End% \0 i% c) O+ R$ H0 V2 i$ t
  1418. LDA #$3F
    3 A& H+ l8 O" h* G5 B6 Z
  1419. STA PPU_ADDRESS9 R) B6 D1 s  t1 d
  1420. LDA #$0C& E: @* U" U9 g* e3 \: l
  1421. STA PPU_ADDRESS- J2 d" ~7 q, p+ v7 {) u# s% T
  1422. LDX #$0C
    1 P. w& P! ^5 [
  1423. Update_Palette_Color_Write
    + \3 Y! z" B+ }" h. t
  1424. LDA Palette_Addr,X4 S/ w6 B; f3 p
  1425. STA PPU_DATA
    ; m) t3 Z& F& R, j# z; j. y
  1426. INX1 u0 H3 t2 ^7 \1 S' B, v4 M: a. y9 z
  1427. CPX #$14
    ' _7 o* \8 V5 d# v  m% N7 t3 ^: R
  1428. BCC Update_Palette_Color_Write
    " P4 \" g2 P( x2 p2 t; G9 }
  1429. LDA #$00, h5 F* l5 `$ ~
  1430. STA <Palette_Update_Flag& Z' l$ w* b1 x1 p4 z5 p2 c
  1431. Update_Palette_Color_End+ l  [5 Q$ n& G$ m$ m0 O
  1432. RTS4 z6 d  A' U; X1 ~

  1433. ; D4 j5 x8 K/ j4 K* n& _' O: O

  1434. " W' G+ r# `* z. @2 I8 Z
  1435. Update_Sprite_Palette_Data/ Q6 A5 Y6 d3 b! o
  1436. .DB $21
      L9 R3 O& r) S; N9 l. o% H7 s
  1437. .DB $21
    ( V5 S" o: E6 s2 h3 v" `
  1438. .DB $11! R8 q& C( s# [6 F
  1439. .DB $01
    " T7 i% \' S/ Q% [# O4 A
  1440. .DB $01) I4 E6 d  C, X$ A
  1441. .DB $11
    * [4 n" R9 n, H' y
  1442. .DB $21' U4 U5 d$ ^/ x, f0 c. U% I
  1443. .DB $214 G. g- y2 M* @# ^1 k
  1444. .DB $115 @! z( T2 ~* N" f, O
  1445. .DB $01, g6 [* L! {8 j8 [
  1446. .DB $11
    7 |* v: \! V! {3 K1 m/ C
  1447. .DB $21/ Y4 u1 v. I  @1 d% U
  1448. .DB $21
    . ]- k  e  V0 p+ v  n; x
  1449. .DB $11
    9 @+ i7 o/ S+ A( ~# \9 ~
  1450. .DB $01
    3 L4 ~2 |* a6 R8 L7 Q6 i
  1451. .DB $11
    ( s+ _& \( j+ g& u# |+ ^
  1452. ;==============================" f7 Y* {# J& B% ]& z5 @
  1453. Update_Palette_Data;更新调色板数据
    ' j8 i3 v; u( H# P: f% L7 Y6 A
  1454. LDA Nmi_Time_Count1 ]& p6 G* A) ?8 H
  1455. AND #$08* b) x2 G' [. T2 {7 R- N3 ?" v
  1456. CMP #$08
    . u0 A- T8 l. z
  1457. BNE Update_Bkg_Palette_Data
    4 P' _2 i6 f; I5 s7 M% m* }$ n- t
  1458. $ \; ]2 G! t+ C5 E; U, c
  1459. Update_Sprite_Palette_Data_Set* e& X0 a$ w) d0 J
  1460. LDA Nmi_Time_Count
    1 o- L6 c+ b& o- z( n- \$ |! r
  1461. LSR A
    3 }; }* `$ o! F( w7 R# L
  1462. LSR A9 `+ s; i& r. \& z6 ?" }: E
  1463. LSR A6 x- r' k5 b0 c$ m( |
  1464. LSR A/ ]8 h! A# `( _6 g" r' Q
  1465. AND #$0F; X* A2 q+ w' ?
  1466. TAX1 z% E& a# ^  N! f4 E/ y6 z
  1467. LDA Update_Sprite_Palette_Data,X
    0 x- L/ d1 Y) l- k8 X% h; O
  1468. STA Sprite_Palette_Update_Addr
    , @' r. `: P! [$ g- }2 H
  1469. LDA #$01  L! E, g9 z. j5 B0 v
  1470. STA <Palette_Update_Flag
    7 ?9 W8 @7 D8 @' \" c

  1471. ' [' {% A- c" j/ n
  1472. Update_Bkg_Palette_Data
    # l% p! U2 ^2 Y2 r/ U3 T
  1473. LDA <Text_Disable_Flag
    " q7 |) g; X2 b  B& }* o# o* X
  1474. AND #TEXT_DISABLE_RAM; e) `5 ]% @+ R6 _7 Y, X9 P
  1475. BNE Update_Palette_Data_End
    " ?+ c: _. B$ x. @( V% m
  1476. LDA <Music_Stop_State
    ; g; n& j  M$ Y! ~
  1477. BNE Update_Palette_Data_End
    7 }3 V. R& p$ F+ @; u
  1478. # O3 J" V  Z3 Q1 V: `
  1479. Update_Palette_Data_Check
    . n- c3 R4 C. V) o2 @: G- @) V1 V
  1480. LDA Palette_Wait_Cnt0 V  ]; J, T* m; b/ x$ _
  1481. BPL Update_Palette_Data_Check_Over
    , ?7 O, |2 B) F1 ~. b! T
  1482. LDA #PALETTE_UPDATE_INTERVAL$ h3 R6 n6 b5 _9 C" A" M" Y
  1483. STA Palette_Wait_Cnt, M4 ?1 D) @: C; e4 J  U
  1484. Update_Palette_Data_Check_Over' X. N4 a* a7 Z9 u( _
  1485. DEC Palette_Wait_Cnt0 O: C3 ?  L. _% J0 c' {
  1486. BNE Update_Palette_Data_End
    . o* p' u- ~! ], @# n

  1487. # [, @0 p/ Q5 p- d: H, `3 y
  1488. LDA <Text_Disable_Flag) g8 f4 i4 z! h: O7 K* o
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    - m# d* O0 ]; l3 s
  1490. STA Text_Disable_Flag
    % X" ]* h% `3 _2 x6 S
  1491. INC Palette_Update_Flag& F) s( @% d, }4 i- O
  1492. $ x4 l2 z/ O& d1 |! U( \( k8 }5 M
  1493. LDA #PALETTE_UPDATE_INTERVAL
    + T6 L1 n6 L! Y- ]( L. ~
  1494. STA Palette_Wait_Cnt
    ; B- `, ~6 W  a. F7 b- _+ L
  1495. . ^0 A8 q3 O& }
  1496. LDA Bkg_Palette_Update_Addr) U1 M0 }) g8 K* q+ f/ |. v  E% B' r
  1497. CMP #PALETTE_UPDATE_MAX
    , a: \. {% M4 H
  1498. BNE Update_Bkg_Palette_Data_Set9 y( I, y) h) O& u) f% L
  1499. LDA #PALETTE_UPDATE_MIN - 15 x4 l& H( F/ B/ Z  w; U/ |( y
  1500. STA Bkg_Palette_Update_Addr
    3 @$ w9 W- X; @4 b: }% y
  1501. Update_Bkg_Palette_Data_Set
    * A8 L& y0 N0 ^5 h3 Y
  1502. INC Bkg_Palette_Update_Addr
    4 f% G& U, A  n' T

  1503. 8 D0 M/ `9 I( I! r# Z
  1504. Update_Palette_Data_End
    4 X: N& k8 v/ `3 w( R
  1505. RTS# {; }' B' h7 p8 r, c& g2 _
  1506. : L7 z+ n& C# Q& t& B- P  S
  1507. ;==============================
      E* |0 l) R' d/ l
  1508. Show_Music_Text;显示静态文本
    1 b3 i4 m5 ?: p  O% ?8 Z
  1509. LDX #$00
    * Y* q& e4 \' }5 w) l& S0 v) h
  1510. Show_Music_Text_Set: U  x; n2 @1 p4 S2 k" I  p
  1511. LDA Static_Text_Data,X
    ; |; D) u5 U+ |0 H4 O+ K% ]% ~
  1512. STA <Data_L- n# f$ f2 y: L# R1 @5 i3 f9 M
  1513. INX% q. P, d8 [% ?$ T' a+ l" G
  1514. LDA Static_Text_Data,X7 }( t& [; {! T* V" t
  1515. STA <Data_H
    ! o3 t' ]2 L6 ?' I; p( n/ m
  1516. INX
    ! j6 K3 q( Q# y' ?4 P5 D7 |' C
  1517. LDY #$00) s3 @; P7 d0 ^
  1518. LDA [Data_L],Y) O( F0 ?; W" [. [
  1519. STA <Data_Cnt
    4 U+ r3 `+ M) O7 q9 K. V; n
  1520. DEX0 {9 e3 t, e3 E, Z9 p0 C3 @( O/ M
  1521. DEX
    5 c1 v6 t! K( L! Q+ }/ ]/ `; A
  1522. LDA Static_Text_Pos,X  ^: e/ |9 H1 g! \
  1523. STA PPU_ADDRESS
    5 {% X( q+ \  z# G7 J/ j
  1524. INX
    9 b9 g9 L8 T% b! H: O. x8 ?# t# Z' H
  1525. LDA #$20
    3 N1 q6 H4 h  O( P2 b! a: E. ^. t; r
  1526. SEC+ u6 ~% W8 s! _4 Z
  1527. SBC <Data_Cnt
    8 U1 B% [5 b7 {9 q
  1528. LSR A3 {) |0 Z# S1 s/ @9 v! C
  1529. STA <Data_Buf
    4 F0 y; Z# x; T. `
  1530. LDA Static_Text_Pos,X0 ~$ f# S2 T* H/ L9 R
  1531. AND #$E0
    & B0 L% s! @" s  u+ Q
  1532. CLC
    3 g' s6 C+ l. _( b& \
  1533. ADC <Data_Buf7 w3 Q# V7 _+ g$ W, y# e
  1534. STA PPU_ADDRESS
    0 \# o( d) l  e" d9 X
  1535. INX; N" A) C3 L6 {0 C& i5 O
  1536. Show_Music_Text_Set_Write
    " E3 `' ~6 Y$ f: N6 ^, z
  1537. INY9 s$ F6 Y/ [+ W. H4 h
  1538. LDA [Data_L],Y! l5 C/ v9 F4 z9 E
  1539. STA PPU_DATA
    9 d7 V1 Z  K7 S. g6 ^9 Y% ~
  1540. DEC <Data_Cnt
    : s2 |8 d: ~: Z/ W5 l
  1541. BNE Show_Music_Text_Set_Write. N, u. N# r2 ?3 {( G
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos/ D0 R+ }* m9 j/ R
  1543. BCC Show_Music_Text_Set! Z; h" m' @+ B; {
  1544. RTS$ T, k5 |+ T$ d3 a& G8 ^
  1545. % d4 H2 {, D9 n& B, \. R
  1546. ;==============================4 B) C5 n  u3 ]9 O( n
  1547. .IF Track_Name_Pos;显示曲目信息
    1 |5 x4 h0 T, i* ?
  1548. * w5 z$ u( Q2 u6 A
  1549. Clear_Track_Info6 @8 Z, ?! [: t4 U( r% `# K8 Z; i
  1550. PHA
    ) Z( x/ u1 D/ H  t9 \5 N3 n5 O
  1551. LDX <Music_Item_Cur- l4 h% D; ?7 v5 d5 e; Y& N( h/ G1 F8 [
  1552. LDA Track_Name_Addr_Flag,X
    : W" s+ b6 A) f4 F: y
  1553. BEQ Clear_Track_Info_End_Ex
    0 z4 u8 o; I+ P5 [2 S. [1 m
  1554. PLA
    * y9 H0 C/ @% `

  1555. 3 i3 G1 @0 D7 W% V- c$ g
  1556. LDX PPU_Cur2 f) Y7 h6 u( {  G2 |, N7 V- ?
  1557. PHA
    # G) k* C0 m$ O% z8 W
  1558. LDA #PPU_MODE_CNT_CLEAR
    % E2 W& A1 S# W; B
  1559. STA PPU_Addr,X+ B2 O# d) G$ ~3 a  A2 q
  1560. INX9 k. w, p3 D& w+ E
  1561. PLA
    7 H5 |" A. a5 v5 R" o% b6 S2 E4 V
  1562. JSR Show_Get_Track_Name_Center_Pos
    + R" t( ?6 Y1 a
  1563. STX PPU_Cur
    . {7 m. {' E1 Q6 @/ Y7 |) r
  1564. Clear_Track_Info_End
    4 I5 L4 d- I* K% [$ E
  1565. RTS* q9 W8 L9 \9 J1 g
  1566. Clear_Track_Info_End_Ex3 M7 \+ r: X  F
  1567. PLA
    ( M$ N6 V- W  [: \
  1568. RTS
    # M) P/ t: }$ y, w

  1569. / s. ~1 m7 M0 K2 J
  1570. Write_Track_Info' h& `3 S8 }0 v+ ^8 Q0 l' x5 W1 ]
  1571. PHA
    ) d" P4 q1 F$ o. f5 W
  1572. LDX <Music_Item_Cur
    1 h6 v- V# P# u' [% t, V
  1573. LDA Track_Name_Addr_Flag,X
    6 H! s& j& U, Y2 p' z
  1574. BEQ Write_Track_Info_End_Ex/ `' U9 ]4 p2 x" p3 A! n& }
  1575. PLA
    ; x& P& i1 k/ g4 M/ N

  1576. : v: \4 d; c; w$ M
  1577. PHA( F+ f; Q! U/ C3 g
  1578. LDX PPU_Cur* E, f% G/ m: n) S
  1579. LDA #PPU_MODE_CNT_LINE
    1 w) x) d2 C8 j) a1 e
  1580. STA PPU_Addr,X0 |0 E7 N! d5 i
  1581. INX
    . X  L; B0 m) v
  1582. PLA% j, O+ @0 d5 c7 D- R7 {
  1583. JSR Show_Get_Track_Name_Center_Pos
    2 ^, G& j+ f5 _
  1584. Write_Track_Info_Data% h* B+ W/ r" ^' ^. `6 r
  1585. INY
    7 [& Z, t. C1 Y
  1586. LDA [Data_L],Y
    7 J- r0 q' Z& W3 K+ ?5 Z/ z5 |; V0 n! F
  1587. STA PPU_Addr,X7 ]; Y* y: Z3 N  N+ u7 v, V
  1588. INX
    ( i. ~4 b  ]9 J/ d& T9 F
  1589. DEC <Data_Cnt8 t8 n9 ~# y5 `- c' u/ v
  1590. BNE Write_Track_Info_Data
    : L! ]1 p6 D1 R; T# J, O0 X6 G$ h
  1591. STX PPU_Cur
    & }; J& K0 e0 N
  1592. Write_Track_Info_End( z. t$ y0 W  G8 T: d
  1593. RTS
    $ p, {( Q4 |# l: \
  1594. Write_Track_Info_End_Ex2 @9 }( \) K4 N
  1595. PLA
    1 q, \# {! U. f8 @9 Y3 l4 N3 m
  1596. RTS
    8 O! h- W/ Y9 V2 a( {2 I. V0 H
  1597. # D; C; _/ m3 i+ u3 e: a) z6 r
  1598. Show_Track_Info
    3 E+ ^! R  }1 A$ G. I8 R5 C2 D6 y
  1599. Show_Track_Info_Clear
    0 k2 _7 ?* M; ^. w: k% b2 }/ g
  1600. LDA <Music_Last
    ! n  ^$ s; T( v( \! _, u' }5 Q1 J5 Q6 d

  1601. " v1 V) y& _6 f% k) e8 S% b$ {
  1602. JSR Clear_Track_Info
    ) Y1 O) w) [9 b) Z

  1603. 4 f, j. @/ |6 U, c
  1604. LDX <Music_Item_Cur
    % a# a+ p* I# N0 o7 Y
  1605. LDA <Music_Cur,X% B7 r* D! V  x, C
  1606. JSR Write_Track_Info
    ' z) Z, S' {4 a/ ^$ @" f* `' G7 N
  1607. RTS, Q/ T3 r! L$ E. d0 j  Y
  1608. ' A1 n  n! O# s+ x
  1609. ;==============================
    4 H/ ~- Y: X. Y% b1 Q! M8 K/ u
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置
    ( R8 G9 I3 D; o' e( k
  1611. % j' y* _7 L$ |" d# e4 I
  1612. ;取出集合名索引
    - U9 y" h/ \4 `" E. V' E# U
  1613. PHA: w; F% Q. d9 x; F8 H& G( j
  1614. % a4 b1 |+ U, h( }- W* Z
  1615. LDA <Music_Item_Cur
    1 s$ W2 ]9 X. L- A1 G9 e8 S0 U
  1616. ASL A, ^1 h; e; m. X9 p
  1617. TAY
    ' T9 s$ F' |( I: K- j. w2 m
  1618. LDA Track_Name_Addr_Port,Y9 b. j" V. \' |: L- y" Y# }
  1619. PHA
    6 P6 _, N; R5 q, S! t
  1620. INY
    4 t" J) n# K7 S5 M- L
  1621. LDA Track_Name_Addr_Port,Y* U$ i0 _  P" A
  1622. STA <Data_H- f6 ?6 R4 P/ v* r
  1623. PLA: Y$ n7 s& K! B* s( K6 `
  1624. STA <Data_L+ E; w) B0 `3 e0 I3 I1 w( l
  1625. 4 J( u1 _4 c3 Q6 E" W" y( k+ I
  1626. PLA! h$ \" k  k. J$ r+ E; L6 _/ I
  1627. ; ^4 n, s3 i: I: Y; C, x0 g, ^% K
  1628. ASL A
    : u4 u% x4 C8 a5 ]  H
  1629. TAY$ F9 p- _8 G* X3 w
  1630. LDA [Data_L],Y
    - i4 u- u3 s7 S
  1631. PHA) [4 c5 v2 b8 \9 p' H
  1632. INY% h; J, V; z4 q# l4 H& C3 m
  1633. LDA [Data_L],Y* V( ?) q1 [: T
  1634. STA Data_H5 W4 G. l5 v0 X  c+ V- v7 n4 }& `
  1635. PLA
    3 I: ?' x+ P8 P3 b+ N6 z! |
  1636. STA Data_L
    * F( A- u% i& D1 w- m. N& r3 ^

  1637. , X# z0 b  h) N) Q' S
  1638. LDY #$00
    7 L) y* e- G4 y; @" J
  1639. LDA [Data_L],Y
    : k5 n3 R3 O3 }& |. q- l! o- c* j
  1640. STA <Data_Cnt0 c0 l6 @8 m) R8 w( C- v
  1641. LDA #$202 `  H1 g1 ]4 [! Z  k: e: G0 D
  1642. SEC  R+ p8 {' y* K6 s
  1643. SBC <Data_Cnt- Y% Z# I4 }2 [  s1 M) F
  1644. LSR A" m  B1 H% V" a9 |) |
  1645. STA <Data_Buf+ j0 [! d/ e* s0 s
  1646. LDA #HIGH(Track_Name_Pos)  a: x2 @9 W6 R- {( n7 O, o* \  k
  1647. STA PPU_Addr,X! O8 l+ K$ n$ Z' m8 R- P
  1648. INX% B4 B0 G2 b) H3 K) X
  1649. LDA #LOW(Track_Name_Pos)9 f% Q/ H5 w5 c& n
  1650. AND #$E0& Z4 W6 h5 x# T2 v' Q& g
  1651. CLC
    7 b5 w& F9 {# Y) J+ z' v6 z- D5 k
  1652. ADC <Data_Buf$ p% s% H# L; l
  1653. STA PPU_Addr,X
    , ^2 ]1 G6 \8 K& m* g
  1654. INX, _- t9 Q2 z/ k8 N  x
  1655. LDA <Data_Cnt
    , U. g4 }- D! m' O$ D5 J8 T- `
  1656. STA PPU_Addr,X8 E" L, E- u  \  w! S" e* \4 L
  1657. INX
    3 n; I: t7 ?- p
  1658. Show_Get_Pos_Center_End# g- I$ o% ?3 @4 S! `
  1659. RTS
    7 S( J, X( p2 V1 e! X0 A3 B: |
  1660. .ENDIF& x2 @7 t% i2 {2 G

  1661. ; W& H# z  n+ t2 t: j
  1662. ;==============================  I6 d6 f2 I  F9 n! l2 g& w4 J3 d
  1663. ;音乐端口清除5 d( Q% Y2 N: n9 Z) w- y* j/ r
  1664. Sound_Data_Clear, R- S* h$ x7 J. ^& w
  1665. JSR Sound_Port_Clear( J2 t8 ^3 v  o
  1666. JSR Sound_Ram_Clear
    + H9 d2 W( H8 y' a7 v
  1667. RTS
    5 F% w  P# M8 N8 D

  1668. 5 C6 u! P  d% |9 Y0 Z
  1669. ;==============================7 N3 a6 t- a& V0 J& H
  1670. ;音乐端口清除
    8 ]/ u9 b5 b% \1 X5 i( U2 X$ }
  1671. Sound_Port_Clear
    ( y3 R4 Z! j" O, g. f7 s, X+ L) [
  1672. LDA #$00
    5 h9 F0 O: K- i2 L
  1673. STA APU_STATUS! y0 F# H, r, O: k7 D: h
  1674. LDX #$00! |" K  }1 ~9 V* \2 Z
  1675. Sound_Port_Clear_Write
    4 _! e4 M( K- n# U+ t. ^
  1676. STA $4000,X
    0 K) o. k4 t& {) Y
  1677. INX* o7 e2 t7 o, O
  1678. CPX #$14: {3 \8 ]  Z7 B( q( v
  1679. BCC Sound_Port_Clear_Write
    + A* _2 Z) d1 O7 R3 N( Q
  1680. RTS
    . a% O/ W- L/ c; V0 ?) @/ k
  1681. . _! s+ {  U9 O
  1682. ;==============================, @) I# _7 d0 n
  1683. Sound_Ram_Clear;RAM清除- j# u/ s7 C+ y- g) @' M/ ]
  1684. LDX #$00$ P1 v( f7 h- s: n
  1685. LDA #$006 S" p+ w' I! J$ c# b# X4 a7 G, ]
  1686. Sound_Ram_Clear_1
    # `( [$ \0 O9 L( m, g8 O$ [
  1687. STA Sound_Ram_Addr_1,X
    ; T% M5 J) Z, ~4 g, d
  1688. INX9 r, \& J' K) e2 C, w+ g
  1689. CPX #Sound_Ram_Addr_1_Size
    ) M: |) q6 t+ H* x
  1690. BNE Sound_Ram_Clear_1" e3 h- h# c: W0 a  I( o
  1691. LDX #$005 z  N& t& G. a5 X
  1692. Sound_Ram_Clear_24 _$ Q* o1 F% d. ]5 a7 D! J
  1693. STA Sound_Ram_Addr_2,X
    , d7 w9 z. X" ~
  1694. INX
    7 |( p7 H* p, A5 Y' J
  1695. CPX #Sound_Ram_Addr_2_Size
    # @; J1 |9 A0 W6 t( M! }% }: C: l
  1696. BNE Sound_Ram_Clear_2
    : }) F: R* M, _
  1697. LDX #$00! E. \2 s2 T+ @5 \. y8 z
  1698. Sound_Ram_Clear_3
    . ]8 t1 N5 T6 \7 J2 q4 j( s$ P: u
  1699. STA Sound_Ram_Addr_3,X1 `. o: T/ C8 e4 O# G
  1700. INX: e0 j; ^# f* f! y& L+ R8 q: C
  1701. CPX #Sound_Ram_Addr_3_Size
    ( Q; z% W5 v' I( f8 n/ m" Z! c) z
  1702. BNE Sound_Ram_Clear_3
    - `7 y0 F1 d9 x3 ^7 s6 t8 _
  1703. LDX #$00
    1 T( H/ Z$ T3 \* _+ [/ c7 D
  1704. Sound_Ram_Clear_46 I6 N6 ?8 o- W; W. t
  1705. STA Sound_Ram_Addr_4,X
    3 d% t# z! `' {0 x% ^/ d
  1706. INX
    / s" j: K9 \9 p2 @
  1707. CPX #Sound_Ram_Addr_4_Size& O- v9 E1 B' l
  1708. BNE Sound_Ram_Clear_4" U! `6 A7 f) Q% {# w
  1709. Sound_Ram_Clear_5% I/ e, C( A; O$ u9 s
  1710. STA Sound_Ram_Addr_5,X
    0 C1 F# L9 ^0 A4 a3 {! m, ~2 s
  1711. INX
    1 M3 M' f% {4 C1 q8 @8 v- d
  1712. CPX #Sound_Ram_Addr_5_Size$ o+ |) ^% F' C5 B, ?/ L
  1713. BNE Sound_Ram_Clear_5
    & v- B. w+ @3 p/ z" [- J8 F
  1714. RTS
    # [) W, }" w  K0 T6 f$ M

  1715. 9 [. I* W: d  V& e% V
  1716. Get_Music_Collection_Name, v, E1 X' J) k
  1717. PHA. s% c4 K- T! i6 m
  1718. LDA <Music_Item_Cur
    ! B% D$ f6 D0 g5 t
  1719. ASL A( w# {( j2 M9 \$ o  G! c
  1720. TAY2 b6 p1 l% F# J% K
  1721. LDA Music_Collection_Name,Y* P/ Z0 z- h5 Z$ W
  1722. STA <Data_L( G3 I9 m; l, N5 R7 c
  1723. INY$ X9 x. {$ R+ }+ W* Z
  1724. LDA Music_Collection_Name,Y
    3 B8 V. Q2 _0 ^4 S, k. o. U) \, P
  1725. STA <Data_H& p$ O7 ?( U/ x1 F
  1726. PLA! L6 n1 e- Q  J' Y; d1 t# Y
  1727. RTS) a) ~+ R1 U6 {  t

  1728. : |2 e/ j: D8 z) `' G7 F
  1729. Set_Sound_Total* V6 ~3 ]7 x- N; Y. h. h
  1730. LDY <Music_Item_Cur
    ( j9 ^- k: K+ Y
  1731. LDA Sound_Total_Port,Y
    1 _1 l, }7 k- p/ z9 v
  1732. SEC5 P% V1 d5 w! I1 ?- [$ Q5 w
  1733. SBC #$01
    1 D7 E$ z7 E1 ~) i- A
  1734. STA <Music_Total
    $ a6 I6 C: \: O; Y- E) W5 Q( B; H
  1735. RTS+ P" v, a& |% h; L' U- Q, i! C3 I
  1736. " w* p: R9 v5 }6 W
  1737. Get_Sound_Start3 o8 V0 s9 k2 E: p
  1738. LDY <Music_Item_Cur
    ! l2 `8 T. q! g9 `( ?
  1739. LDA Sound_Start_Port,Y1 ~- p7 {. l/ w8 E9 b& E5 H
  1740. RTS
    . I6 ^+ b# u/ i4 D* o/ a) O8 Y: S
  1741. & s; Y1 t$ L- K' c0 E! Y
  1742. Set_Sound_Init_Port
    5 c) R8 b4 }+ b& d4 E1 l/ c  R, C2 A* C
  1743. PHA4 I; B7 R" O3 U
  1744. LDA #$20
    # X% G& D  D, w% P; Z+ H- M+ U
  1745. STA <JSR_Addr_Op$ ?) ]9 R$ h6 S4 F2 c; d. T( U
  1746. LDA <Music_Item_Cur
    5 H" }: ^9 d6 P: s7 ]0 q
  1747. ASL A
    ) O7 s; P" I9 N" R, E1 P4 h) ]
  1748. TAY$ l- O+ E# g* `/ z* H
  1749. LDA Sound_Init_Port,Y
    - @. Q! A5 k) C) u% E
  1750. STA <JSR_Addr_L
    ! U7 a- o5 r/ n! q" v
  1751. INY
    7 N' Y! G' F% B
  1752. LDA Sound_Init_Port,Y' s- e" M$ `8 J. A8 G
  1753. STA <JSR_Addr_H+ i; [; F- [& m' \/ c
  1754. LDA #$60
    2 g2 d; ~+ n4 D% c' h+ |  i% z
  1755. STA <JSR_Addr_Rts, o3 m, E) |9 K9 m0 E! v8 Q
  1756. PLA
    $ B/ S* p8 c$ V' r8 c
  1757. RTS
    # H( v( F7 V* j* ^1 C
  1758. 3 @7 r# [% B) S+ y% d- b
  1759. Set_Sound_Play_Port
    : H  e' _. }) [. e1 Y. m9 u
  1760. PHA6 m% c3 e; a/ Z1 @
  1761. LDA #$20
    " i& V' A4 {! b/ F
  1762. STA <JSR_Addr_Op
    ) f, b. S/ Q& Z% K1 E7 @: R; I+ \
  1763. LDA <Music_Item_Cur
    & K' r' r8 `$ c% X* W8 f3 b1 l
  1764. ASL A
    : e: D( G% J; j+ h
  1765. TAY
    0 ?) Y, ^) W) W3 s
  1766. LDA Sound_Play_Port,Y
    , q: _" l# A% j& Z7 }$ {+ O
  1767. STA <JSR_Addr_L$ H' I6 X$ o; P& e9 g% b
  1768. INY
    ( b- T+ D8 P2 Z  z  q$ D) W
  1769. LDA Sound_Play_Port,Y
      O* S9 h8 s& Q
  1770. STA <JSR_Addr_H0 H3 a% y+ _" |& N
  1771. LDA #$60
    ; B4 `- G( E; ^$ e( G9 P6 o
  1772. STA <JSR_Addr_Rts. }1 Z) m2 q, D% Z
  1773. PLA3 Q: Z. ~( T( Q1 x; L
  1774. RTS; [8 s3 f- l) w0 Z
  1775. 9 f) o. L' ?( ^4 c: _" F3 n  C
  1776. Set_Sound_Reset_Port' L* B$ K2 |( r- S9 S& h8 s
  1777. PHA
    3 f) L# r  t  w! H, p; }
  1778. LDA #$20' U+ P/ D" @( Q2 Q7 m
  1779. STA <JSR_Addr_Op! P4 V" w6 x2 H6 H& K2 g2 q
  1780. LDA <Music_Item_Cur
    ! `: q6 X0 B; X0 |
  1781. ASL A
    ! W$ I0 r" P# w8 C4 [, o
  1782. TAY
    , S8 U! K$ _+ p$ q, U0 l
  1783. LDA Sound_Reset_Port,Y- S% H' P4 d+ j6 F) U
  1784. STA <JSR_Addr_L
    & a& a5 N3 T+ o# ]/ S9 x) Q2 K
  1785. INY+ h  `+ }5 O) [0 n5 o- c
  1786. LDA Sound_Reset_Port,Y/ i1 S# W4 p. M
  1787. STA <JSR_Addr_H" q) p& o) J5 v
  1788. LDA #$60  O- ]% \" J) ?3 @! c8 ~( [5 K' y
  1789. STA <JSR_Addr_Rts2 f! b8 _  t6 ]5 H
  1790. PLA
    0 g3 O8 p; F( G9 S$ V# u
  1791. RTS
    * y$ ~8 ?5 Z( p: p

  1792. 5 {! B; ^0 u3 G9 {  V
  1793. ;初始化音乐bank
    - L7 @1 z9 D+ m1 w7 S
  1794. Init_Sound_Bank- H) Q* l& W7 H/ h; l- @! H3 y
  1795. LDY <Music_Item_Cur, I- E" ~: Y0 K# ~, G. _9 y8 }( e% n
  1796. LDA Sound_Bank_8000,Y
    # P) f4 P- p6 R% g8 x) W
  1797. STA <Music_Bank_80004 Y. w) {( W3 \( N2 n( z
  1798. LDY <Music_Item_Cur& j' t0 t9 X7 v$ W4 l/ n! r* L
  1799. LDA Sound_Bank_A000,Y3 k" L/ J3 W: X
  1800. STA <Music_Bank_A000( P; y0 n2 R* i
  1801. RTS
    3 W* _: t+ M5 J7 C* T

  1802. ; n, ?& j4 z. b! M$ X# J
  1803. ;==================================================, w4 S" S. m% F' y
  1804. Sound_State_Reset;音乐状态重置
    / ]2 B: s5 A0 C; Q  \' i" z" q' N
  1805. JSR Music_Bar_ReSet        ;重置音乐条
      h5 M; X+ B8 K+ y
  1806. JSR Time_ReSet             ;重置播放时间
    * Y2 @2 C) T# l

  1807. / u/ {8 {3 s8 W, K
  1808. LDA #$00" Y5 I+ V4 V, D1 m6 u
  1809. STA <Music_Stop_State/ A5 M% n# z+ Z6 T: V
  1810. JSR Music_State_Show       ;显示播放状态! W; r- n& n0 G8 C- K
  1811. 2 `8 l2 v2 H4 @7 S1 ~
  1812. .IF Track_Name_Pos% @2 c1 \/ o; x, S
  1813. JSR Show_Track_Info        ;音乐曲目名显示; `  E/ L! d5 |; Z2 G, H
  1814. .ENDIF, F: z0 [* {% }4 R9 _3 W
  1815. ! @4 _5 i, K& M- s
  1816. RTS- B/ T# w# z' c# e3 a) y* v
  1817. * G. R: w( }1 _1 }1 t, ]) ~
  1818. ;==================================================
    . Z8 n6 b' F! V& E
  1819. Sound_Init_Proc;音乐初始化处理
    * `7 ?' B0 p% a) P: \
  1820. PHA
    & ?9 L9 {) c$ K( I% _2 L. u' ^
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址
    9 Q, s1 U/ a/ V- }( e
  1822. LDA #$00
    , h; A' Q0 y9 ^" E6 |
  1823. STA <Scroll_H               ;重设水平滚动( ?. \4 i1 |- A, X6 t
  1824. LDA #$0F" r& y1 a& O  W1 J$ n
  1825. STA APU_STATUS" k' r6 F/ v3 K( q" b* N* `, a
  1826. PLA
    6 T* p( g2 W% f* T; \1 n
  1827. JSR Sound_Init             ;音乐初始化
    / w# D, W+ l: T/ C; X0 Y- P
  1828. JSR Sound_State_Reset      ;重置音乐播放状态) x- I- R8 E: f2 D5 E7 _8 A
  1829. RTS& m# Y  r* d2 p& I3 d# U
  1830. # g1 }! X8 s$ A  P; O; ]
  1831. ;==================================================8 `8 Z6 R, O, f3 a
  1832. Sound_Play_Proc;音乐播放处理
    6 H9 Q1 S1 G5 q' u7 Z, p! T
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址
    , X& `: Y. d* r6 L
  1834. JSR Sound_Play             ;音乐播放
    6 j. i, C: H/ t) S2 W/ D
  1835. RTS
    ; B, ^, a8 }9 {

  1836. # A0 r; M8 K0 l" z
  1837. ;==================================================$ ]  A; K& P' e
  1838. Sound_Reset_Proc;音乐重置处理5 e5 \, _/ @7 L
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址
    * W- ]; A7 n$ ?2 O+ n
  1840. LDA <JSR_Addr_L5 L2 i4 f) _9 l% E2 V6 N
  1841. ORA <JSR_Addr_H
    ) }& |5 O+ K& W
  1842. BEQ Sound_Reset_Proc_Default7 @3 y6 l% _: r9 E; ^# j' Z
  1843. JSR Sound_Reset            ;执行音乐重置
    $ F$ X4 j! r; k0 ^/ s0 P
  1844. JMP Sound_Reset_Proc_Init_Sound& X. m1 U. u: I

  1845. ( b9 |3 R+ e- P, v" B9 B! @
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理" O# m0 j7 ?" w* d1 Q/ \3 ~$ G
  1847. ( E" W3 ~- h7 I
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断
    9 k* G4 l% h# m& S" C$ {2 U' X
  1849. LDA #$006 A, `" d- u" T& Z# ~/ C
  1850. STA PPU_CTRL1 W, w8 n0 M9 H9 \" P& w

  1851. ) ^, ^4 Z% U9 w0 ]+ d$ }) N4 p' E
  1852. JSR Sound_Data_Clear
    1 c! @8 C+ s; ?

  1853. 1 c" G+ {5 B4 v$ H
  1854. Sound_Reset_Proc_Default_Wait! r6 U, G  r& d* k4 R
  1855. LDA PPU_STATUS, }! a* _' V2 l6 Y
  1856. BPL Sound_Reset_Proc_Default_Wait
    ; W9 x, z6 f$ U( I2 c7 \
  1857. 5 J4 q  x6 W5 ]0 {, I0 u, M
  1858. LDA #$001 x0 A" r" G- l6 [
  1859. STA PPU_ADDRESS
    8 u! |3 X5 H: r  k* [) D' Z
  1860. STA PPU_ADDRESS' u8 X" G0 M! g& u
  1861. STA PPU_SCROLL8 f% r  H$ ~+ ]. `+ |
  1862. STA PPU_SCROLL$ \$ Z# J1 y  t/ [
  1863. + H+ f+ {( L4 n  r  |
  1864. ;恢复PPU控制
    " B9 P3 k& m( `5 z
  1865. LDA Screen_Ctrl
    3 p, u! j# j2 T  s! W6 R! z& J
  1866. STA PPU_CTRL
    % B" Q5 h& ]; A$ H% Y- j

  1867. - {2 ~9 i8 K1 z( D. G
  1868. Sound_Reset_Proc_Init_Sound0 A# V( L: D: B9 v3 X
  1869. LDA <Music_Stop_State  B( u7 H0 p8 S$ f5 ]
  1870. BNE Sound_Reset_Proc_End3 g; L$ _/ \4 L2 F4 b
  1871. LDX <Music_Item_Cur  t! l6 @; Z8 c" W  M) u! A: Y
  1872. LDA <Music_Cur,X
    5 j# i4 y  `# ]5 e! c7 y4 e. P
  1873. JSR Sound_Init_Proc
    * H9 @% M# D- i/ B% y
  1874. Sound_Reset_Proc_End
    # m5 T& X  q$ b$ c* A
  1875. RTS7 x2 V. e0 x  {  K4 @0 w

  1876. 8 E6 l  K% G4 N, ~$ e
  1877. ;==================================================3 K- H8 k; Y! U; }9 h/ z4 o
  1878. Clear_Item_Text;清除页项目
    ; n3 J' {9 J- H$ L# Y/ N9 U
  1879. LDX PPU_Cur# |; P+ y  [7 R0 r2 |
  1880. LDA #PPU_MODE_CNT_CLEAR
    ! m: V4 V# l( K3 K
  1881. STA PPU_Addr,X- {; ]3 \! l; T9 [- p
  1882. INX
    % Z' [  O: b$ v( C0 C

  1883. 3 ?3 c5 i' |$ q1 H5 m
  1884. LDA <Page_Last
    7 C2 J+ S$ `/ W0 g8 D, p% m) v
  1885. SEC
    ) `4 h8 o; N) }1 z
  1886. SBC <Page_Last_Index5 u/ C5 T/ a2 f: G
  1887. ASL A
    . x+ _5 X/ @; Y! b) e

  1888. ( x4 J* h* W( F7 _
  1889. TAY
    ( k; h8 x! q5 D
  1890. LDA Item_Pos_Data,Y  S  Y8 Y0 c& p5 ]: u' {
  1891. PHA
    , w4 ?5 X$ L: W# Y8 q
  1892. INY/ @  |, \# X% V1 B2 X7 x
  1893. LDA Item_Pos_Data,Y
    " [: i0 p7 u) G- r0 V" p
  1894. STA PPU_Addr,X: Z1 r0 O9 W; `4 L6 `7 Y  I3 B
  1895. INX" g; {# a2 t8 e& f7 w4 ?- V
  1896. PLA
    ( [. T. p0 D3 j. `
  1897. STA PPU_Addr,X; i  {+ R) G9 s; b) o/ G0 M- u
  1898. INX
      H% p. o* i! @  n2 T/ S6 I4 ~7 r
  1899. ( U/ a+ f0 W6 J; ?* [, \) p* j
  1900. LDA <Page_Last* Q" n6 U1 v8 j  v
  1901. ASL A4 ?( e1 Y) U" y1 Q  v7 z
  1902. TAY0 v4 Q) r  }( b! U4 w& v& D
  1903. LDA Music_Collection_Name,Y5 h( m# i/ j1 N9 w. ?9 W' Z2 `
  1904. STA <Data_L" b7 h8 ~" U# t+ O( x7 W
  1905. INY( q. ^/ w5 Y, W9 f0 c
  1906. LDA Music_Collection_Name,Y" d5 Z' L/ ?9 C5 O8 A1 G  G$ E
  1907. STA <Data_H6 z, @2 T1 j+ _* Q, L; _5 V
  1908. 0 \4 J- |: V% p; O  h
  1909. LDY #$00
    2 D/ C" Y% x: c8 D2 f1 D
  1910. LDA [Data_L],Y
    + I8 a' S. p: d7 Y# _& ?; Y" Q
  1911. STA PPU_Addr,X; Z) d' M  }$ `2 e$ P
  1912. INX) l! j$ R! r/ E5 e- ^
  1913. Clear_Item_Text_End+ x  `7 A8 z  @
  1914. STX PPU_Cur3 I1 r3 n9 W/ D
  1915. RTS+ f( \7 k3 O- w6 E; _& C
  1916. / |, N: J3 F1 p+ y
  1917. ;==================================================
    7 ?, G7 G4 X2 t2 C4 K
  1918. Show_Item_Text;显示页项目" t, N6 U0 A" ]% k* ^' ~
  1919. LDX PPU_Cur; T2 ~8 _: |/ I# W
  1920. LDA #PPU_MODE_CNT_LINE
    ! h8 z: n- s6 X$ P. q" c, U
  1921. STA PPU_Addr,X
    3 ^1 p4 i: v$ v  ]
  1922. INX3 c9 d! T+ ^+ U. Y. o: j
  1923. LDA Page_Cur
    1 k+ m0 n0 |  W& j+ Q
  1924. SEC
    ' n5 `! Q1 j' |! q( R, U1 l, A
  1925. SBC <Page_Cur_Index
    5 C5 D" V2 Y9 r8 P) Z5 V4 Q% h
  1926. ASL A' Y8 |- R# S, `
  1927. TAY
    - a( z& H5 t& F
  1928. LDA Item_Pos_Data,Y; Q; m$ ~, W3 o; A# R: ?& T6 Q
  1929. PHA" c! b6 i# g2 J1 t
  1930. INY
    " U4 h$ y2 K) S5 M( ]2 n
  1931. LDA Item_Pos_Data,Y, ~' O8 ~$ g1 v
  1932. STA PPU_Addr,X2 u0 i5 Z  {2 t6 {5 y/ u! _
  1933. INX1 _9 b/ s8 B: v; p3 m! g
  1934. PLA
    2 r, q2 X4 z9 @/ V; t: p9 E7 ]
  1935. STA PPU_Addr,X& u+ M4 m, z$ |' m5 T
  1936. INX! d: F5 i; r0 y

  1937. 2 g# M$ F) k. [3 n3 d9 ]( P
  1938. LDA Page_Cur0 i1 B% Y! H* |2 ?$ u) c& R1 x
  1939. ASL A
    # F, z, }" S; Q/ K7 O- O" c2 Z
  1940. TAY7 E" w8 x+ C7 ~2 T+ p  `
  1941. LDA Music_Collection_Name,Y. H2 v% l) O. q+ D" {. r
  1942. STA <Data_L  J. s, i  F+ C
  1943. INY
    - G' T% ^  F5 E: S8 z9 \
  1944. LDA Music_Collection_Name,Y1 s1 |6 \. j3 v7 \3 H! Q0 K
  1945. STA <Data_H- m# x* V% U: V2 L- @# f! V

  1946. ' M; I" ^9 ]7 f0 j0 G3 J
  1947. LDY #$00
    ) `: t  u2 L3 W) }+ z
  1948. LDA [Data_L],Y  [0 g- g7 s0 W7 }/ T8 Y5 u
  1949. STA PPU_Addr,X3 h& c4 V5 e* M0 }- r: r
  1950. STA Data_Cnt
    / X# o( \, X$ z4 m4 l3 |
  1951. INX
    0 W5 U+ I3 N: Q% s# m/ f  }

  1952. ( {. J  _# U8 j' j) |5 D
  1953. INY: ?% [( M( s) ^7 y9 `2 S; _
  1954. Show_Item_Text_Write, W" {! v$ B* @" p( F# S
  1955. LDA [Data_L],Y
    : m. m) C5 q; r0 M: ]$ _8 p& M! n
  1956. STA PPU_Addr,X
      \( e9 ^+ Y0 e( e' C+ g7 u
  1957. INY
    . Z: ~; u- Q. J/ f, }( Y
  1958. INX5 z$ a1 F7 Y2 c& m; m9 p& y
  1959. DEC Data_Cnt, B5 j0 w0 `2 w0 R/ V9 H" \) n
  1960. BNE Show_Item_Text_Write, I" Y9 j. H4 J

  1961. $ k# [: Q8 H- T3 `# ]
  1962. Show_Item_Text_End4 G5 W+ L0 m; k7 n. d+ x
  1963. STX PPU_Cur
    7 k5 v% N7 Y. R5 @
  1964. RTS% }1 u3 p/ t' H  b9 y; G1 }

  1965. 8 M/ ^3 t* X3 m9 F& @0 M9 X# `
  1966. ;==================================================
    * `. K4 V7 h# _& o
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量
      k) h3 A1 E3 K0 u2 Y) K) J* ]
  1968. STA <Data_Buf
      {: E) b$ y8 R( p- ?$ Y3 x. c8 P8 K
  1969. LDA #$00
    " a  T. x0 c& A4 d, A" W, U
  1970. Get_Page_Index_Calc
    , s& [# k1 v+ c) r/ u" w1 d8 o
  1971. CLC. S0 \" x4 f; M& `9 ~5 D0 l
  1972. ADC #PAGE_SIZE
    $ ~/ {) T% ?4 |: q0 F7 C9 z
  1973. CMP <Data_Buf5 ~1 P+ ?( a( D9 L  Q4 @3 f
  1974. BCC Get_Page_Index_Calc) o0 h4 Z- l2 x  {$ o
  1975. BEQ Get_Page_Index_Calc_End
    * h" g; U( z8 o7 d
  1976. SEC* a1 `( o1 i' Q1 r
  1977. SBC #PAGE_SIZE0 z( b* a5 M$ R7 p$ a
  1978. Get_Page_Index_Calc_End& q+ h" Y4 r$ x. Y: _
  1979. STA <Data_Buf; f3 m7 J; S, Q/ k- [( K
  1980. Get_Page_Index_Cnt
    % W" w  c& H' G# f1 F) K
  1981. LDA #PAGE_SIZE
    ) ]/ z& x; Y! g. P3 f& d) ?& d
  1982. STA Data_Cnt4 W3 M2 Q- W3 v4 S8 V

  1983. , A: b6 ^8 f$ `8 X
  1984. LDA <Data_Buf
    8 W* K$ i2 _8 L( a% j% ?
  1985. CLC5 [1 r. W' u0 G7 y4 a  f) s
  1986. ADC #PAGE_SIZE
    3 Y: V$ z1 h! W7 Q* Z! C
  1987. CMP #ITEM_MAX_SIZE
    , J4 M: R, ?2 a! p
  1988. BCC Get_Page_Index_Cnt_End& m8 h3 R2 E. ^7 {1 Y
  1989. ' K0 r0 n6 B, q
  1990. LDA #ITEM_MAX_SIZE* l7 S2 K. L2 |0 o* n
  1991. SEC
    . _2 T! e% O4 K  b, M" Q
  1992. SBC <Data_Buf# E2 s) |9 U) a$ [8 |3 \# |
  1993. STA <Data_Cnt2 V) \+ [  o9 p
  1994. ' _- r8 ^3 u. U) S: V3 j' O0 u
  1995. Get_Page_Index_Cnt_End
    % f; V: ?- s  g& a: z
  1996. RTS/ i0 l7 k) o- C+ W- c

  1997. 6 y" O. `7 z9 k  k6 I
  1998. ;==================================================
    0 D/ V- B% s( Q+ m9 \2 f
  1999. Get_Last_Page_Start_Index
    + M3 C0 ]: E8 q; ]
  2000. LDA <Music_Item_Last' A. g3 C) X0 I: l) o; W
  2001. JSR Get_Page_Start_Index& Y' r6 \" A2 ^2 N7 C, A2 N
  2002. LDA Data_Buf2 D' A, a# z; X* F9 Z, x5 l" J4 G
  2003. STA Page_Last* L0 p- n2 c* U
  2004. STA Page_Last_Index
    , w# D" ]4 O; d5 T/ M* H5 l
  2005. LDA Data_Cnt
    ! l  \/ ~% Z7 C( i& x4 r
  2006. STA Page_Last_Cnt5 e  v2 v8 c% V- q: H8 C( }4 J. a" G
  2007. RTS( X9 U+ X1 N# r+ }# _

  2008. ) W' j$ Q( p$ k# H
  2009. ;==================================================5 l5 o& H$ Y. \9 O3 M4 k! G3 R( a
  2010. Get_Cur_Page_Start_Index4 ~1 S# v2 [0 N* r# T
  2011. LDA <Music_Item_Cur, k; z1 a% x6 u! E% k: z1 R
  2012. JSR Get_Page_Start_Index/ [, Y# D5 m+ H7 Z3 B0 R
  2013. LDA Data_Buf
    / R- Y1 O) _& g* B; l$ ?; [
  2014. STA Page_Cur# J8 {( `- d* X  u
  2015. STA Page_Cur_Index0 ^2 W( r+ o' W. {
  2016. LDA Data_Cnt- m. |. @* D: M" a) C( d
  2017. STA Page_Cur_Cnt
    % ~5 t, D8 y/ `
  2018. RTS6 E' Y6 M, v4 K
  2019. " h/ K1 C/ x# e9 X
  2020. ;==================================================: D$ v, I6 `: G2 C; k
  2021. Show_Page_Text;显示页文本
    $ ]# T: `. w& {" V" k+ u
  2022. LDA <Text_Disable_Flag
    / [. a0 O" h3 V; i. ]! _
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM1 K* M& o% l2 Y
  2024. STA <Text_Disable_Flag
    " X" g7 y7 T, m- [; F$ N
  2025. ( W+ B; l# O/ X8 C2 x$ j
  2026. JSR Get_Last_Page_Start_Index
    1 V. x' e; [$ {7 ~) O( s# t
  2027. JSR Get_Cur_Page_Start_Index( `& T3 t- Q2 ^  n* C  c7 s
  2028. / z+ b1 M- u; a: i$ G, g- X
  2029. Show_Page_Text_Set) U3 ]3 F) t8 |8 d9 |/ ]2 D" j, y
  2030. ' @9 e: \" a0 D3 y2 t7 }; `
  2031. Clear_Page_Last_Item;清理上一页+ y5 G, C$ e( Y' _
  2032. LDA Page_Last_Cnt
    3 w. Y! k8 @/ I/ Q) N* b
  2033. BEQ Clear_Page_Last_Item_End
    ' [' }$ t! a+ D8 d1 Y  d3 k/ t
  2034. JSR Clear_Item_Text
    ! f4 L) c$ ]* g' m4 R
  2035. INC Page_Last
    # U  Q- ]/ f0 E7 V; L5 k
  2036. DEC Page_Last_Cnt0 [( R2 h& h* ~/ a7 K' Z
  2037. Clear_Page_Last_Item_End  X( ^: p7 U% D9 ^) X* U

  2038. $ q0 z5 b/ {0 @9 I+ ?1 D, D# y/ f
  2039. Show_Page_Cur_Item;显示当前页0 z* r+ P. i% ~9 i' B! ?9 ^
  2040. LDA Page_Cur_Cnt& q* a1 e7 u6 ~% C( X: W
  2041. BEQ Show_Page_Cur_Item_End
    " Y0 e- }" h8 D) D, f. a
  2042. JSR Show_Item_Text
    : k" b# |8 p, d% f1 C
  2043. INC Page_Cur
    8 |# r. T6 x0 G' [- k
  2044. DEC Page_Cur_Cnt  G; v, d0 |7 W& ~; B9 w
  2045. Show_Page_Cur_Item_End0 {3 g- f& ?. N$ X0 @" J3 [
  2046. 7 a) r+ _" }; u$ n; O6 @+ G$ d3 n7 ~
  2047. INC <Time_Wait_Cnt0 t5 a* d8 z' b3 N- T
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作/ v. {1 ~& e: f& @2 H% e" T
  2049. LDA <Time_Wait_Cnt$ S0 H& n6 ]( O. N+ E1 q
  2050. BNE Show_Page_Text_Set_Wait4 T, C1 @8 \$ ?" Y& V

  2051. ! E, ^, c3 ]  ~( }
  2052. LDA Page_Last_Cnt# Q0 o* b: L1 `& S
  2053. ORA Page_Cur_Cnt
    ! _( C8 J% V7 l* O( C% E$ h" N
  2054. BNE Show_Page_Text_Set
    4 X  X0 K1 b6 [  \  m4 e% P
  2055. LDA <Text_Disable_Flag6 h% K9 E3 w- w; _! r: J
  2056. AND #TEXT_DISABLE_ITEM ^ $FF
    5 J) T( Y  p5 R6 x/ }4 ?2 b
  2057. STA <Text_Disable_Flag
    $ t/ L& h& O) Y" h2 [4 U
  2058. RTS
    9 W5 C! d  H0 {1 v& f

  2059. $ L$ `4 F! T- t* T" v
  2060. ;==================================================: w1 w* k0 L& k) O$ d) X" ~4 h0 K
  2061. Last_Item;上一项
    0 K9 a% d9 L$ z0 z. n6 Z/ y! _
  2062. JSR Clear_Last_Track_Name
    3 y, m& r6 a; e9 y$ P- d
  2063. JSR Disable_Text_Draw% d6 U5 A7 `. [+ t( _" ?* S+ P

  2064. % k. Z9 Q) b+ r: P2 F! C0 ?
  2065. LDA <Music_Item_Cur: X0 Q7 V0 w& b- u+ Z% j
  2066. STA <Music_Item_Last' ?4 I4 r6 w/ M

  2067. , i1 M* g6 A1 J7 K, o
  2068. JSR Get_Last_Page_Start_Index) C% }) T% o  S( f- c
  2069. 5 }* o6 ^2 v+ L; Z- ^3 o- s
  2070. LDA #$002 M# u- Y; X, U) J5 g
  2071. STA Data_Buf
    0 i9 v$ x! G% D8 M% ?0 n

  2072. 4 l. C; N& ~7 c7 B; C) h
  2073. LDA <Page_Last$ Q+ g8 m6 S9 j8 _
  2074. CMP <Music_Item_Cur
    6 g0 |1 @, _6 Y* r% d) E$ v$ n$ |
  2075. BNE Last_Item_Begin- d) i5 @7 c5 U; g' c8 Z; ]

  2076. & w% T9 n! ], g. c
  2077. LDA #$01
    : U. z' J; {9 H3 m% _! a, T
  2078. STA Data_Buf
    " q- N% A* N! P$ p/ a9 H
  2079. Last_Item_Begin
    / M2 c* r' b5 b' D" s2 S7 U
  2080. LDA <Music_Item_Cur
      e; ^$ [/ r; r% F# M2 T7 R' M
  2081. BNE Last_Item_Set
    % l8 |9 l- i6 a$ s  T' |' M
  2082. LDA #ITEM_MAX_INDEX + 1
    % `- M# l$ \- J
  2083. STA <Music_Item_Cur/ u! F; e# J2 y( d9 _' p+ N2 J& K( v
  2084. : V5 T  V5 Y+ I2 L; i5 g- B
  2085. Last_Item_Set4 _& F( [8 M' k$ ]
  2086. DEC <Music_Item_Cur: F: q; l' q6 o" \, A3 b/ j
  2087. LDA <Music_Item_Cur! O$ m$ j, ?2 o( }" d
  2088. JSR Reset_Current_Music
    % _/ L8 [* u/ L2 M' e$ J

  2089. 9 q5 p: X0 L! n3 ~7 P
  2090. Last_Item_Play; v# E" V1 w# D/ N& ?4 G1 s0 |
  2091. LDA Data_Buf4 ?# |: [+ k  n, M) F3 }
  2092. BEQ Last_Item_End
    0 B3 e+ _3 R9 A8 i
  2093. JSR Show_Page_Text
    & r1 ]% H0 t1 y# A7 Y; [
  2094. Last_Item_End
    1 ?5 E8 R2 [. S! T* ?; ~% A: p
  2095. RTS
    7 e8 j  L5 ~# K& r$ p: |
  2096. - N: ]) n4 R, `4 P( @
  2097. ;==================================================  b/ n; z: n+ x# s( D' J# I
  2098. Next_Item;下一项
    , u: [' P3 t/ {  i8 k
  2099. JSR Clear_Last_Track_Name
    7 \6 p& V/ y+ P; k- D" b
  2100. JSR Disable_Text_Draw
    4 o0 @( D: f' T6 U

  2101. + G2 t  j! v( T. w( \
  2102. LDA <Music_Item_Cur
    3 x5 \0 `2 k& P# }/ j! i4 `. n
  2103. STA <Music_Item_Last# c8 z' l7 J% ^5 j' i8 F# s  Z% A
  2104. * i- [* h' J1 y; F: R1 u  G1 O2 o
  2105. JSR Get_Last_Page_Start_Index5 k! p: U7 k  n$ [8 s
  2106. 6 D9 n5 s: c% C
  2107. LDA #$00. v8 v# b" ~  |* C$ w0 L: K
  2108. STA Data_Buf' w  v0 |% c8 @& {+ i7 O- K
  2109. 2 L1 e7 [+ L* a9 k
  2110. LDA <Page_Last
    3 h/ Q' i0 B2 S$ X
  2111. CLC0 a; z+ e8 x5 M7 i+ {
  2112. ADC <Page_Last_Cnt4 _, T  B% {' o/ t- G
  2113. SEC3 j$ I! s, o4 B
  2114. SBC #$01
      @  h! I- D, N1 _. ~
  2115. CMP <Music_Item_Cur, e4 B+ x( l, X! e1 V
  2116. BNE Next_Item_Begin3 l+ c8 M2 [- B' U" ?
  2117. ' i4 t' R- }% }! f0 u2 k* d; a: ?
  2118. LDA #$019 F  \9 J% J) y' r2 G- w
  2119. STA Data_Buf
      e8 f- {- I4 l/ U' A2 u
  2120. Next_Item_Begin* M7 r4 x' Y0 j9 z: C
  2121. LDA <Music_Item_Cur
    - ^' A  f/ ?& e; F% e% p+ W& `
  2122. CMP #ITEM_MAX_INDEX+ `! g' J& |$ ?" q/ l  \6 ~3 M: m
  2123. BCC Next_Item_Set
    $ a. Y& S: r( E0 ]% G# N" r
  2124. LDA #$FF
    / f. w( ]8 s  ?4 b+ R: k
  2125. STA <Music_Item_Cur+ _7 S) r* Y7 \' ~$ p
  2126. Next_Item_Set
    ; H2 F! n$ P1 M4 x* `; c: h# p
  2127. INC <Music_Item_Cur
    , O8 Q; _) g; y8 T& X+ M
  2128. LDA <Music_Item_Cur: ~* U5 I' ]# l7 k
  2129. LDA <Music_Item_Cur+ y$ R5 w- A/ {
  2130. JSR Reset_Current_Music- P* d, U* I" ~
  2131. Next_Item_Play
    " \7 t% T" M& f: m% |5 V; B, T. u- F+ m
  2132. LDA Data_Buf
    : d& \4 ?9 p+ S! q5 J
  2133. BEQ Next_Item_End
    & n. [1 a% z) G7 ~
  2134. JSR Show_Page_Text
    4 D9 m% J- B: L: c# y0 J5 B6 Y, E2 q
  2135. Next_Item_End
    : z" a. v# t. z1 ^% m5 i# J
  2136. RTS. }1 d8 s6 F# W) N1 t. Y

  2137. 4 b3 i  r, o( w  y
  2138. ;==================================================$ e+ v- c; e4 Z
  2139. Last_Page;上一页
    & H& Z* Q9 M& Y/ u. S; Q
  2140. RTS! d2 u7 z9 E( o: j& V

  2141. 1 v; q& h9 d. F( \
  2142. ;==================================================
    9 j8 a7 ~3 ?/ e
  2143. Next_Page;下一页6 `% y3 }" \; H) q, s3 N$ y
  2144. LDA #PAGE_MAX_INDEX
    ( V2 ^0 U' u( v# D2 a
  2145. CMP #$01
    . g5 p  V* P6 K( \4 C* ?& X
  2146. BEQ Next_Page_End6 b' f6 g% N* v( b2 @
  2147. / Z3 C# o% C/ e# k* w
  2148. LDA <Music_Item_Cur
    / U# Y7 V3 q7 e7 t( X$ V
  2149. STA <Music_Item_Last
    ' k- X  X1 B1 N& A+ E
  2150. # ]' I4 V, P4 Q
  2151. JSR Get_Last_Page_Start_Index7 m# r2 P* w3 a

  2152.   V& E1 @2 k* K
  2153. LDA <Page_Last_Index4 N7 O0 s  E! e
  2154. CMP #PAGE_MAX_INDEX
    ; r0 d) m/ @$ n+ t
  2155. BCS Next_Page_In_End_Page
      |, m& l7 Y3 Q7 k

  2156. 3 \( u* t* r+ G! r* ~' r, \; h% ]
  2157. Next_Page_Not_End_Page;不是在最后一页& B) }7 A2 z- O7 X# @
  2158. LDA <Music_Item_Cur+ i8 W8 i, @" F* k8 S
  2159. CLC
    $ z7 k: \( O5 i+ n0 v
  2160. ADC #PAGE_SIZE
    4 {  [# G/ [% d3 Y% B. t/ v
  2161. CMP #ITEM_MAX_SIZE
      J) N8 n  R2 a( S
  2162. BCC Next_Page_Not_End_Page_Less  n# l+ e5 q# G( N% T' V
  2163. LDA <Music_Item_Cur
    % ^6 H) [% t9 Q  f  A9 t- s4 t* A
  2164. SEC
    2 ?7 x; {$ p$ d" \* G, ?
  2165. SBC <Page_Last_Index
    . q$ {! _2 i- }6 S% h5 E3 @
  2166. CLC
    ) m" y9 M4 c6 k: y' g( O, K9 {
  2167. ADC #PAGE_MAX_INDEX
    8 O2 l" m8 m( m' v. e: C/ o
  2168. CMP #ITEM_MAX_SIZE
    6 @9 Z* d5 a9 F; m/ b
  2169. BCC Next_Page_Not_End_Page_Less
    . l( f' K( x7 q4 s4 S
  2170. LDA #ITEM_MAX_INDEX
    . ]. U, i, n, M6 q( {* p+ S1 Z
  2171. Next_Page_Not_End_Page_Less8 L6 x: X1 T1 a0 ~
  2172. STA <Music_Item_Cur- E- x) ?7 @( Z% }! r
  2173. JMP Next_Page_Reset* l: F$ ^* `3 y# m) _, _6 r
  2174. % X1 j; x/ g1 G6 t1 i
  2175. Next_Page_In_End_Page;在最后一页
    : C6 T) w0 ]/ J+ f$ L6 P. \% S
  2176. LDA <Music_Item_Cur
    5 w+ k7 E7 ^3 _+ D& k7 q
  2177. SEC
    : l! R: g; g5 `% m
  2178. SBC <Page_Last_Index  K5 D% \8 u: j% U
  2179. STA <Music_Item_Cur
    , e9 e4 }: k/ c: n# m
  2180.   M& `5 p4 o5 o% v/ z3 W
  2181. Next_Page_Reset( l1 m& n4 T' s- e8 [; j* F* M
  2182. LDA <Music_Item_Cur" f8 H8 G1 r& O
  2183. JSR Reset_Current_Music
      t  f& y9 o9 B/ ]- T
  2184. JSR Show_Page_Text; c( N6 O* M# ?# s
  2185. Next_Page_End
    9 n8 [/ ~, A  G# x
  2186. RTS) X" K  X, o& ~* F$ [% z& {5 H

  2187. 0 u: i! q3 h5 T6 Q! }8 E4 M
  2188. ;==================================================  e- W9 }) [' [) N$ N- a
  2189. Disable_Text_Draw;禁用音乐条刷新0 E' |0 Q: [; J5 [
  2190. LDA <Text_Disable_Flag, D# Z$ F6 }7 \* I! o
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME. |/ r0 D( [/ f# e; I
  2192. STA <Text_Disable_Flag
    . [2 a# w# U6 u3 u
  2193. RTS- g* B3 S" g& O1 i0 [

  2194. 9 i* f! b, A4 Q0 L7 _# _- r
  2195. ;==================================================
    - A3 A6 d( V. d( Q3 p
  2196. Clear_Last_Track_Name;清除上次曲目名# |  P9 Q9 c: C8 {1 [) r, X
  2197. LDX <Music_Item_Cur
    8 S5 ?. v4 Y+ }3 \; t9 k; ?7 C" f9 z
  2198. LDA <Music_Cur,X
    " d9 i# R' O2 l1 r6 H: j
  2199. .IF Track_Name_Pos
    9 @+ b3 O! d  m2 \
  2200. JSR Clear_Track_Info' H8 m7 s' i! l2 {) C" W
  2201. .ENDIF, N, w: L1 I* j0 K/ w! K) l
  2202. RTS
    4 K' i( f: j) `( `1 V8 {

  2203. 4 N2 ~: l, T8 {) E
  2204. ;==================================================( I: R8 E& u5 Q' K
  2205. Reset_Current_Music;重设当前曲目4 k. A4 j/ A+ p6 ~& f
  2206. % v( g* \8 J. ]1 I
  2207. ;写入当前总曲目
    ! Q+ b" O- ?9 a- |, S1 o$ u+ x
  2208. JSR Set_Sound_Total9 i: \. v; {: y" i) ?( A% ?
  2209. LDX <Music_Item_Cur1 }5 N# }* C9 Z. Q" G
  2210. / p& n( A  X1 S( N5 ]' v& h
  2211. LDA #$007 s0 [2 z9 c. U/ B$ }
  2212. STA <Music_Last
    9 g" U, S$ b1 Q6 ]8 L& F' Q, ^  {  Q

  2213. . G+ k, c7 V  S& e
  2214. JSR Sound_Reset_Proc
      ?) G# X/ i& L1 s+ y6 v
  2215. JSR Music_Show
    + i( \' |4 U7 v- c) W  m/ Y
  2216. RTS
    1 Q4 T" W  S: b. l! e
  2217. ( j8 c; f5 Z0 f& @% F" v
  2218. ;==================================================3 k6 p+ d* l4 p, d5 ~+ p
  2219. Music_Song_Stop;音乐停止% R4 @  Z& a# p- {4 C' K! @# r) f, L0 x
  2220. LDA #$01
    7 Q. N0 X7 x& ]( I- {/ ?
  2221. STA <Music_Stop_State# Y3 Y3 x2 [( E' g. |
  2222. JSR Music_Bar_ReSet
    ' Y- a9 ?6 Q/ o' Y8 W( t- h4 O4 G. T
  2223. JSR Time_ReSet
    2 C! Z) @8 O* Q$ m# B" D& A
  2224. JSR Sound_Data_Clear' A7 d6 y1 W8 t! ?7 R2 B
  2225. JSR Music_State_Show% b2 \, S. _) ^1 H2 P. e
  2226. RTS
    ) c$ I9 _/ \9 x# a$ O

  2227. 4 {9 [9 b8 ~3 y0 w7 M
  2228. ;==================================================
    5 ~2 J7 i$ S8 K9 c8 C
  2229. Music_Song_Play;音乐播放$ I6 P  m6 f9 Q+ _
  2230. LDA #$00
    1 }* B& W1 a6 F( g
  2231. STA <Music_Stop_State
    ( z7 \. q; I! g
  2232. LDX <Music_Item_Cur" f: t/ g# {! \0 w4 T% N" O! y
  2233. LDA <Music_Cur,X+ y; Q5 W" l5 J9 r- G3 ?# ]9 z
  2234. JSR Sound_Init_Proc
    ' |( ]' q& ]# K; L1 X, |7 t
  2235. RTS
    / R- G) B# Z4 ?* b: A5 @* S

  2236. 7 h. G0 m4 f! N) C$ Q  s
  2237. ;==================================================; m" n) Q6 Z1 E: N6 q/ c/ o
  2238. Music_Song_Last_10;上10曲
    1 H0 _; K2 x9 E  \0 j) |2 a
  2239. JSR Clear_Last_Track_Name( `0 q- D* c% n1 b# P! l
  2240. JSR Disable_Text_Draw+ M8 Y0 e7 |$ q( d' Y0 l9 J3 n
  2241. LDX <Music_Item_Cur
    ( R9 o$ ]- F8 T6 @% I8 A8 e
  2242. JSR Set_Sound_Total+ ~( ?! ^2 l8 n/ m
  2243. LDA <Music_Cur,X% L" r6 t+ [; L
  2244. SEC, F4 b1 }* u: c
  2245. SBC #10
    2 W& j) y4 d/ {% j; v
  2246. BCS Music_Song_Last_10_Set- M* E# V6 l! c
  2247. LDA #$00
    % g9 _0 t2 M. m6 E4 B
  2248. Music_Song_Last_10_Set
    3 z7 A- K; F' R% \2 r
  2249. STA <Music_Cur,X" ~, y% w' H! c
  2250. JSR Sound_Reset_Proc& ?8 ^0 t3 k& L2 v+ p
  2251. JSR Music_Show
    7 M* d3 ^3 U. z" T% I
  2252. Music_Song_Last_10_End
      ~. C# }- R$ X1 p  G/ V
  2253. RTS
    8 I7 s& F* o7 m; @' i

  2254. " }% Z( c. O  ^3 |
  2255. ;==================================================6 s. g/ G  a1 B% j; r. l  |, x
  2256. Music_Song_Next_10;下10曲
    ) G) b( m- G) a. b
  2257. JSR Clear_Last_Track_Name2 C% I5 }) @2 u4 ~+ i- i2 @
  2258. JSR Disable_Text_Draw5 x5 D: C2 S. g2 Q
  2259. LDX <Music_Item_Cur
    2 j) o7 C# x/ X( N3 D0 K$ v
  2260. JSR Set_Sound_Total/ S* I$ k8 F: r! k
  2261. LDA <Music_Cur,X* e- G* a; w7 v6 ^
  2262. CLC  h  R) f8 S  X- i( S& V( o4 i
  2263. ADC #10
    7 i7 ], i# r. A' U
  2264. CMP Music_Total& ^  x. |4 Y) L
  2265. BCC Music_Song_Next_10_Set
    9 r" m! B! x; `
  2266. LDA Music_Total: w% m" U, P/ y1 m7 ]5 b
  2267. Music_Song_Next_10_Set
    7 N9 H: Y( ^5 }3 }& n- X; e
  2268. STA <Music_Cur,X
    0 b2 E; l: ~3 p, W4 `' I
  2269. JSR Sound_Reset_Proc
    : ]2 U' P- C1 O# o2 W. J. }' A1 V# P
  2270. JSR Music_Show
    ( j+ V) S* R, H; w1 U" F
  2271. Music_Song_Next_10_End( j7 q5 R( e' _& V. o  N+ ^- c
  2272. RTS+ n% O, o3 w1 D7 v: m0 b! ^& G" ~
  2273. 5 B$ B4 h! K5 l9 w7 d* q
  2274. ;==================================================
    , k# ]7 E# e" n. t
  2275. Music_Song_Last;上一曲
    / ^5 s# T: i. ?
  2276. JSR Clear_Last_Track_Name4 p; d2 Z" t% g: H2 h
  2277. JSR Disable_Text_Draw+ z. a% F9 N- Z3 a
  2278. LDX <Music_Item_Cur6 r9 B& E+ Q6 a- n' r5 D7 s$ ?
  2279. JSR Set_Sound_Total
    $ d: ]0 S3 b( W) B+ H+ Q
  2280. LDA <Music_Cur,X- u& X1 u' ?7 y3 I0 ~
  2281. BEQ Music_Song_Last_Set/ b/ ^* E- t9 V4 h+ u
  2282. DEC <Music_Cur,X* |& z) K% N2 G
  2283. Music_Song_Last_Set
    7 N* U! D+ Z$ F  {) x. Z" ~2 a
  2284. JSR Sound_Reset_Proc% {( }+ ~- [/ n5 N! o
  2285. JSR Music_Show) I/ @- Q0 s5 h( v0 c
  2286. Music_Song_Last_End# [( H6 M/ {) t- v$ A4 k
  2287. RTS
    ( Z3 z' {4 ]  P6 L
  2288. % k1 ]. I, C& w4 S/ w. B2 O; u; |
  2289. ;==================================================
    . i) V4 j% `% V/ S& D3 R
  2290. Music_Song_Next;下一曲& k; E3 O' b7 c2 D
  2291. JSR Clear_Last_Track_Name( Q" Y, i" P5 m/ s/ m
  2292. JSR Disable_Text_Draw$ {/ Y' s3 J1 o. `8 p" j% g& x
  2293. LDX <Music_Item_Cur
    ! m% Z. q* w: u) a2 s2 a
  2294. JSR Set_Sound_Total
    # d/ a8 i# {; R1 r
  2295. LDA <Music_Cur,X: ~" I' h' U: E; c; t5 y. D+ A
  2296. CMP Music_Total
    ! I( b9 P% |7 P% w" J8 e, B4 Y
  2297. BCS Music_Song_Next_Set
    0 T: y/ P: P# G5 [
  2298. INC <Music_Cur,X
    ) d* k) z4 E& O4 G+ w
  2299. Music_Song_Next_Set
    5 r+ \4 V$ o8 y% C" ]4 r
  2300. JSR Sound_Reset_Proc
    4 \. @8 ^9 A) s: Z, G$ e  E% V/ A6 i
  2301. JSR Music_Show
    3 m) O' B& p5 x+ e4 z
  2302. Music_Song_Next_End
    ( R; g, R& G8 [0 p: q; [
  2303. RTS
    2 k# U: o. g9 F' @

  2304. - I8 f0 o# w1 x8 H  K
  2305. ;==================================================4 Y8 d2 G8 e' K- o( Q6 [% V0 z$ Q
  2306. Change_Select_Item;改变当前选择项
    0 r! ^: V& i, `5 \3 ?2 [/ Y0 Y  e
  2307. ;--------------------------------------------------1 U4 h: U1 K1 B! k6 c- _% C7 T
  2308. Change_Select_Stop_Play_Item;停止/播放
    0 R8 y6 ^; n- t6 L* d* d& K$ A
  2309. LDA <Key_Once7 Y0 O* S. e* d7 H0 Z
  2310. CMP #$10! L! v8 \# f% v* g6 e# A2 V
  2311. BNE Change_Select_Last_Item
    7 j, S$ K  w- l2 |, O
  2312. LDA <Music_Stop_State
    3 o% U' {* r1 o' r3 R6 i" U
  2313. BNE Change_Select_Play! @' H9 [* F/ n" y9 Y
  2314. JSR Music_Song_Stop
    , C3 E6 w. B8 ~, k& z5 Z2 U
  2315. LDA <Music_Stop_State: k9 F- v: d2 ]' u4 ^0 m  I3 P
  2316. RTS
    7 m, s0 C" E* Q# A" \+ r' Z$ b
  2317. ( P: v) a+ C+ ?* L7 ^; d
  2318. Change_Select_Play
      n+ O6 D: Y; B6 L0 Q2 m
  2319. JSR Music_Song_Play, ~( I. m- }" M9 m0 A9 L& \! d
  2320. RTS
    / M2 h+ W' M6 N* I# A2 \

  2321. - D+ v& X5 c' j, u9 U1 E% t/ e
  2322. ;--------------------------------------------------# h& ?/ V" D" Q% [, d8 ^
  2323. Change_Select_Last_Item;上一个专辑
    ; I. Z2 }  D7 n  d" p8 \
  2324. LDA <Text_Disable_Flag. k, P# F" |1 _
  2325. AND #TEXT_DISABLE_ITEM
    0 }  O7 q% E$ W! I& b" w1 E  F
  2326. BNE Change_Select_Item_End3 D* Q( K7 p! ^7 x, P6 U; U* S
  2327. LDA <Key_Once
    0 \1 h. a7 L3 Y3 `, ]. e$ o* o
  2328. CMP #$08
    / l4 i- X# A  f0 j
  2329. BNE Change_Select_Next_Item
    5 j& X* o) U4 r4 i
  2330. JSR Last_Item
    8 r/ \3 o: v* ~, z& C. Y
  2331. ;--------------------------------------------------
    ) F5 l/ `3 Z9 Z$ [) R' j
  2332. Change_Select_Next_Item;下一个专辑: S* X/ k' Y- @+ ^4 i
  2333. LDA <Key_Once
    % ]4 I2 a$ K) m# R' m" [9 n
  2334. CMP #$04; s# `) J6 U+ `
  2335. BNE Change_Select_Last_10/ h! g- F9 ], b
  2336. JSR Next_Item( ~5 ]/ m7 Y, Y4 v* A: d7 t+ [
  2337. LDA <Music_Item_Cur9 m! c9 o, D' X& ~9 u# c
  2338. JSR Get_Page_Start_Index- h* O2 j6 T. A( g3 F3 M
  2339. ;--------------------------------------------------8 t3 S$ V8 C$ g, _+ s
  2340. Change_Select_Last_10;前10曲
    6 i+ Y- X9 R! E# p  x( e
  2341. LDA <Key_Once
    - Y% y( w3 B, s7 X2 @" B8 a# s
  2342. CMP #$408 [7 I8 D7 f8 b' w
  2343. BNE Change_Select_Next_10/ s, w" X* o1 ^
  2344. JSR Music_Song_Last_10
    " \' J# ^0 V% y. V" d# z
  2345. ;--------------------------------------------------
    3 }- k- s& i# N, |+ S8 R5 C: B
  2346. Change_Select_Next_10;后10曲! t) A* S$ z' V0 R. v" c
  2347. LDA <Key_Once8 t+ T0 Z8 x* c) z: j
  2348. CMP #$80
    9 T& ]" H: _1 `
  2349. BNE Change_Select_Last3 t9 U  O) D, v5 I- [$ c. \$ S
  2350. JSR Music_Song_Next_10
    0 T# ~/ W. a: L! I5 }
  2351. ;--------------------------------------------------( r* y2 h5 Z& R3 c
  2352. Change_Select_Last;上一曲7 Y$ `8 v  r/ |( t" o- z
  2353. LDA <Key_Once3 V0 a  W& u  U! D
  2354. CMP #$02
    5 L, \4 h6 q0 v- U2 W& c
  2355. BNE Change_Select_Next  v" B9 I6 r2 @- |1 w
  2356. JSR Music_Song_Last
    ) |% m, }0 Q3 C
  2357. ;--------------------------------------------------
    # O: B0 O% p( _! }5 s
  2358. Change_Select_Next;下一曲9 D$ y  b$ m& T) [
  2359. LDA <Key_Once* ]! }3 y( p$ J0 U- D) V+ j
  2360. CMP #$015 t/ i; c- u0 Y
  2361. BNE Change_Page_Next3 x" f: y$ `! S
  2362. JSR Music_Song_Next' K7 i( `& E! A
  2363. ;--------------------------------------------------
    4 W- y, d+ z) u( F
  2364. Change_Page_Next;下一页7 y, A( C0 n! b* M
  2365. LDA <Key_Once% ^2 F9 y5 Q, _
  2366. CMP #$20
    , F/ g* \2 Z" f& v4 {/ Y
  2367. BNE Change_Select_Item_End+ E9 y1 }- _0 b
  2368. JSR Next_Page
    ; K: f6 }9 R" c% D
  2369. ;--------------------------------------------------
    / Y" T9 ~7 ]$ C7 R0 r5 |
  2370. Change_Select_Item_End
    8 c, j$ S" h: Q7 }# o
  2371. RTS
    . c6 g8 |' a8 M- T
  2372. * |% G# x/ u( m. ?# [
  2373. ;==================================================
    ) b9 P; j& n  H2 X" Y8 A9 l
  2374. Show_Arrow;显示箭头光标8 X3 U  W2 N# l0 G1 Y3 k
  2375. LDA <Music_Item_Cur/ y! t) {$ v2 e8 p
  2376. JSR Get_Page_Start_Index3 l! I' A% O# N
  2377. LDA #$00
    / \! r2 L0 f  b& @# r6 X
  2378. STA PPU_OAM_ADDR9 B8 v. Q. Z$ j/ t' W  X/ `' z
  2379. LDA <Music_Item_Cur9 ~. u% _5 T3 X) D/ i% U- F& u3 G/ u/ K
  2380. SEC
    1 m$ {( r7 A4 B& ]
  2381. SBC <Data_Buf' Z$ c) N8 e8 M% q+ g' ]9 x' d# {
  2382. ASL A
    ) t* A2 F  F( {  s& K! e0 M2 d
  2383. ASL A
    8 F# z& H4 Z6 Q& B% m  E2 S
  2384. ASL A
    % Q9 Z/ j$ f+ t$ T/ z4 V0 @5 v8 L
  2385. ASL A6 W1 l8 [+ Q; z- `# `3 V' O
  2386. CLC. M6 {! v9 E" n* [% E3 B
  2387. ADC #ARROW_Y_OFFSET, G- Y3 }* c7 v) S* P& U3 _6 [
  2388. STA OAM_TEMP_ADDR + $00
    $ B9 z  G( p% g1 `
  2389. ;STA PPU_OAM_DATA& E5 f4 q; w4 {/ w4 |4 e
  2390. LDA #$1F
      P8 {3 P3 X' M. a& c8 A3 C
  2391. STA OAM_TEMP_ADDR + $01
    ' i/ M2 e/ A0 F! O) K9 A) o5 c
  2392. ;STA PPU_OAM_DATA
    ( b7 {  H2 b, y+ [
  2393. LDA #$005 ?& [& K2 F4 C
  2394. STA OAM_TEMP_ADDR + $022 E3 H" I1 S/ f$ V* X$ w
  2395. ;STA PPU_OAM_DATA, g, p! v1 g. n' m) T# T0 M
  2396. LDA #ARROW_X_OFFSET* o7 H5 J5 E8 d. N: l, O
  2397. STA OAM_TEMP_ADDR + $03
    4 i' m5 |+ F9 F
  2398. ;STA PPU_OAM_DATA
    , C5 G# J1 I' d  ^6 c- n% R
  2399. RTS8 K' `$ w! b0 h9 k
  2400. 7 \4 l) z, p3 ?3 N9 Q# N, r/ D4 M, W
  2401. ;--------------------------------------------------
    ( k$ a% K9 L% \5 |9 ^4 [1 u3 h
  2402. ;命名表数据
    " L- i& G# w, S- G
  2403. Palette_Attributes8 J; K% O2 l  v! g6 V, s
  2404. .IF SOUND_BAR_SHOW_ENABLE
    ) B# L9 M& ^/ S: U* z1 p8 w( z
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$558 y9 v5 \) r2 Q7 R0 w! h: e
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$554 z% ^3 _2 Z; ]
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75. [1 u2 ]; |2 k. x% _6 m
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA9 }; k3 S0 v4 w  }2 |3 F
  2409. .ELSE  s4 e# j$ M7 J( b. z* f
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55$ n5 i& d: N1 R0 b( N# @1 K" L
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55( F+ S6 c# |. m5 Z- F. b" U$ L7 @3 U- ?- x
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    " w7 ~- W( @3 i1 S( K
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA/ n1 J) N+ o2 a
  2414. .ENDIF
    - J/ Z) D- g# g0 S5 M

  2415. ; U' x# ^, F' q* }
  2416. ;--------------------------------------------------) O2 X; k# H1 k7 O" h/ s# s0 K
  2417. ;调色板数据
    & p, _2 \! L9 O# n. A! W! ^3 g
  2418. Palette_Data
    0 [2 [( m3 a$ q2 E7 P
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F
    # F, Z" i9 L) ?4 U( @
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F
    0 z" @7 ?. q" U

  2421. 0 x* {( w& R; y2 F$ U" z  q% K
  2422. ;--------------------------------------------------; ]4 e4 ~' A0 k0 a- \0 d
  2423. Static_Text_Data
    1 P: z, v- L" k+ P
  2424. .WORD Static_Text_Caption_Data: K0 @6 C- Q6 r1 l; o' K
  2425. .WORD Static_Text_Author_Data/ E2 }# q7 e0 y2 n$ y5 [( ?7 W
  2426. .WORD Static_Text_Date_Data' j0 f3 h) D5 l( h. G) w
  2427. Static_Text_Data_End
    ) v8 ?# ]' |8 o% n

  2428. - k. P- Z! ^8 K1 V, M
  2429. ;--------------------------------------------------0 d1 E% C7 H! t8 ?9 p
  2430. Static_Text_Pos- v4 u( i% U0 T
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)7 O  n; v1 r- E! @. h  e
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos)5 U6 ?4 \+ p6 r8 R! T4 k' `
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos). A1 ~1 X. A  {/ h1 A1 c6 ]" f: l! Y
  2434. Static_Text_Pos_End. \' J0 j) e; S+ W& S

  2435. 3 ~) J2 A: x2 }8 o
  2436. ;--------------------------------------------------
    2 X8 l+ V, `1 E. s2 }$ H' _
  2437. Music_State_Stop' u4 o3 r/ |" k& Q! r$ s
  2438. .IF SOUND_BAR_SHOW_ENABLE
    6 N% r  T- h! H* _! H
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00& _) }# u6 F0 l# [! u$ v) L
  2440. ELSE% r+ ^  t+ P0 \5 D4 i2 Y/ @( I
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00; w" t' b0 _5 n& b2 x
  2442. .ENDIF
    5 p) U$ W3 h  |# l% N2 Y4 z6 k
  2443. Music_State_Play: Z5 S4 \4 E3 @; t
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$00. C" M! Z% Q8 i& Z+ b

  2445. # X5 k6 @5 I4 ~( {
  2446. ;--------------------------------------------------
    . s7 C. r& O+ ^+ W& S. O
  2447. Sound_Bar_Text_Data;声音类型文本
    ; u6 H) y3 u+ \$ A6 Z
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-"
    : D0 m" t3 L4 z; s/ Z4 d
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-". f; l7 h) U  _" S6 t  d9 J
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-"
    4 ^) C6 a1 f/ h/ x# i
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"
    & M- B* p0 O2 @4 K( p4 ]
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00
    3 h  ^) b8 Q5 u

  2453. - }6 g: e4 _) w" m
  2454. .IF Track_Name_Pos
    : n7 t) h1 N5 m
  2455. 4 Y) T6 T" m* E3 B! d9 E8 f3 Z
  2456. ;--------------------------------------------------9 S: r+ U8 W4 d$ L  q2 a
  2457. Track_Name_Addr_00;曲目名地址索引( G& l, o& _1 E& o- I2 M# E5 O% J" B- E
  2458. .WORD Trackr_00_01
    1 C2 w' ~& @1 D  `/ V0 B

  2459. 4 E& b6 }- f& M0 M  m  L
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"
      J0 f6 g$ g3 z$ f' l0 A2 r) Y  f
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"# M! a- Q  K" Y% W8 w
  2462. & C& k- C/ h' o9 w: _4 W
  2463. ;--------------------------------------------------
    4 A4 ?/ k& s9 `: {) q3 p5 m6 B
  2464. Track_Name_Addr_01;曲目名地址索引
    ; R/ j- h' u9 _+ T9 M
  2465. .WORD Trackr_01_01$ ^* g) u/ V* x
  2466. 9 }9 m5 e0 ]7 C% D% o
  2467. ;==================================================
    6 K* ]' p8 ~. d5 I
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1"! u7 D# ^" D' o  ^, |
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2"+ w4 M5 M( A# N* a& e1 C

  2470. # t8 q9 ~- n2 h* U1 P, o
  2471. ;==================================================. d- D: R+ ^5 y
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引
    4 }$ X' B3 e2 k& y2 W' {2 g6 u0 a6 h* ^
  2473. .WORD Track_Name_Addr_000 H/ P2 {- Y6 ]5 b" N
  2474. .WORD Track_Name_Addr_017 i$ T" k1 M- D) t  z4 \5 l" a, T
  2475. .WORD Track_Name_Addr_01) o0 L& d6 I' n0 h" ~& H
  2476. % X, Y2 \; ^& x
  2477. .ENDIF
    6 J, m% z/ m& [8 R. p
  2478. 1 K3 w% P+ K, k( a
  2479. ;--------------------------------------------------2 R( \' l0 T# H0 L4 k% N+ g, m5 b
  2480. Static_Text_Caption_Data;静态文本数据* H' ^* T% [. C; I" I4 k
  2481. .DB 16
    , l) M3 F* j0 F" m
  2482. .DB "FC MUSIC 12 IN 1"$ i& O: v) D- w6 ~
  2483. Static_Text_Author_Data; h# a" A/ W% s
  2484. .DB 25
    . c. b( @# ]4 X& ~
  2485. .DB "EXTRACTED BY FLAMECYCLONE"
    3 b1 g9 o. t1 w0 Z  n& C
  2486. Static_Text_Date_Data) W- q6 z5 e$ |
  2487. .DB 10) o: H% U# P- N1 G2 \; G+ q- ?4 f
  2488. .DB "2023.07.23"
    5 F6 S% ]2 D( i* e

  2489. , I" A0 w) x4 D% ?6 W; J3 H; x! \
  2490. ;==================================================
    . ~: u  c! u7 V. \
  2491. Music_Collection_Name               ;专辑名间接索引
    + a! @: D7 z7 M
  2492. .DW Music_Collection_Name_00# Z1 q# F- Q# w) u, p! [( M" z
  2493. .DW Music_Collection_Name_01
    5 {* M/ k+ v6 e) L
  2494. .DW Music_Collection_Name_02
    & F" }! D/ p* x: h5 s3 m
  2495. .DW Music_Collection_Name_03
    5 b$ b1 h0 E& i8 x. u; m5 Z; P
  2496. .DW Music_Collection_Name_04
    8 ?1 J6 q$ J) L. M
  2497. .DW Music_Collection_Name_05! b2 T: p8 C0 I
  2498. .DW Music_Collection_Name_06. C) w7 d  ?8 P' D
  2499. .DW Music_Collection_Name_07: D( A5 t9 u* d) E3 b
  2500. .DW Music_Collection_Name_08
    % t. k" M& l& e- Y+ z
  2501. .DW Music_Collection_Name_096 P( o, e8 I* L! n8 F& I5 m
  2502. .DW Music_Collection_Name_10" i' i7 G' {- C3 C5 V  w
  2503. .DW Music_Collection_Name_11, K; }2 g  {& y) Y

  2504. 6 S6 f  Q  o/ T2 M
  2505. ;==================================================
    4 ]& T% N* h8 u8 I6 r0 L; u1 f) V
  2506. Music_Collection_Name_00            ;专辑名文本数据5 d+ J1 l6 ~# I- o
  2507. .DB 11,"1.RAF WORLD"
    - l4 o& w2 G- b' h  Q
  2508. Music_Collection_Name_01
    $ \0 p0 M, k; B9 j$ N' l) G, J+ |
  2509. .DB 15,"2.FINAL MISSION"
    ! I( Y& n2 R# d8 \4 ]4 I
  2510. Music_Collection_Name_02
    1 n3 m0 U& E6 l$ N4 h7 {
  2511. .DB 06,"3.KAGE"' m  k) i; G( K. h" e  s, F
  2512. Music_Collection_Name_03
    + r; J4 ~0 \" E4 K
  2513. .DB 16,"4.DOUBLE DRAGON"
    ' D. v8 c! n7 `, w, K' U
  2514. Music_Collection_Name_04" \$ I1 a* ?7 v9 r( {2 f
  2515. .DB 17,"5.DOUBLE DRAGON 2"' J6 i+ u3 g& L+ T
  2516. Music_Collection_Name_05
    " w( f1 K* x5 S9 W+ E
  2517. .DB 17,"6.DOUBLE DRAGON 3"7 E3 {8 D# v6 }
  2518. Music_Collection_Name_06
    1 z/ {6 k9 r4 z# v8 D$ k
  2519. .DB 09,"7.ROCKMAN"/ Z$ |8 C5 V+ `9 |
  2520. Music_Collection_Name_07# ~' x. l3 N9 _4 I3 S! E! E) W
  2521. .DB 12,"8.ROCKMAN 2"
    9 d5 {& Q7 B4 P# g! E
  2522. Music_Collection_Name_08
      V$ Z  }  Q2 F, j8 Y/ g
  2523. .DB 12,"9.ROCKMAN 3"+ N; O, `% g; |- ~( _& }/ q; Y
  2524. Music_Collection_Name_09
    : F# B' X8 n1 I- l0 }
  2525. .DB 12,"10.ROCKMAN 4"
    & G0 Z! A2 X$ Y7 D
  2526. Music_Collection_Name_105 V0 l6 T0 H9 d6 g
  2527. .DB 12,"11.ROCKMAN 5"! F! z7 v( ~  {% d9 v; E, U
  2528. Music_Collection_Name_11
    2 j& x, g$ e$ E( c
  2529. .DB 12,"12.ROCKMAN 6"
    . G8 w- t  j8 O% [1 D* L

  2530.   u* V9 U1 o9 b: z: d
  2531. ;==================================================
    ; M. w9 B9 u: c* i4 ?2 t
  2532. Track_Name_Addr_Flag                ;显示曲目名标记9 w  I! o- [: V2 a
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,0
    % c9 W3 T; H, Q2 K9 }7 }: o; M% t+ `

  2534. ) x; Z7 l& Z3 }: s
  2535. ;==================================================
    ; T1 B- x1 z: s- M) |: I1 p
  2536. Item_Pos_Data                         ;光标箭头位置
    + |  g- b4 u! T  T4 U
  2537. .WORD ITEM_SHOW_POS% }) ~8 \7 E) p9 M# T4 n9 x) U* o7 c
  2538. .WORD ITEM_SHOW_POS + $0040- Q  P; G1 O% m3 `, ?% I2 p5 U
  2539. .WORD ITEM_SHOW_POS + $0080- j3 U$ N5 K1 Y  a
  2540. .WORD ITEM_SHOW_POS + $00C0
    8 c9 f( C, s* j/ Q$ K$ B8 ?
  2541. .WORD ITEM_SHOW_POS + $0100
      {& e, b6 Z' V  N- L& A" U
  2542. .WORD ITEM_SHOW_POS + $0140- V+ L* t5 M5 E) I# I' t! _4 C& G
  2543. * Q# ?) u0 T# L* F& @# r
  2544. ;==================================================
    0 `; l+ C- T1 v) A4 |2 ]% p
  2545. Sound_Init_Port                 ;音乐初始化入口地址
    : x' Y( ^6 z5 G+ g
  2546. .DW $BFC81 L+ C) l/ A. w" J
  2547. .DW $D7F0
    : u4 t, ]! g5 O
  2548. .DW $9FC01 _  a& ]1 K, D$ v7 G0 N* ?; G
  2549. .DW $BF70# o0 D" G/ u- \# D. J; T
  2550. .DW $8003) p! J0 P" p( p, Y9 r
  2551. .DW $BF30
    " T2 f4 Y; s& m$ h" q$ H
  2552. .DW $90031 c. [6 @% z7 ^9 T" ^6 ~
  2553. .DW $80038 G. V8 s/ a; ?6 L. w& c
  2554. .DW $8003
    6 A& K! d( z+ L
  2555. .DW $8003
    . J0 Y. E* N; _  |+ q+ ^
  2556. .DW $8003
    , S1 {- B/ ^; C9 H/ [4 m2 d) h! A
  2557. .DW $8003
    $ y2 W3 N3 E. x! S

  2558. 4 l) e5 ?1 m; V' V( N/ v
  2559. ;==================================================
    5 g2 P" {& m/ a) K, W- j0 c
  2560. Sound_Play_Port                   ;音乐播放入口地址
    , z. e5 N8 L/ X9 V/ w
  2561. .DW $8000
    8 F4 z* ]) j' d- ?
  2562. .DW $8001
    , R- Y: U5 m7 C# O9 Z
  2563. .DW $A000/ Z9 |6 i! S4 @/ A
  2564. .DW $80038 m9 u! N9 e2 X# {+ k: T% v* G. r
  2565. .DW $8000/ }  N5 F" H2 r0 t
  2566. .DW $80030 j1 _% a) Z% p( U% X) b
  2567. .DW $9000
    6 r, \7 ^( h: M4 Q2 k) E6 r( c2 |
  2568. .DW $8000$ j& n1 b0 X4 u" j* `8 x
  2569. .DW $8000/ i+ ~# p4 `$ g6 V) b
  2570. .DW $8000! ^( p0 k" W0 C
  2571. .DW $8000
    1 U6 R5 J- q7 R5 g8 R
  2572. .DW $8000
    - J4 z1 A7 O" [4 e; o. Q6 k! v- y2 W5 i
  2573. ( Q" ~7 U" e6 d) R2 H* y8 l! d
  2574. ;==================================================' U* Y/ C/ E1 D; A. d( c3 c
  2575. Sound_Reset_Port                  ;音乐重置入口地址
    " [: ]* X) L  ?$ e# k
  2576. .DW $0000/ X* ~" y3 Y4 }9 s. X( F$ t
  2577. .DW $0000
    4 F" z3 u" J1 ]- N% i* w
  2578. .DW $0000
    5 J9 c1 R8 i( Y" j. M2 q) Q& q- C
  2579. .DW $00009 h7 m8 S% z+ E$ L& Q& \  ]0 ]
  2580. .DW $0000
    8 C8 L/ |2 l7 K4 d) O0 |
  2581. .DW $0000
    / ^& G. L3 L! N5 R- Z" Y
  2582. .DW $00002 z$ A* T. x4 M: v( `2 Z
  2583. .DW $00001 y, W2 Y' B0 ]; _& m1 c- C
  2584. .DW $00008 s! w3 s) t4 e  ~1 p0 e: z
  2585. .DW $0000
    ' E% Z! v# v+ y8 n9 ^5 M8 d
  2586. .DW $00004 t) O& o- E" P3 ?+ b  {
  2587. .DW $0000
    0 g# }  A, d( d, N% F
  2588. ' r: {( Y2 M6 `& `
  2589. ;==================================================
    ; l) j6 e1 |  O3 W7 J7 |
  2590. Sound_Total_Port                          ;曲目总数
    # h) }, q( F( P/ s" p
  2591. .DB 38
    / ^. J4 P- U0 B0 o" x9 t1 F
  2592. .DB 33
    2 b! L- f$ x8 d$ Y
  2593. .DB 49
    / g/ }, r+ d# v$ l& o$ w+ j# p
  2594. .DB 41* F( c; x9 O. u
  2595. .DB 83
    # w. {/ h  W5 X; Z  j8 o* b7 w
  2596. .DB 70( `) ^+ {. S: P$ V# N% J
  2597. .DB 50
    2 O! {( Y' [+ U1 o3 [3 y0 L% R
  2598. .DB 67$ d4 v7 {  ]! i2 K
  2599. .DB 57
    7 |$ X5 f6 E5 r9 Q3 l
  2600. .DB 71. A; Y; C+ v8 N
  2601. .DB 76* `3 C  k& a6 }2 Z( C. j# t; f
  2602. .DB 1024 q& k' D5 O4 I% T+ G

  2603. $ C2 R  y9 B" m  I( z/ j
  2604. ;==================================================
    , a- p3 x' _: w. z1 ~: n
  2605. Sound_Start_Port                      ;起始播放曲目$ J; N5 D4 d5 v* R$ O. b
  2606. .DB 005 s" K% N# u4 g2 o: h8 S5 R' R! m
  2607. .DB 00
    4 W' M$ \5 r6 \7 p5 x/ ?) O; y
  2608. .DB 00) j+ \8 L* h6 G) v! U1 E  Z# Z
  2609. .DB 00) k" |: E0 k1 O( g5 B
  2610. .DB 00: U, i. n) E, G) S
  2611. .DB 009 K# C( E( O  P5 e  L$ C& g' ^
  2612. .DB 00
    7 e( ^2 T5 ?, d, h% [- R# ^( W
  2613. .DB 000 o0 u7 T7 h* z- S( M
  2614. .DB 00
    ( p* a; o- t: H8 K* P) z
  2615. .DB 00
    " g# @9 p" @$ b: P' i$ ^. K" ?
  2616. .DB 00# U; Y8 T2 Y0 g3 K* q
  2617. .DB 00
    ; I: m( p/ k& w

  2618. 4 o$ G2 ?- }" }. i5 |
  2619. ;==================================================  h7 V1 s& @; h
  2620. Sound_Bank_8000                      ;专辑bank_8000
    2 n- M/ y/ b1 ^1 i6 V' t3 L8 E
  2621. .DB $10
    4 K. h  M: X( p6 L
  2622. .DB $12# `3 g1 ^# Z& t. j; p3 p8 t: s/ q
  2623. .DB $148 A, K- u* j, p: t! f/ X7 u
  2624. .DB $169 z$ ~% U3 Z2 C$ t
  2625. .DB $182 a7 `  M) q7 ~' q: K
  2626. .DB $1A
    / Q) Z( ^9 |  g7 z

  2627. 6 m; ^  j, f4 n. R8 Q  A0 N
  2628. .DB $00" J) _( y3 J' H6 h8 u4 M' h. e
  2629. .DB $02
    ( O' |& E, f8 k$ k" [( ]8 q* v
  2630. .DB $0D3 E, I' W) l$ Z6 F0 _
  2631. .DB $04
    0 R9 Y" {" g9 e3 L6 J
  2632. .DB $07+ x3 s/ p6 G( B
  2633. .DB $0A
    9 v4 t- X0 U7 v

  2634. 8 f# a- T" n: c5 f5 h+ n

  2635. 1 x% i* v1 ~2 W6 }1 s* o
  2636. ;==================================================1 Q$ Z% y' b: A* w* Q! K9 Q
  2637. Sound_Bank_A000                      ;专辑bank_A000  {9 e4 x9 i2 V8 `) J- l3 U0 a) c
  2638. .DB $11
    : C. n: l, U* s
  2639. .DB $13  n2 V: e5 t; _5 F6 y
  2640. .DB $15! w1 u- J# V, N8 b2 o9 }
  2641. .DB $17; Q: A# u5 G; S% v" K, q
  2642. .DB $19
    , O& \8 _2 e7 c# y' I2 ]2 F
  2643. .DB $1B
    9 w+ w/ n  u1 ~
  2644. 8 K" j6 F: ?' H: L9 G( s
  2645. .DB $013 C( ]" b3 H& P) Z0 e" y3 O
  2646. .DB $03
    + c/ {) g2 M" c, w' Q: i
  2647. .DB $0E
    4 d. r+ y$ _7 P. A2 [2 Y
  2648. .DB $05
    0 R& _% i$ y4 l: D8 L
  2649. .DB $08
      B& v, t% F4 i5 i! B( v# O) Y
  2650. .DB $0B
    6 V; H% p8 j# S$ O

  2651. 6 p* K$ t$ M! f4 f
  2652. 4 D7 x# H5 l! G& M; Y7 {* I
  2653. ;==================================================
    4 y% v3 c6 t: k: L2 Z  T2 f/ L2 s
  2654. .BANK RESET_BANK & BANK_DATA_MASK8 E- q% x7 e% M: j- @& P; e6 v
  2655. .ORG RESET_ADDR
    ( @3 d4 n! q( m* F9 U7 g
  2656. . r0 Y6 r2 |1 r* d: J
  2657. ;==================================================
    " I0 G: b* v5 f$ i; b
  2658. Switch_Bank_8000;切换bank到8000-9FFF
    9 {8 Z- W: R/ }* T$ l2 @6 Q2 `2 l1 H
  2659. PHA
    * @* t9 R! V2 E% G9 j+ r
  2660. LDA #$06
    6 p( S4 o$ S* L8 B
  2661. STA MMC3_BANK_CTRL7 \, t5 B: O0 T. C4 I. I
  2662. PLA
    : [+ w' b9 I9 `& |
  2663. STA MMC3_BANK_DATA
    " y" W( ^, V# Z
  2664. RTS
    : y# T( {2 p* P+ ?, ~7 f: r

  2665. 9 b3 w+ I. F* ~  D: W
  2666. ;==================================================! Z. e# u7 m( G% E+ Q
  2667. Switch_Bank_A000;切换bank到A000-BFFF; q, |3 r7 n- ~* R( O- a
  2668. PHA
    ; B( c9 G+ o- R) h
  2669. LDA #$07
    2 u% P1 z  M: p7 }
  2670. STA MMC3_BANK_CTRL
    ; m' ?/ z" [! D
  2671. PLA
    2 g' D9 I' v  ]% [2 v. n
  2672. STA MMC3_BANK_DATA
    " A$ E* m( R' G8 |
  2673. RTS- Z/ ~' ?- U: x/ M1 b

  2674. ' q. {7 P% }% ?$ i
  2675. ;==================================================0 U% R3 m1 w9 y# K: R% i+ Q
  2676. Switch_Main_Bank;切到主程序bank
    ( m3 c. W, q" i. Z" T: I/ B0 y
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK- R) |# L$ d5 H2 W- j
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank1 v3 a( g- N5 u! b8 W  V* R; s
  2679. RTS
    , e" l; g+ L' r; Q5 c7 L: \5 N
  2680. , p  w3 Q5 D. n$ C1 I
  2681. ;==================================================7 C3 J; \( ^$ S; h$ F, o& L
  2682. Sound_Reset;音乐重设(如果有的话)
    ) S. x* F: G' E' G$ t$ |  Z
  2683. JSR Switch_Music_Bank  ;切换到音乐bank% Q' a. _8 x6 W( p4 I6 O
  2684. JSR JSR_Addr_Op        ;执行音乐重置
    * y) o8 y- s2 c, n" |
  2685. JSR Switch_Main_Bank   ;切回主程序
    8 J5 H2 F( F+ }2 i
  2686. RTS$ K5 }$ {6 l3 C+ x8 P0 t
  2687. : @7 b4 H5 _# ^, T$ c
  2688. ;==================================================* b+ O9 a2 F' Z5 E6 V# [) g- y. q
  2689. Switch_Music_Bank;切换音乐bank4 B  p8 H9 C' s9 W- m
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号
    & E: a3 z& s4 E9 P7 i7 L
  2691. LDA <Music_Bank_80004 a' ~! P+ m8 O; B
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank
    % R7 |9 a7 j6 [- ]: ]5 w& K
  2693. LDA <Music_Bank_A000
    2 f9 g- f8 Q0 H! M& Y9 K  d: P, R
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank; S* Z) F4 o1 a4 M9 ]
  2695. RTS3 @& `0 w, e3 i4 {

  2696. 5 V' n2 C0 l9 w; g3 c
  2697. ;==================================================# g' ~5 }( b  g8 z( G7 f( p
  2698. Sound_Init;音乐初始化" \; f) u8 }: C' T3 S
  2699. PHA; l* {8 o6 M5 {- V6 n# d, c
  2700. JSR Switch_Music_Bank  ;切换到音乐bank0 ^" R/ ^0 V2 ^8 O, l8 N
  2701. PLA
    . w0 E- y9 M' h! P! a& m
  2702. JSR JSR_Addr_Op        ;执行音乐初始化& h$ c& ?; S* n, g+ W  c) w
  2703. JSR Switch_Main_Bank   ;切回主程序
    & D: g3 S7 c+ d
  2704. RTS* [& m% d  `; v# `" ?6 |
  2705. - g+ Q6 \- m# s) u" n8 u# d" \
  2706. ;==================================================
    & I3 S$ R; V/ B
  2707. Sound_Play;音乐播放
    6 \: L& w6 e: x( p" Q8 ?& r
  2708. JSR Switch_Music_Bank  ;切换到音乐bank
    & X5 c5 a; G2 @. o
  2709. JSR JSR_Addr_Op        ;执行音乐播放% u! v: D* u  |0 x
  2710. JSR Switch_Main_Bank   ;切回主程序" L+ S" v0 y1 t8 Y3 S' k; U
  2711. RTS- O+ z2 j9 J: w2 z
  2712. # F+ t3 n7 d( ^" K* s8 ~* B/ C
  2713. ;==================================================3 z" t; h0 U: a) Q
  2714. MainLoop;死循环% `+ ]4 {. B: {
  2715. JMP MainLoop$ |& w- K( r& m! v; z

  2716. - A+ k8 Y) S+ a
  2717. IRQ_SUBPROCESS_JMP = 0- |( _; V. }9 M  V( H* U

  2718. / R" H9 c' G( A  m: E
  2719. .IF IRQ_SUBPROCESS_JMP
    + D, w2 l: k* V
  2720. ;==================================================
    % o0 q7 n$ R: B1 g
  2721. IRQ_Process_0;IRQ处理过程0
    9 W  F5 M+ `0 N1 c# ?
  2722. " s) J0 ?9 b1 Z/ J! f; I
  2723. ;15条扫描线后触发IRQ8 q' w3 J1 |! O! A* Q
  2724. LDA #15
    / p( `+ C0 v# r0 Z/ ?  Q$ [) T& |! ]
  2725. STA MMC3_IRQ_LATCH
    ! V7 ^% G& z( d+ [
  2726. : A$ |# V6 e% i4 ?7 _8 q
  2727. ;设置屏幕滚动
    + d' F2 c; q  {) |- X. q+ i5 c0 Y5 E0 l2 Q2 H
  2728. LDA <Scroll_H0 i5 L* J- j8 d2 Q7 S+ Q5 P" A
  2729. STA PPU_SCROLL. V4 s( ^/ [8 k
  2730. STA PPU_SCROLL
    - ~& i; c( W) \9 ~& D" y6 N
  2731. ( e) H! |6 L, ~+ h. o, s' L: v
  2732. IRQ_Process_0_End3 R( d+ T  {+ Z+ @0 o% f3 i
  2733. INC <IRQ_Process_Index" T5 O$ y: V) }, g; ^1 T
  2734. JMP IrqProgramEnd
    + A2 u7 _; E/ v6 b% z, d
  2735. 3 g! T2 \* y9 ^6 T" Z
  2736. ;==================================================9 P1 i- n  L: _1 P+ C
  2737. IRQ_Process_1;IRQ处理过程1
    / V' N* J: J# g! V" c
  2738. 4 W( w1 ?) s$ @
  2739. LDA #556 h, ?, u) _: k: Q7 V
  2740. STA MMC3_IRQ_LATCH
    ) e) q; b/ D0 A! e3 g3 n7 D

  2741. * z8 r+ R" s4 x; y# b  ~- @; {
  2742. ;设置屏幕滚动! d6 \  B1 ~( c7 v& S
  2743. LDA #$00
    1 o0 [( Z0 n8 Z  E" R+ U
  2744. STA PPU_SCROLL" |5 g9 U6 H' Q
  2745. STA PPU_SCROLL
    5 l5 P+ U; H& @8 D/ E: G2 F

  2746. & `- n9 K* e+ z
  2747. INC <IRQ_Process_Index' u: e4 r) o& o, J& N
  2748. JMP IrqProgramEnd
    " _$ f9 |* k1 n! V

  2749. 6 p6 E  L$ D' n4 \: P. @
  2750. ;==================================================  J. ?. I* }# t3 L+ f4 u* D
  2751. IRQ_Process_2;IRQ处理过程2
    $ R% ]8 U: Y+ q4 U) q/ H
  2752. ; A- s" \& ]8 v  N2 d( e. X
  2753. LDA #15
      O  k: \# c# P8 G
  2754. STA MMC3_IRQ_LATCH; b' @4 J$ F4 q9 f4 V/ e$ O

  2755. 5 C+ O" C7 o$ e% A
  2756. ;设置屏幕滚动- T, t4 c5 B1 z, M1 ]( |, k
  2757. LDA #$002 {% q8 k% P( l8 y. Y
  2758. SEC
    " k9 t- G( C3 Z6 B$ n4 \* o5 g
  2759. SBC <Scroll_H- G  {. ~, X5 q- \# ?. C0 `/ i
  2760. STA PPU_SCROLL# v% W' N. m# A+ b
  2761. STA PPU_SCROLL  q# n# b1 P$ d3 Y% I
  2762. , D. Q) `1 S" V
  2763. INC <IRQ_Process_Index
    8 o0 N& Q/ x$ y: y/ ^
  2764. JMP IrqProgramEnd
    ! L* x9 y$ `& Q( B' o+ U
  2765. ! S5 _1 M  Y6 Z: S6 B
  2766. ;==================================================
    ; b; `: ]2 ?  f! ]
  2767. IRQ_Process_3;IRQ处理过程3' L: S. Q! p+ i4 k& E+ W8 Q

  2768. 8 p* L9 n! Z, @0 h+ J
  2769. ;设置屏幕滚动
    # c2 V: e5 ?0 j- B* M: r
  2770. LDA <Scroll_H
    , b1 Z9 M% u- ^; H: E$ _
  2771. STA PPU_SCROLL
    5 v, l- V- y1 i6 u$ @
  2772. STA PPU_SCROLL
    1 ]7 p; {( P$ Z+ k
  2773. 6 S0 J- F: C' [/ x/ I4 K0 q
  2774. ;禁用IRQ
    * E$ s$ ^$ I& J% f" B4 d/ L
  2775. STA MMC3_IRQ_DISABLE
    ! r+ I! y8 H- \6 q/ O
  2776. JMP IrqProgramEnd" x( q8 u. U- z
  2777. ( f3 n8 J' Y+ T& u3 R# k
  2778. IrqProcessAddr
    # W! i( j4 y  Q, e4 @
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_3
    & j9 e# F8 H9 X* C; Q$ z, h

  2780. 4 f  |9 r5 _6 x/ `* ~5 {
  2781. .ENDIF1 r2 @6 o7 b& b/ U# ]1 N4 `7 O" O
  2782. 0 H/ T9 M+ R7 C5 ?1 w) g
  2783. ;==================================================5 b& K$ U% f6 C7 s9 j1 ]7 z
  2784. ;IRQ滚动模式常量$ {" L% T3 T% \" X- U8 z! a% i# \
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动
    : o2 _  ?* f  F/ W* N; K; W
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动
    * d  b6 [/ W- N+ {6 V
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动+ V0 L+ p; k  c
  2788. + S7 F- K" I, L8 @3 H
  2789. ;IRQ扫描线数据
    % o; J! W% j) a2 S9 d% k7 x
  2790. IRQ_Scanline_Data! a" `, s6 }9 R+ [8 A
  2791. .DB 8
    6 x! N+ i# a+ f
  2792. .DB 547 G) V& b* A1 z
  2793. .DB 8
    # P* o5 ]4 T8 E: g6 W+ A
  2794. .DB 00 ;关闭IRQ% p/ S% I" W6 |! R( J4 a/ m
  2795. ' J: I& X: F4 v8 q! a; P* Y
  2796. ;IRQ滚动控制模式
    & Y( B/ }2 c7 s! ~3 ?
  2797. IRQ_Scanline_Mode- l$ ~7 _* q0 M# y
  2798. .DB IRQ_SCROLL_MODE_ZERO
    , H; G, ^5 _* B+ L* r' p
  2799. .DB IRQ_SCROLL_MODE_ZERO' s0 H" _4 f9 L8 X# C7 A2 M
  2800. .DB IRQ_SCROLL_MODE_RIGHT
    0 }8 V; C- s) k; K. _: i$ R7 n8 H
  2801. .DB IRQ_SCROLL_MODE_LEFT( h* d- ]2 m" U
  2802. # Y5 g4 y& [, y9 u  c" Q
  2803. ;==================================================8 N5 ^- o  S2 C3 e# b7 D* G6 W8 E
  2804. ;IRQ处理& I% M$ U1 @1 \  q2 b/ I, }/ Y
  2805. IRQ_Process1 }# L/ \' y& h8 u; Z# `2 a
  2806. LDX <IRQ_Process_Index
    4 R% B6 @# |+ E$ l$ U4 z1 U
  2807. LDA IRQ_Scanline_Data,X! O. d. b$ @( x* Z  S  \, R
  2808. BNE IRQ_Process_Latch
    $ e7 `% a5 q- E7 i0 a8 U# r
  2809. IRQ_Process_Disable;禁用IRQ4 v; {" |( o/ ^. d
  2810. STA MMC3_IRQ_DISABLE% w7 o6 S; g+ q
  2811. STA IRQ_Process_Index- c4 X2 }+ Q9 b/ W+ I
  2812. BEQ IRQ_Process_Scroll0 y( J; q: a. e  F1 Q  v  @
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线& _( S  U+ K: G8 V0 z% \( @
  2814. STA MMC3_IRQ_LATCH) Y7 Z3 ~+ F% x# f$ q/ w7 ^
  2815. INC <IRQ_Process_Index2 h" f9 H! b% I. M$ k
  2816. IRQ_Process_Scroll;IRQ滚动控制! g+ ^' E6 H+ M- z3 p8 O
  2817. LDA IRQ_Scanline_Mode,X, q2 _. h9 ]0 G5 l
  2818. CMP #IRQ_SCROLL_MODE_LEFT
    ! R0 O7 ?0 ^3 }* G) J
  2819. BEQ IRQ_Process_Scroll_Left
    ( {5 A- `& M* o# w9 s2 P
  2820. CMP #IRQ_SCROLL_MODE_RIGHT8 ]+ k: t, I: p
  2821. BEQ IRQ_Process_Scroll_Right. @7 h" V) y2 P0 y, x
  2822. IRQ_Process_Scroll_Zero;不滚动0 e: y- }8 D' I$ s9 {
  2823. LDA #$00
    ! Q+ Z$ }1 v( c: V
  2824. STA PPU_SCROLL
    8 E/ L& R. T( ?1 L/ V1 @7 C% N% k
  2825. STA PPU_SCROLL& @! `! Y# N/ _# ^
  2826. RTS
    + u9 ?" X8 `8 j3 v/ D
  2827. IRQ_Process_Scroll_Left;向左滚动7 d+ {) ]! ~! W! {- {3 }/ M
  2828. LDA <Scroll_H6 S% L6 s4 J' P+ u" v' O
  2829. STA PPU_SCROLL
    - E) ^: U& p$ f8 Y0 n* a; I" X
  2830. STA PPU_SCROLL+ e0 v$ c0 w9 ~: U& ^
  2831. RTS
    5 ~( \3 ]; o5 E* T# v/ W9 [
  2832. IRQ_Process_Scroll_Right;向右滚动
    9 @* I2 E# L9 g
  2833. LDA #$00
    7 Q. B# y/ q, k
  2834. SEC
    & `' w- o8 V: ]. ~. x! x$ H
  2835. SBC <Scroll_H+ o2 z6 L$ ]+ ~  A2 G7 R
  2836. STA PPU_SCROLL8 \6 ?% ]+ W7 t. R8 y$ g2 w
  2837. STA PPU_SCROLL
    9 W# C' B$ n, W6 g* O
  2838. RTS6 E2 I7 j) T' ]+ q) h9 |

  2839. # Z4 ]4 ?  r" D0 g) n. b6 J0 K) k- s- s
  2840. ;==================================================
    ; C; M0 E3 [$ }3 K, O
  2841. NmiProgram;Nmi中断处理  \& H& ?  I/ [1 O% s/ T% Q
  2842. PHA7 u" j& ], V& s, L$ X/ r
  2843. TXA; b8 u  X. h. {
  2844. PHA
    % L  i+ @, F$ ^. |, w  v' A! w# J
  2845. TYA
    # v/ G  {+ W+ r4 P( ^' K
  2846. PHA$ L( G! D0 k2 D5 o
  2847. , Y' P" H7 L! P8 A
  2848. ;读取清除Vblank标志, 防止重复进入$ P, a. k% M. r4 p; K
  2849. BIT PPU_STATUS+ Q; @+ a9 c" @- U- G2 k- c3 Q8 I

  2850. & [* b8 {+ ~9 j, V* E  ]8 T+ K
  2851. ;切换主程序bank
    + z6 n$ Z+ Q, Y* N
  2852. JSR Switch_Main_Bank
    ) c9 Q3 g  j3 G0 n6 x
  2853. 0 N) a7 r" e* c+ u* M
  2854. ;Nmi处理
    0 [1 G* T. \- I* t
  2855. JSR NmiProcess, z" d; ^8 D0 r; v; Q' S
  2856. 9 E+ i9 c1 A9 S- V, b
  2857. Nmi_Proc_End
    . I. L: o0 D. F7 p
  2858. PLA. h6 ~1 g3 P0 n
  2859. TAY3 d3 l3 p$ O5 [  I2 ~9 O
  2860. PLA5 b% i2 B. E/ z2 w1 @
  2861. TAX
    * h( \" W# ?( ]8 l5 u& w
  2862. PLA
    5 g! `+ A$ e8 W2 M& S9 w2 L
  2863. RTI
    ) `' o& ]: P5 |& G( H' }: W

  2864. : g4 P4 r! `: r8 }* z( F3 F1 _
  2865. ;==================================================& D9 i* y. }- \" }
  2866. ResetProgram;重置中断处理/ a9 ^! i" b5 Z
  2867. SEI
    / O7 }5 d1 ]( i# ?
  2868. CLD
    8 q+ n$ }0 H* S  i
  2869. LDA #$00
    % i2 u- g& e: x- k1 p" S& j% y
  2870. STA PPU_CTRL
    & D) n- \0 W& Q' d
  2871. STA PPU_MASK- z2 i2 g% H6 O% G- a
  2872. 3 ^) I* W2 H, p4 U$ y: N" P$ v3 {
  2873. ;切换主程序bank! X2 Z+ [& {0 O/ h5 \
  2874. JSR Switch_Main_Bank
    4 W+ i, {( x" B
  2875. 8 f2 D+ a( ~% Y6 O9 A9 j/ }
  2876. ;程序处理开始
    + Z9 v) _, Y* u$ N
  2877. JMP ProgramBegin
    / v" W5 o) y& X9 H2 J$ B8 V

  2878. : [7 k5 c) f% D* v/ }/ ~% Y
  2879. ;==================================================' G- a% B5 E: s$ b( V% s
  2880. IrqProgram;Irq中断处理& w1 u; m  E4 A% l
  2881. PHA
    * k* N2 g- v1 @# |
  2882. TXA
    9 X+ Y1 F1 `# R( O$ g$ f
  2883. PHA
    , t, G. ]9 A1 `4 e( p% l7 f: o" ^
  2884. TYA
    : ^. T9 T1 P- [# B, R
  2885. PHA
    , `# P" J, R0 N. Q8 q2 _$ K" [

  2886. 1 @3 r* Q4 _& Z( w5 S, T
  2887. ;关闭IRQ( Q; _+ y2 p4 {/ h* `+ ~: }( }0 M; a
  2888. STA MMC3_IRQ_DISABLE
    * _$ p  v/ G1 t

  2889. 1 K8 F( D, q% v% n% b9 ~
  2890. ;允许下个IRQ触发
    ( C1 \8 [8 N4 p. b- {+ i% k) n9 D
  2891. STA MMC3_IRQ_ENABLE2 W1 G$ [: n0 \8 H% a8 x: e% n. e
  2892. 3 |9 u0 i1 i" j: K& J. U. M3 w
  2893. .IF IRQ_SUBPROCESS_JMP+ E8 [4 ]' m7 w! V

  2894. 4 L. z: s% i3 N2 {  h% r
  2895. ;执行IRQ过程
    ( G+ y- a5 p0 |8 P# T
  2896. LDA <Data_L; o$ T; a/ d2 a# s  Z* P& O& K
  2897. PHA
    - T& e! [3 C% b( `
  2898. LDA <Data_H
    / k# T6 K/ g$ i
  2899. PHA
    ! Q+ U. J; |" X( |' e/ F. [
  2900. LDA <IRQ_Process_Index
    2 O. Q- O) k* Y4 l' M; i  I1 l; P" K( t! ]
  2901. ASL A
    & t+ G; ]! H5 _
  2902. TAY9 k: f9 r9 x: V8 T  O* B
  2903. LDA IrqProcessAddr,Y4 m+ X2 a' y2 _0 q+ ^9 z
  2904. STA <Data_L
    7 t1 z3 p7 f/ B9 Y1 |
  2905. INY% K% F* W5 M9 I
  2906. LDA IrqProcessAddr,Y
    * Y& P5 D# v& T  B) }7 H0 W$ j: p
  2907. STA <Data_H
    6 A4 y5 Y# ^5 L
  2908. JMP [Data_L]4 R$ A% c* t) a* _. S
  2909. : y+ h6 V& p6 j$ r
  2910. .ELSE) l% L. Y6 b- t# n  N8 k5 O

  2911. 7 @, K# N- d2 u+ Y5 Z8 _
  2912. JSR IRQ_Process
    6 u# B6 s5 m( K/ U% X: X  f

  2913. 8 Q- _. p2 C4 F, U  H
  2914. .ENDIF
    2 u- z2 H# D1 z  X* f
  2915. , ]* F+ f: n! i" Y* _7 G  l
  2916. IrqProgramEnd
    8 p7 w6 s9 D0 A( E) L% F5 T6 i
  2917. .IF IRQ_SUBPROCESS_JMP% a& l$ g. X0 Q! Y+ c
  2918. PLA6 F2 E* z5 Q0 ^9 x6 {" B
  2919. STA <Data_H
    ! O0 N4 N. z5 Z. O1 I% y" g
  2920. PLA
    : R5 M1 t1 r" O& c& @; O5 R
  2921. STA <Data_L/ u3 c, M% q% N: N7 `$ p( `" ]" Q
  2922. .ENDIF
    0 [) o6 D) {# Z2 \: _/ ^- T, k
  2923. PLA
    $ s' ?1 j( q7 F7 w9 H+ D. m2 `
  2924. TAY
    1 K5 l/ F2 `& V- w' m) H
  2925. PLA
      l2 E* N% j2 C+ a# j  I0 }/ P
  2926. TAX) X- A) S: \! g/ h; l& l
  2927. PLA
      s# D$ S3 @9 u( c3 f; L
  2928. RTI: n8 ^* b8 ~0 T. c4 [+ K* [* y8 I, v, D" N" h

  2929. & J/ M' ?2 f! Q% i; ?6 r
  2930. .ORG $FFFA
    * x4 S4 m( R% H& j9 h- ^/ j2 m
  2931. .WORD NmiProgram
    ( Y. M8 B/ {0 [* W4 ?% ^
  2932. .WORD ResetProgram( C/ ^6 H) K& c( K6 z0 o
  2933. .WORD IrqProgram
    8 Y" M# A. D( |9 c  E) L/ A
  2934. 7 a+ y) e, q' q% X3 g9 W
  2935. .BANK RESET_BANK & BANK_DATA_MASK
    5 `$ V* o% _$ n4 [) B* u/ \5 Q
  2936. .IF SOUND_BAR_SHOW_ENABLE
    % w  e9 R! \6 o6 n& C

  2937. 4 T) G' }6 v4 b/ ]+ E& k
  2938. .ORG $FE00
    9 a0 h/ T. U0 H
  2939. PHA  P. Z$ u; [7 V& l7 f# q7 V5 h
  2940. STY $07BA
    - I# r; N, w! ?3 i4 P2 X
  2941. LDA #$8D
    ! b/ I: G/ _; A7 K
  2942. STA $07BC& G: h( |' P; \' [
  2943. TYA4 j- {2 D, @/ X
  2944. CLC. ?& V; H# K# ]/ M$ Z
  2945. ADC #LOW(Sound_Bar)
    7 w! N( m6 I% R
  2946. STA $07BD
    3 F) Y5 a7 k( }% z& u
  2947. LDA #HIGH(Sound_Bar)
    . u$ t/ u! V- U+ u( C
  2948. STA $07BE
    * l- }& b& ~# Q/ [$ }6 U/ v
  2949. LDA #$60( ?7 a# |5 y2 p, ^$ q
  2950. STA $07BF7 u% f3 p6 H  j! p& [( [$ R! n
  2951. PLA
    4 ^& v: h* z# n. @  k, i' t
  2952. RTS* A1 @1 h. M  [1 q# ~, t8 E
  2953. ; ^9 W4 g( {4 q3 Y
  2954. .ORG $FE20
    ( x# h* R) D* S( n; @: H  @
  2955. STA $07BA) d: {7 \2 v% C
  2956. CLC
    ; b; b& V- X# J3 z4 a. G
  2957. ADC #LOW(Sound_Bar)
    6 ]' ~3 u/ x/ o/ a' K
  2958. STA $07BD
    . ?% \: L7 l2 m7 }2 c5 z
  2959. LDA #$8D7 T2 f7 t8 c6 v( _; K1 [: p
  2960. STA $07BC
    3 I1 i- r, H' ?# D
  2961. LDA #HIGH(Sound_Bar)
    $ `" ?+ p6 D  A- `4 H
  2962. STA $07BE
    6 a- h& Q4 h2 E8 W. n! Z
  2963. LDA #$60( [8 j9 M: g$ X
  2964. STA $07BF0 m5 V' X, H& e$ l% F
  2965. RTS8 q, H2 D, _% d. Z1 K& n
  2966. ; e5 u$ P! |7 q8 r8 W# M
  2967. .ORG $FE40
    5 s& P  q& A; y% k% d! E
  2968. PHA' O& J% D( X, r7 \
  2969. STY $07F1
    ( L+ i$ o  |: y1 v  X
  2970. LDA #$8D
    & H0 o8 u/ h6 z/ k* K$ I
  2971. STA $07F3
    ; Y, F- F7 l" E3 H7 T% k; F6 e
  2972. TYA8 h) s! f( F1 X+ L& K& J" E4 O$ T
  2973. CLC4 I# m2 |+ h! N; P' y9 ?# z. a+ j
  2974. ADC #LOW(Sound_Bar)5 Q3 L6 v; L9 Q: W4 p
  2975. STA $07F4
    6 Q  ~- f' a/ [! D; t
  2976. LDA #HIGH(Sound_Bar)+ P' ~6 \* N1 }
  2977. STA $07F5  R5 ^) D" j" R
  2978. LDA #$60  l: f& o6 z) P: S1 m
  2979. STA $07F6, S# D& G- H, X# ^
  2980. PLA" b5 O$ |) }: z" @! Q$ u" G
  2981. RTS4 w6 U: f* V) h( Q. N  \0 E

  2982. 2 s. M; U4 m+ J% c( t- u. X0 Z. O
  2983. .ORG $FE60: J; B- i* w. ~5 l' l3 Z  G' {
  2984. STA $07F1
    / d0 N0 m) ?8 v& ~
  2985. CLC+ b# i! e  z- ~/ R% g4 B
  2986. ADC #LOW(Sound_Bar)6 m! q2 ]9 u' W% I" d8 m( g+ Z
  2987. STA $07F4/ [4 r4 z" O' R& P9 e9 c/ E' {
  2988. LDA #$8D) A6 r  b' I; B
  2989. STA $07F3- [+ f! j  g) u% z( r
  2990. LDA #HIGH(Sound_Bar). q; V/ _1 z& K; ^: U  q
  2991. STA $07F5
    / Q6 P' }* [) O  x
  2992. LDA #$60
    7 P* s7 r. n8 b& T
  2993. STA $07F6* N! l# `9 E; f; i6 y$ I8 s# O3 k  u
  2994. RTS
    ( D  s* e' j* c# v9 Y4 h
  2995. ; O0 V1 Y! e; L) ?& |! m
  2996. .ORG $FF40
    6 n5 w. e8 N2 R
  2997. STA $4000
    1 S4 d5 p. ?- i( m4 L" h, f2 J
  2998. STA Sound_Bar + $001 N, ?) P' h, X
  2999. RTS
    + a+ j# b. l! W3 s( X$ U3 ~
  3000. $ E1 Z" n, w7 J6 w# j
  3001. .ORG $FF486 u- _' Z% m/ v8 v/ G" y
  3002. STA $4004
    1 Y  b3 u( J( W3 I4 I4 n# Z
  3003. STA Sound_Bar + $04. J6 B+ O: \  h' S+ J4 `
  3004. RTS& D) y( \& S* j7 T

  3005. 7 }. a8 T" B0 z' \
  3006. .ORG $FF50
    " E, N& L" n4 w# Q& g; J
  3007. STA $4008
    1 _9 y4 O7 }* [8 \
  3008. STA Sound_Bar + $08
    ( S8 A) p" `9 D8 N
  3009. RTS7 s$ _" k# n  {6 w5 {

  3010. # _+ S2 y  k! h- n  M9 H
  3011. .ORG $FF585 ]4 r: N* i) t, T; L* U) X' R& T6 Y
  3012. STA $400C, ~+ y% D6 v. O, u7 @6 {; i- S2 e
  3013. STA Sound_Bar + $0C/ T; k) X/ A  T/ }9 W; U
  3014. RTS
      V. m& Y% o7 h" Z, ^8 S

  3015. 2 V  k7 K& P, w+ {  i
  3016. .ORG $FF600 l+ h+ f* L; Z
  3017. STX $40004 }3 E1 t5 f8 c
  3018. STX Sound_Bar + $00, }* K( {0 Q( R  b1 w! _5 P
  3019. RTS6 S5 P# }' y9 c

  3020. & {  l8 m- p8 T9 f/ q
  3021. .ORG $FF68: p2 T. d) t7 X0 R
  3022. STX $40045 ^0 Q6 _8 Z/ ]
  3023. STX Sound_Bar + $045 l( v* p% {; u3 z" t' W) l( u+ x- K
  3024. RTS; r" {8 q5 A8 g) N

  3025. : D+ w) W0 h3 i
  3026. .ORG $FF706 X6 ]& }! p4 _( F) i9 e4 H2 B
  3027. STX $4008% @9 H4 B3 J( S* b# R
  3028. STX Sound_Bar + $08
    / o& n7 s6 G- H- w0 M
  3029. RTS
    # H+ [2 M# `. c

  3030. & X6 d( d$ ^! Z/ W# I0 `( P: p
  3031. .ORG $FF789 j7 o1 g+ [' e% a% T' I, e# ~
  3032. STX $400C1 H7 `* S6 h! H) q
  3033. STX Sound_Bar + $0C) O4 R+ M0 [+ ^$ e* M/ ^' B$ A) t
  3034. RTS. A: w1 ^( C. @( d7 |1 n

  3035. * n6 J/ s/ i1 M; Y4 N6 ?
  3036. .ORG $FF80
    + W% d. Q$ S& Z9 x4 r
  3037. STY $4000
    5 i5 m8 v0 }5 q  p5 N4 h; I
  3038. STY Sound_Bar + $00& g2 L. f4 E" {
  3039. RTS6 ?+ _& g7 e$ ?1 d1 J1 r

  3040. ' ^% C" E% L/ V2 t5 c# u
  3041. .ORG $FF881 S5 x6 O7 h7 r; A8 V" _
  3042. STY $4004
    $ S. k, _2 t  w
  3043. STY Sound_Bar + $04
    & t6 m5 m! m# R! C( c. n* H
  3044. RTS
    ' h  E5 ~9 j3 K$ J
  3045. 1 E- N2 ]- Z0 O5 d- }9 a) {/ }, k0 M
  3046. .ORG $FF90
    1 w7 D. }( M' `1 ?1 [4 k
  3047. STY $4008) f- e0 X' y3 E6 H- y3 s% W/ }
  3048. STY Sound_Bar + $08
    $ M8 u* c+ L* m' m+ w
  3049. RTS/ j- k5 g+ u+ A# k- n  |

  3050. $ M4 O$ E' U5 _% _8 o& z/ q
  3051. .ORG $FF98- m- M1 [5 {+ O: O
  3052. STY $400C0 J$ J- Q3 j; N2 H5 E  {
  3053. STY Sound_Bar + $0C
      X- |8 f+ ^& v7 ^/ M
  3054. RTS' [  N& [7 H& v# x9 f
  3055. % D5 v1 M; I) m4 W# q+ q( B
  3056. .ORG $FFA0# x0 p, _4 W/ o* C4 u" h
  3057. STA $4000,X
    0 p9 P7 y5 H7 ?% i; j  b' Z
  3058. STA Sound_Bar + $00,X
    4 a$ g& w0 p9 l4 _  p% i
  3059. RTS
    ) {/ m+ D+ I& M
  3060. 3 U2 t" e" A2 B, c! H& T
  3061. .ORG $FFA8
    8 m# C0 f+ Z2 x# f2 M
  3062. STA $4000,Y
    3 b/ ?) K+ x, E, d/ t6 a
  3063. STA Sound_Bar + $00,Y/ o4 x) M* I/ T% y* D0 b6 R5 g- c
  3064. RTS  B1 C0 [! F" a& M
  3065. 0 ~* t; ]6 c4 \% a" q! P: g0 u/ Z- |; A
  3066. .ORG $FFB0
    & s) W- Y# _% T& I( @
  3067. STA $4004,X
    2 R" n, X4 b2 K7 q  M$ a
  3068. STA Sound_Bar + $04,X. ^8 g7 V: R7 F4 k
  3069. RTS, O! h: n+ D# x1 i) _
  3070.   h; r7 v) `& c) U: L7 [/ ^; ]
  3071. .ORG $FFB8$ |# c# v4 G! b8 e$ k/ k+ N# p
  3072. STA $4004,Y9 [) W( \5 F$ ]! j
  3073. STA Sound_Bar + $04,Y& m- K9 |1 r% M7 o/ h* h
  3074. RTS: m% r, }& ?3 O: l) P. c
  3075. 3 W  z; z3 V5 `; ~
  3076. .ORG $FFC0* }/ m. A4 d. t
  3077. STA $4008,X
    + }: k- r' c8 `% w6 Y
  3078. STA Sound_Bar + $08,X8 `2 f! I: l/ K
  3079. RTS$ l& {$ j, b8 `0 }* L; ^6 c- N

  3080. - V* j( n- T+ ?/ y
  3081. .ORG $FFC8
    ! u9 T, D% l4 \
  3082. STA $4008,Y
    $ q8 j. G, X4 p3 _- A
  3083. STA Sound_Bar + $08,Y
    1 }0 @7 S( W. p1 I) f/ f
  3084. RTS' H& K  s5 ^, z/ v
  3085. # u7 n+ y  z1 E0 J+ D% n1 K
  3086. .ORG $FFD0
    " D. k9 M' t* }
  3087. STA $400C,X# ~6 I* f, l6 @: _; i* [
  3088. STA Sound_Bar + $0C,X
    2 G& W6 H8 y, @1 [( s: t* R5 X: k
  3089. RTS
    1 t$ p  V) U2 H. K, U2 k

  3090. . Y9 [- W4 E( [, {# U. }
  3091. .ORG $FFD83 t1 @* A% |/ j' t; j, }8 a4 P
  3092. STA $400C,Y# r  J) U4 _' m8 U; s* ?
  3093. STA Sound_Bar + $0C,Y
    9 l, ~, ]. _$ o2 Q
  3094. RTS# b* E+ l' J  p  a

  3095. 4 |( j3 }; ^; N4 s& p+ Y- G' ^
  3096. .ENDIF) a/ }  \9 c: F$ o$ C8 A( K" _2 G: A# F
复制代码
/ e7 q0 I' ^# z0 @$ J
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

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

签到天数: 3024 天

[LV.Master]伴坛终老

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-18 16:20 , Processed in 1.139648 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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