EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑 " K1 N, ]( v# P& ~
: u7 }* s# y8 C7 @
[FC][音乐12 IN 1]. a8 i. h$ v! E6 N4 J3 G. x+ B, h
时间: 2023.07.23/ z- N- `/ U) \5 k
作者: FlameCyclone. `0 A3 [1 \& N0 V

% V9 r/ a7 Q: ^# ~1 A+ u收录音乐内容:3 O5 u5 u4 C. A+ h2 P5 h
1.Raf世界
+ l2 I' R' k  @% L2.最终任务* |/ [& j2 J+ V+ f# r7 v/ }0 M
3.赤影战士
% H" V; P7 }0 M; q4.双截龙, e: Y* Z5 u" j
5.双截龙2
: {6 x( z" r* q% O/ n6.双截龙3+ {5 r0 Y- ^; \) [5 a  K, Q
7.洛克人
1 `/ [- b1 t8 S5 |8 V8.洛克人2/ `) t) W7 Q) x7 N
9.洛克人36 ?* ~2 Q; y' ]- }% G7 N
10.洛克人4. S2 k3 K/ t' d7 ?9 U0 c3 k
11.洛克人5
4 J  T" @4 m. k! Q7 L12.洛克人6" _5 ^  k& L  [! i- U
& c$ H# L- V" _) B7 O; ~; L
操作:1 w! f% q' k9 j( M: R5 x. Q( X
上键:         上一个专辑
; {  k4 f* C7 C- V) h2 J下键:         下一个专辑+ F% |+ e2 t6 E
左键:         上一曲* e. [; f! k3 j' `% v4 V! c
右键:         下一曲1 M  k3 @/ E  M6 W5 ^) F
B/A键:        前10曲/后10曲
0 [! F4 j+ ]& l# Y  d0 H3 N选择键:       下一页8 S' i: v( \( E' \0 ?/ N+ E  y
开始键:       停止/播放, ^' s( A1 u, m& m  `" l8 R  @( V

" I% k+ X' ]! n# @2 a8 @1 l3 ~http://flamecyclone.ysepan.com/
3 L6 W5 `' T) m2 Z1 g% r# t" D5 Z  v, Y8 Z4 C. T
$ S  }3 C& A+ b4 n
/ i7 b, B: W$ i+ s# ^' }$ I

5 N) `. _- [; {3 c2 M2 Z6 A
  1. ;[FC音乐][播放器模板]
    1 k2 X  ?5 X5 J' F8 e1 C
  2. ;FlameCyclone 20230710% l% g4 R1 I/ G9 k) c. Z: {8 e0 {: y; J
  3. 9 \3 l) f/ |; j0 P8 I! u" A
  4. ;文件头: F8 ?6 s, c" ], Y5 R' m$ `
  5. ;======================================================================' }, f& c, [$ f# V# J2 c
  6. .INESPRG 16                                             ;16KB PRG 数量* I5 ?" M9 {. \+ H3 ~1 u7 z
  7. .INESCHR 1                                               ;8KB CHR 数量
    + Q$ ~! {3 V% S3 D! v9 }' a
  8. .INESMAP 4                                                   ;mapper 4
    5 d: e9 N! R0 ^: n& b  K* x
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直; u2 K/ Y: s' L0 Q7 ^. Z# `6 b
  10. - `$ ]: l* W' r) u
  11. ;==================================================
    ( I/ Q# _- e: ]6 g/ d/ P5 T
  12. SOUND_BAR_SHOW_ENABLE       = 1
    4 d7 i* r! N1 W* ?' N/ o
  13. ;==================================================' y1 f# R; M) ^  H2 F  z: k
  14. BANK_DATA_MASK              = $1F
    5 t# X, @: G+ B
  15. CHR_RAM_ENABLE              = 0
    % n' S2 n3 v6 X7 w* i
  16. IRQ_SCANLINE                = 136
    ( n- \0 G' e" T3 S3 Q% ~  h
  17. ;==================================================1 _: A4 _8 b" R
  18. SOUND_DATA_BANK_00          = $00  [9 H  J; s. N* k- F. I+ }
  19. SOUND_DATA_BANK_01          = $01
    7 j' A' X7 B5 h8 X+ G  n# L4 I
  20. SOUND_DATA_BANK_02          = $027 T9 ?) V9 H( W0 r) z& p
  21. SOUND_DATA_BANK_03          = $031 e* R4 ~; M7 v- \/ L) p
  22. SOUND_DATA_BANK_04          = $04# U8 l8 {& j' a5 |( \( x. p6 e( Z
  23. SOUND_DATA_BANK_05          = $05
    4 ^7 S: b% l1 u8 J
  24. SOUND_DATA_BANK_06          = $06" u: A/ Z; F- v1 X9 r2 F+ x* f* V
  25. SOUND_DATA_BANK_07          = $07
    + e% n+ M. j. S2 \7 l' c& ?, Q
  26. SOUND_DATA_BANK_08          = $08% X5 w! V' K! u, H  m( w
  27. SOUND_DATA_BANK_09          = $09
    # m: C+ Y% w7 p  a5 j" `/ G4 H
  28. SOUND_DATA_BANK_0A          = $0A
    ( d: t/ g$ m4 C' R
  29. SOUND_DATA_BANK_0B          = $0B
    3 R+ M# Z  Z1 P  T' @* z
  30. SOUND_DATA_BANK_0C          = $0C4 f* w5 D4 ~, K) K
  31. SOUND_DATA_BANK_0D          = $0D
    4 A" \5 N: _# x# V- r
  32. SOUND_DATA_BANK_0E          = $0E
    8 w& M+ |% A: M, k
  33. SOUND_DATA_BANK_0F          = $0F% ^/ r: S0 k  u4 ^

  34. ( A6 S* q8 h+ v9 r  R2 m/ g* f
  35. SOUND_DATA_BANK_10          = $102 X- U) `" X1 }; A
  36. SOUND_DATA_BANK_11          = $11* _# h0 U- {4 z: c- K0 }& ^
  37. SOUND_DATA_BANK_12          = $121 j/ h) z( L# b( F2 |0 Q
  38. SOUND_DATA_BANK_13          = $131 }' p4 D! M& y) M; G
  39. SOUND_DATA_BANK_14          = $14/ c, z. ~0 }: w) Z& C8 a2 e+ E
  40. SOUND_DATA_BANK_15          = $15  s. v" n: W- I! |3 K& O* J6 I
  41. SOUND_DATA_BANK_16          = $16
    5 n" B: k% R! W9 l
  42. SOUND_DATA_BANK_17          = $17
    3 W3 C8 K! c$ t" ^
  43. SOUND_DATA_BANK_18          = $18
    ' p% n0 _% e1 z2 B9 }0 v# x
  44. SOUND_DATA_BANK_19          = $19
    . g+ w6 U8 o  w( `) W6 r
  45. SOUND_DATA_BANK_1A          = $1A
    4 X# V' p/ ?; n) w/ p( @3 X  _
  46. SOUND_DATA_BANK_1B          = $1B
    8 w" E. U  w& A; K; ]' x$ O4 x
  47. SOUND_DATA_BANK_1C          = $1C, g& a$ R) W/ ?
  48. SOUND_DATA_BANK_1D          = $1D* I) A7 v0 Q3 ^: ^) A7 W

  49. 0 G6 ^2 F) `' b# I3 Y0 E/ E; s: X
  50. SOUND_DATA_BANK_C000        = $1E# _) J( P/ C4 {5 X0 P. n5 J3 @
  51. SOUND_DATA_BANK_E000        = $1F
    0 \6 d2 x0 Y( x# i  {5 Q/ W* X& D
  52. ;-------------------------------------------------: R* e; z. N% L+ P7 ~. V
  53. CHR_DATA_BANK               = $20( N# T- ?+ E- O5 j* `
  54. CHR_DATA_ADDR               = $A0006 `  r' u8 U7 ~
  55. ;-------------------------------------------------/ P* D2 z; R2 a2 u
  56. PROGRAM_BANK                = $00
    $ E( ~" I# a0 ~0 z
  57. PROGRAM_ADDR                = $8000# H, x0 \# B4 [$ @1 o
  58. ;-------------------------------------------------
    7 Z9 x, ?  l( N" w. \
  59. RESET_BANK                  = $1F
    6 B. j- R# B% o. ^$ C# \( }! }
  60. RESET_ADDR                  = $FD00$ e* _: }8 K4 g+ C( N0 z

  61. . ?8 |& x; L0 b' x/ H# @" O
  62. ;==================================================2 L6 y1 s, p. V/ y  j' ~
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数
      W1 b: {8 M) Z* b
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引* a+ O) z4 X- b
  65. PAGE_SIZE           = 5                     ;每页节目数' d# n8 _7 c5 R# O
  66. ' G  D4 R) D: j/ g' o
  67. ;==================================================& r/ A+ g1 ?; x0 u+ Z- d! n2 ~6 f
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除
    $ C- q* P0 a$ Z8 }/ Q$ \/ ]( L5 K% r* b
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数3 D8 c/ D* f5 q, H! J) p% M5 H7 M
  70. .ELSE) `% U/ c& q' v
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数7 }' S" Y1 w7 S2 @/ R
  72. .ENDIF
    & D! U- g3 V" O9 U; k1 r

  73. 5 o3 Y4 P3 \. V8 F
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引
    # Q% p! F) _1 v
  75. : u) z: i2 g8 {5 S
  76. ;==================================================: @4 s3 w& w5 K0 j+ G" o8 ^
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置
    8 U3 }3 B8 y/ \6 L
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 2
    . Y" Y% ?/ M4 K; n) u
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;
    + o2 V  v/ V6 K* k3 L2 ]
  80. ;==================================================% `8 z+ e1 ^/ z! h* u' _
  81. Caption_Text_Pos    = $204D ;标题文本位置& p9 @$ d0 U8 A' `* q9 y
  82. Author_Text_Pos     = $2324 ;作者文本位置
    7 D  C, R# w0 A$ i8 F6 {
  83. Date_Text_Pos       = $236B ;日期文本位置7 }$ T5 _+ Y8 t6 X; r/ R4 j
  84. ;------------------------------2 u1 ]  I0 T' s7 i% p' q) p
  85. ;------------------------------1 L8 y0 V+ b2 b" `
  86. .IF SOUND_BAR_SHOW_ENABLE3 v. W( A3 f  M0 C
  87. 1 U9 o; S& w, P3 m7 f, c
  88. Play_Index_Pos      = $2273 ;当前曲目位置: ~0 y0 E# n! _! R- J  L* V. I
  89. Play_Time_Pos       = $22B3 ;播放时间位置
    % [- t6 p& K$ a3 R  V# W
  90. Play_State_Pos      = $22F3 ;播放状态位置
    + y7 X( x$ j: T* E3 L# ^: \
  91. 8 f! v# A! \. n$ @* a: [
  92. .ELSE
    & p* h+ O8 h& F5 G# J
  93. $ O  Z0 L3 Y: @
  94. Play_Index_Pos      = $226C ;当前曲目位置
    ' F/ o9 v$ {- W1 k: I4 i' }- M
  95. Play_Time_Pos       = $22AC ;播放时间位置
    5 p, y6 x. K4 L7 r5 y7 P/ U
  96. Play_State_Pos      = $22EC ;播放状态位置# _  i8 X( X- h! m% Q

  97. 2 e9 Y4 F" t5 z, }  t* t
  98. .ENDIF2 R6 h" Y5 e# @
  99. ;------------------------------8 \. e4 B% B2 |, g
  100. Track_Name_Pos      = $222B ;曲目文本位置
    / u/ N0 ^+ v+ q* p2 ^
  101. ;Track_Name_Pos      = $00 ;曲目文本位置
    4 c$ |& T3 [3 h. K: O1 Q* Y
  102. Sound_Track_Pos     = $2265 ;声道文本位置2 ]' A6 M+ p4 C. H$ }+ F1 U
  103. Sound_Bar_Pos       = $2269 ;音乐条位置
    . J1 F& J& ^3 C' x4 B5 m
  104. ;==================================================
    ( M+ V8 B- T* T4 u' n  w
  105. Scroll_X = $002 L& x; ]/ C) h; e4 U
  106. Scroll_Y = $00
    7 E3 B, N. o* b3 H1 P' n: K& Z% _
  107. ;==================================================- x1 O: x3 M  Z+ F
  108. Sound_Ram_Addr_1       = $0100  a! o( R  ^! m4 T6 A0 i
  109. Sound_Ram_Addr_1_Size  = $80/ O8 K( o# e% f5 o  V) \. q1 {- Q2 v
  110. Sound_Ram_Addr_2       = $00908 S; }) l$ y" e" H0 _
  111. Sound_Ram_Addr_2_Size  = $708 b) n4 r% w0 [% q, g2 H
  112. Sound_Ram_Addr_3       = $0700* j: r% u8 M3 j
  113. Sound_Ram_Addr_3_Size  = $00
    / q2 s- ]6 \+ `, C0 P" O3 m7 e  X+ y
  114. Sound_Ram_Addr_4       = $0400
    1 G0 L9 G: p+ ]
  115. Sound_Ram_Addr_4_Size  = $00
    0 N5 ~! P- r( ~
  116. Sound_Ram_Addr_5       = $05003 j0 f" F/ n' ^& S  P' }) A
  117. Sound_Ram_Addr_5_Size  = $405 l8 W. w% a1 s* l( t, T4 T" z0 z
  118. 1 r  s1 _1 |3 G# i) P
  119. OAM_TEMP_ADDR   = $03002 j. H( u& A# K" e7 ~) g
  120. " }2 a# A3 i( x0 c$ ^; }
  121. ;==================================================# B7 W7 D/ h; e- Y+ a  B
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器0 ?4 T5 J" H0 {
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器
    6 S* \+ J  {) I3 B$ l0 |5 G# O
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位6 e+ H* T# q: B* Q3 \7 g3 k9 n
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加1: d" z9 _4 Y: d+ }5 }
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加1: P- A" ]$ Y7 Z
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器
    % \, P2 K4 G0 R$ e! e
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加
    9 V8 X+ l0 H$ X7 O; Y% v* c8 L; o, W2 @
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32
      C7 ~% b  Q; R  [) ~& u
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存
    % M' K5 V  u8 ?" u4 l& P
  131. APU_STATUS              =   $4015   ;声音通道切换
    7 v  [# k" w5 b7 y% X# h
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通
    8 ]: \2 p; {* }
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通  ^1 J4 h, ^# v
  134. ;==================================================
    5 g1 ?, K/ [/ i3 c9 o- o( P
  135. MMC3_BANK_CTRL          =   $8000/ y* P$ r1 X2 y" }$ v% N
  136. MMC3_BANK_DATA          =   $80011 E" H- z& L4 A+ }! e4 |. r
  137. MMC3_MIRRORING          =   $A000
    7 C7 z) i2 M/ G
  138. MMC3_PRG_RAM_PROTECT    =   $A0015 y  A" }& R+ u% D
  139. MMC3_IRQ_LATCH          =   $C000. x+ U9 i/ ]8 {( U) q
  140. MMC3_IRQ_RELOAD         =   $C001
    6 f1 S) f' L/ ~' r1 h6 g3 ~9 N
  141. MMC3_IRQ_DISABLE        =   $E0002 ]) Y9 z) M0 e( z7 P
  142. MMC3_IRQ_ENABLE         =   $E0013 c+ Q+ g8 @6 j; a% u# N  T$ c1 }
  143. 1 `- C% F7 N, n7 l+ ^
  144. ;==================================================& ~! d6 ~  K- |$ I
  145. PPU_Addr        = $0200
    $ ~( @/ P4 d$ ~, ^
  146. Palette_Addr    = $02C0
    + t) o, K$ e, U& q+ x
  147. Sound_Bar       = PPU_Addr+$E0: E, [$ Y0 y7 K6 F+ X
  148. ;==================================================
    7 t5 l7 [3 {2 v. G
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D
    2 o4 d9 o. S* B& e
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$11
    % S4 P& R* o3 U# U0 }! g! f
  151. PALETTE_UPDATE_MAX      = $2C
    ( s: w! z3 o9 ^- n! U
  152. PALETTE_UPDATE_MIN      = $21
    , g5 f* l- }; S# d# K
  153. PALETTE_UPDATE_INTERVAL = 60
    5 R* d/ k; p/ C' W! S, |+ @6 N0 E, p
  154. ;==================================================
    - j1 c: d* J( h. g7 [+ w2 Z6 `6 L
  155. Sound_Bar_Cnt       = PPU_Addr+$F0# _/ n. k' x2 U4 {; s& z
  156. PPU_Cur             = Sound_Bar_Cnt+$028 Y4 Z: Y/ ~5 k- P# ?, B; l
  157. PPU_Addr_H          = PPU_Cur+$03
      q! K' y) q4 \9 X/ t$ Q$ ]
  158. PPU_Addr_L          = PPU_Addr_H+$046 W( f# l0 ^( ^/ A; o. B6 ]
  159. Screen_Ctrl         = PPU_Addr_L+$01
    ; L7 |2 A2 ^1 r! v% _2 d/ x
  160. Screen_State        = Screen_Ctrl+$019 n! U9 N' n& O- h
  161. ;==================================================6 [$ {# a/ Z, \. u
  162. Use_Ram_Begin       = $50* R8 k* d0 c4 H/ z6 U0 ^
  163. ;==================================================
    ) L0 o0 j; z1 P1 m  R9 C
  164. JSR_Addr_Op         = Use_Ram_Begin/ z$ @5 w. N4 c1 Q* z9 j3 l8 ?! K
  165. JSR_Addr_L          = JSR_Addr_Op + $01
    " m& ?8 M! p( [* x+ G' y
  166. JSR_Addr_H          = JSR_Addr_L + $01
    ! O+ q( j$ a9 ], S
  167. JSR_Addr_Rts        = JSR_Addr_H + $01
    - j0 \2 V' Z! Z% m
  168. Data_L              = JSR_Addr_Rts + $01
    7 L# L. l" J- v0 ]3 v
  169. Data_H              = Data_L + $01
    ( v  V% H  g" E0 ]# l- ~+ o+ M
  170. Data_Cnt            = Data_H + $01  A2 ~0 M# M% M+ ?, z
  171. Data_Buf            = Data_Cnt + $01" n  B+ c. z6 [/ D; l5 Q
  172. Nmi_Time_Count      = Data_Buf + $01
    - ?! y4 U0 T* [* `# R$ Q
  173. Time_Wait_Cnt       = Nmi_Time_Count + $01
    1 X* q5 L, z9 H: M
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $01
    ( R4 f' ?: Z+ F+ Y$ n
  175. - o6 s9 J: y: G5 y
  176. ;调色板刷新标志
    5 @& S4 G# L5 h% ]2 k1 Y# s& Y
  177. Palette_Update_Flag = Palette_Wait_Cnt + $01' G5 q- r7 I& S- w' k& g' `

  178. ( J! f  v+ Z9 \7 u
  179. ;当前帧文本写入禁用标志# T( r' V" p. r" W4 O) w. S
  180. Text_Disable_Flag   = Palette_Update_Flag + $01
    4 _- \2 C* T" K% {
  181. 1 g; z8 G6 s3 ]; K. F( W
  182. ;==================================================: s' {. |7 W  L
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动
    + ]' _8 v, a# v0 I- C& s
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条) R* z0 ~7 l4 i  c; e1 h( X
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间' _# B: o6 @" y6 C
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间2 k5 R# Q* w8 n' S1 a) ?
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间1 W3 e! C- N6 m( r/ \+ C' f+ g
  188. ;==================================================) ]7 m2 C" @6 p
  189. Key_Keep            = Text_Disable_Flag + 1
    + m! s  r8 x8 N
  190. Key_Once            = Key_Keep + $01& C! s7 [1 b7 A/ x" n) A( m
  191. Key_Kemp            = Key_Once + $015 C- ~* p1 a# y
  192. Key_Temp            = Key_Kemp + $012 f, C- x0 C4 ~7 ]
  193. Key_Getv            = Key_Temp + $01" Q5 }+ G8 P6 u# e. E
  194. ;==================================================
    - P( v! y2 f" U3 b; O7 v* g
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集
    ! t- V' L) F; i' n
  196. Music_Item_Last     = Music_Item_Cur + $01
    ' y' h5 V; g% B. Z1 W$ U
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集8 n. o) A' C7 Z) h4 q3 _  l+ L. H
  198. Music_Cur           = Music_Total + $01  ;当前曲目
    8 O- f* X% f. B0 _& a* ?
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目
    6 ]  `8 E. K7 \
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态
      [- y% A) v5 z9 {2 ~7 A
  201. ;==================================================, |) _% g# y( R3 E; Y2 W
  202. HEX_Data            = Music_Stop_State + $01
    & c$ Y9 ~; X) s0 U. i
  203. DEC_H               = HEX_Data + $01+ B* g4 l" p8 L8 {, O
  204. DEC_T               = DEC_H + $01
    4 ~: f- d9 M  x' Y$ ?
  205. DEC_L               = DEC_T + $01
    ( }5 ?7 W; `4 o1 I
  206. ;==================================================3 c4 S, L2 K: t1 d* K
  207. Time_S              = DEC_L + $01. N6 `$ Y+ v) a+ O" o4 ?
  208. Time_M              = Time_S + $01
    : N% [6 J3 G- {
  209. Time_H              = Time_M + $025 C2 b% `/ g$ I! u8 y- f7 ]( B
  210. Time_Cnt            = Time_H + $037 }8 f" _3 V, r& d

  211. ' X6 O$ G4 Z0 m4 c+ C
  212. ;==================================================3 E) K$ Q0 C/ |4 P, G2 ^, u
  213. Music_Bank_8000     = Time_Cnt + 15 K" {; E+ x( \, c; v
  214. Music_Bank_A000     = Music_Bank_8000 + 1
    " Z2 e/ }2 i$ Z+ `; h; W. ?+ u
  215. ;==================================================. B. ^. O$ N% m3 H; X3 z6 O
  216. Scroll_H            = Music_Bank_A000 + 1
    6 t/ ~0 l9 k$ }! m) C' J  ?* F
  217. Scroll_V            = Scroll_H + 1, i7 Y% Q! W2 Y" K( p
  218. IRQ_Process_Index   = Scroll_V + 1& G: E- V8 }$ a8 y% `" U. G
  219. ;--------------------------------------------------
    7 U4 y' |: `1 b+ z" T' v
  220. Page_Cur            = IRQ_Process_Index + $01" g, ]$ v/ |; C. o% S  U1 c
  221. Page_Cur_Index      = Page_Cur + $011 E" \+ X% J: d. h5 o9 B% H
  222. Page_Cur_Cnt        = Page_Cur_Index + $01
    4 s! U* [/ U# H" J
  223. Page_Last           = Page_Cur_Cnt + $01
    % U! W& Y4 o. J7 p2 c: }3 y
  224. Page_Last_Index     = Page_Last + $01
    8 z! p. O! @+ B' O# v2 i/ S
  225. Page_Last_Cnt       = Page_Last_Index + $01( t8 E8 k* ^0 M0 x' L& P! L1 V
  226. Use_Ram_End         = Page_Last_Cnt + $01
    6 y1 D, J% Z  M% D$ X. U7 q  T
  227. ;======================================================================
    * K/ u* i1 q/ @; p( j/ @" L( w
  228. ;音乐数据块
    9 v; c* {, Q/ v/ Z/ h
  229. , K/ d$ o6 d9 h' b/ T
  230. .IF SOUND_BAR_SHOW_ENABLE
    ' g3 K! R# n4 }' R9 `3 M" `5 y
  231. ( G  m' ~8 G9 d; y/ Y9 o
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    - @) X2 b$ `, l; q* a
  233. .ORG $9000
    ; l! E$ N* v# e7 v
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"
    + P5 K7 g/ ?  W1 t- C. u. V6 n
  235. # G( q' R9 R2 R' K
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    & Y$ z# X7 J, p: o9 b9 f% f, B
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"/ U9 p6 p4 S7 Y* ~7 \4 D' f
  238. ; E8 g% u% l' n
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    9 E& ?1 ]6 o* s1 l; H' J0 z& ^6 l
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"
    & ]( n3 z* m& o

  241. ! W" p9 @# Y7 ]& e0 |8 \: z
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    $ c5 b; A. ]4 e; L7 L
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank". t& v: Q5 W! l0 _3 H! T- @. M2 V
  244. # ]# a, ~% g, `2 y( a  W7 c: B
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    & p6 c; g9 H7 K; J/ T2 k( f: r
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank"
    ( l1 ]  ]3 I8 _; g. p

  247. , z& b- D2 x" v( N$ J1 n2 D
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK. u+ [, X" W! r+ h& c: a
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    $ |* N2 g1 a2 X% D# w  Y+ a

  250. 9 r$ u% Z; W* Z7 J
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK( x4 x* r5 A& |  j; j4 T) x
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank") H  Y- d" d( y' k3 C

  253. $ V& E8 ?* H5 [8 h
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK; _; I! D) u2 `! K& ~; p  ^8 X2 E; k, ^0 C2 j
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank"8 i: M) |( j) g$ U5 R& t

  256. ! Y3 o! H( L. ]% {! V2 M% k
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK  D" w, l1 P2 k" r: Z
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    9 J/ B+ K. C5 v) S
  259. # x: v9 R9 ~2 Z* @4 y, U
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK& Z* t! c; z: C/ O
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    ; b0 b) L" s7 Z/ P/ r  o

  262. + o, o; f: |9 }; n7 {# i
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    " x+ s! b$ O' a9 ^5 B
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"1 d$ ?# c7 `1 J/ l

  265.   {9 r$ ^: H6 }0 D1 C2 b$ A
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK
    4 m' _7 e1 Q5 l0 |$ h
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"0 W5 @% W, {8 e9 e* E' s
  268. : F9 A! ?$ p9 b' S2 ]
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    $ ?& p' f8 D' E' t; J$ Z3 B3 `" r
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    $ w2 H% ?" a; V8 {3 E2 P; s

  271. 2 q( Y. E$ L# o7 ?
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    9 U, R0 p+ R# z
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"
    , L0 l0 i* D# ?7 d6 f) A( x
  274. 2 L( f/ h% s9 J9 C' j# ]% ?
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    " n8 j( [# a1 q$ T5 ^) i
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"1 h6 G' y5 t* R6 k8 U* z

  277. 2 C9 |. z& x' l" e6 W: E8 ^) Q
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    , h- D+ V& B  t
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"# J% c# i% k( ?9 Y; E$ G7 L) K: h3 P
  280. + }# [+ J, {% }( D# b
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK! v+ h$ Y5 y/ J6 i8 W1 Z8 f: W
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank"  y' O3 Y9 o. Z0 u

  283. - {% b( T3 W* u
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    # B* n! c4 b# c: K& k1 {5 C/ L
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"2 j' e3 m$ d8 I  x# u4 N
  286. - y2 x1 y: e8 ~( w1 C) f7 W
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    0 M9 Y* }; N& x3 v* j: c
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank"- E) E2 k# V( E0 u9 d  m- W2 r
  289. % o  A6 A( e) I2 b  \2 L
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK
    1 a) g3 {. i" J# ~5 B# F, ~
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    ) Z* {6 g8 \  |- }) o* q0 O
  292. : K* a6 M# x: o( s
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    # q2 w9 A' a3 p9 M
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"6 F. k+ G& Y0 L; c8 A8 J
  295. ; p! N2 t+ X5 Q' t- N1 F
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    ) [( B4 }0 x2 p3 M$ W, n
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank"1 p7 G9 b: P- f
  298. / M4 |& v# c9 {: m
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    ( D1 t2 |2 {2 O6 K! o9 X
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank"9 r2 P6 w4 N! M( k; q( D& H
  301. 2 w6 ], ^: e: E$ I* `. f
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
    ) Z% I' R% z" g! Y% U/ \* ?' V* ~- y: g
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    & m6 }( a3 o" `6 Y2 o9 \

  304. . H/ L* q: T+ t3 I
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
      l8 M& ^8 j8 p8 x7 N  ?! t
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank"
      ]' X! Q# q0 F8 ~5 F

  307. : A; U# ]2 d+ c" ]9 b/ L; C/ [
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    ' S# @2 R8 }" w; i3 d! g
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank": S2 R# [( F2 s* n$ h

  310. ( F1 O& N; x" M9 @- c; u
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK2 K# X" A2 g$ n8 n0 h0 R
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"
    / T" V6 z2 l- O
  313.   F* L0 S- o; ]1 K  a! f
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK$ x" g( m+ j. M/ x' l0 f. Z
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"0 S, O. ]6 i' h, v5 W2 ?. L( z+ [) v
  316. 7 ^; M- w  D( k/ N! a
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK7 {" A/ E! l! _& j  i! h
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"# j9 M1 x# B( d$ T

  319. * a  o: b6 h5 k- g2 p
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    1 |7 Z0 |: X1 B; A! q2 l% @; V
  321. .ORG $D400
    $ p5 p% \+ N# ~$ f6 I# t
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"' A: V2 i% a+ ~5 x: d1 O$ x
  323. 1 q4 r% U/ O/ V$ Y
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK' W6 v. M3 ]; \" N% H
  325. .ORG $D800
    / W! D5 ^( t, G7 s
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"
    $ J( @( f# m+ r: E3 e. Q
  327. 9 p. K7 i& y* a8 b; n/ q

  328. ; ^! y1 k7 b. c( [3 R
  329. .ELSE
    / n7 [8 p* b3 ?, N* u: y

  330. ; T6 o/ S7 `$ [& n% E8 W# H
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK, F& R$ J) l" l* q
  332. .ORG $9000
    ) B* b. B2 w- o
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"9 G% [, d# {2 D% N: X0 C1 R! \! X* G
  334. 5 V$ R! R0 p8 G  @  w6 s
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK( z6 d+ `+ y4 a$ i! y
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"
    + j! l2 i! p; W3 V- q# Q4 F

  337. % n* x$ `3 B% J
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK3 o- G+ Q% I) k3 }+ @- e1 B
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"
    / p  D# V5 \# z  S% w

  340. - Y% B0 A$ x% ?
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK& T& y. x3 e$ g# r7 F' p
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    " z* z( U9 g# S

  343. * i8 I( ~4 `' I
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK0 e4 {4 b3 [' M" p  c0 [, {* Z# J
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank"
    2 A3 X' Y& w8 l  n$ ?
  346. : C& r2 q* |( W, G# ]
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    * c4 X. i" N6 \: `* n  H3 Z
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank") Y. c/ T* \6 @! P8 a, t
  349. $ }, @/ J) y  k+ _# v* i# B. [
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    5 {- h5 L( g1 i* S2 P* x$ F
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"6 G$ p, }& {! d
  352.   y. R' s" [0 B' p" g
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    ( _7 H7 R7 R& F3 B7 t! a4 w
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"5 k- ^! v! {8 u/ b1 z
  355. , z! v  u( b% D9 s6 X1 w
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK( o/ a% L5 j  l9 M
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"  M+ Z. [9 [% A7 p1 J# w- g

  358. 6 G+ F: x7 t& _$ O6 O1 r
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK4 C+ V3 S9 g5 j6 i
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"' P1 @2 z8 ?4 D9 q2 x

  361. * ^8 \. I# S; h" @/ j
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK# s2 ^* O7 L  ^
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"3 i2 `: m4 Y, n& v# l1 [. b( f
  364. ! V$ |# l  c- o- d- u
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK' B7 a$ E1 w3 ?6 O& k6 |
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"! z& B9 ]& j% P1 Q* @

  367. " j- r2 J) \/ K  x7 i
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK- b, ^+ _4 j2 C' C# L
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    8 J% m: ^; E$ q' F
  370. - L; _3 V! G' C: \+ l( o0 E. y3 L3 L
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    9 B! Q% s( M' g
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"
    . q+ l) L% g* f& K4 s. L5 w* |! `

  373. $ q4 `6 ^+ _1 i; x( {4 V
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK; V2 M  u5 X5 K5 I' |6 n0 O
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"
    ; D/ Y: b- h8 n, a; K8 v

  376. $ c$ U5 ~. q  `2 A
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    2 g) O6 T; U; F8 @; s! P) h7 X
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    * `/ O# g" E1 v7 Z. B

  379. ( D7 C( E0 ^* V" t; p5 f0 ~
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK
    7 F& @0 z. }# ^6 V+ E0 j1 ?
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"
    6 f5 ?# W+ H; j, ^& B- S- @1 |
  382. 5 s7 x! H3 z+ B& }' F
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK8 ^: m9 O( X  H5 u4 a  B
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"/ }" f/ u6 f: T
  385. 6 n$ w3 _) S$ |
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK" u9 O7 ^+ O! L- J  i2 R1 [
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"% [( v+ I* Z3 v4 J  U! b

  388. # b/ I: ?% f% p4 [8 e
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK
    : f; C8 z1 g, r" Q  L
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    " m8 K. t% P- R; K2 g5 Y# j* E/ l

  391. : L7 y' s8 z3 T
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    3 n  V) d2 F0 R5 Y  L
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    : m% I9 e! J* K  Y1 M) `% Z
  394. ( [4 `! E' _* [/ J
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    ) E3 O; r; U9 A. Y
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank": `. S5 o: K' c
  397. 6 Y! O- Q  c' L
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    / Z/ Q) F0 n" \2 [4 D9 f0 s
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"; o( o: t$ \5 W% G% A2 t4 F# X
  400. $ [1 l6 g- W+ e. R; P
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
    * D0 M. D, h* F" c6 o: X
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    ! k! C$ ~5 J9 s7 ]* Y  c
  403. 6 P& P$ @  N7 C5 e5 l
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    8 h  C1 {! ~  C8 K9 x
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank"
    " P9 S% t. Z6 L# z" v7 ^% T

  406. 4 ~! O1 z1 s6 Z" V" A# {! e; x+ h, A
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK8 Q  O- V% b2 t& F) l, ~
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"4 b" X+ @$ ~' r  Z( e1 v0 ^
  409. . J1 f0 w! b* a. ]; Y: j; T& |1 k# k
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK
    5 y: }9 C9 p; i  O
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"2 ^/ T3 R6 M$ h/ e

  412. $ s3 n7 P7 l/ O
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK
    0 G1 e+ \& |# ^+ v
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"9 s4 N9 B* I1 {; J/ L' i) K0 ^# \+ r
  415.   Y  ]* [1 j& L; l  Q' c8 \
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK( w8 P$ P0 B" F( J
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank": G: O) @. e1 N) o' P% s

  418. 0 n& h4 V6 n' b9 c* V
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK. r9 H! i6 W  k. v
  420. .ORG $D4005 K3 o7 H& d' q3 y. |# w
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    - C! Z( c$ n! K. l) r
  422. " A5 n* F  A  H% u/ L
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK" L, _! w% d( s- y
  424. .ORG $D800
    * d  Y  J) i' [8 V7 B7 i
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"
    3 J5 p  a9 E: C

  426. 3 K* P* k, H' h
  427. .ENDIF. u% p, U  [; l0 B( U
  428. ' A3 i4 @5 o6 w6 `: d
  429. ;CHR图形数据
    ; Z* R* W0 m8 ]+ [: o
  430. ;======================================================================
    7 s% Q% T, t& H4 o" R
  431. .BANK CHR_DATA_BANK: n# ?1 Z9 y% \  s& v2 R
  432. .INCBIN "chr_bank/chr_data.chr"4 P. M) R- K. v
  433. 6 p6 e8 I  z/ s- W, y' v" G
  434. ;======================================================================
    4 R. \7 I# I4 ^; t0 S8 J
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK
    9 a) A& C; q, v; d7 P
  436. .ORG PROGRAM_ADDR3 k: p( t* O7 X; e  `0 W* H/ I
  437. - U  z4 T$ ^9 T2 ~6 ]1 {" ^0 i
  438. ;==================================================( w! N& `' F3 C; A" G; u; o
  439. NmiProcess. _1 x6 e$ R" c0 g; ]3 I

  440. $ e8 j0 {" v4 N2 W: \
  441. ;关闭屏幕控制
    7 d) W) b  x8 O  K6 y" m. y# m
  442. LDA #$00% `5 O' p1 b; n7 x; S+ E
  443. STA PPU_CTRL& X% y7 _4 l  `8 e2 X$ F

  444. 2 ~  z* _$ ?0 y" r9 l4 a
  445. ;没播放音乐就不需要触发IRQ6 s) M$ I! W6 ~/ g5 w6 y
  446. LDA <Music_Stop_State
    * f9 j1 F0 E! d4 o3 C- v. W
  447. BNE NmiNormal4 [0 c& P8 H; P9 }

  448. $ {) ?; [6 W+ I; S% d3 V
  449. ;重置IRQ索引
    ! Y9 |" t2 \+ n* |" {
  450. LDA #$008 Q# l! u8 @; n
  451. STA <IRQ_Process_Index
    $ ~9 K0 a. ?. [) r! B& f1 p
  452. ) h6 Q1 e1 r+ J. K
  453. ;时间秒数为空则跳过
    ; D6 Z+ V6 M$ Q, e. b
  454. LDA <Time_H5 d) |/ ^  x( M( R0 B
  455. ORA <Time_M3 `0 U5 [- ]2 l% `8 s  P
  456. ORA <Time_S* }& \0 R5 X+ |9 |4 M8 ^$ U8 u: A
  457. BEQ EnableFirstIrq
    0 o+ a. u9 b0 W" w+ L' h
  458. ; @1 M5 S( J3 D' S* }7 _, `
  459. INC <Scroll_H
    * e# c! _6 h  \& F; y. o

  460. ( Q# T9 e1 }) D( [( s9 w& p
  461. EnableFirstIrq
    , n$ ~. B" V$ A: @
  462. ;80条扫描线后触发IRQ9 L; t6 ?+ t- P
  463. LDA #IRQ_SCANLINE4 Q/ ~" o: t- }; e' H+ X
  464. STA MMC3_IRQ_LATCH0 W1 i6 c/ `: E5 O) O" R8 p# Z
  465. STA MMC3_IRQ_RELOAD& U9 U+ o* ?% S" Q8 N, F5 A& O
  466. STA MMC3_IRQ_ENABLE. C/ \# o6 c. v* F( J' g# Q
  467. CLI# `+ ]9 n$ e0 P

  468. : F% [) j" E% j8 h/ Y
  469. NmiNormal- K# ]0 ]1 r, _: ^) Q' G

  470. : P1 m: V: k3 w* Z: }- i5 A
  471. ;处理PPU图像! h# q9 N9 [  m+ q5 p  d
  472. JSR PPU_Proc
    4 O8 ^% d& I* @+ L9 ?" H6 D+ S

  473. / k' S- l7 }4 I$ P0 g& ^7 A
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化), g$ P7 A8 A2 L
  475. LDA PPU_STATUS- L) H( s2 }6 A3 s5 W- c1 S
  476. ;LDA #$00
    ! l" Y0 x% x) P& E, S0 v& g  u
  477. ;STA PPU_OAM_ADDR
    ' J0 t8 q' [6 i5 B. S
  478. LDA #OAM_TEMP_ADDR / $0100
    & [" @# w+ B; g6 [- L: R- T
  479. STA OAM_DMA
    . }$ C$ ?: |/ J1 \8 C3 C
  480. ( v( w- G6 k. p
  481. ;启用NMI中断
    ) c9 \& r* M- H. B2 u3 K
  482. LDA Screen_Ctrl
    - b4 E* a! f7 ?* ~
  483. STA PPU_CTRL; U% u) ?. S# r0 t' U4 ?. I
  484. 6 ?$ b- ?$ g/ b5 R2 R/ ?
  485. LDA <Text_Disable_Flag
    9 F5 S8 X; B6 n- s) D# G) |0 z7 A/ C
  486. AND #TEXT_DISABLE_RAM
    5 I7 S0 P$ V3 M
  487. BNE Nmi_Sound_Play
    ) ~* W% l7 t- ]5 j  W% N3 ?

  488. 6 C# q) Q1 d* |
  489. ;处理手柄输入
      i" k, D6 l7 z; \6 P+ t5 e* x" A8 Q
  490. JSR Key_Proc  R' i/ e6 r3 W6 q  c5 n- n
  491. 6 _/ n; V) N: }; f0 Y8 A
  492. ;切换音乐(手柄触发)
    / Y7 s9 T+ a" L' n2 d
  493. LDA <Time_Wait_Cnt
    ' ]) ], Z5 |+ a1 ^& [
  494. BNE Nmi_Cursor_Arrow
    : J' p0 M3 M9 U/ T' a
  495. JSR Change_Select_Item
    # H! T+ N. O1 ~, V" O+ J0 F

  496. " [* T( `. r( b+ f# K: M  V) Z
  497. Nmi_Cursor_Arrow
    * L2 V) h4 W; V' e1 K/ j6 N$ ?

  498. 1 q3 R6 T; N) A6 _
  499. ;处理光标箭头0 }! @7 P5 g7 f; [' w# N, r
  500. JSR Show_Arrow
    " M5 H3 u/ [, t$ ?* @/ b$ U

  501. + b1 v1 O: \- e8 w! l4 f) ^
  502. ;更新调色板
    2 k- H, `1 M9 z' h9 ]
  503. JSR Update_Palette_Data- @4 d4 Y; A0 {/ A- g

  504. $ x4 B3 ?  {0 N! P" P; I' G( A
  505. ;显示时间(缓冲); g; d5 h1 i% z+ R
  506. JSR Time_Show
    5 S; j8 M7 Y$ g- W% v
  507. " P7 u4 y) W1 a- g. w9 J" {! c
  508. ;音乐显示(缓冲)
    6 d% N9 O5 @$ P& b3 L0 a
  509. .IF SOUND_BAR_SHOW_ENABLE! E7 j8 _' O  ?8 X' \# ?  w
  510. JSR Music_Vision) ~! l3 r9 H3 z0 r6 ]& t4 v+ f; t* t
  511. .ENDIF% I! W" I- l! n* _

  512. 4 g2 j! _* q) g0 ^- h3 x1 k! j8 ^
  513. Nmi_Sound_Play
    . X5 }, k: D0 E
  514. ;播放声音/ ?4 h  d/ G' c9 f# k
  515. LDA <Music_Stop_State
    & f( w( f: x/ _' a+ E
  516. BNE Nmi_Time_Wait_Set
    0 t) D, N) p6 v) i3 ^2 g
  517. JSR Sound_Play_Proc1 P, M% j, v! L' `( x! ~( q: ~4 D

  518. 0 v. o+ }* T6 i% t' e8 t7 [+ [( M" U
  519. ;播放计时2 j& T9 L/ }) e8 Z8 x9 |9 v
  520. JSR Time_Count; ?( k9 x# x# i0 _% j# i

  521. . r0 P& I5 Z3 I( i0 o- z+ s: _
  522. Nmi_Time_Wait_Set9 k. j, r2 I' t5 D3 \/ A
  523. LDA <Time_Wait_Cnt
    6 B) @. o5 J; C4 s8 W
  524. BEQ NmiNormalProcessEnd8 X$ f" u9 E0 }+ ^2 F9 _/ z  I  A
  525. DEC <Time_Wait_Cnt3 N& }) R9 y9 G/ @' z, p4 t
  526. NmiNormalProcessEnd
    * P2 Y5 N: i  x
  527. 6 o8 ^3 ^+ Y4 C1 ^2 c1 W9 y
  528. INC <Nmi_Time_Count
    . [1 N$ F' e6 j; ]2 X$ \6 T
  529. % Y& n& E5 j7 y, O* R
  530. RTS# d: y  w. d% A0 A1 r
  531. ) K5 P# F/ k6 z
  532. ;==================================================
    , Y5 a3 Q' L, Q3 c
  533. Init_MMC3
    " W- n9 R- f- O1 b: f
  534. ;==============================
    . T5 i1 x; b& N  I2 \. B+ U9 O/ Z
  535. ;禁用IRQ# t# N* S+ c9 S6 j
  536. STA MMC3_IRQ_DISABLE
    1 V3 X1 ~$ L! z
  537. , O7 }/ Y- T9 ]2 u! E( [
  538. ;水平镜像
    7 ^3 w1 M: h% [& j0 I9 b& H
  539. LDA #$01
    1 x4 H8 W" Z! Y
  540. STA MMC3_MIRRORING
    . p# I  S7 d& X8 Q3 l9 Q7 |

  541. $ K) V# k* G  b! k$ \/ T' s
  542. ;初始化图形bank" L/ o0 F! ]& r, ~5 S& A
  543. JSR Init_MMC3_Chr_Bank# E+ B5 b& e# o1 N2 F- x
  544. * {% G- c5 H* g& B) E
  545. RTS
    % x6 J2 @4 E3 _1 m5 A
  546. ;==================================================$ H: W% \1 f, x9 Z  K
  547. ProgramBegin;主程序
    " P- s  _& W5 `
  548. LDA #$00
    0 v4 a2 v) ?2 M* [- p; r4 c
  549. STA PPU_CTRL3 L3 V$ }1 V( V- v
  550. LDA #$00
    4 ^) Z0 M8 Q; s  X; @  }' f6 {
  551. STA PPU_STATUS
    ' `8 N& t. I/ U; Q
  552. STA PPU_MASK
    + B2 c" r+ w$ x# O+ w  N" W+ r
  553. STA JOY2_FRAME; [6 V7 [5 ?$ \5 J; W  y3 p

  554. 9 X4 @  b  y0 M) \# s# q2 c
  555. STA PPU_SCROLL6 o! S6 V- [: a3 J  o
  556. STA PPU_SCROLL
    + ]( `2 T' ~4 j0 Z0 n# W( `
  557. 7 d, M' l! |8 _* |) U  x' H$ d
  558. ;==================================================
    : i3 q3 M; |. o* f/ x
  559. LDX #$FF
      {' J# ?# F' B9 L7 X0 A: p6 }9 i
  560. TXS
    * `( I+ R) o; Z2 t1 f5 ~& p; R
  561. 1 f! e  t. |4 ?2 A5 ?1 M7 j4 O
  562. JSR Init_MMC30 c8 R  v8 M# x$ J" O  f; G$ f

  563. ( X8 i9 y4 M. j0 I
  564. LDX #$02
    4 f3 ^* Q) s4 B, G% u. s$ y. s" I
  565. Check1
    ( S2 _- G. M- Z
  566. BIT PPU_STATUS
    - \& I* w& H, j7 c6 X
  567. BPL Check1
    2 L9 f1 K/ i" i+ E# G( }
  568. Check2
    3 J0 H3 s7 H3 {/ h. @2 l8 Q/ e
  569. BIT PPU_STATUS# l, ?8 @' B5 l+ Y2 n
  570. BMI Check2
    ) g" I; ]7 y4 g+ G" N; v" Z

  571. 5 ^- b1 v7 p$ |& f* g& w5 {
  572. LDA #$0F' x5 d/ i' J  y" P% B( a0 `' V( v
  573. STA APU_STATUS
    ( S' w- g/ T  J% ^* r, a  D
  574. LDA #$C05 C! ]6 U( t* B+ h+ U1 s  \* D; l
  575. STA JOY2_FRAME7 t& f6 _) q2 c8 e8 [( k

  576. " b0 h) U/ Q% P" z$ A  g- C
  577. LDA PPU_STATUS
    1 r' z/ U: J$ w# O0 D
  578. LDA #$10
    ) m" J8 f& |% M4 I
  579. TAX
    9 ~0 ?  T; Q9 a
  580. Check3
    3 ^% x$ H4 d( Y/ \- N$ x' T
  581. STA PPU_ADDRESS4 I# o) G, F, I! P1 x1 c+ H) U
  582. STA PPU_ADDRESS
    ( k0 Y7 ]7 X- {2 I
  583. EOR #$00
    ; }" W) e& A$ m! ~
  584. DEX
    2 k! E0 Y2 t9 I% _  m
  585. BNE Check3
    ( u" r  _+ \& \7 z2 Z- t: m
  586. ;==============================) q/ X. U: b1 `  s  \; g9 j, A
  587. ;调色板清空
    ( h, V$ @5 p/ ?  C) P
  588. LDA PPU_STATUS
    " V4 Q2 j& T7 j4 `
  589. LDA #$3F
    $ e( f7 o+ q, [) w) |- L
  590. STA PPU_ADDRESS
    0 V, P- T" c# u" z# c
  591. LDA #$00
    - D* t/ G4 Y5 N9 c6 P6 W, _
  592. STA PPU_ADDRESS
    + c! H4 V8 f& s, V  |/ X+ S+ v
  593. LDA #$0F/ |. U2 E3 }8 a1 B4 V# C
  594. Palette_Clear* s& b  h3 c/ R5 C$ \' H# {
  595. STA PPU_DATA
    4 ?" v+ r0 Q3 I3 B' y! F6 i
  596. INX7 \2 p# [& I0 r% L
  597. CPX #$20" f9 s8 c, J4 q) C
  598. BCC Palette_Clear
    % V9 t: C+ ~3 n
  599. LDA #$00
    ! G) x" y3 Q% _# ^5 z6 C% c( M- w' e
  600. STA APU_STATUS- `$ @* m$ h3 p" c" j9 L5 G- k: [
  601. & m# e4 v; @- Y) U: T
  602. ;==============================
    1 [% B/ ^6 ^3 Z/ W
  603. ;RAM初始化
    ; S: i* P6 W. ?
  604. RAM_Clear_All
    2 N4 _) A4 x. t6 ]$ i
  605. LDY #$00$ @3 f5 R  s$ x* p5 Y3 D/ s; d
  606. LDX #$08' B+ |: p4 X) i3 V0 ^+ d
  607. LDA #$00+ q2 C4 c+ H% b2 s- V
  608. STA <$008 {' d; u* _7 a8 m, c2 B
  609. STA <$01
    8 x) z: f6 i( U+ A
  610. RAM_Clear_All_Start
    ! E2 P. j+ S' B2 l! h3 R
  611. STA [$00],Y
    # D; r* j' Z9 k
  612. INY
    + x8 }  k" [" d1 H+ F
  613. BNE RAM_Clear_All_Start8 T7 H! I0 Z* m& q! R8 g9 P
  614. INC <$01. ~% c2 M; @0 D1 I0 h$ Y. d' ]
  615. DEX
    $ D* j  x9 h* X: U3 V7 V' B) ^
  616. BNE RAM_Clear_All_Start
    ( i! t' a# b1 Q6 l. ~8 Q# H6 F. X
  617. 6 H2 [: |* Q$ p0 `# i5 J8 a
  618. JSR VramClear
    . W# E3 C8 y! D+ j
  619. JSR VramInit
    ' _3 Y1 W/ c; {
  620. JSR OAM_Ram_Init  b& O' }2 o/ h( p$ T
  621. JSR Init_Palette_Addr5 w* m1 q! U/ G- C5 f

  622. # v% l5 z( b2 @9 T" L
  623. LDA #$FF$ Z0 w6 k+ ^2 C* b, C( J
  624. STA Use_Ram_End! ~9 }5 o+ ^1 o; C8 t' E; I$ w
  625. ;==============================
    6 I; j& {9 i# `; a/ e" h& I
  626. ;初始化背景调色板7 q5 w* d; X) x7 `' i* p
  627. JSR Set_Palette_Color) y, w% J( `3 L
  628. JSR Set_NameTable_Attributes6 h% \9 t2 e, K
  629. % A; j" u5 N7 M
  630. LDA #$00
    $ K) U  ?5 Y' ^/ t# q3 s4 G! m
  631. STA PPU_OAM_ADDR
    + G: [  ?' a( C4 g, h
  632. LDA #OAM_TEMP_ADDR / $0100
    , z. B/ I2 `% H( P# E
  633. STA OAM_DMA% N$ F  f" `( R, @' M! Y
  634. 2 x! g' Y0 B0 W& _+ K
  635. JSR Sound_Reset_Proc1 [8 I7 ~1 ]1 J( g. y
  636. JSR Set_Sound_Total
      H3 S  ?7 Y$ l. V+ F
  637. : W- Z1 Z- |) Y- v% @
  638. Init_Start_Music
    1 Z& O. d' D* o9 b: z) k4 L
  639. LDX #$00
    ' G/ p1 G$ s: B) A8 q
  640. Init_Start_Music_Write
    8 Y$ T9 U, [, z
  641. LDA Sound_Start_Port,X
    - D* n" H* M, b$ Z# b) G; Y
  642. STA <Music_Cur,X
    1 K* N7 F- R# \  O  V' c
  643. INX. [) n* K& J+ Z2 t3 P& z
  644. CPX #ITEM_MAX_SIZE
    2 w+ c& Y# |% d0 k5 p0 _
  645. BCC Init_Start_Music_Write/ G( ]" Z& b" _6 ]
  646. ' I' e3 m, i- h; y7 B9 f7 ?
  647. JSR Show_Music_Text/ y6 p$ m0 r# ^

  648. $ A% R$ n% O# @0 h' }; b
  649. .IF SOUND_BAR_SHOW_ENABLE! j' H0 `9 w" e8 U* }/ p2 ]
  650. JSR Sound_Bar_Text_Set
    8 ]9 U. z* c* Q
  651. .ENDIF
    2 ]0 ]. l# Z# m& M0 {

  652. . `1 w$ s1 X5 E! b1 @
  653. .IF Track_Name_Pos
    0 a# {- A. D' X1 v
  654. JSR Show_Track_Info
    " {2 Q+ l2 R7 ]$ u/ h
  655. .ENDIF
    : u6 @) I! }( t& H" w6 _$ j

  656. 5 ]9 V* Y% a7 M# s# Y! Y
  657. JSR PPU_Proc
    . f/ F8 N& f3 v7 S+ @% W3 ?

  658. 9 y9 S: Q4 ^/ J% i6 T
  659. ;==================================================. Q, b4 M4 e4 I0 N- S
  660. ;音乐bank初始化 ! P4 T' [1 Z/ `8 n
  661. JSR Init_Sound_Bank7 B* k8 I8 H* |1 D

  662. 5 }8 Q4 M; s7 B% I9 X4 |% N2 c
  663. JSR Music_Show
    ' h8 r* `: g! ^) p- M( n/ {5 i
  664. JSR Time_Show
    + }: C8 Y) D# l
  665. JSR Music_State_Show$ n8 H: {2 u. E9 O
  666. JSR Time_Delay
    9 T$ h: o, F" P  d

  667. * g) B& @& Z; }0 d4 a
  668. LDA #$01/ W  c2 ]6 Q& V# q( W, o9 n; u
  669. STA <Music_Stop_State
    3 S: x3 }& y# c8 p) z
  670. 8 e5 U" R; C0 }. c& x, d( I
  671. LDA #$88  a) p2 e% ^! l6 U  @2 h: D' @; @7 C
  672. STA Screen_Ctrl6 N! }: p- V: H( a; a! s
  673. STA PPU_CTRL
    5 W- I% C7 M- T) l
  674. 7 x! J2 P- |7 ]3 U
  675. JSR Show_Page_Text
    # m: l: A, o1 f9 K3 E

  676. / l% Q# a: T  ?/ n' g! |
  677. LDA #$10
    ( U7 L/ a( m  F( \) A. a
  678. STA <Time_Wait_Cnt( q$ c7 C6 @/ }# m& i) ^
  679. " [9 q4 o- w& {% H% K
  680. Wait_Time_Over% P; o* u, p- H& @# K2 L% q
  681. LDA <Time_Wait_Cnt
    3 F' Y( u3 `7 Y* s# n3 d
  682. BNE Wait_Time_Over
    ( G* ]9 z# r+ B" [- e, p- F
  683. ' a6 M& a% x8 [2 p
  684. JSR Show_Arrow9 I* ]; N- ~; |2 J
  685. LDA #OAM_TEMP_ADDR / $0100
    3 c! X2 e9 F7 A0 m4 ]
  686. STA OAM_DMA
    " }9 D/ E5 U* r; A* \

  687. 4 L7 |! t* L* P4 `2 M( Z9 D0 @
  688. LDA #$1E
    - I( ~/ r# P# d' _0 v, s
  689. STA Screen_State" M# A( j! f4 w' S
  690. ( U3 M/ o" Y1 C+ H3 p, B% J
  691. LDX <Music_Item_Cur0 ~9 V7 `4 p; r6 G9 J
  692. LDA <Music_Cur,X0 X: Y* A4 A3 c$ }" ?
  693. JSR Sound_Init_Proc
    ; u' j! ]' D! L$ U4 F5 w
  694. # U, ~- J7 k0 m0 X  {1 l9 v) S. e
  695. CLI: R) e& Y  T  {5 r
  696. JMP MainLoop
    9 t9 ^. ?$ Y+ C4 D$ ~1 Y5 I7 r
  697. * e6 Z8 y8 H, s9 X4 y# T" I) m9 z% O, F
  698. ;==============================
    1 Y0 `6 y& O' N7 r0 C
  699. Time_Delay;延时等待3 d, z% u7 B# t9 m9 L" _
  700. LDA PPU_STATUS; o1 N* W: E- C+ l$ [1 G- k
  701. BPL Time_Delay, ?( g. U  c% b# ^9 H+ Q" x
  702. RTS" Q" h, M: h" j% e6 N0 e9 P

  703. 5 Y! |) y' y7 T
  704. ;==============================! S- R! ]2 ?! U0 G: n- y  h! N
  705. OAM_Ram_Init;初始化精灵内存' H8 |# F8 V" ?3 ~; c) |- P
  706. LDX #$006 {* F1 ?9 f# n* G5 ~2 q
  707. OAM_Ram_Init_Write
    8 I( K. \9 Y& G* o$ y
  708. LDA #$F8
    : S; `6 P! t$ G  a# p; N
  709. STA OAM_TEMP_ADDR,X! q* v8 U( T% f) v* Y3 v4 E1 X, t
  710. INX6 X. {: h% [$ t0 ]6 a
  711. LDA #$F84 @7 L  B! H; i/ P
  712. STA OAM_TEMP_ADDR,X
    . H, n2 H' ]7 k2 ?# Z) P9 _6 P# K
  713. INX8 }2 }, @9 B+ C1 F% ~
  714. LDA #$00; ?% n' k, [$ N. T
  715. STA OAM_TEMP_ADDR,X3 f3 u; C4 e! f% o2 s
  716. INX
    ! S8 q$ }( p- s: g# ]1 J) w+ W- \
  717. LDA #$F81 u* T4 j  _- q  k/ ~1 x
  718. STA OAM_TEMP_ADDR,X
    / e% v% {5 Z4 r9 |6 V9 R
  719. INX' E. e+ V2 A' C3 V
  720. BNE OAM_Ram_Init_Write' q( `) @" Z7 h, R
  721. RTS
    ( E' [( {% G, D8 m! N
  722. # E- W, ~/ ?" N+ K2 G2 Y; g, g  M: \
  723. ;==============================' _, h1 Z9 d' I5 F! a
  724. VramClear;初始化图形内存# M' U, S8 B# v: V+ S0 Z  q
  725. LDA #$20
    1 [# q0 N+ d% w. t+ R
  726. STA PPU_ADDRESS
    - q6 y' x( ~9 u2 @+ h, o
  727. LDA #$00
    + Y7 p; d0 D0 P9 `+ {+ U
  728. STA PPU_ADDRESS
    * F8 f# c6 Y! |5 {- [+ Q6 ?# r4 l
  729. LDA #$00
    + s& x; G6 [& v0 A, d( q1 T5 @1 }& e
  730. LDY #$00
    0 X+ q- C. x4 b6 [2 j" ^) u
  731. LDX #$10
    ; z0 [% t& V9 T2 E# P, L9 ]; D
  732. VramClearWrite
    . Q* r4 ]' d& n4 m9 T
  733. STA PPU_DATA$ k/ S$ H/ o" v' o/ Q  p2 j
  734. INY$ A4 w2 A& W$ B6 O  A- z) E; K' j
  735. BNE VramClearWrite
    ) ]" {/ N3 J1 A' Y) ]. i6 D2 f
  736. DEX
    8 Y! U1 g5 B6 t8 G
  737. BNE VramClearWrite! M& H" X( U' e3 ^* n' f
  738. RTS
    ' P8 t0 O9 s" ]
  739. 0 `( ~; d+ N2 d
  740. ;==================================================
    : k% v# t4 P: E1 |+ o, {
  741. ;设置MMC3图像bank1 ?- W0 f: b! g, j
  742. Init_MMC3_Chr_Bank1 X* X' ]0 `3 _( ~8 _+ _7 l; ]
  743. LDX #$05, |5 A1 s0 E0 o2 c" u
  744. Init_MMC3_Chr_Bank_Write6 Z& o: M) M4 K& @
  745. STX MMC3_BANK_CTRL
    ( K) K- M. g0 W9 @& U
  746. LDA MMC3_Chr_Bank_Data,X8 E# f+ }& o' }/ K
  747. STA MMC3_BANK_DATA3 q: H, ?4 v; e; P/ I7 e, V; Y! x& W
  748. DEX
    + @  X- C' L6 A. ]$ b
  749. BPL Init_MMC3_Chr_Bank_Write- g6 w+ p/ q0 R6 U) G! O
  750. RTS& K. f; F. L( {1 Y5 d
  751. ;--------------------------------------------------
    2 e4 e2 u; K$ V( S
  752. MMC3_Chr_Bank_Data0 @% z# J0 C. ^4 u1 }% |4 p
  753. .DB $00,$02,$04,$05,$06,$07$ x% b  _& e% v" _
  754. ' t# v0 r" N; m1 o4 T
  755. ;==============================
    6 x3 K( |. R# u& _* x& V
  756. VramInit;初始化图形内存
    ' L& }5 d2 n  r- J- `; m/ U
  757. .IF CHR_RAM_ENABLE# A+ S: o7 S2 M5 C0 Z
  758. LDA #CHR_DATA_BANK0 T) |/ ^" E8 [8 ^$ _' j
  759. JSR Switch_Bank_A000, Z/ {5 k, r. A4 e0 O6 j3 V( [
  760. LDA #LOW(CHR_DATA_ADDR)
    - O) s5 h( D, z$ U+ e; j5 d
  761. STA <Data_L. i% _- o. Y: T6 w/ g4 s- |
  762. LDA #HIGH(CHR_DATA_ADDR)
    6 q3 v) u# I: y) r
  763. STA <Data_H
    ! K6 n6 h" ]/ R1 N; ^" k
  764. LDY #$00
    6 p  k: F' |, L4 L' C! m
  765. LDX #$20
    4 q- E0 e: ~2 h* {" B8 k$ N
  766. LDA #$000 H3 W: B  Y- ?* \8 `: {
  767. STA PPU_ADDRESS
    8 G. F9 ?% I8 q9 X8 e% L
  768. STA PPU_ADDRESS
      t( H; |) O8 v+ p2 _8 k' Y
  769. VramInitWrite7 X2 \: t# v6 j# S' Z4 P
  770. LDA [Data_L],Y5 J4 @& S" R3 n) Q1 P0 F
  771. STA PPU_DATA
    % x- G# h2 ~1 u' |8 k
  772. INY/ \4 G8 M7 Q6 E: }, ^2 w3 a
  773. BNE VramInitWrite; V% l/ Q; I. T* Y
  774. INC <Data_H
    8 n( ?" d" C5 E8 F
  775. DEX
    , i" I; u: d" z
  776. BNE VramInitWrite
    4 l& L/ `& v" K; y' M0 E, P8 D
  777. .ENDIF
    3 e! I+ l4 m! X# x( S9 V; C% j7 M% h" z
  778. RTS
    # v  C5 |* S% t, C3 o2 m$ a

  779. 6 I% }# E. V% u1 O6 _& j; S
  780. ;==============================
    : v- Q9 i$ p* n, u
  781. ;音乐切换" g$ a9 h- n" ]# e; a! _  D5 H
  782. Music_Play_Change& U  ?, U2 [  f  a" @% r
  783. LDA <Key_Once
    + L" Q/ L" W( ~9 w6 Q6 |
  784. AND #$FF1 ~; [' H0 C9 ^4 I' q+ j
  785. BEQ Music_Play_Change_Check
    ) o- o+ C! `: p& J' ?/ C+ p; F
  786. 4 m) N& j% j) r2 x; W
  787. ;禁用音乐条刷新
      `/ ^% s. l/ d8 p# Q
  788. LDA <Text_Disable_Flag
    : z2 h( s) f- f; e+ ^/ v. w
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    ( q% ?: x  y: o& H& X6 s8 m. T
  790. STA <Text_Disable_Flag) C1 X8 W  b; S. h4 V, k9 M0 }
  791. ( c4 A  T1 ]% M4 s4 r
  792. Music_Play_Change_Check
    7 R7 `! E' v! C  e2 X% P
  793. Music_arrow1 V8 O4 q& x. ?0 S
  794. LDA <Key_Once8 K7 O) U/ z/ O
  795. AND #$0F
    , A* g+ ~! [' t1 f7 y" D4 K
  796. BEQ Music_Play_Change_End
    ' _" ~1 U9 T8 b6 \3 \7 R+ F
  797. JSR Music_Track_Change
    . |0 C' o. P4 }7 j, m9 O
  798. JSR Sound_Reset_Proc0 \7 T$ Q' `, I1 N0 I% N" X
  799. JSR Music_Show1 T! T7 a  D7 A: l. }% m
  800. Music_Play_Change_End
    / X& {7 a. A) \. u# D! u
  801. RTS
    % D3 f# M$ u$ M. t0 Y

  802. $ Z( I, q3 _; e
  803. ;==============================& {. g0 J; U; x1 }
  804. ;音乐曲目切换: x) t1 b7 J+ K3 ~" M/ S& D
  805. Music_Track_Change
    8 }) s+ H9 d0 E/ y! [7 q
  806. LDX <Music_Item_Cur* d+ s  N1 M# [* N* P+ ?9 N7 m3 v- Y
  807. LDA <Music_Cur,X
    8 ~  K5 m. L5 M. B3 C0 x4 ]7 _
  808. STA <Music_Last
    . \1 b2 k) C6 ]9 d5 I
  809. Music_Decrease
    2 \& }. f) ^4 {9 H  q  e  e3 [
  810. LDA <Key_Once% C% _0 J" K/ X) z" g4 P- Q
  811. AND #$420 \( Y& w! T/ l% n; U
  812. BEQ Music_Increase' j4 \0 K  @# M, D: V, t
  813. LDA <Music_Cur,X( m5 o; H. @/ A
  814. BEQ Music_Increase
    5 f; @3 }( u  v# M* }# `: I
  815. DEC <Music_Cur,X( `- P: f8 N/ s6 }+ I- O2 J  n
  816. Music_Increase
    , x5 e5 y' Z$ l2 `) D3 b
  817. LDA <Key_Once9 W4 x' t/ v  Q+ }& k  E
  818. AND #$81, k& S8 Z( N0 g1 ?* N, ]2 k0 g
  819. BEQ Music_Decrease_103 {. x: H# j! M8 M- \, }+ M- y5 v
  820. JSR Set_Sound_Total
    2 U+ c8 r' h" P% [
  821. LDA <Music_Cur,X& |6 X9 q4 v0 L/ U" ]& m& U
  822. CMP Music_Total4 @, _2 b# p- c$ m9 l2 Y
  823. BCS * + 48 B& V6 Q  A/ m" r5 M9 Y& s" X
  824. INC <Music_Cur,X( L$ Q7 z' p' J8 B( U% L4 R- ?4 z
  825. Music_Decrease_10
    $ U: ^1 n3 |2 B2 M- S
  826. LDA <Key_Once7 E$ W0 F/ ^* c+ }, v- v
  827. CMP #$040 F. t9 n: P! e" v! W
  828. BNE Music_Increase_102 @/ F$ O1 A  m
  829. LDA <Music_Cur,X8 P2 F5 [6 e2 I! }% l
  830. CMP #10( X1 T6 t) y) F5 F6 W3 Q' U
  831. BCC Music_Start_Song_Min
    6 D& I3 }% T: E' _, ^
  832. LDA <Music_Cur,X
    * M& x9 E: w) S7 h. i
  833. SEC7 k& \) ~7 p9 B
  834. SBC #104 `7 P* t1 n0 r5 J; M' D
  835. STA <Music_Cur,X% i8 d6 @9 _4 e  S4 {
  836. LDA #$006 Q6 D, p1 B$ M
  837. BEQ Music_Increase_10
      w2 w. f5 U2 ], U' m7 c0 M
  838. Music_Start_Song_Min9 F5 ~# r+ \$ Z  ~% N* t
  839. LDA #$00
    1 s% M$ `# o: I* G5 v9 d! A
  840. STA <Music_Cur,X4 v* a3 `. ~: b7 h
  841. Music_Increase_10
    * T8 T5 r+ r7 M" Q; T0 x
  842. LDA <Key_Once# U4 c7 w7 y" w$ p8 T% n
  843. CMP #$08+ F* {/ E" w: d! ], W
  844. BNE Music_Track_Change_End
    / n" r/ e$ g  D- K( R2 g0 o
  845. LDA <Music_Cur,X
    % l( Q9 ?" _1 G3 M. V0 r
  846. CLC" E6 w" ]( S. b$ k0 u6 X
  847. ADC #102 I0 t0 O7 K" C' ^
  848. CMP Music_Total
    8 P4 g. m3 z# Q/ N8 Z4 L
  849. BCS Music_Start_Song_Max
    & L( X9 g8 U5 L( F& O
  850. STA <Music_Cur,X
    3 ~0 C$ R" V  I: o& |) |8 M& G* l) A
  851. LDA #00
    ) f) z$ }; E' J. `! S0 g" w
  852. BEQ Music_Track_Change_End( H! l. |$ z' H' a+ D0 V/ Q
  853. Music_Start_Song_Max; j' M( _: d) Y* O1 Q! R4 x) n
  854. LDA Music_Total
    , d( p6 {8 [- m( J9 E3 P2 M
  855. STA <Music_Cur,X
    , r) P- ?$ ]- P* M
  856. Music_Track_Change_End- j, u- u' _5 @, Q; ?6 S2 D
  857. RTS$ M8 h' `+ x$ I& ]2 F& k
  858. " l- E# |) ~; \; `& ^
  859. ;==============================4 K& k3 V4 T& {) ?+ s
  860. ;按键处理
    2 U8 r- _# U9 i: R- F: L
  861. Key_Proc: c: a2 k7 d' M
  862. JSR Key_Scan/ X0 C+ `. {; ]1 G, A' S" H
  863. LDA <Key_Keep
    . d- i! A: C/ A: H
  864. STA <Key_Temp
    ' |/ F1 ?' p1 @1 f7 i
  865. JSR Key_Scan
    / U' I- D' l/ w4 c* p
  866. LDA <Key_Keep
    4 |8 ]' ^: T3 s/ }) a
  867. CMP <Key_Temp* g, b0 O1 ^) X& m& B* _
  868. BEQ Key_Get_Once! t# |4 a5 x" Z9 _  K6 q+ K
  869. LDA <Key_Kemp1 O1 n( R4 j1 Q- D, k
  870. STA <Key_Keep$ Q% k- {2 a0 R1 O/ l- B) |
  871. Key_Get_Once
    1 i8 J( U% s* V+ l# v: X
  872. TAY
    8 s/ q3 L, A4 `# l8 O5 M6 }
  873. EOR Key_Kemp
    1 E' ]1 Z; E& I+ f# Y5 N, q
  874. AND <Key_Keep  e6 ^- t% ?) O9 ~. X: S+ `3 S
  875. STA <Key_Once6 \/ M$ V7 W/ {% \2 L/ a
  876. STY <Key_Kemp
    # U9 E, I+ P0 W/ l: C5 w$ |
  877. RTS9 d/ A; R9 q( p7 H6 ^( @
  878. ;------------------------------
    / \/ j) e" F* i) }# `- g- X# u
  879. ;按键扫描
      K" }8 [, J/ w* {) `& o6 h/ @
  880. Key_Scan
    8 t. u* Y) L: e) u6 @# f
  881. LDX #$01% y1 b- R- m4 N" h
  882. STX JOY1_FRAME
    ; E9 ~3 x/ a, k1 w$ F
  883. DEX
    * h7 A: G2 r! i/ |/ m/ T5 D" Q8 k
  884. STX JOY1_FRAME# N& R0 a! P" Y9 {7 o$ ]
  885. LDX #$080 u' @3 X- ]" P2 Y# Y  P
  886. Key_Value
    / T% R* B& s5 f3 [! `
  887. LDA JOY1_FRAME
    - ^! A8 S: [* w  u7 A6 Q
  888. STA <Key_Getv& G. v5 s, O% |, R( I9 G0 @
  889. LSR A/ G4 i; R2 o4 J; O! r4 Y
  890. ORA <Key_Getv
    + ]/ Q# n1 h* k3 s7 x
  891. LSR A% Q8 P. u8 Z4 P9 R8 w- Y
  892. ROL <Key_Keep
    + i" N' T7 X( z8 G, M
  893. DEX8 a0 e5 h! s9 O5 v
  894. BNE Key_Value. Q5 T+ U7 E" D/ }6 v% E
  895. RTS
    2 K4 S6 Q% f3 `9 R6 K, l

  896. 3 N9 b9 p3 y7 [& s! s" S
  897. ;==============================
    4 A# W1 F2 E  }( T; b" M
  898. .IF SOUND_BAR_SHOW_ENABLE8 c: B- g: m/ [# R- N- y* U
  899. ;音乐条显示
    9 L5 T* e$ O! K2 K: H
  900. Music_Vision
    2 ]/ X9 E! u/ O6 R' r& G) L8 e
  901. LDA <Text_Disable_Flag
    ' w$ f/ u3 A( a2 b3 n% l
  902. AND #TEXT_DISABLE_ITEM' k5 V. `& u8 p# \
  903. BNE Music_Vision_End
      n% e! ]  F& X
  904. AND #TEXT_DISABLE_BAR
    / Z- u) R8 Y4 S, L' s4 H( s  Q' t
  905. BNE Music_Vision_Set. c- i5 q+ q! x8 V2 x. Q
  906. LDX PPU_Cur
    3 y9 X0 w! w2 K/ i8 a* o5 w6 W
  907. JSR Music_Animation% z3 h2 {  e4 f- C7 L
  908. STX PPU_Cur: D- f, q" v/ m) O
  909. Music_Vision_Set7 g  f% x0 U8 ~! j6 b
  910. LDA <Text_Disable_Flag& k- `! `: U  U! c; ^- G9 ^2 g
  911. AND #TEXT_DISABLE_BAR ^ $FF9 ]& `" w  k6 O# h8 i+ w2 N
  912. STA <Text_Disable_Flag
    & l/ T6 k' p7 p5 _; ^$ X% r
  913. Music_Vision_End7 d% l8 k6 a0 l+ ^% R, g
  914. RTS
    ( l8 U* G3 Y. m5 ]' ~( ]/ n* m$ a
  915. ;------------------------------9 g; _8 s  s5 ?, O
  916. ;音乐条显示处理
    $ s+ m, V" @/ |- b& U
  917. Music_Animation
    * N( h8 s* d2 a5 S" }; t- ^% @# }& e
  918. LDA #PPU_MODE_CNT_LINE
    . n* M' x9 l9 w5 A4 R* ?
  919. STA PPU_Addr,X
    . D5 ?* ]) B' r5 Z
  920. INX# E0 y, _1 x( h  l  O6 x
  921. LDA #HIGH(Sound_Bar_Pos)' S& f8 S' l# {$ E, R" b
  922. STA PPU_Addr,X0 |7 c# I1 Q% ^6 T. ^  t4 q) u; w
  923. INX
    + A  ]" \4 N1 Y5 e2 D
  924. LDA #LOW(Sound_Bar_Pos)& ~, b& A/ q6 Z; N9 ]  E( {* r
  925. STA PPU_Addr,X7 m" g) C+ X1 t- N; m/ j* X: R: t. b
  926. INX: |( K4 V; P8 z4 u3 q' ^! k
  927. LDA #$082 l) r1 }% A7 J
  928. STA PPU_Addr,X
    * v" Z8 X* y. a$ e3 n( w
  929. INX
    ( I5 B, J: S- ]3 z9 P0 E! ?# Z' h
  930. LDA Sound_Bar6 i& x5 g+ |1 ^/ N
  931. JSR Volume_Convert
    4 t2 C& @+ Z$ S/ b& Z* h

  932. 0 I+ g7 W- G% O6 G
  933. JSR Volume_Set_Cnt
    , z( a, H0 G; [. X2 f
  934. LDA Sound_Bar+$4
    % a1 I& R( W- }7 w7 Z
  935. JSR Volume_Convert6 L$ w# L! d6 l6 t

  936. 4 T$ @% Y0 f  Z7 P" K* x7 U, x
  937. JSR Volume_Set_Cnt
    - Z8 L1 {% L9 K6 s, h0 A
  938. LDA Sound_Bar+$8+ u$ E5 U; b1 l( j% ^; T
  939. JSR Volume_Convert8 t& \  i/ i3 g- w# G; |* {7 u1 ]

  940. * I, ]! O( E9 g- l
  941. JSR Volume_Set_Cnt0 N* O, x' x9 r: [: z1 J9 k
  942. LDA Sound_Bar+$C3 S( I, R1 [* X# Y2 z; s
  943. JSR Volume_Convert
    / ~, L9 i& c2 H$ Y
  944. ' Y; Y: m, N- P# ]( S# D
  945. JSR Volume_Set_Cnt  n- L$ m& a4 D6 C; p
  946. 9 l) g5 T7 T% \4 n# b) q
  947. LDY #$10+ K: c% s5 d% B, l; o: p3 e
  948. LDA APU_STATUS! A% Y! q! ?3 H. L+ G
  949. AND #$10
    $ J" e3 s7 T6 S' X4 i. F
  950. BNE Volume_Count) M- ^) D* w) E, b1 B
  951. LDY #$000 s: I# P2 M. p! r3 N2 j4 @
  952. BEQ Volume_Count9 X3 Z& A4 A, @7 n2 x/ n

  953. 7 `: S& x  f: @$ m
  954. ;------------------------------
    7 w* |0 V4 z2 m3 |$ `. E/ b
  955. ;音乐条处理
    % G6 _0 p( Y, @
  956. Volume_Convert
    8 K5 m# @& {+ v) E3 k9 U# r
  957. AND #$0F0 M# C+ F- g4 g  W4 @* ]4 t1 T
  958. TAY
    7 a6 M3 `; v2 ^1 h1 L
  959. Volume_Count/ ^8 a0 C- q$ ~/ |; ?4 {
  960. LDA #$08- ^" v8 i' L9 e8 O8 \# i% M* f
  961. STA Sound_Bar_Cnt
    , @. l& C" s" E/ F" t# _
  962. Volume_FILL9 j1 k. X1 G' ^0 i
  963. DEY2 _4 S5 M+ @5 Q  b
  964. BEQ Volume_Half
    - z  J3 X# u* L% F
  965. BMI Volume_Empty
      h% r$ W0 r3 q4 r% Q1 D
  966. DEY# d. X! G* J5 P2 E6 w  w1 F
  967. Volume_Full1 i: c$ t) F! b5 M; \; ~
  968. LDA #$16$ j& X; B, N, H. Z
  969. BNE Volume_PPU1 h  A' d" @4 J: S
  970. Volume_Half- n- q9 Z! {) I& i
  971. LDA #$154 }. X7 U2 G$ D" u
  972. BNE Volume_PPU
    6 v# _; Z1 g# t" u3 e- N7 ]; W
  973. Volume_Empty9 H) ~) U# \4 d7 Z) k1 L
  974. LDA #$145 K! n8 q. u2 n& _5 l
  975. Volume_PPU" E2 C6 F. G0 B
  976. STA PPU_Addr,X1 d3 W7 r2 X2 b# O
  977. INX# X" n; p! i2 ]6 v! L# U7 L
  978. DEC Sound_Bar_Cnt" W4 J5 }* Q& g* m) r5 s
  979. BNE Volume_FILL& L8 q& l* U) _3 D: q2 g: H
  980. RTS( e8 z+ H2 z! u2 ^( I
  981. 0 I" m1 c3 {' k. g/ y) l5 r
  982. Volume_Set_Cnt0 r9 `$ o: J  t
  983. LDA #PPU_MODE_CNT_LINE_NEXT5 u. z6 H3 G! [$ c) Z
  984. STA PPU_Addr,X8 A3 u# j' c5 }+ O$ F
  985. INX5 y4 ~7 M: X+ b8 X5 E
  986. LDA #$082 K; b! @) |! m' O" M# r
  987. STA PPU_Addr,X7 x" M" U; m; B# |/ m/ M
  988. INX
    ; l( M, P. z" \7 s' T! |
  989. RTS
    : @4 \% H3 n0 X. l: G

  990. ( q3 G  e0 D5 l- _! r# ^3 Y
  991. .ENDIF4 o9 W5 y! ~# ]
  992. & E; m) Z% L3 t4 v: O: \1 _
  993. ;==============================
    - `- w* U- g$ z
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入
    " [; k" |& f# r1 ]! n8 s9 H' K
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式
    2 P! A8 y5 n7 Y9 u
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除
    - ~, @/ B( e& Z" K
  997. ;------------------------------5 W# h- N' U% u  E1 g4 G' U% E0 P
  998. ;PPU处理& l0 k6 H  n' v
  999. PPU_Proc& r+ \, f" d- o0 Z; k
  1000. LDX PPU_Cur
    3 v. o' u* x3 g
  1001. LDA #$00* A7 V; D. Y7 @  }
  1002. STA PPU_Cur3 }1 ~2 f! ^* c+ v! G
  1003. STA PPU_Addr,X+ a& q' W2 O  q2 z4 z+ L# m
  1004. LDA PPU_Addr% d+ w: S' M2 t' l0 \
  1005. BNE PPU_Proc_Beg( V+ `/ b% x5 `6 @/ H/ J
  1006. PPU_Proc_Ret
    + c! c! G" M/ R4 d* ^  m/ s$ K3 }- h
  1007. RTS, @) s. s' @4 }

  1008. ( T7 ?+ {7 t! I  p! d' c- B
  1009. ;------------------------------
    & K2 p; i, W9 @1 r2 |- A
  1010. PPU_Mode_Return_Cnt  ;转下行模式
    . c/ |* U9 E) N6 _7 p/ F9 t( ?7 h+ v
  1011. INX4 d# P( K3 N3 y
  1012. LDA PPU_Addr_L
    ' ~; U' h0 `8 B7 \4 U* b1 W/ X5 W5 M" D
  1013. CLC, S( N* ?( R, B# w/ W
  1014. ADC #$20. ^' z% d" C, p- C
  1015. STA PPU_Addr_L4 y' g9 p4 y5 q) t
  1016. BCC PPU_Mode_Return_Cnt_End' _! F% `! N! ?5 U3 g' x5 F/ p% Q
  1017. INC PPU_Addr_H  ~/ ?- y; D, z% i$ v6 E/ H
  1018. PPU_Mode_Return_Cnt_End9 V6 e8 ?' m+ e& m, k; T2 g  J
  1019. LDA PPU_Addr_H
    $ k  l: W3 w! o( U! H4 @
  1020. STA PPU_ADDRESS4 i( L0 P9 {2 p% ?+ S' b
  1021. LDA PPU_Addr_L4 o3 h. n$ Q" l, d9 i
  1022. STA PPU_ADDRESS! D& ~0 {7 [+ L; p4 |
  1023. LDA PPU_Addr,X) }; J5 w! ~/ I; }% K
  1024. TAY
    ; p0 X6 [/ z$ k/ B# ?: x1 P( p: z# B
  1025. PPU_Mode_Return_Cnt_Write. a; n: S2 {7 [+ n
  1026. INX9 _5 D6 V1 P" i* ?6 V
  1027. LDA PPU_Addr,X- J# Y+ H. p8 p, \* X4 V4 p
  1028. STA PPU_DATA
    2 a7 [2 d1 U( Y7 p; n- Y
  1029. DEY
    . A! E3 r1 ?" q% T$ @0 o. c
  1030. BNE PPU_Mode_Return_Cnt_Write
    * |: s' k) _# @$ B  S3 p
  1031. JMP PPU_Proc_End/ e5 h% T! p. `# m- D% U
  1032. & D& A! J3 i/ n. B$ g# R' p
  1033. ;------------------------------
    + ?5 c$ w& P% A5 X, j. V
  1034. PPU_Proc_Beg  ;处理开始
    9 U5 U! ]+ f; j0 `9 U. z9 P
  1035. LDX #$008 _* F) h0 o1 }7 v9 t7 K$ `
  1036. STX PPU_MASK
    5 d' R* f8 A# f3 l( e% F
  1037. ;------------------------------5 o  P- Q7 f; _3 m
  1038. PPU_Mode_Select  ;模式选择
    & T; ~1 D; \3 ]3 h' A0 J6 t
  1039. LDA PPU_Addr,X
    7 N( ]% U, r2 ^9 q( n
  1040. CMP #PPU_MODE_CNT_CLEAR7 m4 A& c) I) P$ m+ M% P
  1041. BEQ PPU_Proc_Clear
    - ^2 U4 ^6 a  _8 v
  1042. CMP #PPU_MODE_CNT_LINE
    " y1 _7 m7 |- u- ]$ l" b9 h/ l
  1043. BEQ PPU_Proc_Cnt_Line
    9 w& U% u4 N+ M6 J* m8 Y- J" ]
  1044. CMP #PPU_MODE_CNT_LINE_NEXT
    % x; ^1 Q4 x. U$ B% \: N5 e
  1045. BEQ PPU_Mode_Return_Cnt9 a: [0 R& O$ }$ E
  1046. JMP PPU_Proc_End_Write
    ; B  A7 D. f: L6 w; _
  1047. ;------------------------------  {: q  M* g) V) {" h# k9 `
  1048. PPU_Proc_End  ;单行写入结束
    - y: c: A2 O3 x/ H" i: c7 P: ~. a
  1049. INX7 G+ I: G7 ]% G( y
  1050. LDA PPU_Addr,X' N3 X9 q1 @  x7 g! c. S; V
  1051. BNE PPU_Mode_Select7 x) I$ k# ~. m, T/ F
  1052. STA PPU_Addr7 n1 l( J1 r: u* b" s/ i6 L
  1053. JSR Update_Palette_Color4 I3 L' i& j: e# k) G, m4 A+ o
  1054. % B( W/ s& X; y% c" p! S. j
  1055. PPU_Proc_End_Write
    6 B6 x( p% w$ g- d% A/ I8 g
  1056. LDA #$00
    5 [2 f7 S% p' m* f. D) s" |
  1057. STA PPU_ADDRESS& K7 f0 u6 G9 Q- U
  1058. STA PPU_ADDRESS
    1 B9 U- k8 t; O+ M8 h9 }
  1059. LDA <Text_Disable_Flag8 G3 H7 j7 }" X
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF, f: ?7 d$ f  F" v
  1061. STA <Text_Disable_Flag
    % M! L& n2 `5 x% d
  1062. LDA #Scroll_X
    ( @9 D3 W% D- g  F2 H0 d: a+ f
  1063. STA PPU_SCROLL- S- `! ?; K1 @: O1 j& W1 _
  1064. LDA #Scroll_Y
    + i+ a- k! g' V
  1065. STA PPU_SCROLL" ], @) M9 P) {# Y& \' U# l. b( V
  1066. LDA Screen_State9 M) r' ?/ t% s
  1067. STA PPU_MASK
    $ }: e: U' m6 ?( [$ e. W
  1068. RTS$ m; ^' p; x( o5 I9 ^
  1069. / F* r6 ?5 D* E) U, T( e
  1070. PPU_Proc_Clear3 _2 _+ P. c+ T. S0 `7 r/ z' j
  1071. INX
    # T' L( ?( H% [7 O4 U7 b
  1072. LDA PPU_Addr,X7 s5 x* Z) f5 f$ o) T
  1073. STA PPU_ADDRESS4 U# \2 C% e9 Q' y3 C
  1074. INX
    / j, Z: x$ r/ R( S; D8 `" y7 ]
  1075. LDA PPU_Addr,X2 O$ \+ T5 e8 ~; d& K0 }
  1076. STA PPU_ADDRESS% ]2 ~. d4 v1 t) P+ O4 T& {$ f
  1077. INX
    : S4 B3 `% ^: {4 I, E9 r5 {7 L* l' f. x
  1078. LDY PPU_Addr,X
    0 k- d1 o, ?) I( C. P
  1079. LDA #$00
    4 D4 ]$ n6 M) X/ F
  1080. PPU_Proc_Clear_Write
    4 ?* h2 m# U) B& z8 d
  1081. STA PPU_DATA7 x& A+ D/ P# |- n6 p1 x3 s
  1082. DEY& x+ M2 F" _$ A7 ?! ^4 Z7 a
  1083. BNE PPU_Proc_Clear_Write+ \1 {2 C/ G5 Z$ f) d
  1084. JMP PPU_Proc_End
    $ c# q: i6 L- I/ m' p
  1085. : T7 ?0 L# ], G- \
  1086. PPU_Proc_Cnt_Line
    ) S0 z: M  V9 c$ x* V
  1087. INX6 Y0 B" ?# r) U& v2 y4 v
  1088. LDA PPU_Addr,X
    & ^" A. F' f  U! d8 w' g- |
  1089. STA PPU_Addr_H6 v+ c* Y+ X$ o' Q( U9 p
  1090. STA PPU_ADDRESS
    9 o4 ?. o( i. ]/ [0 w
  1091. INX
    . G0 g  c& N( o9 c, ~
  1092. LDA PPU_Addr,X
    - Y- A7 w. t/ c% f. V( T
  1093. STA PPU_Addr_L) E- B; E( j0 ?( v4 n
  1094. STA PPU_ADDRESS
    % b% m& S) V; ?0 P. R: Q; r
  1095. INX7 o+ n3 H! w/ h% k0 h& Z( a
  1096. LDY PPU_Addr,X
    ! q4 L3 e* Y; v1 e- c$ j+ u
  1097. PPU_Proc_Cnt_Line_Write
    3 P  e$ j6 e% X" D% }+ r0 T
  1098. INX
    5 v6 \/ O9 B* P. S
  1099. LDA PPU_Addr,X
    8 @6 i) C7 @" T0 n3 I9 C1 F
  1100. STA PPU_DATA4 v; M; G& ^& N6 U' M& g8 z5 O
  1101. DEY( x4 @8 \; w7 b" ^* U, K4 N
  1102. BNE PPU_Proc_Cnt_Line_Write
    4 \! ?4 K) u4 a" L. d3 {  q
  1103. JMP PPU_Proc_End% ~# s% P4 u7 `: X  ], H# s
  1104. 4 J% p) c5 d( N( B
  1105. ;==============================/ |9 ^. Y  X+ Y; E
  1106. HEX_To_Dec;十六进制转十进制# R" Y4 V( ?" @( h! x
  1107. STA <HEX_Data
    7 m, o+ S7 d+ |0 r. Q# f% j
  1108. PHA
    ; a+ u- e! J- U$ K% b) \
  1109. TXA$ N$ \. k; |9 b7 n
  1110. PHA
    0 V8 i5 g% E1 t) _6 C0 y
  1111. LDX #$00; W& v/ a& D9 Q4 x5 c( U6 X  b
  1112. LDA #$00
    & |9 ^# Q, V3 o- w* Z( b2 R
  1113. HEX_Cln
    0 g. j+ m5 X! d  u! a* R! G
  1114. STA <DEC_H,X2 C0 s' m: P: k" w; v# ~3 |& z
  1115. INX
    ' x% l" ~: f4 _- n7 o5 T
  1116. CPX #$03, o3 C" U  `  _) d; F. K5 x6 ?
  1117. BCC HEX_Cln" Y% Y$ Y5 t: W6 c: k4 H
  1118. LDA <HEX_Data
    , b2 P6 S0 v+ d& z% v
  1119. ;------------------------------
    ( I' ~; a0 {6 `" @( z: p: ~" f
  1120. HEX_1005 S6 B8 x1 ^6 j$ Y2 C; t
  1121. CMP #1008 G# H# l2 U9 ?" ]- k6 `, P
  1122. BCC HEX_10
    2 y+ K. U$ H1 T" m  F) y8 F; Z: v  B- W
  1123. SEC
    ) f$ X9 ?/ g" y
  1124. SBC #100
    - W$ y0 k4 }# i  U0 V# t0 O
  1125. INC <DEC_H
    + s" h0 K' y) r" L: D- C% L
  1126. BNE HEX_100) d7 p) |( ^/ l. k4 @0 `0 x& T" W/ k
  1127. ;------------------------------4 G' S% i2 H5 J; ^1 V, T$ ~: o  R2 v
  1128. HEX_10
    ! u, y9 E; S8 j2 l4 Z
  1129. CMP #10; G1 ~; s# D+ j/ c& F& n
  1130. BCC HEX_10 ]2 ?4 \4 g% A
  1131. SEC
    : E% V/ ~! W( q
  1132. SBC #10  M5 B0 z% L5 t, v; J- a0 T6 q( M
  1133. INC <DEC_T
    2 s9 p$ [6 d4 U: k: [# d# o7 e
  1134. BNE HEX_10
    , S: T* e; j2 |2 X: }2 A( ~
  1135. ;------------------------------1 o5 U0 X% L% o$ e
  1136. HEX_19 T! A$ f; t0 p9 l" _9 `
  1137. STA <DEC_L& [" ]- H: H1 A) O
  1138. PLA
    # m- k# |, a; i# Z' N. p
  1139. TAX
    - X9 j9 ?( n5 X1 x8 Z' @
  1140. PLA
    0 r4 b$ D7 c; c9 u. q+ M$ O
  1141. RTS5 s. z4 q1 T# C. t4 [

  1142. 2 _( k% M, B, w
  1143. ;==============================/ R; `% k! H- v
  1144. ;音乐曲目显示! m. Y/ A4 E5 E$ T
  1145. Music_Show
    2 Y# v0 ]( H# k8 ~' @
  1146. LDX <Music_Item_Cur
    7 O' v- L0 {. ^3 Z3 v! N
  1147. LDA <Music_Cur,X
    2 o) H; e* o' I1 e' F/ N# k
  1148. CLC
    8 o1 M9 W2 k6 K0 _& [& W
  1149. ADC #$012 g  U# ~7 K+ p# f5 S
  1150. JSR HEX_To_Dec' Q5 d' L9 W2 p7 m" K% f
  1151. LDX PPU_Cur4 P. G% c: c. f# |- s2 c$ Z
  1152. LDA #PPU_MODE_CNT_LINE
    , e( P2 A6 X! X3 x/ T
  1153. STA PPU_Addr,X
    , F( Z# Y0 a6 O/ [  S* O4 @
  1154. INX
    0 Y1 [( k! \' h/ \  g
  1155. LDA #HIGH(Play_Index_Pos)0 S) T4 K+ _7 @# i2 X
  1156. STA PPU_Addr,X6 W2 U( K% B. S5 t( p1 Y9 j
  1157. INX) P4 V/ W% Q9 m& d8 q5 L" r
  1158. LDA #LOW(Play_Index_Pos)
    - ^; s. B8 A8 g" c9 Y8 M
  1159. STA PPU_Addr,X4 f( Y4 V( j7 C! \3 B1 W+ I
  1160. INX
    6 y& ]7 F, J+ y6 i6 Z

  1161. 9 _& c7 v+ }! G5 G* d% z2 v0 Q
  1162. LDA #$07
    ( ]8 o. W, E* s4 [% g9 a$ _$ o
  1163. BNE Music_Show_Length4 l6 h# D2 _  ~# X6 F- R" X# Y2 V

  1164. ; J: w- o+ N9 |
  1165. Music_Show_Length5 J% `) y) w( S  U" m8 ^: ?2 R) |. Y$ R
  1166. STA PPU_Addr,X$ S. M" V! G! X, ?' k! Y& v
  1167. INX
      m3 C% e- B, V; V# j# ]
  1168.   n& X  j* a5 ^5 s. L/ S
  1169. LDA <DEC_H
    : x, j! Z" \4 L5 N1 h8 P
  1170. ORA #'0'" R8 Q2 h$ Y/ ~
  1171. STA PPU_Addr,X
    8 F) z" C5 L7 G1 E
  1172. INX
    + Z( j0 y+ w' [3 U) C9 r& H
  1173. - O" u9 X0 q& A8 S8 l. b+ O
  1174. LDA <DEC_T- G! w0 v' U( z' f, ]
  1175. ORA #'0'/ x0 C" j! H" p4 s# o6 m- I
  1176. STA PPU_Addr,X  X5 \+ D. [- u5 ~
  1177. INX
    7 G  F- E/ d1 W; h' ^$ {" j
  1178. / F' a" l, K+ k8 w" V
  1179. LDA <DEC_L
    5 Q8 f- s1 |7 l) f" |4 r
  1180. ORA #'0'8 ?8 c6 O3 Z" c' O
  1181. STA PPU_Addr,X  B5 {: q1 ?  m6 L; G
  1182. INX: _; A5 i. V2 D* X/ n# Q# q
  1183. 4 J$ ~/ Z0 z( S
  1184. LDA #'/'
    " z; W; S! o/ H' E9 C3 t8 j( e. V
  1185. STA PPU_Addr,X
    3 Z5 j. q4 C: R6 Q$ f0 W/ ]
  1186. INX
    , y$ a& h8 e( l( B  w1 r
  1187. Music_Show_Total# P0 {1 R- ~0 n- M
  1188. LDA Music_Total
    ! M1 B$ ]( G4 ^5 {4 a
  1189. CLC/ K; p, ?+ q" [. W4 |* x0 R
  1190. ADC #$01' w2 S# W5 S/ Q: Z' Y) @1 r
  1191. JSR HEX_To_Dec* M( Q! _2 g, p; j* ~

  1192. - y0 V% h) p, V9 f" h* W
  1193. LDA <DEC_H
    8 ?+ T# l5 V" C$ S, `' I
  1194. ORA #'0'
    2 p* m; }9 j9 M' O0 E
  1195. STA PPU_Addr,X
    + j. n  V: }! Q' a3 z
  1196. INX, t$ z, n; j  {
  1197. ) |) `* H9 T  ?1 C* b2 G& t
  1198. LDA <DEC_T
    * g8 c) I! }+ r5 X( O4 x3 _
  1199. ORA #'0'# {( C, e4 E. k4 Z- L
  1200. STA PPU_Addr,X
    , C0 m. v8 v/ l8 N
  1201. INX1 Z( v$ _0 P" |2 z' u5 y6 G0 Y

  1202. 2 d. W9 C+ R, _: Q5 V
  1203. LDA <DEC_L
    2 \* P2 U% q) B# z  ]4 I. z
  1204. ORA #'0'
    0 j0 S& Z. T; N+ k
  1205. STA PPU_Addr,X2 g' A  [* R8 I' n2 |# r8 u
  1206. INX
    5 V7 s0 y" ^5 w: n

  1207. 5 f  V, i1 v/ M5 `( z7 Z, L
  1208. STX PPU_Cur
    & w+ S. z; Y* D7 h& V
  1209. Music_Show_End8 I- q( t) a& \0 N( u8 U; C' Z
  1210. RTS
    " W8 W! v9 W' {9 H

  1211. ) @0 y( w1 \4 |: b
  1212. ;==============================/ X! G9 H; L1 z" c8 F
  1213. Time_Show;播放时间显示  N# ~  c3 t8 E" L) t
  1214. LDA <Text_Disable_Flag; e! d4 D8 r- W8 e$ `9 W* ?' q$ i
  1215. AND #TEXT_DISABLE_ITEM
      v' s% h. r5 [: y
  1216. BNE Time_Show_End
    : E( X  b" z$ o6 v
  1217. AND #TEXT_DISABLE_TIME
    . D# s0 Z9 }. D0 t+ s
  1218. BNE Time_Show_Enable$ L8 M" g% c6 Y+ `

  1219. % M; E+ k0 X$ B
  1220. LDX PPU_Cur/ ^9 U( N! F& A, l; l
  1221. LDA #PPU_MODE_CNT_LINE
    # B9 h& ]5 j/ C2 E
  1222. STA PPU_Addr,X
    # K: U/ F2 N* r, C/ D
  1223. INX5 R+ z, x' [9 D8 T' D6 m/ ]
  1224. LDA #HIGH(Play_Time_Pos)! ^, s6 U, ~: I( b8 A* s5 K
  1225. STA PPU_Addr,X4 y& O$ F6 c7 A9 u# _
  1226. INX
    & S. M* Q( r' E8 p# `/ u
  1227. LDA #LOW(Play_Time_Pos)! H2 h; T$ n: X9 M2 ~
  1228. STA PPU_Addr,X* W. ?8 B7 k: l
  1229. INX
    ' b4 \* L# {! I- H) N0 R) r3 V7 W
  1230. LDA #$08
    ! G8 U9 t( O+ W
  1231. STA PPU_Addr,X8 d5 j: T" z, b4 f) g
  1232. INX
    - S- K4 U, l  [
  1233. Time_Show_H
    5 H! r! \8 e7 ]6 H9 u
  1234. LDA <Time_H
    " g7 M! V. v9 u" R( L0 }9 \
  1235. JSR HEX_To_Dec- n, A' m9 M" s5 R! F- Y
  1236. JSR Time_Digit
    5 B3 O$ \0 T0 d
  1237. LDA #':'" z3 I5 x5 L, ]$ i" {
  1238. STA PPU_Addr,X
    & u: N( B4 y* G9 v
  1239. INX
    ! P$ ~4 X9 o. {2 x$ B9 k# b
  1240. Time_Show_M/ X; F1 i1 w' @5 x  n& ?/ l
  1241. LDA <Time_M
    5 F* K0 v; S8 a/ {% f/ t
  1242. JSR HEX_To_Dec5 p- Q# c2 O  N- W2 }7 `
  1243. JSR Time_Digit& {' k% S: u7 K7 m8 Y/ ?
  1244. LDA #':'
    ( Z$ \' ~7 q% P
  1245. STA PPU_Addr,X
    $ E* p; _% m0 L! ^4 K6 ~1 p
  1246. INX
    * P% I  y* P: Z
  1247. Time_Show_S4 x6 p4 p0 p0 c- v$ b
  1248. LDA <Time_S3 m) }) |7 A+ K7 A
  1249. JSR HEX_To_Dec! W+ c* V; z, \9 o
  1250. JSR Time_Digit
    " L: I4 W: I$ N+ G
  1251. STX PPU_Cur
    # h& ^; I% L  \* ?/ ?( d
  1252. Time_Show_Enable. `2 Y5 p' x8 j! o# Q
  1253. LDA <Text_Disable_Flag- f( k8 J( S) \/ a
  1254. AND #TEXT_DISABLE_TIME ^ $FF
    & W) u1 I5 X8 c7 x6 K; J
  1255. STA <Text_Disable_Flag% I" N0 M& d/ m9 q9 p
  1256. Time_Show_End
    # p, R4 _  k7 {( M% T4 T. c
  1257. RTS. b' K5 ?" i5 k2 S5 w* L- A
  1258. + q# ?3 R7 Y+ _: E5 c; \
  1259. Time_Digit& x  U9 J7 W- W- |
  1260. LDA <DEC_T
    : N$ h# B  _4 B3 Q% f6 r5 K
  1261. ORA #'0'
    5 V0 j# l# a# _. ^
  1262. STA PPU_Addr,X
    " K4 P5 z9 P8 g5 Z5 }( {) I: h
  1263. INX+ s. M; t3 P+ N
  1264. LDA <DEC_L8 k3 M+ a* l+ c$ h
  1265. ORA #'0'
    $ V) d" H9 ^0 w: I" `, ^# x8 }5 R
  1266. STA PPU_Addr,X
    : M7 e/ A  [7 X* \: S7 ?/ s7 w7 T! s
  1267. INX
    / u& a; W) f2 z
  1268. RTS
      A6 T. q) A, c2 D% K5 n

  1269. 5 C5 a; j( i, K; F9 M7 F( a# p0 q
  1270. ;==============================* c5 C) L  M6 w: a* Z5 h# y
  1271. Time_Count;计时
    5 M# W! \. u5 b! s7 L7 L
  1272. LDA <Music_Stop_State
    6 s, ^; {! Z/ c1 G2 ~
  1273. ORA <Time_Wait_Cnt' N% \' d3 \; G4 }5 r
  1274. BNE Time_Count_End; H- M4 I' m( a, w. V
  1275. INC <Time_Cnt: V& s9 q) I/ Q3 E
  1276. LDA <Time_Cnt
    ; J* m" h  R, b4 w/ o
  1277. CMP #602 j: S/ {7 {( f
  1278. BCC Time_Count_End$ `, l) \9 R0 ~1 x0 Q% U7 D, y
  1279. LDA #00& ~8 U, l# g, p3 ]3 T
  1280. STA <Time_Cnt
    % r3 O4 T1 N% Q1 |
  1281. INC <Time_S. h1 |/ r" T5 h# F- M# D0 G3 ^- H

  1282. * ]; J2 Z; T8 U* J2 y; Z4 K$ k
  1283. Time_S_Cnt4 C4 {* y! s8 d% w4 s9 P
  1284. LDA <Time_S- v& }7 b" q7 |7 m3 t
  1285. CMP #604 V; {2 M. u' P2 I; a
  1286. BCC Time_Count_End3 {. a5 _* f6 A
  1287. LDA #004 ~0 j9 v* ], z
  1288. STA <Time_S! f8 y  w0 H0 k  o& {
  1289. INC <Time_M5 S' r/ L1 f3 M8 [" r! e% l

  1290. 7 @9 W+ f' c2 A1 f
  1291. Time_M_Cnt" J7 {3 A! [1 {! h( e3 p+ s
  1292. LDA <Time_M$ `% E$ L# J' Z' }( Q9 A/ i7 m- {
  1293. CMP #60
    9 G1 K. T( m8 Y- @" O
  1294. BCC Time_Count_End. P, r& f! G# S* e' }
  1295. LDA #00+ J) @# w& F1 [/ q( o" B6 a8 _
  1296. STA <Time_M
    / g% u# a' \. J" B
  1297. INC <Time_H! {+ E6 O* c% Q, v/ H7 m2 H4 q

  1298. . K5 p9 z- l% ?6 d
  1299. Time_H_Cnt
    6 |; a0 E8 b6 p: e- _$ R1 m
  1300. LDA <Time_H: i& r$ a% r9 w
  1301. CMP #24
    6 U7 [' t7 x( c* h
  1302. BCC Time_Count_End
    6 L, i8 I: H4 v' M
  1303. LDA #00' I! b8 `* G5 w4 u2 l, `) \
  1304. STA <Time_H
    7 F, p. N& Z( \4 s% F( m" G
  1305. * {4 D1 Y  F, j
  1306. Time_Count_End
    . j. M( x* `4 B& _- H! v( l: F  j
  1307. RTS- ~6 @" ]" g& s' }( w

  1308. ! m9 @' E. [9 P. W& V- D" g
  1309. ;==============================
    / `/ b" A7 h) l" q8 J
  1310. Time_ReSet;播放时间重置
    # Y$ x$ `6 B, P2 i
  1311. LDA #$00
    7 G- |( [3 Q$ E. O. x* y  Q
  1312. STA <Time_S, W1 q. C& y4 Q0 ]! h
  1313. STA <Time_M % |* O6 x3 c. D$ `2 q: q3 V
  1314. STA <Time_H
    1 Q! F( l& }/ u( h5 d
  1315. STA <Time_Cnt
    & G3 q  S4 [' a* i  Q0 i4 n
  1316. RTS6 v/ R& L) y/ B5 n, ^
  1317. - Y0 N7 V5 K% n' E
  1318. ;==============================% X1 J, m3 s+ J
  1319. Music_Bar_ReSet;音乐条重置
    $ m8 F$ M3 h( |
  1320. LDA #$00: q' w9 ?4 i: E  R6 b6 ]/ m
  1321. LDX #$00! V* v/ P! J, }* j
  1322. Music_Bar_ReSet_Set! p$ ~) h. B, s, L$ Z
  1323. STA Sound_Bar,X4 f5 S! D8 H+ E3 g
  1324. INX
    2 @1 e( n- X4 y2 a# f! l6 {
  1325. CPX #$10
    5 G3 V2 H7 a) j: i
  1326. BCC Music_Bar_ReSet_Set7 G+ F0 \. @; q" N
  1327. RTS+ l/ W4 \# H$ B: Q. x7 V7 L5 N) Q: W

  1328. ' i% E, G, I, u& m
  1329. ;==============================
    ; e1 O, C, j5 v
  1330. PPU_Data;PPU数据写入3 j! |8 F6 z0 T7 U1 o: W$ q
  1331. STY <Data_L  |" k* ]( `$ F1 I
  1332. STX <Data_H
    " r; \; [+ p2 B: o
  1333. LDY #$FF
    ( H, a6 p* N5 H
  1334. LDX PPU_Cur
    7 w) Q, k: Y0 c& O1 N
  1335. DEX
    $ d* `# H% O& g$ O0 z6 f3 S
  1336. PPU_Data_Beg
      F( u$ T( i6 C0 I4 d
  1337. INX8 c0 B5 x+ G4 s# x
  1338. INY( a) l+ k& @' B" S& G' ~
  1339. LDA [Data_L],Y9 F" G) P5 P# C& X# p
  1340. STA PPU_Addr,X
    9 Q7 T0 d4 S$ W8 Y4 q
  1341. BNE PPU_Data_Beg
      c4 r3 [" e0 ~+ ^& |
  1342. STX PPU_Cur  m$ O) a2 i$ F4 E6 A, m! M: a
  1343. PPU_Data_End8 i, }5 e1 w( R2 E) [3 F1 O; j1 N
  1344. RTS( p+ K, T4 ?6 x6 f& y

  1345. 1 w* S! y& h4 K
  1346. ;==============================
    7 d( c. |6 [# `) {% ]
  1347. Music_State_Show;播放状态显示& v; P" {- P+ y& n0 P( |
  1348. LDA <Music_Stop_State* K5 i$ e! f& G
  1349. BEQ Music_State_Show_Play% |/ K4 v% _% f) V- |- M& N# c5 d
  1350. Music_State_Show_Stop- A/ |2 l+ P8 Z8 W% x
  1351. LDY #LOW(Music_State_Stop)" r6 b4 {% R( S: P  w
  1352. LDX #HIGH(Music_State_Stop)+ m  x9 `. }  E
  1353. JSR PPU_Data
    4 D9 z" W, ?3 Q3 }4 R$ k2 F
  1354. RTS
    1 R! c+ h/ u; N8 B( J+ O1 C: V, [) k
  1355. Music_State_Show_Play5 Q: j: M' ~" R& J1 X6 F* G! @
  1356. LDY #LOW(Music_State_Play)+ t6 r1 o2 @9 L! ?, p  T
  1357. LDX #HIGH(Music_State_Play)2 \. l& B- a9 e5 b& b/ Y/ N
  1358. JSR PPU_Data
    % z% x! B- q6 Y9 w, E: M- Q
  1359. RTS
    / O8 d6 a1 K* |) r$ B

  1360. $ [! {. r7 W" m3 \* }
  1361. .IF SOUND_BAR_SHOW_ENABLE9 h# d/ M3 U$ E1 ~' |4 T0 r* D
  1362. ;==============================3 N6 L2 @7 f* \# N) ~
  1363. Sound_Bar_Text_Set;标题与音乐条初始化1 Z' S3 ^2 p% }, G. h
  1364. LDY #LOW(Sound_Bar_Text_Data)& J" l* r+ [; Y: e( e
  1365. LDX #HIGH(Sound_Bar_Text_Data)
    0 M  b7 z" @4 `' A7 {8 C
  1366. JSR PPU_Data2 M8 j/ c) v' z
  1367. RTS4 `( G5 m5 P$ K4 t# A
  1368. 0 |% b% U4 f) W& C* Q8 q
  1369. .ENDIF! b, B" V7 G# i* `& J+ [7 `- S
  1370. ( B& I6 ]" \7 K( i* p
  1371. ;==============================. K, r8 N7 j% L
  1372. Set_NameTable_Attributes;设置命名表属性6 x; x+ o. `( Q! `
  1373. BIT PPU_STATUS
    ' \! L* t8 G% O' v5 r
  1374. LDA #$23) C. b9 g- X# W
  1375. STA PPU_ADDRESS1 z9 F0 k% q5 V  Q$ g+ c) n; U
  1376. LDA #$C0
    7 Q, }) G" W7 h
  1377. STA PPU_ADDRESS1 ]% G" G3 Z6 A3 K) X5 o
  1378. LDX #$00( q0 t+ q' j- R9 z% w
  1379. Set_NameTable_Attributes_Write
    : s, h: F9 C  L$ m6 Y) u& b
  1380. LDA Palette_Attributes,X3 \" _7 W- q/ `: L9 R5 }
  1381. STA PPU_DATA/ S8 Y5 {7 U) |" @, Y1 {* L+ u# [+ i9 c
  1382. INX2 ?5 K4 ~* Y+ p, f9 O" {( ]
  1383. CPX #$40
    2 Y- A$ {8 L7 Z. y- w# v
  1384. BCC Set_NameTable_Attributes_Write
    / O& Z0 E% K2 y3 U
  1385. RTS
    * ?  `2 h/ |; @/ h1 |9 H
  1386. , M% l! h: |$ l6 \# m* q: s
  1387. ;==============================9 R$ X3 `/ S# C& `: T
  1388. Set_Palette_Color;设置调色板数据9 `, U. {' P% h+ ^: I  C: D% q* q
  1389. BIT PPU_STATUS6 K: T- \+ E5 W' D% m4 I% X
  1390. LDA #$3F  u8 X; q: u( T9 }9 o" H
  1391. STA PPU_ADDRESS) [  p9 d8 ^' f( d: @! ~  C
  1392. LDA #$00
    3 M- d1 g0 b" t5 N
  1393. STA PPU_ADDRESS
    $ v! M4 t/ M- b8 n3 x
  1394. LDX #$002 W* ^3 ~* [, V0 g6 P4 ?
  1395. Set_Palette_Color_Write- |: q# ~7 ^$ M* i: s
  1396. LDA Palette_Data,X8 E- ?4 d/ C( {9 D: z% b  _2 z; s
  1397. STA PPU_DATA" d. Z4 p8 h5 M
  1398. INX3 e7 C0 i0 q" x
  1399. CPX #$20
    1 _3 F( R% G9 t; [1 p# W' d# }
  1400. BCC Set_Palette_Color_Write1 i. d. s: r/ ]$ {
  1401. RTS. [* q, Z0 B( R( M5 I4 S

  1402. 5 N6 F0 h0 V! o0 v: t. Z
  1403. ;==============================( ~# T, v# O" N& F6 N/ Y4 A: a
  1404. Init_Palette_Addr;初始化调色板数据
    6 N2 s! ~' Z$ P( U* q
  1405. LDX #$00! H: {; @. j2 `: U) p+ U  {
  1406. Init_Palette_Addr_Write, H$ a+ J: c7 F
  1407. LDA Palette_Data,X+ C. f- y7 Y$ {, y" x
  1408. STA Palette_Addr,X3 b9 P8 T! A: s$ W; V# s
  1409. INX# x" L$ ^2 R1 c1 v; O3 W4 }
  1410. CPX #$20
    6 x8 P/ T- \: K$ h1 m
  1411. BCC Init_Palette_Addr_Write
    - u7 T& l8 ~. q3 I  V& z  D4 ]. G/ m
  1412. RTS: h2 N5 y/ s# J& _# ]$ r7 g; U
  1413. % z$ ^1 D, y& V$ z2 f2 }& X
  1414. ;==============================. O, ?, E% r+ r. r. P: t
  1415. Update_Palette_Color;更新调色板颜色+ O; T6 |6 {6 Y. {
  1416. LDA <Palette_Update_Flag
    ! j5 Z& ]2 W8 G  ]5 R# f
  1417. BEQ Update_Palette_Color_End. S$ l) t! d3 P  s9 u+ {
  1418. LDA #$3F8 @3 C8 a" J" u' Q8 O$ Z6 ~
  1419. STA PPU_ADDRESS/ t" F2 I- g. x6 G" M
  1420. LDA #$0C
    ' Y+ A3 h) K0 C( [; v) A
  1421. STA PPU_ADDRESS- O6 F7 U' D6 m, Q" ]7 x. c
  1422. LDX #$0C
    : m  q' f# U) S- ~$ L6 S
  1423. Update_Palette_Color_Write+ {3 j6 K8 K8 i* B/ K, W& @) L& W5 a
  1424. LDA Palette_Addr,X. m$ I. M9 [# t4 N' ?
  1425. STA PPU_DATA
    % r) ^* C' I/ U' K9 r& i
  1426. INX
    & w3 G. I  V+ U+ {& |( G+ A. R4 n
  1427. CPX #$14
    ! i; Y& {' d) V& }$ S
  1428. BCC Update_Palette_Color_Write
    2 p" V  B) Y: M  \9 i
  1429. LDA #$00
    * J  |8 l) H( m  Q. ?
  1430. STA <Palette_Update_Flag" _" O0 j, ^4 z4 f3 h) V$ W* [6 X
  1431. Update_Palette_Color_End
    0 P( z$ u5 l$ u' h2 D8 k7 h+ {
  1432. RTS
    / P/ R4 v$ ^( C

  1433. 0 j, N- G3 N3 D, q
  1434. 1 `  u- C+ R8 w, X& \) R, f
  1435. Update_Sprite_Palette_Data
    1 \8 o% w3 R) i5 |) Y3 _; Y
  1436. .DB $21. u4 @" A+ Q% F* P5 c
  1437. .DB $21
    ' m2 k/ N3 k" t7 _3 C1 B
  1438. .DB $11# u2 U) D2 Z' [
  1439. .DB $01: k  f$ u; B( O( O( G1 B: o' |+ o0 G
  1440. .DB $016 O, t8 r3 N$ v7 j# Z
  1441. .DB $11
      G8 O5 c! U. X( ^" H# V
  1442. .DB $21
    . o% ~7 m) l: j9 b/ j
  1443. .DB $21
    8 P: ?% F: {8 b& G7 o8 i; ^: C0 s- G9 L
  1444. .DB $11
    & l# T( r  @6 |9 j8 }
  1445. .DB $01
    4 B# C3 f0 n! j9 N) C4 o
  1446. .DB $118 M- w% T6 H' |2 e
  1447. .DB $21
    " N9 C/ {1 O( K! M5 K5 l
  1448. .DB $21
      d: U* C/ l( i' `( l1 \2 H
  1449. .DB $11) Z8 ?  i$ l1 y" C- n; g
  1450. .DB $01
    2 b2 ^, l, {2 V
  1451. .DB $11
    * l4 Y2 @$ H- H" k% D9 \0 P
  1452. ;==============================
    + z& r: X; A; u
  1453. Update_Palette_Data;更新调色板数据
    / ]" L+ ?  X& g  M- u+ z: F! ~
  1454. LDA Nmi_Time_Count4 r: J& H% d1 X, n& `7 |! F
  1455. AND #$083 t7 t. O2 [' d3 e  u
  1456. CMP #$08
    ; H) {" r9 V9 N3 `: e* b7 f
  1457. BNE Update_Bkg_Palette_Data
    0 C3 [7 |3 I: Z" g! l/ e
  1458. # b$ f7 ]# r2 E7 N. P7 l* G
  1459. Update_Sprite_Palette_Data_Set
    7 G4 h1 ~- K  z$ h/ L- A( O( I& R* o
  1460. LDA Nmi_Time_Count, A& T0 H* r' v& k5 g& H4 U+ S
  1461. LSR A& l6 e/ q( f: Z2 t( D
  1462. LSR A4 B7 r1 d) e8 F! I- O9 p+ ^
  1463. LSR A
    - b7 |- @6 ~, l4 v$ A( D
  1464. LSR A& s; l: v3 k1 h; E0 |& S
  1465. AND #$0F+ {+ V8 ~9 k/ L2 W4 ], r6 v
  1466. TAX. o9 L# I6 M- [. G7 Y( O; d2 j
  1467. LDA Update_Sprite_Palette_Data,X
    5 S  e# |* t8 k. f6 [
  1468. STA Sprite_Palette_Update_Addr
    0 s+ w4 u. S; h+ _5 l! {
  1469. LDA #$01' j8 O2 k! |3 `6 e
  1470. STA <Palette_Update_Flag! |, T0 }. U1 `* F, V& d; w

  1471. 4 K5 b; I, {/ W. ^: ]
  1472. Update_Bkg_Palette_Data% i& Z& q" \6 H' G2 g
  1473. LDA <Text_Disable_Flag
    ; U6 K1 D* r$ `  y, c
  1474. AND #TEXT_DISABLE_RAM) g, ]" B9 V7 s5 G" z
  1475. BNE Update_Palette_Data_End1 O) L% t( N2 O, Y
  1476. LDA <Music_Stop_State
      t5 ]0 n# k6 B% l( p
  1477. BNE Update_Palette_Data_End
    1 j; e7 j" L& V2 n8 r
  1478. 6 x5 d" l7 }" _* s9 D* L
  1479. Update_Palette_Data_Check+ {4 W, [4 P9 R1 a- i. d
  1480. LDA Palette_Wait_Cnt
    5 `1 G5 \9 X3 b& P2 c3 D1 Q
  1481. BPL Update_Palette_Data_Check_Over5 f' t2 Y# x' o; T; K
  1482. LDA #PALETTE_UPDATE_INTERVAL6 p! w( f9 O! T1 Q; t1 _7 c
  1483. STA Palette_Wait_Cnt
    5 V" ?& K+ Q( F9 l! {
  1484. Update_Palette_Data_Check_Over3 U, v+ ~1 W5 ^
  1485. DEC Palette_Wait_Cnt
    ( G5 }9 t9 L% Q7 D# I& j1 h9 \2 t
  1486. BNE Update_Palette_Data_End- Y  [$ i1 u6 f2 L  i

  1487. 4 t: T' j- Z5 e$ Q3 O
  1488. LDA <Text_Disable_Flag
    1 j0 _# V% h& x$ x) k$ [
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    + e; {* g/ ~# Z( _* L
  1490. STA Text_Disable_Flag2 a6 u: n! N8 L' _) ]3 h
  1491. INC Palette_Update_Flag( m- l( U" F4 {' }" r

  1492. 3 A- B% R3 ^# Y+ ]2 R- G
  1493. LDA #PALETTE_UPDATE_INTERVAL
    ; Q, G0 h+ x" P
  1494. STA Palette_Wait_Cnt% J! c4 ]7 a  ^) c( ?, r
  1495. . @5 L( u# P' O! L# n# Z; [( E: r
  1496. LDA Bkg_Palette_Update_Addr
    7 O; c6 J, z2 \( K" F( u
  1497. CMP #PALETTE_UPDATE_MAX' u% \+ B6 C  }  g* q, ~2 i
  1498. BNE Update_Bkg_Palette_Data_Set  J; m; q, p/ N- e- f% Y' l
  1499. LDA #PALETTE_UPDATE_MIN - 1
    ! I, [6 R. e/ c
  1500. STA Bkg_Palette_Update_Addr
      m% e5 w* B/ F* I: ~2 v$ ?9 U0 p- \
  1501. Update_Bkg_Palette_Data_Set
    4 _" T' a: C2 }6 j9 F
  1502. INC Bkg_Palette_Update_Addr
    4 U. I6 ~$ M% [: p
  1503. 6 s8 S" s8 i5 T5 U& {, j
  1504. Update_Palette_Data_End- }. n! l9 U% i( {! K8 d
  1505. RTS
    " p) }2 d. D; y3 b% j- U8 S
  1506. 9 |5 _. K* w2 Y
  1507. ;==============================  Y/ h  r1 l3 R0 \' q& W: v
  1508. Show_Music_Text;显示静态文本
    - H! C8 _8 v8 q# B, }3 s0 U( D) C
  1509. LDX #$00
    ( q' }1 }0 R, b$ z9 S6 u3 S1 @
  1510. Show_Music_Text_Set
    . e/ Z7 ?0 }7 a: b% B$ I2 w1 }, j
  1511. LDA Static_Text_Data,X
    : x9 F# N" ~; [* y* p
  1512. STA <Data_L
    & z5 t9 \) F6 L9 I' ^
  1513. INX4 o* {% q% b* R" R
  1514. LDA Static_Text_Data,X2 w6 r8 U5 x: b' r
  1515. STA <Data_H
    1 x# ]- ?: I& H
  1516. INX2 w2 d7 A8 p8 E' _' Z* J
  1517. LDY #$00& l% I1 L  T. y; g: T
  1518. LDA [Data_L],Y
    ' N- c1 t& L. a* c6 ?+ n* J: I
  1519. STA <Data_Cnt7 v& T0 Y; \: {
  1520. DEX
    & ~4 `  B6 F5 W8 l. w
  1521. DEX. J3 ^  |# N& E( S$ r
  1522. LDA Static_Text_Pos,X
    ; ?. u' M% E3 C$ F( b7 a. P- g
  1523. STA PPU_ADDRESS+ ]* L: {  x% {, V2 v9 N& J
  1524. INX
    2 p# R9 Y4 X* S; Y) W* e/ N
  1525. LDA #$20* f3 f5 A/ M# y" x
  1526. SEC# n5 l4 ]2 z$ g% e; h
  1527. SBC <Data_Cnt
    $ i( y" Q! d/ I1 M4 n3 m. E
  1528. LSR A
    + y7 {5 u  T8 K$ F/ {) t
  1529. STA <Data_Buf' R* ]0 J2 M5 J) K( \
  1530. LDA Static_Text_Pos,X
    , v* m7 `$ `$ N3 n9 R1 K7 u% r/ v
  1531. AND #$E0
    $ x( e! s: x: O  b( z
  1532. CLC: F: h; d$ v4 }
  1533. ADC <Data_Buf0 `! w6 H8 G9 }% R
  1534. STA PPU_ADDRESS  j, ~2 x$ `4 L6 w
  1535. INX
    8 m4 \$ D& n; {8 S( v! z& b# h
  1536. Show_Music_Text_Set_Write3 x3 s% @( [3 h1 q
  1537. INY
    4 S7 M9 c/ F: T; x
  1538. LDA [Data_L],Y) {1 K+ n: |' ?0 k6 I" z; |
  1539. STA PPU_DATA
    * ]2 Z5 p+ v+ H" @: `) ^
  1540. DEC <Data_Cnt0 ?1 z4 C& Y$ _2 h9 l; f
  1541. BNE Show_Music_Text_Set_Write
    - d' N9 ]; B2 R4 V# v( ~. E& R
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos5 U2 r% P1 ?. k$ b) C8 L
  1543. BCC Show_Music_Text_Set+ _" h) K. ?2 p
  1544. RTS
    ! z$ [) p3 }; V

  1545. * s; u4 ?% i3 q6 P
  1546. ;==============================
    - }' z$ p" Y3 f, Z; s, R4 K1 u1 J
  1547. .IF Track_Name_Pos;显示曲目信息3 {$ D3 `( @" Z! U# `1 i- F! {+ K
  1548. 0 G9 b7 L! Q0 t7 \9 g- a# }9 @
  1549. Clear_Track_Info( P& ^1 G0 Z3 [7 ?2 _; z7 U
  1550. PHA0 |3 @& G! w. {2 @$ p! [  |6 T
  1551. LDX <Music_Item_Cur) K1 O2 V: _( L9 O  c6 W: y
  1552. LDA Track_Name_Addr_Flag,X
    - y, l& K' D) y+ o
  1553. BEQ Clear_Track_Info_End_Ex
    # E% ]& [' u& S4 G' s4 H# [
  1554. PLA1 |0 P2 G7 S6 O: H8 r- ~

  1555. 4 [  v  t  O" H8 e  a  D
  1556. LDX PPU_Cur1 A; |; g0 f/ W% l9 u
  1557. PHA" L0 K/ h9 b+ Q! e
  1558. LDA #PPU_MODE_CNT_CLEAR4 e8 x' g8 b( w6 E
  1559. STA PPU_Addr,X7 N' [+ ~8 @2 i; \  j# a1 W
  1560. INX/ l& q. `; j: D* ?
  1561. PLA
    4 b8 |& T' N1 v- O
  1562. JSR Show_Get_Track_Name_Center_Pos. s8 S* h. P- h3 h: `
  1563. STX PPU_Cur0 v! U) D$ h1 x. ?; Q; Y
  1564. Clear_Track_Info_End5 {1 \' c, D2 c6 m7 D
  1565. RTS
    / |8 F. Z( S# Z9 U. E8 G* B$ \
  1566. Clear_Track_Info_End_Ex2 l7 J% V6 c# a4 q) f
  1567. PLA7 h! x( ^) B; B/ c; F/ Y
  1568. RTS" z: U2 y" s  P9 Z

  1569. - e" h# A& e' K% F# @
  1570. Write_Track_Info
    % y$ ~$ R- M2 h2 D+ ^
  1571. PHA6 K" H) Y" n+ g) P0 R
  1572. LDX <Music_Item_Cur+ o! E7 |" k2 r" t% ?$ c
  1573. LDA Track_Name_Addr_Flag,X
    1 r2 a! x- Q" x  \9 j- s
  1574. BEQ Write_Track_Info_End_Ex
    % \3 e2 J; ?' l) {, t5 t" F
  1575. PLA
    * m/ U3 r( M! j2 w- w
  1576. $ _# D9 c$ j* e8 T# a/ H
  1577. PHA
    " t7 n; _2 B. }
  1578. LDX PPU_Cur: i6 |* C' E" c; n6 I( l- l1 U
  1579. LDA #PPU_MODE_CNT_LINE
    1 Y* y: |2 ^8 k% _# X' ^
  1580. STA PPU_Addr,X& B  |9 E+ D+ U. ?8 _( D
  1581. INX; c- s$ D9 v, Z0 E0 J  r4 `2 n
  1582. PLA; L( h7 b5 A* u. L
  1583. JSR Show_Get_Track_Name_Center_Pos
    4 c% ]+ k) `* k- |7 H8 R
  1584. Write_Track_Info_Data; Y$ l! o$ V4 g9 q. V6 h1 F+ E
  1585. INY% u( e$ F3 V$ ?6 A
  1586. LDA [Data_L],Y* C- \  t" Q' ~6 V) Y( i$ H
  1587. STA PPU_Addr,X) v& a# n& j% O3 l
  1588. INX! s8 t3 |5 e4 ?) E( ]* s/ j* i
  1589. DEC <Data_Cnt
    / ~! h- k! |0 k1 N  D5 S
  1590. BNE Write_Track_Info_Data; M' v1 N3 B) F6 E
  1591. STX PPU_Cur8 t' B5 c# w* X
  1592. Write_Track_Info_End
    ; g; L1 a9 S$ C; m
  1593. RTS' s, p3 a! g1 i
  1594. Write_Track_Info_End_Ex- q5 @, ]& c& ?; J4 N9 H$ m: n9 Y/ z1 |
  1595. PLA6 y' ]8 i7 h5 g; g( Q! E
  1596. RTS1 V" `; ^+ }! Q
  1597. 0 L7 s& H: B9 v& k
  1598. Show_Track_Info. {: l8 V) l. K
  1599. Show_Track_Info_Clear1 `  d5 `: g8 C0 g
  1600. LDA <Music_Last7 T7 M7 K( e, n. K

  1601. * |8 S+ A2 Z2 S2 a- f2 g! A
  1602. JSR Clear_Track_Info& `) F3 ?# t" U* T7 H8 x8 `

  1603. 5 x# k8 P/ A3 X4 C8 w' |1 c( B
  1604. LDX <Music_Item_Cur
    ! t5 a) R+ G1 N# j  G# X
  1605. LDA <Music_Cur,X4 i) p! M6 `: s5 c# V) b
  1606. JSR Write_Track_Info
    5 c0 _' r7 k2 @' g& A
  1607. RTS8 X! Y' t/ \5 X
  1608. : D$ f! y1 ^" Z3 P3 T+ l
  1609. ;==============================% I& c- q2 J/ Y; `' v" G
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置
    , S4 K: p5 N) D5 e# z$ s' y
  1611. ) O8 e4 L3 A" d/ V
  1612. ;取出集合名索引
    ; W, {: y# C/ n7 w
  1613. PHA
    ; |+ l+ W* Q& J, l

  1614. & ?& h4 k3 H( O; `) ]' h
  1615. LDA <Music_Item_Cur8 W8 w/ c. X' e; }4 [3 a# e) g
  1616. ASL A! G) [% K4 z# ~- I" B/ H, `9 c/ I
  1617. TAY
    & X% y) B' S9 K( y
  1618. LDA Track_Name_Addr_Port,Y
    ( Q6 ^3 V# c# R9 z& m8 [( i7 n9 G; o
  1619. PHA
    9 Z/ }. E0 N5 e$ E' h. |
  1620. INY
      K4 D3 u$ ^3 j+ R5 [5 L
  1621. LDA Track_Name_Addr_Port,Y
    9 x0 z  X  I; W8 s, Y1 k
  1622. STA <Data_H7 W: D3 S/ i3 \$ P- z4 M
  1623. PLA% i! ^! f7 S# T" M& `' a# r
  1624. STA <Data_L9 D) }' b" _6 D! j
  1625. 1 Q3 h6 D# t' ?( C6 r6 ~
  1626. PLA9 }$ }2 g, q+ I) L+ ]) o
  1627. " J- y, w0 G( _7 h4 G( p& G4 n
  1628. ASL A! E2 n: I; T; g) b  R9 W, T/ f; L
  1629. TAY
    * a  G7 {$ X; C# Y4 T
  1630. LDA [Data_L],Y
    5 g1 A- c- d0 T+ _
  1631. PHA- L- ^+ r  A# n8 k8 N3 b& z$ D) E
  1632. INY
    & |  M# q3 v& o" ~! d6 F8 k
  1633. LDA [Data_L],Y- h# y) F# s/ E7 N7 _1 g
  1634. STA Data_H" O0 z5 e  Z" X% A& i
  1635. PLA1 Y1 |/ e% a5 d2 V2 p
  1636. STA Data_L2 C3 V# t. q  i. p/ V- }

  1637. : u1 o- D3 l2 s
  1638. LDY #$00
    + W) D4 Z3 _  {2 L
  1639. LDA [Data_L],Y: ^" t1 l0 W+ G6 O* `
  1640. STA <Data_Cnt( V' q# A/ Q5 o, a5 x. [7 A
  1641. LDA #$20. |# N/ {2 k( M, G/ g0 x+ L) ?
  1642. SEC  J# A1 Z& d0 G
  1643. SBC <Data_Cnt+ K$ L" Y0 ]7 {
  1644. LSR A
    , D" R3 R: c7 _  q, K
  1645. STA <Data_Buf
    ; |. o: ^! Z- B% p
  1646. LDA #HIGH(Track_Name_Pos)
    / {: d* k3 G* M2 G
  1647. STA PPU_Addr,X: w4 B0 r- f4 y4 j& o' P+ ^. T
  1648. INX
    2 w3 I3 f; r3 x8 w2 T
  1649. LDA #LOW(Track_Name_Pos). k- h9 {4 Z8 l; v
  1650. AND #$E0
    / v% c7 r' m3 g. a
  1651. CLC. e( u0 N( P. R8 B5 D9 F
  1652. ADC <Data_Buf  E% Q& g5 W4 X- W
  1653. STA PPU_Addr,X3 x" R" A9 }' w. a
  1654. INX
    2 p. ]8 z# V! E# o8 g( s
  1655. LDA <Data_Cnt1 B) i# \$ r1 I
  1656. STA PPU_Addr,X( Z) k6 ]5 S8 Z; o
  1657. INX
    $ ?9 _" X/ A3 \; g1 \1 o: G, g
  1658. Show_Get_Pos_Center_End5 }' g9 C% Z4 }# }' i
  1659. RTS
    3 ^" I7 s3 [) J: V( a/ k$ O
  1660. .ENDIF* C/ E8 @) W# m$ u2 K

  1661. 8 n# i; T$ G: Q+ r3 X0 o
  1662. ;==============================7 a4 \& X' f6 k7 p: A
  1663. ;音乐端口清除
    & f1 q: p7 d8 ]3 a  E, D0 ~& }: t; E' u
  1664. Sound_Data_Clear
    , h9 M- v# x7 l2 h1 U" j
  1665. JSR Sound_Port_Clear" N, v/ C9 N$ ^( v7 e, t
  1666. JSR Sound_Ram_Clear, m) l" s7 G6 ~. l. e  V% S
  1667. RTS
    / h0 N: P! _+ @( Z

  1668. . Z* N  c- G2 j$ D/ [" g; V$ i
  1669. ;==============================; b( Z, }2 {& l# L- P! k
  1670. ;音乐端口清除  R; t- C" \: a& i" ~0 {5 t! e
  1671. Sound_Port_Clear
    5 _$ @/ B5 t  x
  1672. LDA #$002 c) D/ V9 S. ?6 q# U, s% x1 P
  1673. STA APU_STATUS
    ! y6 y  l4 Y4 n& {% [
  1674. LDX #$00# m% i( U4 u1 ]0 A* J- n7 W( U
  1675. Sound_Port_Clear_Write/ u2 R" G9 N; A* e- M
  1676. STA $4000,X
    / z" ~1 Y% U- W) U7 f: Q* z
  1677. INX
    1 ~* E3 Y: z2 }
  1678. CPX #$14
    * v8 w( r! t, F$ X" L/ s8 m
  1679. BCC Sound_Port_Clear_Write5 h8 L% n% E9 q0 i/ W1 ~
  1680. RTS; j" _+ ]( Z5 D! P1 T% S3 t

  1681. $ p$ A( H- u9 |% b$ g$ y- C) u
  1682. ;==============================0 t# u6 W- z7 h& d  b4 s
  1683. Sound_Ram_Clear;RAM清除5 Z! F# o8 A2 F
  1684. LDX #$00
    ! K0 A: U4 j9 ^% N6 z9 ~
  1685. LDA #$00
    5 O- L  N9 p. b* L% @6 T
  1686. Sound_Ram_Clear_1
    ! `, ~; G" {8 a* O7 u$ p( |. `5 x
  1687. STA Sound_Ram_Addr_1,X
    6 m" t6 Q9 x$ Z, S. u
  1688. INX
    2 P6 t9 I+ [( t  ?
  1689. CPX #Sound_Ram_Addr_1_Size
    ; i) v3 \( u9 x2 p$ }  a& b
  1690. BNE Sound_Ram_Clear_1
    $ ]7 i2 P/ s0 s# p" o
  1691. LDX #$00
    / a, M0 i6 j' V4 x$ a
  1692. Sound_Ram_Clear_2
    ! [* v! a+ W- p, u( Y! g6 Z; h
  1693. STA Sound_Ram_Addr_2,X4 F5 v# S5 V# H& G. ?. B; p
  1694. INX
    5 Z: k' F$ V: E+ p6 E# `9 Z5 X
  1695. CPX #Sound_Ram_Addr_2_Size
    5 Q! y4 Y& T5 h
  1696. BNE Sound_Ram_Clear_2
    9 G6 V) A" e+ S( a5 \
  1697. LDX #$00
    ! T. t& u, B; q! F8 D( I
  1698. Sound_Ram_Clear_3
    & g- O) M/ n- }* |
  1699. STA Sound_Ram_Addr_3,X9 ]5 X/ V, X, A/ M$ e6 ^1 h
  1700. INX% X: u. r6 J4 r7 o7 K, |
  1701. CPX #Sound_Ram_Addr_3_Size
    7 X. }$ O/ T# G! ~9 l0 z. A
  1702. BNE Sound_Ram_Clear_3% L' z! Q5 z" F3 ?! R* y; L+ ~
  1703. LDX #$00
    , b4 H* W9 z2 j, k% Y) @
  1704. Sound_Ram_Clear_4
    % R7 |# {! L" J; S
  1705. STA Sound_Ram_Addr_4,X
    9 E3 Y; S& m; u0 X2 E
  1706. INX
    * S- i/ v9 H* B: \) ?9 k& j
  1707. CPX #Sound_Ram_Addr_4_Size
    0 N8 @$ g1 p! u' m+ a2 _- v
  1708. BNE Sound_Ram_Clear_4
    5 c% ?, T5 j7 w, i
  1709. Sound_Ram_Clear_55 @  ]9 X; i" t  S, X6 }, n; l
  1710. STA Sound_Ram_Addr_5,X8 Q! |2 S9 N. @0 S( n9 h
  1711. INX# ^& ?. g' X) b7 x! {- @
  1712. CPX #Sound_Ram_Addr_5_Size
    $ K( K& e. P3 y- m1 g- T
  1713. BNE Sound_Ram_Clear_5" v8 o2 C( S1 n8 ^$ U) g5 G/ }
  1714. RTS
    9 G4 {( Q) Q" u1 w( K  t

  1715. / v/ \$ d6 Q% H2 [" s* W
  1716. Get_Music_Collection_Name+ U  p9 L" G8 v- U9 I! c
  1717. PHA; M' f( S; p8 Q. _
  1718. LDA <Music_Item_Cur8 Z) `  {) k2 x& o" d
  1719. ASL A, i+ l8 Z) d- B; y
  1720. TAY( x3 H+ q8 G. Y$ M
  1721. LDA Music_Collection_Name,Y
    % b% J/ f, n+ d7 O( ]& ~
  1722. STA <Data_L% A  D4 `& o+ q9 h8 m! t
  1723. INY+ v7 h! a$ M' f- @, ^
  1724. LDA Music_Collection_Name,Y/ k- j* n9 N6 I+ e  B& G' ]9 `! h5 i7 L
  1725. STA <Data_H6 X/ F- H9 `# a; P
  1726. PLA" x+ `# N3 `+ m3 ?+ B
  1727. RTS9 b% ?% X0 \0 f! o
  1728. ( o+ _2 O; v' D9 j, {) M
  1729. Set_Sound_Total2 V' ]- k; C* h" P: i' S( \' I6 K4 r
  1730. LDY <Music_Item_Cur
    . P" v6 r$ X. e" @
  1731. LDA Sound_Total_Port,Y
    - g. n0 H' e- p+ R( K% l  S. d! N
  1732. SEC0 d& R* s$ [# i, {' t$ Q2 R6 j
  1733. SBC #$01
    ! k# O6 [9 |) d: x! \1 b
  1734. STA <Music_Total
    $ R: }% ?; @  S8 p
  1735. RTS
    6 G, U# e+ ]7 \& R& i. e; _. l
  1736. 9 R* Q8 b* h3 }& `
  1737. Get_Sound_Start
    ( P7 v2 g& z. t/ S: Z4 p8 Q) s: N' `
  1738. LDY <Music_Item_Cur
    8 I: f0 `/ O6 k7 A) F9 l
  1739. LDA Sound_Start_Port,Y
    ! r8 A" ~6 L3 f8 k$ B! m0 X6 x
  1740. RTS
    # r' S" p, q- L* ]7 N1 q
  1741. 5 T+ ~* l1 @3 ?4 M; ^: n
  1742. Set_Sound_Init_Port: _& X, U6 [1 b6 d+ E% O
  1743. PHA' V; d" p4 p4 ]. w( q
  1744. LDA #$20- \+ p: J2 z# Q+ v
  1745. STA <JSR_Addr_Op
    % C+ N; u4 V$ ]
  1746. LDA <Music_Item_Cur3 p) n5 _4 ~& P7 T+ Q
  1747. ASL A
    % B) C: {; R) o* l$ K
  1748. TAY. G6 D- T  b* d1 A6 ^* h6 V7 O
  1749. LDA Sound_Init_Port,Y9 {5 B- |/ J8 d: n/ @8 a4 `' [+ ^
  1750. STA <JSR_Addr_L
    ! ?& ~; u4 \0 ]3 ~
  1751. INY+ C, k7 O% U, ]( ~, |  |. x* t
  1752. LDA Sound_Init_Port,Y& `' ^) s3 o" q/ O& H+ O/ a
  1753. STA <JSR_Addr_H
    " n: ~& \5 H" U+ K- m/ D
  1754. LDA #$60
    + P' R6 `* f* a
  1755. STA <JSR_Addr_Rts
    2 ]2 T) P% N! v$ @. i. x9 W
  1756. PLA2 e1 v4 G* D" n) a9 A
  1757. RTS9 R1 |! L! n4 Y/ U) Y' v: S+ m
  1758. . d# y2 ^6 N* K. `+ n% M/ y
  1759. Set_Sound_Play_Port
    & c) d; \  j4 T" Z3 p6 i' w
  1760. PHA
    3 l, N; `9 O( g$ I' Q
  1761. LDA #$200 }8 e5 _: U* s6 i: v3 B  X7 t& B
  1762. STA <JSR_Addr_Op
    9 E2 l# q" I$ Q" M/ @
  1763. LDA <Music_Item_Cur4 |4 K) @) ^! _. K& x3 M0 n
  1764. ASL A
    5 v! Q, W3 g, b+ @! i
  1765. TAY6 S6 T, e$ g$ {
  1766. LDA Sound_Play_Port,Y, s3 |4 j6 b( Y0 i* L; @
  1767. STA <JSR_Addr_L  [- p9 s- v6 |& n
  1768. INY) }# y. {( l. Y9 u9 H
  1769. LDA Sound_Play_Port,Y
    * [3 B8 ~; l1 E1 Q
  1770. STA <JSR_Addr_H" s  K, I% _7 h% \
  1771. LDA #$60  b: {* d: T5 O3 Z! v7 t; o3 r7 j) U
  1772. STA <JSR_Addr_Rts
    ; S) P* ]: C9 n  p9 C/ B) m7 h
  1773. PLA
    . }; d, D2 z' u' _" E. U
  1774. RTS- g9 I' i) |$ G) |7 K" Q( O
  1775. 2 J7 F# f: ?* t9 S+ p+ |- f3 U
  1776. Set_Sound_Reset_Port
    2 E; k: h7 Q/ m& ^! P
  1777. PHA& F2 b: V7 G" H, Z
  1778. LDA #$20% F; b5 S2 e, Y$ I; P7 o
  1779. STA <JSR_Addr_Op
    - J: X3 x1 @6 s, v8 O, [
  1780. LDA <Music_Item_Cur
    4 k5 {$ L5 g2 U# T% u6 K" X
  1781. ASL A8 {1 K, I: G/ g! h
  1782. TAY: t8 S* X" E+ S3 Q# L
  1783. LDA Sound_Reset_Port,Y4 E) |6 j( ?1 ]- f; n
  1784. STA <JSR_Addr_L
    , k5 o* Q; u* {. j# r7 E5 Y! {
  1785. INY
    . Y! O; F: Z! {  D( h
  1786. LDA Sound_Reset_Port,Y
    0 Q4 }% G: E4 }; d) b
  1787. STA <JSR_Addr_H
    0 n* _" }# I) g- U9 G
  1788. LDA #$60
    % \& ~# h. @& ?! ~2 {2 b
  1789. STA <JSR_Addr_Rts, U' w. ~4 O# J, e" j/ H' d& a
  1790. PLA) b$ X9 z& g8 r9 f/ t
  1791. RTS
    5 X* L& r' E( ]% G6 U# c
  1792. 8 w; c# L/ K- x2 \, |# S4 r3 e
  1793. ;初始化音乐bank
    ; d8 Q, s+ q8 v6 j8 o
  1794. Init_Sound_Bank$ G$ C& s/ E9 d/ i0 ^
  1795. LDY <Music_Item_Cur
    % A; K% s9 [! ^
  1796. LDA Sound_Bank_8000,Y
    ! i2 b% \- h( Y$ _" H% y
  1797. STA <Music_Bank_8000
    - o5 i5 x& M/ o" F4 p; ^* Y( J5 s# [6 i
  1798. LDY <Music_Item_Cur
    % Q1 a; W; M$ w$ \
  1799. LDA Sound_Bank_A000,Y' u8 Z2 `& |% d* }
  1800. STA <Music_Bank_A0006 H: ~1 N( n, g! x0 `8 j) G
  1801. RTS3 A/ I) O, y( j9 e  i% P- I

  1802. 3 F4 l, `7 _9 w
  1803. ;==================================================2 G1 ]9 v3 M' E% Y8 h4 M$ E) y
  1804. Sound_State_Reset;音乐状态重置$ Z( }7 g9 N' |$ J8 m' `
  1805. JSR Music_Bar_ReSet        ;重置音乐条: O9 C7 }) f! t1 w+ ~
  1806. JSR Time_ReSet             ;重置播放时间
    : y  E& ^5 _3 H3 s4 Q
  1807. 4 z* K  M  a! M7 s8 t/ Z* ]
  1808. LDA #$00
    & ?  l. Z$ I, k) i4 o
  1809. STA <Music_Stop_State
    1 W& a5 D) \* U7 L
  1810. JSR Music_State_Show       ;显示播放状态
    : l% `6 x. U+ N: d7 [% N* `0 a

  1811. 2 k. U$ C, j4 b8 |' n
  1812. .IF Track_Name_Pos
    1 Y9 p' ~5 j7 a* I7 h. K7 x
  1813. JSR Show_Track_Info        ;音乐曲目名显示
    ' L7 J+ I8 t. F0 D! }% ^* h: ?  ^
  1814. .ENDIF
    9 O! U6 i* i: p! f& w! F

  1815. / n! @; Q9 G  N" E+ q2 b* [
  1816. RTS
    $ C, y2 G3 J" X- @+ X1 M' w

  1817. $ A' N/ z+ g# y4 Q3 r2 Q
  1818. ;==================================================# U9 `3 N* b' A) a0 B  @
  1819. Sound_Init_Proc;音乐初始化处理' Z5 J/ L& j* U. ~9 t8 |; i
  1820. PHA
    ! F# u: w$ D+ h" u
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址4 t8 h) f" f. d5 g2 z* d
  1822. LDA #$003 w* f6 \+ s2 H% P
  1823. STA <Scroll_H               ;重设水平滚动
    ) W, `% S, e/ p% J, F  |' e
  1824. LDA #$0F
    3 Q, E1 {3 S# F, ~$ f  f& i4 o
  1825. STA APU_STATUS: |7 s9 n* ^! E
  1826. PLA1 T  d' H/ I) g$ }0 O
  1827. JSR Sound_Init             ;音乐初始化
    9 ]8 I6 e! `6 y, ]4 o7 m. ~' a% ?
  1828. JSR Sound_State_Reset      ;重置音乐播放状态* W  ~4 k7 X8 ~6 x
  1829. RTS
    3 h. A7 @7 r" u7 r- ?, f

  1830. 0 D8 M) x& P/ p9 {/ R
  1831. ;==================================================% V0 \) I8 c2 B8 {4 m
  1832. Sound_Play_Proc;音乐播放处理, ]$ R1 e6 w" M5 o
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址# {8 u1 F2 V+ ]1 ~7 W
  1834. JSR Sound_Play             ;音乐播放: V% `# Y! Y0 q9 ~/ l1 k
  1835. RTS3 \; W: P$ N# [# l; p4 \
  1836. ' A# q) b/ |$ d* v, Y. B
  1837. ;==================================================+ j5 M$ H# j* G
  1838. Sound_Reset_Proc;音乐重置处理
    $ r) X; T; Y& g1 o" f
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址6 b4 U, e6 d6 k5 F, R
  1840. LDA <JSR_Addr_L2 i" l* Q- k2 z8 s! z* e1 \
  1841. ORA <JSR_Addr_H/ Z$ ~, k  K: U0 K1 v
  1842. BEQ Sound_Reset_Proc_Default
    . M* ^9 j2 X3 h. ^; F% U
  1843. JSR Sound_Reset            ;执行音乐重置
    0 j% @6 Q) r5 m
  1844. JMP Sound_Reset_Proc_Init_Sound1 K" h+ R% f) b! C+ J7 c

  1845. 7 {4 H" C/ A- a! [
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理
    : B6 ?, e/ v0 ]
  1847. 2 q  c2 W1 {6 U( J: w5 `" Q' }2 D
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断
    " v7 m' o' y0 y
  1849. LDA #$00
    8 |! Z. O& ~! \4 o0 B+ y" k
  1850. STA PPU_CTRL
    9 F5 n# t( f: ^' O$ @) H

  1851. 4 i+ D& G4 F8 n: ?& L; |, m' W* u4 z  ]
  1852. JSR Sound_Data_Clear
    # T1 @# w% }1 O5 Q. {" s
  1853.   S7 m; @3 i8 e& S
  1854. Sound_Reset_Proc_Default_Wait
    - c. V& |+ d4 G1 Z: s
  1855. LDA PPU_STATUS
    6 N# r5 a8 d& ^+ r* V& W: a) t( R# c
  1856. BPL Sound_Reset_Proc_Default_Wait
    3 c; j1 Y, G0 l+ S! Q) Y! W
  1857. ' F; m! f4 r. O( L8 @
  1858. LDA #$000 \, U; J3 R% t+ K) Z  B6 Y7 Y
  1859. STA PPU_ADDRESS
    + \( i4 t& M! ?, l0 s8 B
  1860. STA PPU_ADDRESS
      a1 \) o( k  Z* }# t
  1861. STA PPU_SCROLL7 G. |) S! h! A3 }# _& v
  1862. STA PPU_SCROLL+ M# h4 T& O. E, b# c
  1863. " s1 _8 M; K! B9 ]; F
  1864. ;恢复PPU控制
    7 g0 W5 [6 U1 Q: R6 N
  1865. LDA Screen_Ctrl
    5 e" |. j) g* M8 c
  1866. STA PPU_CTRL, o' _, V# T' ~/ k4 ^& m

  1867. ) ^0 k% U& E& H, {4 J! o7 j- _
  1868. Sound_Reset_Proc_Init_Sound
    4 R( n/ z) U1 i1 u8 o/ ~- S" O
  1869. LDA <Music_Stop_State# E8 R" H: o6 O9 C+ \
  1870. BNE Sound_Reset_Proc_End
    ( P1 ^7 d: h+ s1 u
  1871. LDX <Music_Item_Cur5 H+ d: B7 i; w+ o) p: j
  1872. LDA <Music_Cur,X
    % H# a% u5 _# q4 T9 t5 W
  1873. JSR Sound_Init_Proc
    , p& A3 b0 m0 N  b
  1874. Sound_Reset_Proc_End, L( D% G0 ^& e; s: T0 t
  1875. RTS
    2 w2 `0 i" Q' m, S; w

  1876. 5 `9 ?, I5 l: ~+ I+ d8 L$ ~
  1877. ;==================================================
    % p6 l6 y6 U* A: G! U
  1878. Clear_Item_Text;清除页项目
    ( C. C4 p2 }0 s/ L
  1879. LDX PPU_Cur
    8 k' i7 D$ M2 Z
  1880. LDA #PPU_MODE_CNT_CLEAR
    , H9 a7 k* D- [2 ]8 S6 n. T- [
  1881. STA PPU_Addr,X& C1 m7 P' @) m" W
  1882. INX3 B0 Y% V) {  `# ^' f8 v

  1883. 5 h& ~& h' _3 ?' N- p
  1884. LDA <Page_Last
    ' a! i0 G4 W! e! D1 a
  1885. SEC
      n; W* m' }" _# s
  1886. SBC <Page_Last_Index
    8 A6 Q: `) Q4 f: Q+ y" M% D& z
  1887. ASL A
    & N, N9 R+ o% T' |: ?

  1888. 4 h: r5 b! a8 a4 r
  1889. TAY8 I( |% |2 \0 |/ l: ^
  1890. LDA Item_Pos_Data,Y
    4 k8 y4 H5 n! R$ ?) N  N! H) v# D
  1891. PHA
    ) c3 I8 b8 D6 H+ o; X; X3 a7 r
  1892. INY9 Z' }/ @. @: K- }, c2 P5 D, j
  1893. LDA Item_Pos_Data,Y
    ' N4 U5 {4 x: Y& F; v. r( @
  1894. STA PPU_Addr,X& B7 c0 V7 U1 Z3 ~$ s6 G
  1895. INX
    $ g) H- L2 B6 h
  1896. PLA; u$ h4 `. p/ A" O
  1897. STA PPU_Addr,X+ [6 Q9 r$ Z" r# O+ ?$ T
  1898. INX" z* g# P6 v& ~4 \) T# x, [% @7 m1 E
  1899. + Q0 s8 u4 P  P+ Q
  1900. LDA <Page_Last
    6 M, Z/ v* w" C2 B% |
  1901. ASL A) `  ]6 b3 n7 ~. E  l7 N2 A( p
  1902. TAY- [% P8 ^: ]; F) W2 q; z5 z! N- X1 n
  1903. LDA Music_Collection_Name,Y
    - G( k  I7 J  z8 V4 d+ b* J
  1904. STA <Data_L
    6 u4 f- [3 b8 P- ~: L6 L
  1905. INY" ~6 l0 Y* M- N6 M. n9 T) Q, J0 S
  1906. LDA Music_Collection_Name,Y* Y8 D& z+ ~3 g9 R
  1907. STA <Data_H
    ! o& }& f& P& L# Q" r( y8 ?

  1908. + A& D5 S: K+ m' T  I( X9 }% [# }! o
  1909. LDY #$00$ C4 D! _; t7 d1 O
  1910. LDA [Data_L],Y
      X# {* A# A  t3 N6 v4 ~6 l
  1911. STA PPU_Addr,X5 f0 }  y* H! d# [/ o' c
  1912. INX6 X2 _' L% Z! H. s. o
  1913. Clear_Item_Text_End9 l( h& o1 @$ W* \
  1914. STX PPU_Cur1 J, D9 Y2 s$ w: u
  1915. RTS
    ; T) \! u$ X, h
  1916. 7 R  X3 H, i0 ~9 I' g: f
  1917. ;==================================================
    , D$ \9 I* P4 \2 z) H2 x" x' I9 J
  1918. Show_Item_Text;显示页项目+ z' j& S/ R6 J" A- W2 j* a
  1919. LDX PPU_Cur
    8 M* Y/ \  K# ~2 m
  1920. LDA #PPU_MODE_CNT_LINE1 v: x0 ^2 U2 @: d+ Y$ |$ O
  1921. STA PPU_Addr,X6 B! h' O) C0 n" T1 G( C
  1922. INX- F5 i; L: ^. `* T0 a
  1923. LDA Page_Cur  P9 z3 }0 h9 M5 t9 w
  1924. SEC. c# Q; q$ X* Q7 U! t" v- U% e' R
  1925. SBC <Page_Cur_Index" A" s3 S9 K: Q$ j2 ~# T0 V/ M1 T
  1926. ASL A% [1 o) p: _8 T- P! w% Q
  1927. TAY
    ! z+ J. o- n, F& w' n" G
  1928. LDA Item_Pos_Data,Y2 j4 ~, }$ v! l5 o
  1929. PHA
    5 J8 o, X. g0 ]
  1930. INY8 G3 y1 y& c& p7 b4 @
  1931. LDA Item_Pos_Data,Y
    " R7 k* @0 J+ {$ j! y- L6 U
  1932. STA PPU_Addr,X/ w" G1 x3 H1 G% I! h2 o% ^
  1933. INX
    7 u- g; @% n# u! P- b2 J
  1934. PLA
    & l4 p) _  |; b5 L; n
  1935. STA PPU_Addr,X7 s; F# X* U# ?
  1936. INX+ s3 l" S% |5 O( k% q
  1937. 9 d. e+ b3 T& j
  1938. LDA Page_Cur
    - O4 l7 z) M1 F- r* k
  1939. ASL A
    8 ~  R( O5 i* D3 K, r
  1940. TAY
    5 I$ {* P, X0 e9 G8 c+ [8 @" [
  1941. LDA Music_Collection_Name,Y
    # d- U( }* ]" L5 E6 m/ \. C: ?% ]
  1942. STA <Data_L
    0 x' g8 k8 m* K5 A+ q
  1943. INY
    0 t1 S  m  ^! X; A
  1944. LDA Music_Collection_Name,Y
    8 s, ^9 N0 ]) B$ K2 `+ W; S& D
  1945. STA <Data_H
    1 Y7 `6 y! e- I4 K0 x* n8 ~+ N5 y; y

  1946. $ `) N0 s5 E5 B7 D/ F7 }& b
  1947. LDY #$003 s3 k5 \, a& Z4 N% g
  1948. LDA [Data_L],Y
    + M- z7 ~' ?# U: X4 }
  1949. STA PPU_Addr,X
    7 ~9 }6 w+ S* d9 Z- _, S$ m
  1950. STA Data_Cnt, d* z# w( P& t2 Q& o
  1951. INX
    " \2 d6 y+ I& \( |+ l  }" q8 S7 E

  1952. 8 m- \$ U3 g/ e2 f& O* ]2 h- O
  1953. INY
    * O6 T( v1 \' b
  1954. Show_Item_Text_Write3 s  X( [/ @6 X. q7 \% S# y
  1955. LDA [Data_L],Y. {1 y1 Y/ P" D: C
  1956. STA PPU_Addr,X/ k, P* f. `1 H+ h* V* }& B' U7 V6 A
  1957. INY3 _$ j* ?# t6 b. k
  1958. INX; t3 T5 g' S' J6 t) x# Q4 e# b' F
  1959. DEC Data_Cnt. f! e4 y3 ?: o! t, j1 a. ]
  1960. BNE Show_Item_Text_Write- e! i/ S" o6 e' |: j9 E

  1961. ! p& v+ Q0 U; M
  1962. Show_Item_Text_End
    ' A/ G/ _& E. ]. t# t( @
  1963. STX PPU_Cur
    / i" k, u- W0 u% K- j
  1964. RTS
    ! P- {7 x) `3 C, s0 R9 G, G% N

  1965. 9 {& |2 F1 H5 N+ u
  1966. ;==================================================) \  [1 n9 d2 Y( a7 y' B
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量" l% \  O% `" I3 h7 {* \% H
  1968. STA <Data_Buf9 |( B1 C1 }7 s# o# l
  1969. LDA #$00
    * I0 c7 n6 P4 h" C7 Z4 g4 T
  1970. Get_Page_Index_Calc
    " k4 j) P% `' L) S5 n
  1971. CLC
    3 b( G3 K% O$ n+ P# c
  1972. ADC #PAGE_SIZE0 f" F. e# M, N
  1973. CMP <Data_Buf9 S" h3 o- w$ ^# y: J) F+ ~
  1974. BCC Get_Page_Index_Calc1 T  |3 b; E. e5 T' y6 _
  1975. BEQ Get_Page_Index_Calc_End* p8 g* E, t; W' n
  1976. SEC, W3 f5 ?3 b4 ]% A8 W
  1977. SBC #PAGE_SIZE
    0 g' j* G# k$ H& g1 S
  1978. Get_Page_Index_Calc_End
    0 I. T0 ~3 H9 G* K- F9 d- ]
  1979. STA <Data_Buf2 q2 [: B8 J' [9 D$ x
  1980. Get_Page_Index_Cnt
    * n2 A9 j8 x( X1 o! u" {9 p9 z
  1981. LDA #PAGE_SIZE
    # M9 h- ~& E) P/ H1 w1 M
  1982. STA Data_Cnt
    9 k* |3 V2 ]- _! x

  1983. & ]& d9 H  q* T+ x
  1984. LDA <Data_Buf
    4 X; r' _: M' k1 q
  1985. CLC
    9 o1 m9 A, [# D/ N! `! E0 h# \1 N3 X8 r
  1986. ADC #PAGE_SIZE
    ' F2 N$ }7 n6 C5 f
  1987. CMP #ITEM_MAX_SIZE% m2 |9 h. Y4 w7 g
  1988. BCC Get_Page_Index_Cnt_End
    3 k# C' P+ B; I7 H. ?, ?9 X9 b  g* F
  1989. 4 O/ {( B* b! E" C5 J3 X
  1990. LDA #ITEM_MAX_SIZE
    : U3 C) B' f8 T& ?% [  p: ^
  1991. SEC
    . @6 o  y9 T+ S5 F6 B9 i
  1992. SBC <Data_Buf* n+ F7 r$ o- k+ n' {) A
  1993. STA <Data_Cnt4 A+ W% U) _6 c; [4 D, p

  1994. 5 k, v5 U; z$ ]2 Y
  1995. Get_Page_Index_Cnt_End4 m0 ?/ F; l; f. v* }& _, q9 [# X6 y
  1996. RTS
    ( N9 r! A+ t  ^9 e7 Y- K" u$ O
  1997. - C% L9 k. T( `; ^5 R  J' _' _
  1998. ;==================================================6 Y. p$ B6 e# U, a( [" c
  1999. Get_Last_Page_Start_Index9 Z( h5 B, L, s# m; ?; _% [
  2000. LDA <Music_Item_Last
    % A: ^8 W5 r1 ~6 Q% T, X5 X
  2001. JSR Get_Page_Start_Index' O5 C: T, u6 X; S7 Y( t/ x
  2002. LDA Data_Buf
    & ~( d  Q: Q* _3 k8 e) A& F/ s" u
  2003. STA Page_Last
    9 e. J6 O; ?5 b) w9 z
  2004. STA Page_Last_Index% J: G# e3 ~6 c( J
  2005. LDA Data_Cnt
    ) a! N+ j' o! R- \8 R: ?# g# ^6 Q
  2006. STA Page_Last_Cnt0 m! [7 @" u! P
  2007. RTS
    : L/ J- A( @9 O; W9 M1 X

  2008. % O$ ^1 M" j- l0 Q/ i+ A
  2009. ;==================================================
    3 r2 o% W( v5 `7 L* }
  2010. Get_Cur_Page_Start_Index
    + h0 Q. F: Z& e- c# b
  2011. LDA <Music_Item_Cur/ j! Y, H& H9 d) S2 d
  2012. JSR Get_Page_Start_Index- w5 S* k% |# C
  2013. LDA Data_Buf$ D3 P! @- k# r" D
  2014. STA Page_Cur
    # x; y# ]! q3 ^6 L0 L
  2015. STA Page_Cur_Index" J; H. v0 I! N' l7 L0 I( d! D& W4 ]
  2016. LDA Data_Cnt
    ; {7 |0 V& \% P! _. @8 @% r/ }
  2017. STA Page_Cur_Cnt
      d* T( ]2 j/ \. J9 N6 n9 i$ y$ Y
  2018. RTS
    - N7 P: Z' @, U9 @; w! I- a

  2019. * f+ P0 X' \6 p  q/ L4 p1 ^! d
  2020. ;==================================================
    8 ^5 {; L! L" G% s
  2021. Show_Page_Text;显示页文本5 y  _1 G, y. g; u% \
  2022. LDA <Text_Disable_Flag* @. I3 |. ~6 U) E9 g
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM9 x& {0 M2 f5 N" k1 T% O
  2024. STA <Text_Disable_Flag; O8 E5 K, h, F, K7 X0 Q- v
  2025. * G/ ~) d4 b7 l6 W9 ]# g) I
  2026. JSR Get_Last_Page_Start_Index+ V* M% V2 T6 P- ~5 l1 S
  2027. JSR Get_Cur_Page_Start_Index
    . [( l' m* a  I. k: D2 z6 n

  2028. " @' P/ w# Q- K+ Q0 N. p
  2029. Show_Page_Text_Set
    # V& ^& _0 j: _. x4 a

  2030. * j% s1 z3 W  {4 z% f
  2031. Clear_Page_Last_Item;清理上一页
    # r( ?! n- h0 L" ^3 I! I* C" P
  2032. LDA Page_Last_Cnt
    ' G/ p$ I/ Y& Q0 V; x& E
  2033. BEQ Clear_Page_Last_Item_End
    1 y* z2 l0 ?7 Z+ u+ y( J
  2034. JSR Clear_Item_Text; G% y. |4 i# ?( J3 {- w6 d7 m
  2035. INC Page_Last9 o& b6 Q( {8 F( B/ _0 e% e
  2036. DEC Page_Last_Cnt! ?! E0 L8 T" r' ~; j7 l3 V4 Z$ q/ u
  2037. Clear_Page_Last_Item_End7 o/ f9 z$ Q; M/ |
  2038. 9 B3 I- p/ s  ~5 t
  2039. Show_Page_Cur_Item;显示当前页. H8 G- m) w6 x
  2040. LDA Page_Cur_Cnt  Y/ [* I: f4 M3 B
  2041. BEQ Show_Page_Cur_Item_End
    6 s" F" ]; K- F  j/ z
  2042. JSR Show_Item_Text
    $ D" y$ u6 ~! m3 z7 p; J
  2043. INC Page_Cur4 i9 g  x& T8 K  y
  2044. DEC Page_Cur_Cnt& u$ w  @3 S7 W; C8 M+ o- ]8 _3 ^
  2045. Show_Page_Cur_Item_End
    0 `' X4 M8 P1 J, p4 ]
  2046. % {9 E+ }7 x+ ?* t
  2047. INC <Time_Wait_Cnt3 w) Z( M# c4 M) W& N
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作
    9 @5 C5 `/ p1 w- Y+ r9 d
  2049. LDA <Time_Wait_Cnt
    & O+ e' A6 |2 M0 R1 w6 I
  2050. BNE Show_Page_Text_Set_Wait
    + l; _/ U) ?4 S& S6 s0 h- V
  2051. 5 M: v# Y) A7 k! I* Q
  2052. LDA Page_Last_Cnt
    2 m& v8 H6 Z! ]
  2053. ORA Page_Cur_Cnt
    / D  s/ [! `) B3 w2 U" J
  2054. BNE Show_Page_Text_Set
    $ |3 _. z* l- ?* J) e2 \1 u2 ?4 D
  2055. LDA <Text_Disable_Flag
    & b6 g1 Q5 D2 D# F% ?
  2056. AND #TEXT_DISABLE_ITEM ^ $FF: j/ x& D: B8 l6 i3 x( ?% z7 @2 }
  2057. STA <Text_Disable_Flag
    $ G( L1 j; {3 K; M
  2058. RTS
    ; h9 A6 C' X+ ?$ i$ P3 j
  2059. - K$ c' l% v& C: L4 P
  2060. ;==================================================, l* U3 x0 L6 E9 x3 s/ b
  2061. Last_Item;上一项1 H5 e7 o7 f" U+ R, |, a4 x' ]
  2062. JSR Clear_Last_Track_Name
    0 G/ B" U2 Z. n  v# z* ]' Q
  2063. JSR Disable_Text_Draw
    1 U4 \4 Z9 I+ A; m
  2064. 5 {( |9 h; U3 G  A" J- J$ `
  2065. LDA <Music_Item_Cur
    ) t; Y0 J% [- M; j9 d
  2066. STA <Music_Item_Last$ ]/ w7 B. N9 n2 K. `
  2067. , E" ]2 R2 E+ M
  2068. JSR Get_Last_Page_Start_Index
    ! V" u* N- l$ e+ [3 Y
  2069. + U5 V0 T3 E  |5 Z
  2070. LDA #$002 p0 z3 d. Q5 r0 H
  2071. STA Data_Buf% B0 y1 i- G+ {7 h2 n( o9 e
  2072. . i4 x! k. G2 a8 k) F. `4 [6 N4 Q8 a$ p
  2073. LDA <Page_Last
    ! W+ L# u8 F5 V2 g- ~9 u) F
  2074. CMP <Music_Item_Cur
    0 X" g: \, i+ ]3 w: |& K
  2075. BNE Last_Item_Begin# \5 E! t9 _* b/ y, O# t: o
  2076.   o" T' U5 W! E, p
  2077. LDA #$01% C0 o# I- C* ]# U8 J) K9 A
  2078. STA Data_Buf/ W4 L2 ^$ V' |
  2079. Last_Item_Begin0 K7 Q+ d* y- E6 D3 e
  2080. LDA <Music_Item_Cur6 G# m  G+ I" l6 u4 d+ p1 J
  2081. BNE Last_Item_Set
    % c8 q9 H/ @) x& d; _5 p' \
  2082. LDA #ITEM_MAX_INDEX + 1
    2 a/ n: N6 a3 N% ^, A- J
  2083. STA <Music_Item_Cur9 w! H( T1 n+ H
  2084. * q, r7 P4 x' b8 A
  2085. Last_Item_Set
    & t$ I# m0 X& \9 W. }
  2086. DEC <Music_Item_Cur
    $ h' A& Z, R% F) Q3 u: Q6 d
  2087. LDA <Music_Item_Cur& P- l$ C9 L4 A0 R
  2088. JSR Reset_Current_Music
    1 |9 V" F, I, }) z- R
  2089. 7 B. t' d3 L  O+ q3 J
  2090. Last_Item_Play
    $ c" f. P/ Q+ i1 r. q! ?9 B
  2091. LDA Data_Buf
    9 X% }! P4 P: O2 @+ }
  2092. BEQ Last_Item_End& G% i, _) ^2 I
  2093. JSR Show_Page_Text% ^+ l4 h1 v4 H/ W' W
  2094. Last_Item_End" z" a# t  [  F; h; I
  2095. RTS; n* @; {, U* E; _$ {

  2096. ! y# S0 h) C$ g" {( I
  2097. ;==================================================  }) D* g5 m+ y
  2098. Next_Item;下一项( p& g/ x) R' a) |! m- v3 l, X
  2099. JSR Clear_Last_Track_Name
    # Z6 }# Y+ q" a1 r
  2100. JSR Disable_Text_Draw
    2 f0 t9 U1 h6 r# l

  2101. ' X1 W, a3 f# w9 M
  2102. LDA <Music_Item_Cur
    + p; w/ s4 i; r" y3 k
  2103. STA <Music_Item_Last
    5 I, [0 O( D' Q1 S8 C
  2104. ; Z/ j% N3 `+ R0 k) A6 h
  2105. JSR Get_Last_Page_Start_Index. E! Z" M  J/ {# d+ M3 n& }( |

  2106. 1 H8 v  z6 D8 e8 A$ L
  2107. LDA #$00
    ( K% L3 C% K- v, i; x6 O' |
  2108. STA Data_Buf
    ' I4 n) V3 u+ s' N% d* m0 |+ t' ]6 A6 s
  2109. : u5 h3 I* X: G; u# p7 c
  2110. LDA <Page_Last5 O6 X: r- u8 X5 C7 e6 z4 o# I
  2111. CLC
    " f' J% G# E) o/ K2 m& U% {
  2112. ADC <Page_Last_Cnt
    . m$ b8 p# t2 [; u  O
  2113. SEC
    ; e+ r" m9 ?; R' i8 F1 N
  2114. SBC #$01/ e  L" g" M, W2 S, Y) ^
  2115. CMP <Music_Item_Cur1 n1 y4 h0 j5 d" M
  2116. BNE Next_Item_Begin
    2 p% l' |3 o/ d/ J/ U
  2117. $ s6 Z4 E# y' a' L
  2118. LDA #$01
    . U$ a6 r3 B7 [8 L2 [6 X& b
  2119. STA Data_Buf
    . P) |1 o" ?, z8 ^- p% R) l9 d
  2120. Next_Item_Begin
    & N2 r" \6 A3 h: a' x1 J
  2121. LDA <Music_Item_Cur. }+ Z' D' J% W. n
  2122. CMP #ITEM_MAX_INDEX2 z) p9 j) p2 @/ g+ x
  2123. BCC Next_Item_Set% a5 V0 U, D9 M6 p
  2124. LDA #$FF
    : ^5 T8 |9 q/ l) r/ j
  2125. STA <Music_Item_Cur
    - J) j0 _3 m1 _6 [
  2126. Next_Item_Set% d1 l: \+ _3 P( |* _. O
  2127. INC <Music_Item_Cur
    $ [, v; a4 h+ w; R4 M; g6 I. @& s
  2128. LDA <Music_Item_Cur  y% q) V% v+ Q( [. v9 U% C
  2129. LDA <Music_Item_Cur$ C' m4 F% P9 N  E% C2 l4 ?# H. C
  2130. JSR Reset_Current_Music. h% J7 c, `# n0 Z$ [7 w
  2131. Next_Item_Play
    # _4 i# {/ n9 |% o; j9 D0 z
  2132. LDA Data_Buf
    & z7 K# c* @9 P0 z9 y! C! M: K
  2133. BEQ Next_Item_End0 Q" A& C% w. K. z1 X2 V5 R
  2134. JSR Show_Page_Text
    1 I0 z) D( W  m) J4 g$ }3 N
  2135. Next_Item_End
    ; X6 i5 _, ~9 d
  2136. RTS* [, X0 d/ D& U" Z/ p! ^- M

  2137. 7 O4 j7 _& F, a4 R' o
  2138. ;==================================================+ v3 S8 G/ f4 Q, v1 j
  2139. Last_Page;上一页
    2 @2 }8 W+ o$ ?6 ~& t: K
  2140. RTS$ U( e8 F4 x5 ~" w( w( P6 s

  2141. ' i8 s& O" s$ r3 k
  2142. ;==================================================+ b! G+ \+ I) C0 w' W6 M; r
  2143. Next_Page;下一页. R& A0 O9 N% ?
  2144. LDA #PAGE_MAX_INDEX
    4 e* B+ I. D- v
  2145. CMP #$01
    # a! S" Y4 n; D: ~
  2146. BEQ Next_Page_End0 D' `; |9 G& M5 @1 G$ ^; p' j2 t% H
  2147. * B  k! b' ?7 U* ^" e
  2148. LDA <Music_Item_Cur
    4 l- A9 L; L# S; l- y8 z
  2149. STA <Music_Item_Last9 H- R) R0 E4 R4 F0 d
  2150. & w  V9 x/ W# y/ ~5 ?3 m
  2151. JSR Get_Last_Page_Start_Index
    8 x" G! ?6 r/ K
  2152. 2 w& V; }" C$ c; b: Z, }
  2153. LDA <Page_Last_Index4 v' o+ s8 G- U: Q. y! }* k* |
  2154. CMP #PAGE_MAX_INDEX
    ' ^- _, h: R. `1 N# H' X7 m
  2155. BCS Next_Page_In_End_Page+ _, Q" F# H- O
  2156. # f( `. H+ r$ K2 [: p0 x. Z
  2157. Next_Page_Not_End_Page;不是在最后一页7 z8 |$ O' N- z: H- Y
  2158. LDA <Music_Item_Cur$ G, B. N- I: j
  2159. CLC+ k/ W( i! E+ f, Z5 ]
  2160. ADC #PAGE_SIZE$ \  c" \( Y: |+ m) ?5 w$ h$ _
  2161. CMP #ITEM_MAX_SIZE
    + O" A6 ]$ |8 G* c1 a, u
  2162. BCC Next_Page_Not_End_Page_Less
    " G3 K" \; @3 e
  2163. LDA <Music_Item_Cur9 U. X; I( z; }) s- q8 S" h$ c
  2164. SEC% q5 b! g% D* M
  2165. SBC <Page_Last_Index/ E( N, W5 E' [! s# i
  2166. CLC
    + R- `4 h$ t6 b. x% M" K+ u
  2167. ADC #PAGE_MAX_INDEX2 E/ D" O( j5 p2 T* u9 k- j
  2168. CMP #ITEM_MAX_SIZE
    , T% a& W* i; i
  2169. BCC Next_Page_Not_End_Page_Less
    % r$ G6 ^- C5 G5 x, q
  2170. LDA #ITEM_MAX_INDEX5 U& l5 v8 Z1 D% Q5 M, b7 Z
  2171. Next_Page_Not_End_Page_Less) [5 H# i, A7 g+ [/ t0 c5 w
  2172. STA <Music_Item_Cur
    9 V2 S: v; d2 w2 y6 y6 C
  2173. JMP Next_Page_Reset4 F3 \# Z. q4 Y' q
  2174. ' o! b: \1 h6 l# M2 N+ H' x( W
  2175. Next_Page_In_End_Page;在最后一页
    # E8 @, ~; ]  D8 ~9 R5 c+ M& r
  2176. LDA <Music_Item_Cur
    3 ?& Q; }  b4 I. B( x: v" M
  2177. SEC, ^( h2 Z. V9 H* q2 ?: J
  2178. SBC <Page_Last_Index
    ) u: F3 t! Q% w) t
  2179. STA <Music_Item_Cur! f8 R& t3 \+ V* x4 q! R

  2180. ; t5 z" ]/ V8 h
  2181. Next_Page_Reset
    # f/ B6 L& W) d( _9 m9 P
  2182. LDA <Music_Item_Cur
    6 X5 ^3 X% G+ p' t* x6 |' J' S
  2183. JSR Reset_Current_Music4 ?6 |+ Y5 D. x; y2 U
  2184. JSR Show_Page_Text1 g5 Y" ~' w0 g) M, h7 ^2 k
  2185. Next_Page_End& H; }$ Q/ A  h: z7 i
  2186. RTS, s2 Q; |: N  L% a0 ]$ i

  2187.   Y& v# K7 b& o! `8 o% C( t! Z$ p
  2188. ;==================================================
    , W/ j9 I; ?& K& b) w  {
  2189. Disable_Text_Draw;禁用音乐条刷新
    # [* D% {( j, t4 q3 F
  2190. LDA <Text_Disable_Flag5 I3 L9 v6 J2 i% Y( q
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME3 W9 U+ \) z9 H1 @
  2192. STA <Text_Disable_Flag' V; p, f" m7 f2 D* n/ X
  2193. RTS+ Q: o* a- O! v  @4 h# E
  2194. 7 U" e0 L9 y- K# ^' d
  2195. ;==================================================( E4 t5 ^% `9 W  l; Q
  2196. Clear_Last_Track_Name;清除上次曲目名, b) O" f' g5 k+ }6 k0 F& K
  2197. LDX <Music_Item_Cur
    ) o6 w1 `3 C2 Q) ~6 B/ U% ^$ a
  2198. LDA <Music_Cur,X
    2 a* H4 B# o- B& I6 i8 V9 ^( k# `
  2199. .IF Track_Name_Pos; _$ \* g: _3 I  W' Z
  2200. JSR Clear_Track_Info
    - C1 e6 R1 T3 p; a. [& h3 ]# q
  2201. .ENDIF/ G6 O  `* X7 F, |+ j
  2202. RTS
    2 S$ Y. c5 s! M2 z5 `) \6 o7 ]
  2203. ; y0 G9 R# s# m" w$ V+ K3 e
  2204. ;==================================================- n5 \1 e! r! i6 F  h2 a
  2205. Reset_Current_Music;重设当前曲目; i- J: z- {+ g+ u4 g4 n
  2206.   Y  p2 C  S) j9 @  g( W6 J
  2207. ;写入当前总曲目
    9 W$ K# {; t! L
  2208. JSR Set_Sound_Total& u/ V9 {6 I' k. u
  2209. LDX <Music_Item_Cur3 Q1 C1 E1 j! ]3 \3 t% |

  2210. " \( i: p$ D3 L
  2211. LDA #$00
    5 T& R, n) e8 K" M0 H, F
  2212. STA <Music_Last4 I6 E/ i9 f9 d2 d, I0 H1 h! D
  2213. & v. t0 z9 I  H; _5 r* Z
  2214. JSR Sound_Reset_Proc/ q6 N0 ?+ l# E" r  C
  2215. JSR Music_Show
    - Z+ n/ {. `9 j! Z0 R- s$ [3 [2 _
  2216. RTS2 c3 E. Q( W0 T
  2217. 4 k0 l' c1 L" w
  2218. ;==================================================
    $ P0 \, ]7 ^( Q5 h
  2219. Music_Song_Stop;音乐停止
    " A. i# M7 z/ c5 g
  2220. LDA #$01
    # q( o# C$ @' `( G, L% V
  2221. STA <Music_Stop_State
    " |) B0 ~5 P3 R3 E7 W4 d/ Y5 H
  2222. JSR Music_Bar_ReSet0 o2 c: Q  w: Z- l1 S, ?- K& \+ D- I
  2223. JSR Time_ReSet! R2 r0 P5 }* b5 E+ U/ |
  2224. JSR Sound_Data_Clear- y% ]  B  R3 u0 s- ]% c& J
  2225. JSR Music_State_Show) u# c! ?% E& u8 T* |
  2226. RTS% g1 D1 M7 {2 ^: B5 W3 y1 c
  2227. ; X) x$ y) i: r  ]1 Q. L6 ^
  2228. ;==================================================
    : t) V' O* s' I/ E
  2229. Music_Song_Play;音乐播放
    : I2 A# z7 ]6 F! K1 Z& N. R
  2230. LDA #$00
    2 [" v5 g4 ?3 `$ u6 [1 H/ y. S7 d
  2231. STA <Music_Stop_State
    / L2 G' X) `  M: ]( f5 m
  2232. LDX <Music_Item_Cur& k( K/ b& [5 z5 E0 s- u0 _) A. a
  2233. LDA <Music_Cur,X
      V0 d+ ?& i( _
  2234. JSR Sound_Init_Proc8 G+ E  F( C. p( W, @3 E
  2235. RTS
    $ g& r) J+ x4 ]0 I7 k

  2236. ( a, X$ A; W6 s
  2237. ;==================================================# U4 I3 A% l) i; w  t- ?
  2238. Music_Song_Last_10;上10曲
    9 r. U" Y! G5 {
  2239. JSR Clear_Last_Track_Name
    " A8 \2 Y8 E! V
  2240. JSR Disable_Text_Draw
    / x! L% B' M1 J1 V6 T
  2241. LDX <Music_Item_Cur
    5 l( j/ F  Y3 g! |, D
  2242. JSR Set_Sound_Total% z% \. a7 A) Z
  2243. LDA <Music_Cur,X
    9 w- U1 j# F# O- ?+ t
  2244. SEC
    2 o: C8 T; {4 t% R
  2245. SBC #107 l2 e- `0 J7 d3 e
  2246. BCS Music_Song_Last_10_Set8 @. v& Q0 B( B5 q# q
  2247. LDA #$00$ `# h& v. ]- k$ x
  2248. Music_Song_Last_10_Set
    , Z% x7 H" C) Y8 a- E5 c5 U) h+ m/ r
  2249. STA <Music_Cur,X6 L1 h1 J% D+ k
  2250. JSR Sound_Reset_Proc
    / h, o% D) K* B! O0 G# V
  2251. JSR Music_Show
    / P" ^  Q8 z0 ~' Z+ c$ J* v
  2252. Music_Song_Last_10_End
    " o7 b0 p! S& t% t5 p, N- q( a! `
  2253. RTS
    $ `# `/ A* X& c8 ~* p' Y9 A. U8 g

  2254. 7 L, @. c9 Z, h3 B2 v
  2255. ;==================================================( a7 x* j- F4 W* i3 a4 U0 A' |
  2256. Music_Song_Next_10;下10曲; K. D5 c9 Q0 X  @+ P
  2257. JSR Clear_Last_Track_Name4 J3 U1 N1 r& ]! y- T) B- k
  2258. JSR Disable_Text_Draw
    $ @. B8 L, i# m" N
  2259. LDX <Music_Item_Cur* _3 J' X4 q2 v3 U7 I4 k
  2260. JSR Set_Sound_Total; e4 L/ s- e/ H: c
  2261. LDA <Music_Cur,X
    % N1 }( h. @0 q
  2262. CLC
    ' n% ?1 r7 T& F8 Z
  2263. ADC #10  \5 Q! y  k' }6 K4 z6 {
  2264. CMP Music_Total
    7 m- V4 o' U- e* }8 Q( g. I
  2265. BCC Music_Song_Next_10_Set" R+ t  j, W5 f6 A  J7 p
  2266. LDA Music_Total* Z5 [' h  H* @# [% m  F. S
  2267. Music_Song_Next_10_Set
    $ B/ N% U3 M2 k3 n1 L8 z1 W) h
  2268. STA <Music_Cur,X
    / b/ k5 b+ N& N
  2269. JSR Sound_Reset_Proc5 l$ T+ c8 e1 |. E" c
  2270. JSR Music_Show1 v' S' a2 n3 R4 I7 b; p9 ]) h6 K
  2271. Music_Song_Next_10_End" t6 u6 n$ K$ {8 W9 c' w: o
  2272. RTS
    . Q. g3 O0 k# V3 I9 a
  2273. , o  A+ M6 @7 w5 {2 Y1 r
  2274. ;==================================================; q$ y  i; A0 ^# o
  2275. Music_Song_Last;上一曲2 Q9 W. `! l# [
  2276. JSR Clear_Last_Track_Name# D: w7 z9 d1 D
  2277. JSR Disable_Text_Draw7 P) y1 f: [9 E7 S, Q/ o
  2278. LDX <Music_Item_Cur. K- h2 t7 j1 {0 Z, O% h3 Q
  2279. JSR Set_Sound_Total
    : M9 v5 j* K5 {% Q. ~4 Y* b* i
  2280. LDA <Music_Cur,X0 a. x3 r8 ]$ @2 V
  2281. BEQ Music_Song_Last_Set5 e7 s* ~# K* \; v
  2282. DEC <Music_Cur,X" j4 e; f5 G* l9 y! y! r: j3 ?
  2283. Music_Song_Last_Set
    4 w' J- F$ S) y$ m( B4 X
  2284. JSR Sound_Reset_Proc, F# v- J+ p) c/ U! ]
  2285. JSR Music_Show1 T2 h7 K5 A9 V& P& b# u4 }) L
  2286. Music_Song_Last_End
    - ^! R- w+ {8 q* A/ }
  2287. RTS- n0 f' I% ^* e5 v) U

  2288. 8 c* \& Q1 W' K& h' _
  2289. ;==================================================
    2 k' Z, n( {# E" l+ ~
  2290. Music_Song_Next;下一曲. V1 l: s4 `0 A
  2291. JSR Clear_Last_Track_Name; T: p2 `$ z& v$ X- y
  2292. JSR Disable_Text_Draw( o/ C( x( \" c2 b9 j- U$ i! s! c9 q- R
  2293. LDX <Music_Item_Cur
    & w. D1 Q: {, u1 w' R
  2294. JSR Set_Sound_Total" Z9 J- I) Q1 X/ A
  2295. LDA <Music_Cur,X5 e  l( I/ G9 T' l( Q
  2296. CMP Music_Total" g" X! p# s2 e. `3 l7 u1 w; N0 q
  2297. BCS Music_Song_Next_Set
    ! H3 d* _8 w/ L& i9 Y+ r3 f+ y
  2298. INC <Music_Cur,X
    3 u" G3 h: K1 v  E7 P+ [
  2299. Music_Song_Next_Set8 `' ~% J8 u/ f0 s# M
  2300. JSR Sound_Reset_Proc
    ! W) h# o) ]4 G# }  D
  2301. JSR Music_Show: F" @+ x0 _- |* f, v4 C( f
  2302. Music_Song_Next_End
    . w) \" C8 |6 @5 `7 i) @- F
  2303. RTS* M- t$ i" G2 K
  2304. - K5 D: }8 T9 i3 a6 r) s) R
  2305. ;==================================================1 H( U0 w* w- i/ h4 i2 |( a
  2306. Change_Select_Item;改变当前选择项5 m; X! ?% x% k8 x
  2307. ;--------------------------------------------------& P( b' \7 c% y0 e. o, j/ k1 C
  2308. Change_Select_Stop_Play_Item;停止/播放
    # ?% |' m/ C, x& N& }
  2309. LDA <Key_Once
    ! ?  L" o$ L5 }
  2310. CMP #$10
    1 f3 X5 y$ B7 T4 Y; y
  2311. BNE Change_Select_Last_Item
    4 Z# L9 k0 u% K4 R( X- g0 c  U
  2312. LDA <Music_Stop_State
    1 k# ?- ~: R2 H' y9 _7 Y
  2313. BNE Change_Select_Play
    & x) {6 [+ Z8 v' Y/ z
  2314. JSR Music_Song_Stop- u1 A& X8 F9 p* [1 F
  2315. LDA <Music_Stop_State
    3 K) Z. R! J7 L( [+ d1 b' s$ B8 l3 }
  2316. RTS4 a# M6 R2 z4 ]

  2317. 4 y8 R: b- O. x; |8 a, v% B7 I5 k
  2318. Change_Select_Play
    3 r/ f+ W5 w3 _1 B, G
  2319. JSR Music_Song_Play% C& Q: G5 H) w( x
  2320. RTS
    5 k. q" `4 A0 Y5 e2 f) a& P: w

  2321. 8 x3 C4 G' x, N3 G. `; ~+ n5 ~
  2322. ;--------------------------------------------------0 u: J; K2 K- V& W8 z
  2323. Change_Select_Last_Item;上一个专辑" k% f. v6 k# B6 X1 T6 O9 S3 S
  2324. LDA <Text_Disable_Flag9 W- M$ y( G# y% n9 n4 E. ?- J
  2325. AND #TEXT_DISABLE_ITEM( E3 f6 A" r* b$ m8 f& ^- @! K  \4 {
  2326. BNE Change_Select_Item_End- b9 z2 U7 S4 r1 i% v. v. p8 R
  2327. LDA <Key_Once9 M2 |% c, W' o6 H  c; c
  2328. CMP #$080 y- A' C! N' C9 i
  2329. BNE Change_Select_Next_Item9 s, {# @( L% k2 R  @" A
  2330. JSR Last_Item7 v- I! J% {) F3 @* l
  2331. ;--------------------------------------------------
    0 k( O  F3 o5 F+ o+ T: ?3 e6 ~
  2332. Change_Select_Next_Item;下一个专辑
    " o; Q1 n$ l6 ~( l/ W& F5 t, {
  2333. LDA <Key_Once, g; e/ h1 `1 b( b0 ^! K4 b
  2334. CMP #$04
    " r8 d, q: ]/ _; ]1 m
  2335. BNE Change_Select_Last_107 j  P+ s& R4 S- I! P/ W( P+ s
  2336. JSR Next_Item" g7 {; |) B2 f0 s$ B4 m& ~
  2337. LDA <Music_Item_Cur
    4 m: G$ s% o. a" V1 u+ c5 A
  2338. JSR Get_Page_Start_Index) a$ H$ @* d& u# q) _
  2339. ;--------------------------------------------------  j* O$ d* n$ ?% D7 a
  2340. Change_Select_Last_10;前10曲; j7 F- s) D  W5 V; u5 f
  2341. LDA <Key_Once
    + `2 x6 V% J  z8 t& Y! \
  2342. CMP #$40+ ?! d5 G3 |$ h9 M% Z3 j: n
  2343. BNE Change_Select_Next_10
    5 F/ W+ W* z' ]$ J5 j) \' o
  2344. JSR Music_Song_Last_10
    9 {; k2 d- E( `$ ]1 Q3 j
  2345. ;--------------------------------------------------7 |8 K6 C7 m* y" J5 u
  2346. Change_Select_Next_10;后10曲  z: J0 J- X* q
  2347. LDA <Key_Once
    . q; P' Z6 b  O1 i8 e$ `! U5 p+ k
  2348. CMP #$80
      J0 O+ G; f/ [1 `( e& o( _/ X
  2349. BNE Change_Select_Last7 _4 q! A* e$ M- M- E2 ^+ x, U
  2350. JSR Music_Song_Next_10. x) e* i* x4 t$ U
  2351. ;--------------------------------------------------
    4 J% @, ]! R: ^, U' s" M
  2352. Change_Select_Last;上一曲  A7 ]1 y  b5 x' V, }3 g' C
  2353. LDA <Key_Once: _7 S4 U" }1 _; Y
  2354. CMP #$02
    ( q/ N9 X3 P9 }, j0 y  @; h1 E
  2355. BNE Change_Select_Next
    ) l6 c' F7 }3 k& S& B
  2356. JSR Music_Song_Last
    , H- z+ T9 Q8 i
  2357. ;--------------------------------------------------4 `8 J/ Y) P/ J
  2358. Change_Select_Next;下一曲
    - ~: ^* V1 M# ~/ n' ?3 l7 \
  2359. LDA <Key_Once
    2 [5 E( W8 z8 }, i
  2360. CMP #$01
      V: c* R, k$ d
  2361. BNE Change_Page_Next
    / n4 z/ C  f/ E0 W( `# P8 Q
  2362. JSR Music_Song_Next
    7 v5 r: C: t. `8 ~) L; s
  2363. ;--------------------------------------------------( Z& ~* n5 M; u. }4 y
  2364. Change_Page_Next;下一页7 O' \* o& y6 w! D0 s$ _
  2365. LDA <Key_Once
    ) k5 Q5 ?: T% k8 Y$ b  f
  2366. CMP #$201 Q9 k4 V, G9 w8 L  V
  2367. BNE Change_Select_Item_End
    0 i' N6 j" r: x5 s# M
  2368. JSR Next_Page7 J' M$ _1 ~; Y. r2 p2 O
  2369. ;--------------------------------------------------* `; k' W" w1 U
  2370. Change_Select_Item_End& }) O3 X3 ?( f! M* i& h
  2371. RTS& m7 A, {7 f& x: ~
  2372. ( J' w* H" I# \, E$ d& u0 ^
  2373. ;==================================================
    # G) b$ E0 S6 ~! d/ r$ d
  2374. Show_Arrow;显示箭头光标
    : L* g6 ?* h8 r/ |. a6 Y
  2375. LDA <Music_Item_Cur
    ! q  d7 P$ h5 ^" H6 Q" o7 @
  2376. JSR Get_Page_Start_Index6 t  Q# O2 q( p4 o
  2377. LDA #$00  ^! {5 [# s- @2 S7 m& a0 ~
  2378. STA PPU_OAM_ADDR
    ' @  ~" O1 T" l( t
  2379. LDA <Music_Item_Cur
    # @1 t- L3 Q3 B# f% ]% V
  2380. SEC
    1 s0 }% r0 v3 v. G
  2381. SBC <Data_Buf
    ' y0 B) z, q/ J. a4 |* G* b
  2382. ASL A# d% j9 N' D: p) G. ?
  2383. ASL A" ^% b6 O! m; w
  2384. ASL A% |, Z( e; y, x( d2 v5 b1 L& U7 w4 j
  2385. ASL A
    " b9 g2 R9 B6 K9 u7 k* _, X9 }
  2386. CLC
    ( r9 m8 E  ^; a' @" \" B
  2387. ADC #ARROW_Y_OFFSET# W# O- g. p1 q8 @# d+ q# b; O
  2388. STA OAM_TEMP_ADDR + $00) h% A* U: v# Q0 U/ [+ n  i
  2389. ;STA PPU_OAM_DATA$ J: k: e$ \8 |- i% N, z
  2390. LDA #$1F! n5 d, ^( \! U( Y3 S0 Z; T/ j* ?
  2391. STA OAM_TEMP_ADDR + $01
    6 d$ z: ^, D1 P6 z' B
  2392. ;STA PPU_OAM_DATA
    9 _- q, P5 U5 l4 F0 O
  2393. LDA #$002 f, ?; l2 _, R: w+ Q
  2394. STA OAM_TEMP_ADDR + $02
    1 |- y; W3 x$ b) M1 ]3 J8 p- O! o
  2395. ;STA PPU_OAM_DATA
    4 ~7 g0 @( ?1 V
  2396. LDA #ARROW_X_OFFSET
    * I* f# f# H8 y
  2397. STA OAM_TEMP_ADDR + $03
    7 d1 B: ~4 t) g" ]+ f
  2398. ;STA PPU_OAM_DATA! k# f$ ~% t- O
  2399. RTS" r# h1 T  Y0 N& |
  2400. : p8 h; c3 C; o# q- F4 V6 x
  2401. ;--------------------------------------------------
    ( }: d6 h$ n4 I
  2402. ;命名表数据$ ^8 Q/ n! Y6 O4 l0 ]1 t3 T
  2403. Palette_Attributes
    + Z  R$ g; ~$ G% |3 @
  2404. .IF SOUND_BAR_SHOW_ENABLE. [9 f8 r! E4 h$ T2 ^
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$556 O( N' M7 q( M1 [+ a0 Z
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    & k- v, i4 i" o- {8 r/ w6 T
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75* X; N: y1 C, C" \1 a4 K- Y
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
    0 o1 i' _% @8 q  H$ c+ m' p
  2409. .ELSE5 k  G: D) L& V5 o: ^
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    & @( e# ^: Y5 [8 d0 X- L
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    ) ~" I* ~& u' J& M" g# {
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$756 z; |/ b9 C( c% G$ V4 @7 U0 ~7 ~, L' I
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA/ Z+ l6 ?3 @  @$ {2 Q3 c
  2414. .ENDIF% I9 n# {8 f( A, x4 l9 W

  2415. 3 A6 v8 |3 J( x* u
  2416. ;--------------------------------------------------
    & k  B0 C/ r5 T, Y
  2417. ;调色板数据3 I( B2 y& e3 h
  2418. Palette_Data8 B6 t! f5 \1 E7 a$ L6 D/ R1 b
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F
    + X, b0 |& n% U
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F7 M* ]6 |0 X5 p6 \0 k
  2421. / V8 @9 q/ u! _/ j; |- s. O
  2422. ;--------------------------------------------------; Q! Z# W% f1 U/ g+ ]1 s* n3 L# m
  2423. Static_Text_Data
    0 T, l9 `8 j/ A# ?5 f
  2424. .WORD Static_Text_Caption_Data
    1 N, R- J1 K  {3 G# V: Y+ }
  2425. .WORD Static_Text_Author_Data
    4 H3 I/ y3 C% M  n3 r" g
  2426. .WORD Static_Text_Date_Data+ @  R" K- R$ m+ u: f, s
  2427. Static_Text_Data_End
    # |" }- M9 P+ d, m- S1 J2 H/ F

  2428. , R9 C+ }) a0 V9 w: ^* j) a
  2429. ;--------------------------------------------------
    - U, w! n! k& w$ Z" ?' M
  2430. Static_Text_Pos
    4 T# f- p+ _1 ^
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)
    ) G( }8 g* ^4 T3 E3 i' j" C
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos)
    3 B  u! _. H, U; @( W: i
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos)' |1 c+ l0 r8 A8 g9 p( H# G
  2434. Static_Text_Pos_End! ^* N( w) F4 d
  2435. 4 T' f" i# q0 f9 `" S7 G0 O
  2436. ;--------------------------------------------------& r# R6 e9 _2 @  B  o, [1 m- U! |
  2437. Music_State_Stop& [3 R% e  d4 {$ j
  2438. .IF SOUND_BAR_SHOW_ENABLE# X; {7 }8 v7 I8 K2 U
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    - ~% Z. W( L. L7 p: \* C. L) @7 p9 j
  2440. ELSE
    * j5 F8 {" C* w' S- ~; L9 t) L# F
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00$ F& F, Q7 ]& ?" P% V' p
  2442. .ENDIF
    4 Y1 Y$ w7 ?, y6 n, L
  2443. Music_State_Play
    : _  R6 q- T" \- ~3 }4 ~
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$00
    9 V: ^3 p, H  R+ @0 _8 e/ G
  2445. 7 V' \7 I" s$ s8 J
  2446. ;--------------------------------------------------/ F7 c2 x# d6 ?) g" ~* R" S  ~
  2447. Sound_Bar_Text_Data;声音类型文本' r- T; j/ Y$ C4 L$ F7 c
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-"3 a$ j) h' J) W8 S5 p- [
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-"5 F: Z3 |; `3 c. `: v' i- N; ^
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-"2 t6 \/ |. m% _/ X1 l! k* q# ?# d- j
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"% _2 J% T$ t2 i( ^5 I
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00
    ) Q0 ^$ u6 Z/ T5 @) J

  2453. 2 A2 y# t/ W. A# B) O
  2454. .IF Track_Name_Pos
    6 Z* A0 `% t+ @1 d2 s' I
  2455. ; v* B# Q) g3 c' o
  2456. ;--------------------------------------------------7 f! a7 \! ?5 b' O4 s5 g
  2457. Track_Name_Addr_00;曲目名地址索引
    4 l1 c8 [/ [% o; }2 V/ K& p) O
  2458. .WORD Trackr_00_01
    3 ?0 ?7 {& f. J' P
  2459. " n& T% K. D( S. ]8 b
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"/ u: v6 D! m% F; s7 f
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"- R' A; O4 g& }) J; ~3 i

  2462. ; c+ F% {+ G* q" W7 y3 h& [
  2463. ;--------------------------------------------------" V9 z5 i8 r: P+ `0 K6 W( E
  2464. Track_Name_Addr_01;曲目名地址索引
    % }. ]" v, O8 T9 {! H! i
  2465. .WORD Trackr_01_01
    ; X) h: |, l6 U* ~

  2466. % Q6 O9 F+ p0 A# Q! Z
  2467. ;==================================================
    ; w  `% s" i$ Z6 Y; y; s% a
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1"& \/ g" K9 ^' X
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2". |: N& B; u% K
  2470. # l; _) g6 k6 T% l: i% m: R% c
  2471. ;==================================================
    8 @& {5 a1 G# ^9 {
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引; q+ a- c4 {/ P& z* t" A
  2473. .WORD Track_Name_Addr_00! }, D' x  u/ Y8 J
  2474. .WORD Track_Name_Addr_01
    ( G6 N9 |! c$ |% e% [
  2475. .WORD Track_Name_Addr_01; w' {, U7 q* b
  2476. 7 P( N# l, u5 b7 B
  2477. .ENDIF" n6 e; u6 {4 r

  2478. 3 u2 U3 G+ d" Y$ `2 A6 n& Y/ ^0 a2 B7 Y
  2479. ;--------------------------------------------------
    $ q8 F9 _) r9 {" q4 V
  2480. Static_Text_Caption_Data;静态文本数据
    5 I; g4 n  O# u1 k+ y0 U$ s
  2481. .DB 16
    * Y" Q& K# i: E0 G. q9 c
  2482. .DB "FC MUSIC 12 IN 1"" k& b) r# o% b* a1 ]) r
  2483. Static_Text_Author_Data
    ( c- B' ]9 D  N
  2484. .DB 25
    % f% @) ?) C( l+ e
  2485. .DB "EXTRACTED BY FLAMECYCLONE"* l: B9 E+ i7 i8 x; T( E
  2486. Static_Text_Date_Data7 \- M; u: c& H) T
  2487. .DB 10
    * Z! n- ]8 i- s& f
  2488. .DB "2023.07.23"
    / y- h  t% z* t; E, g
  2489. . O6 [9 ~+ _- P# j1 d) V3 d
  2490. ;==================================================
    / I, _( g# o5 I& x- ~8 W3 Z' Q; }
  2491. Music_Collection_Name               ;专辑名间接索引7 I8 O7 V, E% J3 x: h
  2492. .DW Music_Collection_Name_006 Q. V6 [( |4 F% T
  2493. .DW Music_Collection_Name_011 R( \1 m! n. E% Y" G9 C! Z- g
  2494. .DW Music_Collection_Name_02& w  x; N# A8 I, S  C. \1 _' Y7 \
  2495. .DW Music_Collection_Name_037 K) C) k0 O1 D, @/ C, I
  2496. .DW Music_Collection_Name_04# O7 P& l, ]2 b) r! g
  2497. .DW Music_Collection_Name_05
    6 B+ s+ _& ]- ]
  2498. .DW Music_Collection_Name_06: @2 _  x8 j" l
  2499. .DW Music_Collection_Name_07
    $ l6 a; }/ c8 y1 W
  2500. .DW Music_Collection_Name_08
    ! p$ Z; X( a* Z2 e  H
  2501. .DW Music_Collection_Name_090 D8 s# p% C7 ]% p' `
  2502. .DW Music_Collection_Name_10; }. S/ E) s+ J, R
  2503. .DW Music_Collection_Name_113 b9 E/ M. g' }* o/ R* r

  2504. * b3 l0 x3 V4 N  c- S; i
  2505. ;==================================================
    9 T  L; Y3 P0 C6 l" l" ?8 c
  2506. Music_Collection_Name_00            ;专辑名文本数据
    2 d  M& S1 M: f, e7 q. g
  2507. .DB 11,"1.RAF WORLD"
    . R" L, u: l; ~; s; Q
  2508. Music_Collection_Name_01
    1 ?) u1 p3 y, y& J8 w
  2509. .DB 15,"2.FINAL MISSION"
    2 R4 t. ~7 x  R- `! W
  2510. Music_Collection_Name_02+ e# G9 C; n, }8 w, @6 X
  2511. .DB 06,"3.KAGE"
    ) N) W$ U$ f) r4 P( V
  2512. Music_Collection_Name_03
    + i) l& j( Q! @) V5 v6 s
  2513. .DB 16,"4.DOUBLE DRAGON"
    ! C& {# u. D' `" |! C- q/ O
  2514. Music_Collection_Name_04
    . }: O  [7 Z; `0 B+ Z
  2515. .DB 17,"5.DOUBLE DRAGON 2"
    + ~/ _/ p7 r, y2 A$ \
  2516. Music_Collection_Name_05
    9 m7 I/ i) \$ ]
  2517. .DB 17,"6.DOUBLE DRAGON 3"
    ; t% `4 u7 v. ]( T1 [4 O, O8 }1 X
  2518. Music_Collection_Name_067 Z7 `  j% e& e. a/ p
  2519. .DB 09,"7.ROCKMAN"
    2 I: m+ @( D3 f/ ?) T( d
  2520. Music_Collection_Name_07+ U$ z5 w; s' j/ F# k' l: S4 q
  2521. .DB 12,"8.ROCKMAN 2"
    ) e- I+ B4 ^; e9 y0 b
  2522. Music_Collection_Name_08
    5 Z; @1 o+ z3 c5 \& L
  2523. .DB 12,"9.ROCKMAN 3"
    3 @  @( L/ ?- h! z
  2524. Music_Collection_Name_09
    & g6 H( i) s, l5 ]0 ~
  2525. .DB 12,"10.ROCKMAN 4"' l, Z  U/ {. j0 R8 h7 \# y
  2526. Music_Collection_Name_10" ]6 C' ]5 j% k3 c9 U1 g) A. D
  2527. .DB 12,"11.ROCKMAN 5"& h1 v, e0 Y0 ]3 }' X1 K- |  R
  2528. Music_Collection_Name_11) q% k! \5 I5 G" w3 E1 ~! K- _: a
  2529. .DB 12,"12.ROCKMAN 6"
    # |! M# y$ ], n

  2530. 1 b& A+ T6 P! C1 I, d/ C
  2531. ;==================================================2 T$ A5 \$ l; x+ |: s0 q5 t
  2532. Track_Name_Addr_Flag                ;显示曲目名标记
    / F. C& ^: Q8 [' @/ B0 K0 n  F; M
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,0$ \" f7 e/ g+ A$ S/ n& }6 J
  2534. 2 N: Z- X2 v9 s* S
  2535. ;==================================================
      C6 y3 W9 r3 J. ?; f# Q
  2536. Item_Pos_Data                         ;光标箭头位置
    ' [" q  P: S" N
  2537. .WORD ITEM_SHOW_POS
    . {, Y- l" b: W  t% N7 a' B4 z
  2538. .WORD ITEM_SHOW_POS + $00409 C1 ]; E5 r$ V' I) G
  2539. .WORD ITEM_SHOW_POS + $0080! E  e6 z! j, t, x9 X
  2540. .WORD ITEM_SHOW_POS + $00C0
    ) a: e  s6 _9 z. ?
  2541. .WORD ITEM_SHOW_POS + $0100. P. M; d4 _8 j% V6 x
  2542. .WORD ITEM_SHOW_POS + $0140: W" s: L( a5 K; q2 W& b* e( B
  2543. 5 c: f' r' K$ P1 h9 n' \9 S3 _  w
  2544. ;==================================================
    0 D% D, B: K5 C$ u
  2545. Sound_Init_Port                 ;音乐初始化入口地址9 [; K/ N- m3 Z+ _: I
  2546. .DW $BFC8
    7 g3 u6 k! e" \+ R
  2547. .DW $D7F0
    & Q- O! t  u! `$ p9 g5 t- a8 T& s7 ~
  2548. .DW $9FC0
    ! Y% W1 }' z0 `* `; h& h9 k4 ?
  2549. .DW $BF701 \, ?2 P- r# ~' m3 O
  2550. .DW $8003
    # p  [: c1 L% l* x1 c, \% V
  2551. .DW $BF30
    : F$ {8 l3 P- h# q
  2552. .DW $9003' ?8 q. f& Z, {0 h1 u* W1 H# s8 b
  2553. .DW $8003* c; s! B) g( m" U7 ]( m2 L
  2554. .DW $80036 q# N1 Q" u, {7 Y. b) J& _
  2555. .DW $8003
    2 s4 ]7 _" O2 U% i0 ?
  2556. .DW $8003
    # ~- i  n- ^  ^
  2557. .DW $8003. X, c) J- ?( ^! X0 g) Z& T, T# T

  2558. 7 ~& W/ f" U* I5 l2 [4 G
  2559. ;==================================================: v! z, [  w  ]# y9 X
  2560. Sound_Play_Port                   ;音乐播放入口地址2 s# S6 z: U! _% V8 K1 F
  2561. .DW $8000
    : x1 E! }0 H/ N" ~4 [/ ~# a
  2562. .DW $8001
    % `& n8 |9 p  x/ I7 z
  2563. .DW $A000
    & z1 X5 }# B; B' v$ I" W4 k' Q
  2564. .DW $8003
    . Q- O8 W  w* r9 W8 v! c# D
  2565. .DW $8000
    0 w0 \! X! X, N$ Z" H
  2566. .DW $8003
    + s6 L4 a9 t7 j& R: d
  2567. .DW $9000
    * i9 m$ L( E9 |5 L0 M
  2568. .DW $8000# P6 M5 g4 @/ |5 a$ _
  2569. .DW $80003 z2 z# V  r, R8 ^+ G  ?
  2570. .DW $8000
    ) ]3 u% q# ]5 ~5 R' t
  2571. .DW $8000$ M% G' y& P& g9 C8 B( R6 l( v
  2572. .DW $8000
    7 g# ]9 r7 N4 f# e. J
  2573. ( L. \& G! W! c$ |1 \
  2574. ;==================================================1 c: p" c' [* b& g) V$ }$ C
  2575. Sound_Reset_Port                  ;音乐重置入口地址) w, k: P+ L4 d) E) l6 k
  2576. .DW $0000
    - Z! j7 ~7 b, @8 ^1 Y9 E( }5 u  C/ H
  2577. .DW $0000
    # o: D2 D5 c! z
  2578. .DW $00004 v9 _" s  o8 }$ U& {
  2579. .DW $0000
    : @8 }# M  R' a; y3 H+ e% S) f
  2580. .DW $0000
    * R6 r; M2 w) |* o: B
  2581. .DW $0000
    4 N1 d! d' V) q5 V2 V0 e( W5 [
  2582. .DW $0000* i$ u; v2 h* m' f' o
  2583. .DW $0000: c7 m, ?0 M: n! \1 {
  2584. .DW $00006 V9 X- M, Y# E5 W9 r- v2 t. a
  2585. .DW $0000
    ' [) C  s' Z, |$ p3 T9 \0 W
  2586. .DW $0000
    ; ^+ l* e; w7 n) K4 A4 z
  2587. .DW $0000
    , I) N! g0 v& W! J& I
  2588. % j* ?9 r+ i$ a! o# c
  2589. ;==================================================. {1 J0 T& R4 A# S8 Y, Y3 f! d
  2590. Sound_Total_Port                          ;曲目总数
    + f! \# k4 h5 U* Q$ U, L7 y0 N
  2591. .DB 38
    . a1 [9 g5 u, ]- e9 {. {  d
  2592. .DB 33& s' H* y$ I  E* F5 ?4 W4 [
  2593. .DB 49
    6 s. l3 W6 l% R$ K- w5 A) Y
  2594. .DB 41
    + c$ a' w) l$ t6 [, ]: `8 D
  2595. .DB 83# p0 A* h" H& h/ `5 M
  2596. .DB 70
    6 v& B) K; D8 a
  2597. .DB 50
    ) e- `% R; h2 P0 b8 \/ M# [
  2598. .DB 67
    : t) A& e% H% b+ w4 v
  2599. .DB 57
    # `/ r- \2 \. r* P
  2600. .DB 71
    9 t( J8 t9 e  a# C/ J4 R' g
  2601. .DB 76
    " T7 z3 H+ T; U! C
  2602. .DB 102
    $ \$ {4 p8 X: i9 s# ^- r8 R, l) [* k

  2603. ( p) s# |( e0 k% ]9 d  M0 V
  2604. ;==================================================3 ?' n; b$ \+ p: w$ Q9 D0 e, V
  2605. Sound_Start_Port                      ;起始播放曲目$ z3 |+ J2 w  m
  2606. .DB 004 {! r# u2 n5 {1 `1 }
  2607. .DB 00
    3 M, N& {4 N  H- ^2 V
  2608. .DB 007 y. W: M* o+ O0 |" ?9 O( Y
  2609. .DB 00' |0 S+ x; z% \4 }, x$ R0 G: }
  2610. .DB 001 Y3 P1 ~# y! X% _  P1 z6 X' [8 m0 I
  2611. .DB 008 e5 x, n" Y. J; s* U  s
  2612. .DB 00
    ) g4 W5 K4 f7 }" b" s
  2613. .DB 00
    * ~+ S" g$ ~+ L# x7 |: ]( L5 t
  2614. .DB 00' u' c. V% s( s+ r! K" A) `6 T: ?. K
  2615. .DB 00/ c; H- m: N% l7 l$ `& j* w
  2616. .DB 00
    ; F* @6 R5 i, }; N5 h; n7 P
  2617. .DB 006 [0 Z$ H9 t  K1 x
  2618. 0 n1 R0 w* w1 ?& b+ p0 f
  2619. ;==================================================' O2 e  M, y! Q. j
  2620. Sound_Bank_8000                      ;专辑bank_8000
    , m6 _" ]( A2 r4 t8 @
  2621. .DB $10: U9 h: e0 s; E8 f/ v5 Q
  2622. .DB $12' K( C; W" e  G) U7 ?
  2623. .DB $142 k- W: Q7 x9 f* }2 b2 D
  2624. .DB $16
    ! ?& O' U. o- o' m
  2625. .DB $18
    : Q* D# V9 m2 ]9 `" L! a
  2626. .DB $1A
    0 J( r2 r2 c" y2 U0 E+ R7 C( y
  2627. ! S, s! U- V; x0 b4 S
  2628. .DB $00
    $ {& D4 m+ q- W
  2629. .DB $02; R  P8 t! \* s; q% G
  2630. .DB $0D
    5 ^+ j- c( U# U8 ]! ?/ G
  2631. .DB $04" ?. t' l, m7 I% k# ^
  2632. .DB $07
    ) O! l4 }( O; [& L% S
  2633. .DB $0A
    : @% p8 C/ f+ Q/ [9 i
  2634. 2 I4 u1 D  J# f4 _

  2635. $ d9 D9 {4 K7 H6 A4 ^9 q7 q7 g
  2636. ;==================================================
    ) ]& ~& f! b8 ]5 G4 K
  2637. Sound_Bank_A000                      ;专辑bank_A000: R0 E9 O2 L/ f0 |2 ?9 [* X, M7 e2 H
  2638. .DB $11
    ( L+ ]! V7 b4 b) N
  2639. .DB $130 p" ~7 ]6 L2 j2 U8 M
  2640. .DB $15
    9 P6 e! _5 \- i  |) X, |
  2641. .DB $179 r, L9 y# m4 p
  2642. .DB $19
    - y& X( S- ]6 v/ e) d6 @
  2643. .DB $1B/ B- ^* N# t2 ~! m

  2644. ; X+ v7 p% M$ j9 k2 O) o
  2645. .DB $01! e% n: H/ d. f0 v" O
  2646. .DB $03
    7 h' t1 H! l! s9 K! Z' ^
  2647. .DB $0E6 T; S' c5 G) A2 S- r
  2648. .DB $05. q% {! ]2 X4 m/ ~
  2649. .DB $08
    4 j4 B9 J% c; D  c' z) L$ U
  2650. .DB $0B; b: O: s& i9 T: B# ^
  2651. / B) _( Z" a* R* S* q5 ]0 x- g
  2652. / d, ], }- B1 H6 K
  2653. ;==================================================
    - g" g; j8 }$ g( Y! g( J: I
  2654. .BANK RESET_BANK & BANK_DATA_MASK) t* L0 k0 L4 [! v4 I" ]. P
  2655. .ORG RESET_ADDR
    7 Q# c7 R4 g; {# {! p& J1 B. l

  2656.   G# u- _4 d6 s0 |6 D, y' K: h
  2657. ;==================================================
    3 I9 J. R0 g: e: W
  2658. Switch_Bank_8000;切换bank到8000-9FFF0 v8 E* H4 c* U
  2659. PHA/ Q# i1 O& Y0 [* l# L* X
  2660. LDA #$06
    & X) X% W% e1 ?9 o" y
  2661. STA MMC3_BANK_CTRL8 Z% Q6 K# G3 ~; ?& f
  2662. PLA
    & m# V7 Q6 s- G5 h) f
  2663. STA MMC3_BANK_DATA
    ) j+ Y) j7 _( l+ x
  2664. RTS0 i$ z! ~0 F; R8 \; S( K$ q
  2665. , ?, C4 {( \: s: u; P. D
  2666. ;==================================================
    " x' O* U- r2 L# I* G
  2667. Switch_Bank_A000;切换bank到A000-BFFF* v- W, o; |$ _8 ^
  2668. PHA; K4 H8 u* T9 j  a
  2669. LDA #$07
    ! n  z- q  _$ `0 p
  2670. STA MMC3_BANK_CTRL! V" `+ z' p# k2 d3 t: v
  2671. PLA
    9 z# H; v6 \# J" q+ _; a1 a! ^
  2672. STA MMC3_BANK_DATA
    / q& D1 q7 H% [3 Z( V: x& \
  2673. RTS
    + [6 \" U$ x; d7 ^( }

  2674. ) S  \# }0 j" {$ P. M% \
  2675. ;==================================================
      z. B/ {( D8 g7 K0 }+ g- D- |
  2676. Switch_Main_Bank;切到主程序bank
    2 t9 E% C+ j8 R5 @" n
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK* A/ m5 |' G* H' d' J; F
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank! N* \: r: l4 M6 M$ n
  2679. RTS0 I, w7 |$ x# x, p- w! ]
  2680. 2 o1 F9 M$ z" O8 y
  2681. ;==================================================
    . {1 o! @. \1 z4 L/ u% a
  2682. Sound_Reset;音乐重设(如果有的话)3 Y4 ?, a5 Q, o7 I- }1 [
  2683. JSR Switch_Music_Bank  ;切换到音乐bank$ p3 y- @# V# p" v
  2684. JSR JSR_Addr_Op        ;执行音乐重置! J' P0 V( p+ a1 k! R
  2685. JSR Switch_Main_Bank   ;切回主程序# h9 L5 p2 ~- u0 R) ~. T
  2686. RTS: E- t& ~& T4 K9 y
  2687. $ b9 K( }" [4 ~$ X5 k  L1 t8 I) e
  2688. ;==================================================
    ( m7 i2 k/ q( r: N5 P
  2689. Switch_Music_Bank;切换音乐bank
    0 Z: E$ @5 |3 Z* `. e: U2 E$ w1 Y
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号
    ) t1 z# {+ R: K
  2691. LDA <Music_Bank_8000: h6 E; X0 Z5 E) O2 M  n5 z+ w
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank
    4 b! G8 U) H5 [) D. @
  2693. LDA <Music_Bank_A000
    0 a9 s. Q5 u. y2 ^, Z
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank
    7 p8 t9 K2 G8 ?- @; |1 _
  2695. RTS' S' T6 ]" W1 b1 d% \8 N

  2696. % l' M- E: h6 N+ m" b
  2697. ;==================================================
    % M+ ?! e! s1 [! v- H
  2698. Sound_Init;音乐初始化/ W: H$ w: h4 i, x9 r0 N" H
  2699. PHA% N0 ~. @5 L6 ~' N( p/ n- U  e
  2700. JSR Switch_Music_Bank  ;切换到音乐bank
      T: k4 b+ j" ^' `1 }6 T
  2701. PLA
    & z- g7 R3 h3 o6 y2 O
  2702. JSR JSR_Addr_Op        ;执行音乐初始化2 _8 ^0 J$ }6 X. u: {
  2703. JSR Switch_Main_Bank   ;切回主程序
    3 G% |* ]8 o* {% l# u7 [- T
  2704. RTS1 ~7 `8 j, |- Q9 e% u; U, s! i- I  U3 M
  2705. ' Q* h; M( O9 H0 g
  2706. ;==================================================
    + B' ~. y% }; }7 L
  2707. Sound_Play;音乐播放
      y% P: ?% h: ?  g6 n. \! D
  2708. JSR Switch_Music_Bank  ;切换到音乐bank9 K* v$ ^* A  _. P0 V! |( {
  2709. JSR JSR_Addr_Op        ;执行音乐播放
    + U9 X- S' m8 {1 X2 i
  2710. JSR Switch_Main_Bank   ;切回主程序! \; v, ^0 Z$ @: G' L, I
  2711. RTS, G3 r# U  Q# c  |1 e

  2712. / Z/ y3 m6 p- ?2 @1 s  v
  2713. ;==================================================1 y) x# h- v, B; U+ Y( [/ t6 m* J
  2714. MainLoop;死循环
    # [) `: B7 g8 I* i
  2715. JMP MainLoop" a- e+ n% v0 l2 m
  2716. ( V" K1 \4 a5 j. Y% H9 ~# q! P( H
  2717. IRQ_SUBPROCESS_JMP = 0
    3 m: x& G* `2 o4 T- S" o: b

  2718. & i) _& w) G! @4 u
  2719. .IF IRQ_SUBPROCESS_JMP7 F9 F3 f8 B! t6 E
  2720. ;==================================================
    ' D+ q7 |1 q* @) M7 Q& x9 z
  2721. IRQ_Process_0;IRQ处理过程0
    1 `: N& k( C# }
  2722. 4 o1 h+ X& S2 R% ^
  2723. ;15条扫描线后触发IRQ1 U6 @6 N+ c( a* k, n
  2724. LDA #152 n7 O0 h" b5 R
  2725. STA MMC3_IRQ_LATCH0 b& _. H: k2 U3 c$ R
  2726. ) ~* u3 x& T2 b4 `$ o- E* k4 v8 F9 ~
  2727. ;设置屏幕滚动
    8 E  h2 j1 f! a7 ]: g
  2728. LDA <Scroll_H- V% P. |  l" I6 F
  2729. STA PPU_SCROLL
    0 D7 r* u, M9 a+ c) E3 |4 ?$ X/ m
  2730. STA PPU_SCROLL0 i- D5 @% X  v( E" Q  O4 e
  2731. ; E. k/ ?1 P- E
  2732. IRQ_Process_0_End
    7 ]& f' F0 }# c6 q
  2733. INC <IRQ_Process_Index
    $ E: p' P" u8 Y
  2734. JMP IrqProgramEnd
    * T) s: o7 c% p
  2735. ! L* D0 Z- m4 N7 p- Z
  2736. ;==================================================
    2 r, G( n. p$ p9 H! W
  2737. IRQ_Process_1;IRQ处理过程1
    % c( z' }2 Y4 i& F" t, l( j4 n

  2738. & E* E' ^8 E. P  |
  2739. LDA #554 ]) X" V: I7 T) }: h0 w3 q
  2740. STA MMC3_IRQ_LATCH) r8 Q$ E- g' {$ p) K( I
  2741. ) l- s# [% }, J* Y6 J
  2742. ;设置屏幕滚动
    7 v0 v2 i+ v) S, b' Z
  2743. LDA #$00, F9 z1 e! M/ S2 A! {( I" A! \
  2744. STA PPU_SCROLL7 b8 Y4 b' R( t$ O0 d  C
  2745. STA PPU_SCROLL5 [' |. `- J* x- v4 \. g. W
  2746. & b8 g8 C; S3 C& D4 \
  2747. INC <IRQ_Process_Index
    9 Y- w2 F" Z: Z9 a; a  |7 ?
  2748. JMP IrqProgramEnd  k. u# U- J9 i9 E& T- K4 i

  2749. 0 n- l% a9 S" h) [
  2750. ;==================================================3 m$ a% I( p/ O! x
  2751. IRQ_Process_2;IRQ处理过程2
    ' h% H0 S4 k3 U: G  _: H4 J4 W
  2752. + L! m0 \  K1 w2 k, z
  2753. LDA #15
    $ u$ F; K9 p; L/ X" k7 O: t! C
  2754. STA MMC3_IRQ_LATCH
    0 w* E5 z: Q- Y6 e) r

  2755. 0 C5 E2 O1 R9 R: @  P
  2756. ;设置屏幕滚动8 h/ T5 O. Q3 Y: ]/ \. H+ c
  2757. LDA #$00" {, u* S; a  R" i
  2758. SEC( P" t4 J/ d( Z. l5 M5 }
  2759. SBC <Scroll_H
    4 J* k( [4 _; y3 v: E
  2760. STA PPU_SCROLL
    ( o1 d4 m! p, C( u  r0 ^* B) _5 f6 f
  2761. STA PPU_SCROLL9 f% d' V9 {5 \5 {; U4 t# C# k( M

  2762. ; @0 Z- _  l1 y- t( R: K( T
  2763. INC <IRQ_Process_Index9 @- ~$ B* t8 L! t  J
  2764. JMP IrqProgramEnd
    - r, y' X7 T" r) a" R) y
  2765. % d$ j9 r- ?- ?! D$ W" a' m
  2766. ;==================================================
    1 i: ?' d  u! X5 f3 R8 l7 i
  2767. IRQ_Process_3;IRQ处理过程3
    5 S4 g8 B3 Q% Y9 O! l, l8 }' Y
  2768. ) `4 U) D& }9 t& P) S
  2769. ;设置屏幕滚动
    ( m: A1 b" @0 Z8 P/ |& E: e( S8 P
  2770. LDA <Scroll_H- Q/ d' ^8 U% l
  2771. STA PPU_SCROLL+ m7 J# ]7 ]& T$ s  o- B! w5 L
  2772. STA PPU_SCROLL$ B  B2 x) s9 h- F2 N- |9 ~
  2773. + w3 {) L* w1 ]+ P  `& Q
  2774. ;禁用IRQ( f. z6 C) `' c# q7 J0 K, G
  2775. STA MMC3_IRQ_DISABLE
    / _) Q8 Q2 z4 h
  2776. JMP IrqProgramEnd/ c  p2 w# z* p5 Q
  2777. ! F! G; y9 v( K8 o
  2778. IrqProcessAddr
    ! P$ y% y$ d3 o+ g* s
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_38 S! s, Z' G: \. V7 [
  2780. 6 B- J; s1 Q& G& H+ u7 H5 ^
  2781. .ENDIF
    ( K; v& x( U9 G( T2 p3 b

  2782. 1 V( m: b8 w$ Z+ x' O: K
  2783. ;==================================================
    8 B/ }, ]* I" @
  2784. ;IRQ滚动模式常量0 k5 B. ^, @+ r: L( E0 |
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动
    / t* a: Y; ~  J8 w; E2 z
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动
    # }) F- {5 [/ {4 d) e
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动( i# o- }3 B( U

  2788. ) k$ C# e/ T3 W. f; w
  2789. ;IRQ扫描线数据
    ' e' j5 ^" {. G# s+ S8 Z8 e7 B* k
  2790. IRQ_Scanline_Data( D  x1 |0 E; D2 P% Z
  2791. .DB 8
    ; s$ ]* u) {  g: m! d
  2792. .DB 545 n& I7 t% H, v0 ]% \% D' S  e6 {' n
  2793. .DB 83 p, o& X. d- [! L2 L
  2794. .DB 00 ;关闭IRQ  G8 T8 z- S4 J1 y

  2795. " ~/ ]8 p- @- D5 b, m
  2796. ;IRQ滚动控制模式
    8 W; E4 u6 H" Q
  2797. IRQ_Scanline_Mode5 x9 Z6 f* `/ p) q; s4 P; e7 j
  2798. .DB IRQ_SCROLL_MODE_ZERO" K) K. f" p! d2 {; ^
  2799. .DB IRQ_SCROLL_MODE_ZERO
    1 a9 M$ p" E- p! ?- u
  2800. .DB IRQ_SCROLL_MODE_RIGHT: Z! y5 ~; t0 ], w0 H8 K' B1 `
  2801. .DB IRQ_SCROLL_MODE_LEFT* \! y3 j# q3 ?
  2802. 5 D- B; {6 a' O7 A
  2803. ;==================================================
    ( H3 s4 `! ]6 |+ J) ]1 h
  2804. ;IRQ处理+ K' M! b4 c0 H/ e( j1 D
  2805. IRQ_Process$ S4 X: v4 z- p/ L9 X
  2806. LDX <IRQ_Process_Index1 r& p- E, w, E! C( k
  2807. LDA IRQ_Scanline_Data,X
    4 T5 s2 t, u7 H) [
  2808. BNE IRQ_Process_Latch1 D$ M" g, G& Z5 b* p
  2809. IRQ_Process_Disable;禁用IRQ
    4 O! X& W. ]% y6 p% Y4 Y! Y! M
  2810. STA MMC3_IRQ_DISABLE
    0 {# y- H/ [" w% v1 l5 c
  2811. STA IRQ_Process_Index
    3 p' A8 g2 ^  z, p2 k
  2812. BEQ IRQ_Process_Scroll5 n; `" E* `. e, A' I- L5 I1 x
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线
    " ~1 @2 }0 E) H# X' D! p6 _
  2814. STA MMC3_IRQ_LATCH
    . |, W1 p# Q. h) ]9 m+ p
  2815. INC <IRQ_Process_Index
    " F  s% Y, i) i( {
  2816. IRQ_Process_Scroll;IRQ滚动控制1 \1 J; b& ~0 }# q2 G, k
  2817. LDA IRQ_Scanline_Mode,X
    8 l' }: Q) c% A
  2818. CMP #IRQ_SCROLL_MODE_LEFT" @# T7 R2 L& t! e8 q+ v
  2819. BEQ IRQ_Process_Scroll_Left
    1 }( V  l% x$ |3 }6 B4 o6 b0 e
  2820. CMP #IRQ_SCROLL_MODE_RIGHT+ b  S" p7 O* _
  2821. BEQ IRQ_Process_Scroll_Right
    9 L5 f3 o$ d3 J# ?3 t' K  w
  2822. IRQ_Process_Scroll_Zero;不滚动2 r# p1 N, |  U* _' \1 O3 Q
  2823. LDA #$00
    , D) Y  P! U  S+ V4 B5 H! U
  2824. STA PPU_SCROLL2 G* @. _7 B7 w8 C1 p% z+ a$ Q* m
  2825. STA PPU_SCROLL5 F" R; K& @( J. R1 Q
  2826. RTS+ }8 w% o: A. e
  2827. IRQ_Process_Scroll_Left;向左滚动! \. ^4 w# A8 @3 J
  2828. LDA <Scroll_H
    3 a  r/ j" c6 L+ a8 h1 f
  2829. STA PPU_SCROLL
    + `' q+ ]- A5 f
  2830. STA PPU_SCROLL
    2 _$ E- ]$ l4 A; o% Z
  2831. RTS2 ^+ S/ G0 k( Y/ {
  2832. IRQ_Process_Scroll_Right;向右滚动& M& P/ ]* s7 H- Y( L
  2833. LDA #$00
    $ U+ w8 G5 j/ `! J5 i  {; e
  2834. SEC- q* D2 d% N8 Q! T; l9 z
  2835. SBC <Scroll_H, G3 E( v6 N1 u
  2836. STA PPU_SCROLL
    ) ~0 ]" i# W! o( t9 m
  2837. STA PPU_SCROLL; \; e7 ?/ _8 n& K" G  D4 t1 i7 {# Y7 P
  2838. RTS0 x& [: B3 O0 _* d$ L+ {6 u4 D
  2839. ) q% I0 q! J( u0 h
  2840. ;==================================================& q: M& i# `  S2 h) ?/ d6 G; A8 F
  2841. NmiProgram;Nmi中断处理
    9 ]3 O( Z) R4 L/ c
  2842. PHA
    + t0 f* ~6 e+ l; v+ z
  2843. TXA8 R# D# {6 q" }+ a: ~' O5 k
  2844. PHA8 j/ P3 S  u3 Q) \6 }: f' b
  2845. TYA4 H) L. X& T6 M7 E3 b+ Y) T: J+ T
  2846. PHA+ L$ P* P: b+ e
  2847. 6 X3 `' b1 v! g3 K0 r
  2848. ;读取清除Vblank标志, 防止重复进入
    ! o: z% s2 I- H' p: ]$ Y/ [5 N, K" T
  2849. BIT PPU_STATUS
    " Y) S4 T* s% P, X, }- {, T
  2850. 1 ^0 O, w! x6 W5 Z. b2 g
  2851. ;切换主程序bank
    ) a  x3 S- B7 r9 O+ X
  2852. JSR Switch_Main_Bank
    0 r3 d$ a3 W& g
  2853. ; M2 m5 X# d2 C  j5 a7 L% ^
  2854. ;Nmi处理
    & a( z& [0 Z- b6 O
  2855. JSR NmiProcess
    % N5 N: S" ^: {0 B
  2856. ( R( K+ ~$ d5 O6 F- @# G3 W: F8 x
  2857. Nmi_Proc_End; m3 Q1 R& n0 y: U% f! X
  2858. PLA
    + S3 ]- y- X. Q' s& c4 L: N' k
  2859. TAY
    0 ~& |! R4 N: s
  2860. PLA
    8 l, d- ?* v' t& s
  2861. TAX
    , P% ^0 a  G5 x6 \
  2862. PLA
    4 |* C' h/ Q9 U
  2863. RTI
    : l8 w; q0 y6 |" S3 ]( ~% g. I

  2864. * h3 g' k1 G: P9 O+ d. i5 Z
  2865. ;==================================================
    6 |& V6 h5 X. p2 u1 b# V
  2866. ResetProgram;重置中断处理
    + @% c& Y2 k6 V4 u- R) s* O9 _+ r
  2867. SEI
    # d; f: @* `4 {
  2868. CLD
    # J3 C, s, G5 Q% G+ Q1 j- n
  2869. LDA #$00
    2 L  |; C3 Z) E! G+ D2 i7 @
  2870. STA PPU_CTRL
    7 P; J9 k; _6 L+ ?- j
  2871. STA PPU_MASK2 Q7 w( J9 [8 I
  2872. 1 L8 q# P' _% \0 y
  2873. ;切换主程序bank6 t: G4 R7 N% [2 Z4 S
  2874. JSR Switch_Main_Bank
    / O' ]) ?/ P* m1 v+ y! {3 a
  2875. # V' I' z, u5 T! a6 ]  T
  2876. ;程序处理开始: n! E8 F/ c, z
  2877. JMP ProgramBegin
    * l/ Q" T5 N* y* n6 r# ?9 T

  2878. . u, x& b3 a$ s" x0 ~
  2879. ;==================================================; E8 l2 X6 b" i3 g$ H$ p  A, N! C
  2880. IrqProgram;Irq中断处理3 X' i0 Q8 U/ J; \0 @
  2881. PHA
    # P3 Z& |. X! [7 r7 y' ^# \
  2882. TXA
    6 |) t1 T' w0 n/ e
  2883. PHA
    3 A, f8 a. j( m7 Z. K+ V
  2884. TYA" o! k+ _! ?7 u, n% L; A. T8 b  f
  2885. PHA: H) |* Z+ l7 D

  2886. ! [3 h: V! Y  ^: y) O
  2887. ;关闭IRQ) X& i1 [( H, x2 f* T0 _. z
  2888. STA MMC3_IRQ_DISABLE1 \3 G+ T/ }6 U$ n5 [/ b! K( m

  2889. " K0 `0 L# h: q6 |1 M4 m
  2890. ;允许下个IRQ触发
    * }5 Y9 s% a/ t
  2891. STA MMC3_IRQ_ENABLE
    ) \% R/ J2 h/ l* u& t; C

  2892. 3 B7 ?9 R+ ^, H! _
  2893. .IF IRQ_SUBPROCESS_JMP
    6 B, z1 v2 H3 \' P* Q9 x& }0 y

  2894. + F) f0 }" p2 ~, }5 @3 P
  2895. ;执行IRQ过程
    ( F7 c0 r" C2 b, I
  2896. LDA <Data_L
    $ h" j4 A* c3 ~' C: Z2 N
  2897. PHA/ B% T) Y" F" w
  2898. LDA <Data_H; C6 r+ v+ e  F7 f
  2899. PHA9 G2 J( e* F  X/ m  S6 Y" W8 R
  2900. LDA <IRQ_Process_Index
    % x/ l+ K$ L6 m
  2901. ASL A
      U7 q9 B- u* n% M; p
  2902. TAY
    ' i7 j# [" f  {4 L5 b! k" x5 a# B* L
  2903. LDA IrqProcessAddr,Y( q1 B" A) |3 {: O
  2904. STA <Data_L
    0 ~4 U" c' m$ T2 ~# y7 E) |7 p- u
  2905. INY/ ~+ u* F8 L: W$ Z' b8 y8 _8 [
  2906. LDA IrqProcessAddr,Y, L9 D7 C- M) r0 ^* W" ]- X
  2907. STA <Data_H- x. O9 I* z  G! E& e7 k  t
  2908. JMP [Data_L]
      ~0 t2 i" c4 n: x& A6 g8 s

  2909.   [5 C/ U% k- F0 Z5 L5 Y
  2910. .ELSE
    ' l; _! w2 `4 g; D( k. R$ q

  2911. ! q7 c1 Z! A/ u2 G9 [, i. J& f
  2912. JSR IRQ_Process
    8 {# f" v6 t+ @# l- I- M
  2913. 9 d- t$ ^( n, z5 ^4 h! l% Q8 {
  2914. .ENDIF  J$ r1 A' @1 @6 F" k+ v# S& ~% P

  2915. ( p3 V8 C* m$ s  {
  2916. IrqProgramEnd# M1 T$ J  D' e: _/ }
  2917. .IF IRQ_SUBPROCESS_JMP
    & R% S* l9 j" e5 W! L0 j" @
  2918. PLA
    3 T! ^8 o7 S' E) [" U+ r4 K) u
  2919. STA <Data_H
    * v1 S, u' N' H& p# Z) u, L7 e
  2920. PLA, V1 Y. H; C$ M9 U
  2921. STA <Data_L0 b1 ~1 q3 V/ Q  P7 Z, T) ]3 ~
  2922. .ENDIF! C$ V% M" S4 B& P+ D
  2923. PLA
    . P7 j5 N1 y( E$ [( J
  2924. TAY5 }" n" R) x  Q/ Q, y
  2925. PLA
    2 e% w4 c/ n$ K+ R
  2926. TAX+ |* _% F6 Q% D+ H$ J  P
  2927. PLA
    4 R/ [  m5 O6 U1 \$ K
  2928. RTI! o6 ]4 l* c3 R7 _; I3 o- M7 J; h

  2929. . P" g, N4 Q9 }1 a
  2930. .ORG $FFFA! Q6 a4 M7 u1 m% |7 u
  2931. .WORD NmiProgram2 l: o; y- ]7 x
  2932. .WORD ResetProgram# e) {; K' o6 ^; F) R% ~0 |
  2933. .WORD IrqProgram
    % y' p- k' ^, C/ B  m
  2934. % U/ E1 ]8 a+ z! ^1 z% m  y7 R
  2935. .BANK RESET_BANK & BANK_DATA_MASK* ~9 O) g- q, u$ T8 h- {+ j
  2936. .IF SOUND_BAR_SHOW_ENABLE$ k! _9 f, h" u4 B% o+ c

  2937. # d& H8 l* i( `
  2938. .ORG $FE000 ?) {: D* A% U9 t( ?2 P; o% U
  2939. PHA2 R# M! c1 _- o, [% |6 S  R
  2940. STY $07BA
    ) k) K) a8 O) P) R/ O0 Q2 `# `7 \
  2941. LDA #$8D; y/ e# a; T/ A
  2942. STA $07BC
    " W5 H% Y% h9 k
  2943. TYA% A# Q/ N) d6 L# J5 J/ r
  2944. CLC
    0 T8 z' `* X" {$ s8 o
  2945. ADC #LOW(Sound_Bar)8 a/ P! f& ^4 s% k9 o- x
  2946. STA $07BD/ H- `+ G5 s3 Q  t! e
  2947. LDA #HIGH(Sound_Bar)
    3 T7 e2 W: d, a2 ~' v. w
  2948. STA $07BE' i# _/ d; P+ {# ~
  2949. LDA #$60
    , ~2 J9 U+ [' ?# ]5 ~" H; I/ [
  2950. STA $07BF8 ~. d) @4 W) ~3 T- s4 s- b
  2951. PLA
    * q, U* T/ p" I' e+ c5 o7 o+ V
  2952. RTS+ K0 n# Q: E* `  e1 [  _1 a2 i; H

  2953. 1 _( G/ d9 @( |) L- S
  2954. .ORG $FE20( ^" `5 ~# l. J( I0 h7 ^
  2955. STA $07BA: N1 D8 Z5 `$ A" j
  2956. CLC# }! E, \/ u' P% K# j. I
  2957. ADC #LOW(Sound_Bar)! ?+ O4 N$ h! e: q9 t- k2 G6 ]
  2958. STA $07BD! Y' }5 o# ^' ]% G3 W
  2959. LDA #$8D; d, K1 F- G/ V
  2960. STA $07BC+ g9 ?0 w! ~# _* C( o
  2961. LDA #HIGH(Sound_Bar): U4 t: v6 l0 K* V) w# J9 ~+ V3 l
  2962. STA $07BE
    , p/ z/ n5 z+ ?3 k# M7 d
  2963. LDA #$60
    + ?. q' R  C5 C5 j$ q
  2964. STA $07BF
    ! \  I9 ]3 h8 H' l7 c
  2965. RTS
    9 z8 u: u2 M4 K% [) b- G& J
  2966. : a$ j- q+ i4 e8 W. E
  2967. .ORG $FE404 P& P  L; [$ G0 A
  2968. PHA
    / H7 \/ {: ~% d9 h' j
  2969. STY $07F17 A& F1 y9 B( r5 J
  2970. LDA #$8D
    % N( @  \8 U  |2 D
  2971. STA $07F3" ^5 M6 o5 w* u( T! b( U' c; K+ v
  2972. TYA6 B3 P; o' c# @& [
  2973. CLC2 F6 B$ @( w+ Z; ~; H
  2974. ADC #LOW(Sound_Bar)% c, c) d( a  Q0 X
  2975. STA $07F4
      I+ G% Z% c; v0 O* t( {
  2976. LDA #HIGH(Sound_Bar)
    , E& t5 P- l' P# N
  2977. STA $07F5
    ) X! x$ f1 D+ b; f
  2978. LDA #$60
    7 s+ B! Z4 y& {; j6 s9 K! h
  2979. STA $07F6
    9 i8 [. h4 G+ I
  2980. PLA6 G+ B1 ^$ k0 U) q- j
  2981. RTS
    5 u! _' y+ Y& Q! G6 z3 X' l" [+ b. _

  2982. 3 q! t( N( X. Y" l: K
  2983. .ORG $FE608 g& ~+ ~* l* B
  2984. STA $07F1
    ( e6 t. j2 }/ ]) `% O: c
  2985. CLC7 ~* w5 j& e5 v9 y5 ^
  2986. ADC #LOW(Sound_Bar)* r* Y" D7 j$ t( T4 V! d
  2987. STA $07F48 ?9 X3 ]; _( n% @! M
  2988. LDA #$8D. e6 u5 E" r* `7 _
  2989. STA $07F37 i# M* D+ K* c5 _8 G# y
  2990. LDA #HIGH(Sound_Bar)1 M$ ^8 {& w  D9 q
  2991. STA $07F5
    8 ]% ]) N3 P* F% R2 P4 {) E* N
  2992. LDA #$60
    ) B/ H2 y8 I4 z2 @& v5 x
  2993. STA $07F6
    ' l) |0 B9 q9 g* d5 W; o  O
  2994. RTS
    + y2 X% [) t! h- X& _

  2995. 4 U( H* }+ ~, ]
  2996. .ORG $FF408 a8 y' _1 s0 O3 O1 x4 G2 |/ H
  2997. STA $4000# L+ l6 D3 G/ W/ `
  2998. STA Sound_Bar + $00
    5 W: ]" X) L) ]) C
  2999. RTS6 U8 X, ^/ G* N! T; \
  3000. 3 ]; w9 q2 g% C6 E* I& L& m2 v( D
  3001. .ORG $FF488 L9 f7 \) E; q! L1 h
  3002. STA $4004
    ( s# }; b, `' v9 U" g  Z/ F
  3003. STA Sound_Bar + $04; x$ s$ U! r8 |
  3004. RTS  i- Q" h) X" O2 [' g

  3005. , @- S& R" N6 Y3 K  a1 B
  3006. .ORG $FF50
    7 o: G5 z6 R! K# v9 [0 R
  3007. STA $4008
    4 S4 F2 `0 Z% F! H6 n# I4 I  o
  3008. STA Sound_Bar + $08
    2 v' C. D; b2 f8 j* T' }7 Q" u
  3009. RTS/ b  W9 E+ g5 U7 ^
  3010. 3 w- K: l3 d& W. c4 l
  3011. .ORG $FF58
      p0 U/ s/ ~+ F# \. j
  3012. STA $400C  c9 [4 @2 q; {. V7 _, N) |
  3013. STA Sound_Bar + $0C
    * b8 h) b4 R6 H( l3 N
  3014. RTS
    ; R( v7 w  s( m; U" ]( I' Y$ b

  3015. 5 ~" s' e; I  ?3 N) ~
  3016. .ORG $FF60
    + c0 ^0 A( a2 Z7 O
  3017. STX $4000
    3 e: ?* Z; a& f
  3018. STX Sound_Bar + $00
      P9 v5 C. i6 _3 M
  3019. RTS" m% X$ B6 Y! A2 r0 x; z
  3020. , O) L. e- B; K. e
  3021. .ORG $FF68$ @3 c3 I# s) d' ]" X4 p% Y2 i- e7 G+ r
  3022. STX $40049 p) A& [% q/ [9 |. r! V
  3023. STX Sound_Bar + $04' K1 U) d, Z. g1 W& }4 Y# n- J+ M/ I( q
  3024. RTS: l2 u7 M( b' q" Z. @7 [

  3025. / {& t- ~8 u1 s* ]" e
  3026. .ORG $FF70
    ) O; O3 ]. G6 @3 w
  3027. STX $4008
    ' `4 \# q* o/ N4 ~& ^) A
  3028. STX Sound_Bar + $08
    % m& y9 U( u. X% m
  3029. RTS
    0 a! N, _, {& T1 l- `& n
  3030. - X: |0 E" m" F
  3031. .ORG $FF78
    # g$ L; E! T: u% {0 b9 c5 W$ g
  3032. STX $400C
    # T& L* F/ K- m# F- Y- k) Y( g
  3033. STX Sound_Bar + $0C
    : r) [9 _' v) W1 e$ d# _7 h/ `
  3034. RTS* F4 \8 D/ A* ~

  3035. , x9 o: K* p; E1 W4 b$ |8 I
  3036. .ORG $FF80
    8 G! j; t) ]& U% E
  3037. STY $4000+ P1 _7 n$ t0 D" g% W8 L
  3038. STY Sound_Bar + $00
    4 E7 a, a4 Z2 v0 x0 h% j
  3039. RTS
      j& i; q- Z" u4 G1 N, K  V; S
  3040. ! e  R0 ?" P* Z5 f
  3041. .ORG $FF883 h, V2 c/ _: f: v9 W
  3042. STY $4004
    ; F) y+ `4 J' P3 P' K
  3043. STY Sound_Bar + $04% s6 t, ]* R) @* U3 k7 J; C6 S" V
  3044. RTS) H% k0 ]' I) W5 f3 b( l6 i
  3045. . j0 t- G' A& m1 Z
  3046. .ORG $FF90
    . b4 v- {. t3 I# h; P
  3047. STY $4008
    + r( ?! q5 b: J7 \. m" i# U
  3048. STY Sound_Bar + $08$ i( t4 V: K) L+ T: y
  3049. RTS
    / c6 J7 F$ ~" l5 x1 {' M, F% l8 ?% X

  3050. * ?: l  \  y4 S. D5 B$ D' d
  3051. .ORG $FF98
    ' C/ F& i% l1 o1 h
  3052. STY $400C
    5 D2 K! b  N1 F6 p4 c% Q# }
  3053. STY Sound_Bar + $0C
    ) x0 [' r( i) U$ c& y& n7 e
  3054. RTS
      @: \$ q% @) L

  3055. $ S1 ?9 \5 S  V- l
  3056. .ORG $FFA0! _! e* t* z! N+ _1 R; [7 M, q
  3057. STA $4000,X: c$ X+ ~3 ?, |% Y
  3058. STA Sound_Bar + $00,X% F5 t- ~6 G1 r1 [' o+ `
  3059. RTS
    + I# ]  ^: Z, `2 Z( X8 e3 e& X
  3060. ; W9 {' L" V! n: _3 o  ~* x
  3061. .ORG $FFA85 \1 n1 X9 c& I( U( v8 ?6 T
  3062. STA $4000,Y- f3 q# [) P5 ~2 h/ o5 V0 ~
  3063. STA Sound_Bar + $00,Y
    / p9 ?# Y1 F4 d3 Z8 L" ]
  3064. RTS
    " {! |0 ]  H. Z0 k
  3065. / R: U, w1 C6 ]# }# X
  3066. .ORG $FFB0- l+ n) A& ]4 Q/ f6 ~
  3067. STA $4004,X
    4 K" c0 J3 d0 k
  3068. STA Sound_Bar + $04,X3 ^2 G* E# s' @; ~8 u$ @: v7 E! l& M
  3069. RTS
    , r, p. Z& }* D, w* e

  3070. - j2 A" T) S9 l. d+ n" q9 G
  3071. .ORG $FFB8
    / z' h$ f' H* k2 b* q1 H
  3072. STA $4004,Y
    2 o; [. H* j5 H/ v0 Z0 k( A
  3073. STA Sound_Bar + $04,Y
    4 @/ X; @4 a4 \2 F) {; T
  3074. RTS# _, l! }, H- h( x

  3075. $ v9 ]' `  r# ~! M0 }; `5 B$ d
  3076. .ORG $FFC0
    $ M4 j1 x% l5 s$ y8 p8 d. |7 ?
  3077. STA $4008,X
    & t, K4 d0 _% \" b8 h5 J
  3078. STA Sound_Bar + $08,X
    9 f5 Q2 n2 I# j* q$ o$ l# {0 L
  3079. RTS' C) A$ _. G8 ?# S% ?% J

  3080. ' |  c/ p& j! Z
  3081. .ORG $FFC8# _& e5 [/ }9 M/ K
  3082. STA $4008,Y2 I# N3 U( R( X; {4 |. r
  3083. STA Sound_Bar + $08,Y2 N: @% l" [1 P& C  v) Y1 Y
  3084. RTS
    % `: l! c( c" q; n/ ~8 ?

  3085. 8 y# K6 L  X& X  Q0 {* _, z
  3086. .ORG $FFD0
    ! H8 r% y! T$ O6 ^5 y( K& q( Q! Z
  3087. STA $400C,X  H/ l+ L& ^: V# C
  3088. STA Sound_Bar + $0C,X
    1 |3 ^# {  W# ]8 T, k5 e2 _+ S/ R
  3089. RTS  V1 q9 X, u& M* X$ L
  3090. * v+ Z# [" h! g8 ?1 X8 w
  3091. .ORG $FFD8
    8 J/ W& x% u  B" u. F; H; ?
  3092. STA $400C,Y
    & X& q& h+ `7 q. a4 q  c
  3093. STA Sound_Bar + $0C,Y+ s6 r  z" ?' ?/ y0 j- u, _( I( Y5 g
  3094. RTS5 H3 y# R6 {& f+ {7 \

  3095. 7 G$ }. s0 m8 W7 q0 b
  3096. .ENDIF
    " S* r( @- r8 [* O* K
复制代码
( n8 Z& J& q4 d; }
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

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

签到天数: 3074 天

[LV.Master]伴坛终老

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-8 05:06 , Processed in 1.105468 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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