EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑
) ^7 _" l2 X6 |/ u+ q* O! s) I' ~/ o0 n- H/ Y+ E# u& l5 g. ]: }
[FC][音乐12 IN 1]
! q+ n. X1 I9 k) `  f时间: 2023.07.23/ O5 f# ]/ d- L0 t& _& P1 R" p
作者: FlameCyclone
+ x3 t/ X1 ?  n/ }; e! c6 V& s# r! D, m* W: j7 e5 Q3 w
收录音乐内容:3 i8 Q) Q) @% p
1.Raf世界
2 _) j( P$ ?8 I# p2.最终任务" `) d; x2 _  ^2 ~5 Y
3.赤影战士3 E9 }8 L0 e& m4 S- ]
4.双截龙
& m$ |- @$ `" ?7 i0 c4 |5.双截龙2
/ F. o% Z4 N* |6.双截龙3
6 G4 ?# f7 u+ f) Q! d) J7.洛克人
! r) G2 g/ ~+ w) |5 e0 a1 c8.洛克人2
# _/ q* t: E& A) ^4 P; o9.洛克人33 l, n4 O. I: v, [) X
10.洛克人4
. O: V/ T( |) {11.洛克人5& |/ ?9 Q  `1 H: x
12.洛克人6
# S1 W6 K7 m- Z9 ?! `6 `4 W
9 }6 l4 U) V$ N: {+ ~8 J1 @- I' R操作:( d+ f/ w) ]. I4 P. v! u
上键:         上一个专辑
# w: w8 C% l" h* g下键:         下一个专辑
; @# ^; g; F% ?左键:         上一曲
+ O" E$ d; z2 {3 j3 r% t; Q右键:         下一曲8 w" o2 {' w! w
B/A键:        前10曲/后10曲
8 q2 x$ ?: L. ]$ A选择键:       下一页0 K* {8 o: G$ W$ O: U
开始键:       停止/播放9 J  w$ e. ?; M6 ]1 h, T" T3 o4 c
+ i- I# F0 H+ Y9 |! m. \! c
http://flamecyclone.ysepan.com/5 i# e! Q; ^# E* R& v, p8 K3 {
7 Z$ {% Y5 l+ ~

# C+ q/ b' g0 P$ J/ h3 u& T4 F* W" ~5 _7 D5 j; J+ Y

; i  z; A! R% _
  1. ;[FC音乐][播放器模板]  I( `/ N. f" v: b7 P# b& Q& Y4 U
  2. ;FlameCyclone 20230710
    ! Q- f7 }% K/ l( S/ o: O
  3. ' Q* \! O  n% L/ ]% n5 h9 |' k
  4. ;文件头/ i7 a" V: `6 [. B2 c. i
  5. ;======================================================================8 C. q  T+ B' s; T" c/ T& S+ R5 y, |
  6. .INESPRG 16                                             ;16KB PRG 数量
    2 k; T% S! Q# D' r+ M" W+ ~
  7. .INESCHR 1                                               ;8KB CHR 数量
    % D; B: V  |2 E4 |& T0 |
  8. .INESMAP 4                                                   ;mapper 4
    : S6 V, _' b4 G, Z7 n$ n' e
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直5 `6 b: }4 }6 ?1 g7 w% E

  10. 4 K6 E/ ?- A- g+ g* t
  11. ;==================================================
    % e6 S  j" }( A0 U0 t; s, b. _
  12. SOUND_BAR_SHOW_ENABLE       = 1% C3 p6 t; N2 ~
  13. ;==================================================& x9 J: S, l. f. i7 d
  14. BANK_DATA_MASK              = $1F
    5 i, ^5 y6 _# F2 `- D9 y
  15. CHR_RAM_ENABLE              = 0
    . J$ P- U" B, M  N! b% y2 Q1 p
  16. IRQ_SCANLINE                = 136* T! L1 v; y: ]/ K
  17. ;==================================================
    5 E  k4 R( T. ]+ @. b( T: z2 \* A
  18. SOUND_DATA_BANK_00          = $00, h" X5 S2 Q: @3 M( X" n; z
  19. SOUND_DATA_BANK_01          = $01( i* V( A% e6 d' `. d. j! T
  20. SOUND_DATA_BANK_02          = $02
    $ R& x4 H/ }3 `4 N' D. T  W8 T
  21. SOUND_DATA_BANK_03          = $03
    : q9 O+ y. m4 i$ m) _
  22. SOUND_DATA_BANK_04          = $04. J# ~$ Q9 E  m9 X( r
  23. SOUND_DATA_BANK_05          = $05
    + _1 [3 y5 U2 N; r
  24. SOUND_DATA_BANK_06          = $06
    . t, A) x+ D8 W; u6 z  V
  25. SOUND_DATA_BANK_07          = $07! a, F7 U  H2 {4 Y7 l+ E. m
  26. SOUND_DATA_BANK_08          = $08
    6 n7 o' ?# Q0 o$ N  c# @9 t6 k$ x6 b
  27. SOUND_DATA_BANK_09          = $09
    3 V. e: @1 X' O  @7 ?7 F" ?8 C
  28. SOUND_DATA_BANK_0A          = $0A' u- t! ^( n/ t6 b  N' }
  29. SOUND_DATA_BANK_0B          = $0B: I" c5 o. D' [4 K- C6 h0 f
  30. SOUND_DATA_BANK_0C          = $0C
    ! f& n1 k4 ~$ U6 p. ?4 a* Z4 S- X
  31. SOUND_DATA_BANK_0D          = $0D& N( b6 X4 y; ^6 G5 A& N" z/ A; i
  32. SOUND_DATA_BANK_0E          = $0E
    # X/ \7 S4 d7 x" }4 U# X
  33. SOUND_DATA_BANK_0F          = $0F& L* ], H. I' u" M7 j
  34. 0 ^1 j" f' Z- J0 z0 U$ Q8 g  S9 Q
  35. SOUND_DATA_BANK_10          = $10
    4 A' m( n* N/ b4 p4 F
  36. SOUND_DATA_BANK_11          = $11
    * i9 W* r' Q* ~5 y  l# Y
  37. SOUND_DATA_BANK_12          = $12
    ; H, p6 [' _  o
  38. SOUND_DATA_BANK_13          = $13! I& ~; U: V0 u0 C0 d+ w: V
  39. SOUND_DATA_BANK_14          = $14( I2 a! p9 Y- P; k/ \- ^
  40. SOUND_DATA_BANK_15          = $15, }# p: c6 ?2 o& r4 u
  41. SOUND_DATA_BANK_16          = $16
    ! }& Q/ X1 k) X1 j7 |' W# ?: x
  42. SOUND_DATA_BANK_17          = $17  d( t% F! Q; Y( q1 k8 X- B
  43. SOUND_DATA_BANK_18          = $18
    # q3 z, {0 B9 {  e
  44. SOUND_DATA_BANK_19          = $191 t5 }% _+ k% g
  45. SOUND_DATA_BANK_1A          = $1A
    7 v$ J3 [: G$ O; Z  W) A
  46. SOUND_DATA_BANK_1B          = $1B1 `; a( G  [* a7 F5 m$ g
  47. SOUND_DATA_BANK_1C          = $1C0 ^0 V. P4 p: _1 z
  48. SOUND_DATA_BANK_1D          = $1D+ ^. S' ~  ?8 X# ^6 v  N2 P2 A

  49. , a$ o( T5 b3 I4 f% c/ O
  50. SOUND_DATA_BANK_C000        = $1E& v5 M8 Q: P% T3 r6 s
  51. SOUND_DATA_BANK_E000        = $1F  {# P" u6 O2 i1 h: \% ~0 I, A
  52. ;-------------------------------------------------9 d) e7 h' h4 N; k6 ^
  53. CHR_DATA_BANK               = $20
      G2 o( ~; D3 c$ ?: P8 H8 u
  54. CHR_DATA_ADDR               = $A000
    ! Q: r3 e( }* P" n) l8 G5 h
  55. ;-------------------------------------------------* g8 N5 {, x. m
  56. PROGRAM_BANK                = $00
    ; L0 _7 v* Z! @
  57. PROGRAM_ADDR                = $8000# H- ]) G' q6 A& \0 S/ A  j
  58. ;-------------------------------------------------
    " i; J$ @3 r. z7 _: p+ ~1 A) r; Q
  59. RESET_BANK                  = $1F$ I0 r5 T  h) e3 O% J
  60. RESET_ADDR                  = $FD00. e# u, E, z  U# f1 Z7 ]  _- e; L
  61. 4 m) @, \4 d, c3 X1 A6 L+ v! x5 y& i
  62. ;==================================================
    ( `1 V) P3 E, j4 j* z8 s
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数3 }7 E. {2 H8 R" ]/ f0 ]
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引
    " `7 l0 Z  U, Q
  65. PAGE_SIZE           = 5                     ;每页节目数
    ! x- \8 |/ k7 a# \2 ^/ b! j

  66. 7 i/ v! C/ T+ B8 x
  67. ;==================================================+ L* x9 l& f3 D
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除7 T2 a, [* v: @/ M  ~
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数
    " j: V) e! `% O. E! d  F, v+ Y) f
  70. .ELSE
    2 X. Z' y' ?% X7 c5 v
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数
    : p& L% ~' I" i+ l
  72. .ENDIF
    . h# z8 w1 y6 `( D
  73. ( j  k6 i1 a; ?- @# [/ a0 H
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引* E' s+ A: C- N$ b0 b! D
  75. ) z% n7 ]9 g' l  k: B
  76. ;==================================================6 G4 U' [# Y% F3 K6 M# G
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置
    - [( R+ q% r: w: b  Q9 C
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 2
    : W, K2 n1 L6 b! G3 V( j. z% R
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;
    . O5 ?% J/ o+ s/ S! `
  80. ;==================================================
    1 p. I( Z+ Z" R6 S& `* K8 n
  81. Caption_Text_Pos    = $204D ;标题文本位置
    $ i/ N8 w& m# K1 o; f+ v
  82. Author_Text_Pos     = $2324 ;作者文本位置$ }2 \! v! d5 |" d) @
  83. Date_Text_Pos       = $236B ;日期文本位置
    $ ~! ^. c4 x! N, d" x* ^
  84. ;------------------------------7 V7 h* e, j) A. I5 a! g  I
  85. ;------------------------------
    - `$ g1 K' ]7 {0 S: u2 u
  86. .IF SOUND_BAR_SHOW_ENABLE
    . ~! _& M- r9 b8 E

  87. 0 b+ T$ @5 z$ h( }& Q
  88. Play_Index_Pos      = $2273 ;当前曲目位置8 O! s$ c, D6 M' `. @1 z
  89. Play_Time_Pos       = $22B3 ;播放时间位置
    ; F; p: O# M4 V' k3 e, Q1 V
  90. Play_State_Pos      = $22F3 ;播放状态位置0 u! |, Y5 t# x8 t
  91. # O6 Z, d( X% s% r* i9 j
  92. .ELSE
    % U9 h1 q# ~- ]4 |4 C
  93. : `. u% u( @- u3 i- _# K
  94. Play_Index_Pos      = $226C ;当前曲目位置3 d$ a5 q1 g4 Z' {- E
  95. Play_Time_Pos       = $22AC ;播放时间位置( C+ f. s1 Q( I' {7 B
  96. Play_State_Pos      = $22EC ;播放状态位置
    0 o  X$ s) f- a! R) d; P+ c* \
  97. . C9 [, V  I8 w& g! B
  98. .ENDIF
    & ]( [% H9 r# I0 [8 A' @' Y0 `
  99. ;------------------------------
    / I9 s/ `$ @% ~4 m
  100. Track_Name_Pos      = $222B ;曲目文本位置! U& {; ~* y' Z! n' X. Y+ W
  101. ;Track_Name_Pos      = $00 ;曲目文本位置
    7 ~: T$ ?1 x3 j
  102. Sound_Track_Pos     = $2265 ;声道文本位置
    ( g( x) J- a6 M# F
  103. Sound_Bar_Pos       = $2269 ;音乐条位置0 X: q4 r9 Z8 N( Z8 e& L6 ~! W
  104. ;==================================================
    " M8 ?  _- s; h: G* q# t5 B9 e
  105. Scroll_X = $00
    7 r' u( }, l, {
  106. Scroll_Y = $00% R  F; b; K' u
  107. ;==================================================
    2 N  s, v! _" I! q# c* Y/ ~) j
  108. Sound_Ram_Addr_1       = $0100
    . Q1 O3 b# Q/ |/ n" a8 c) U
  109. Sound_Ram_Addr_1_Size  = $80
    & X  H7 _5 K5 a$ A
  110. Sound_Ram_Addr_2       = $0090
    / X. Z7 Z( s7 _: e- ~
  111. Sound_Ram_Addr_2_Size  = $70
    9 W! b: s' T% a9 H8 C
  112. Sound_Ram_Addr_3       = $07005 r! e$ r1 q; o
  113. Sound_Ram_Addr_3_Size  = $00
    $ F* t$ v/ `" V  d4 q
  114. Sound_Ram_Addr_4       = $0400
    1 _+ A: j& |  }# t8 Y& p6 p
  115. Sound_Ram_Addr_4_Size  = $00
    5 w4 e$ \) O) h* U
  116. Sound_Ram_Addr_5       = $0500* q( q- V  p4 U9 w  |5 {
  117. Sound_Ram_Addr_5_Size  = $40
    ) q/ N5 p) |. Y- p% D4 `) w
  118. 1 t6 b, S# `/ S: y6 X
  119. OAM_TEMP_ADDR   = $0300+ i; M7 w: F: H2 d+ J. V

  120. * V; k4 x# |) E1 Y. A
  121. ;==================================================
    / R( _$ t+ S/ ]. S
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器
    5 `& T& |6 M; x, `% b* d
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器
    ) z) M2 G1 C$ l( ?: D
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位3 T6 Q% D$ ?* b- M( t) q
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加1# }- r! i; c! G1 L  H
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加16 k5 M5 H, ^+ N  L
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器
    + C9 j2 r4 m0 [, i" b
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加
      U  [) q% g% l  R& h3 B
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32
    3 Y' A0 m. }: w, n" ^% o* R
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存( ^- p* D+ T& [* T# p! |  K
  131. APU_STATUS              =   $4015   ;声音通道切换, L; a. [5 X8 h' ?8 T% w: ^
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通# f, U- F5 g' Q1 P
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通
    $ N: h1 M/ ?& A3 d
  134. ;==================================================/ }. J* I2 o, U) T4 [
  135. MMC3_BANK_CTRL          =   $8000
    6 c' A7 {: t1 P8 ?! E
  136. MMC3_BANK_DATA          =   $8001
    ( |0 x: m, G, R. X3 L8 u
  137. MMC3_MIRRORING          =   $A000
    " }9 B7 @; a# c9 y9 Z+ S8 @$ {
  138. MMC3_PRG_RAM_PROTECT    =   $A001
    ' Z" Q5 l, Y) y+ J
  139. MMC3_IRQ_LATCH          =   $C000
    ) h& s+ d" q) \: D
  140. MMC3_IRQ_RELOAD         =   $C0019 a$ A& u% r& q# @
  141. MMC3_IRQ_DISABLE        =   $E000
    ! x- @5 _# f! L
  142. MMC3_IRQ_ENABLE         =   $E001& R! f; z4 L1 b! {; c

  143. 9 R- u( @! |1 V8 U
  144. ;==================================================$ ?) j( i! y) h+ c2 Q, u
  145. PPU_Addr        = $0200
    . Y3 V+ L) n. x* f2 _- W% n' r$ C7 ^9 Y
  146. Palette_Addr    = $02C07 G) L7 \* g. t0 h4 o: t- [
  147. Sound_Bar       = PPU_Addr+$E0
    * F0 ~+ k( K; S# |' v2 x( V
  148. ;==================================================
    , O) i1 V4 k" p% X- J# M3 z
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D
    ! o# h+ ?2 T3 Y6 w6 p5 ^
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$115 [+ A! P/ P1 u' ]; z
  151. PALETTE_UPDATE_MAX      = $2C
    ) l' h1 G& n: P0 @% x9 a: K4 x7 q8 N) ?. d
  152. PALETTE_UPDATE_MIN      = $21
    + v+ n6 S5 a  p$ _
  153. PALETTE_UPDATE_INTERVAL = 60
    % {; P3 n. {/ X; n
  154. ;==================================================; |5 p% [7 Z7 L& n3 o# t0 o
  155. Sound_Bar_Cnt       = PPU_Addr+$F0
    * h6 m9 W0 p9 n# H: Y  p
  156. PPU_Cur             = Sound_Bar_Cnt+$02. Y& y/ g: U4 j
  157. PPU_Addr_H          = PPU_Cur+$034 w  J- @5 `  e
  158. PPU_Addr_L          = PPU_Addr_H+$04' o( f+ m% X, C! J/ F, L. j3 I
  159. Screen_Ctrl         = PPU_Addr_L+$01& V% j2 u# h2 z
  160. Screen_State        = Screen_Ctrl+$01
    + T8 `% m! B% G- f
  161. ;==================================================. U/ o% ~' x1 v; L
  162. Use_Ram_Begin       = $50
    ' X# @4 `* ^9 J; b( V
  163. ;==================================================
    - M" x- S# ?: l2 I
  164. JSR_Addr_Op         = Use_Ram_Begin
    4 _" V, _8 m, }, v7 J2 J) B3 G2 h
  165. JSR_Addr_L          = JSR_Addr_Op + $01: r" R" c0 j* ?( D
  166. JSR_Addr_H          = JSR_Addr_L + $01
    , Z5 d3 W+ O$ g- ^3 S
  167. JSR_Addr_Rts        = JSR_Addr_H + $017 q6 G4 |, ]! T; |# L
  168. Data_L              = JSR_Addr_Rts + $01- p' q4 ?& S% X8 {5 w! A( w7 m9 R
  169. Data_H              = Data_L + $01+ b: P, x+ |1 `* _0 r
  170. Data_Cnt            = Data_H + $01; b  ~7 ~5 `6 g5 W; K& e
  171. Data_Buf            = Data_Cnt + $01
    . S1 o% Z7 K1 K+ b7 y  l8 h. p
  172. Nmi_Time_Count      = Data_Buf + $01
      R. S; \( z0 T* \% B( x! y
  173. Time_Wait_Cnt       = Nmi_Time_Count + $01
    " \, `7 b( P  k& P9 C
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $01- J  L' G+ T& i: @. H
  175. : O$ Q1 k/ z9 \; q
  176. ;调色板刷新标志
    2 x, [: v$ ~" \; C+ G! k! t
  177. Palette_Update_Flag = Palette_Wait_Cnt + $010 L7 d6 \$ c$ D

  178. % K- U( }: r$ B, p9 h+ _9 h: r+ p
  179. ;当前帧文本写入禁用标志
    ) B; p* w, M) `5 {! ^
  180. Text_Disable_Flag   = Palette_Update_Flag + $014 d5 L8 k7 D' N! w3 ^7 e

  181. 5 e% K# z% N- g/ ^) \
  182. ;==================================================; Q8 a: A0 @& Z& B( a
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动
    , x4 m; X4 {* c* f2 Y! E* v* V
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条
    ; a( _5 R* c# ]( P; h8 ~- M; @
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间
    0 [% q! N5 |( |" y1 ]
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间
    2 p9 e6 A6 a8 ^1 _7 m2 I1 s) [
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间
    . f& B* }  q: W
  188. ;==================================================+ _, {, d2 w. @# l, z& c( N# ~0 Y: K
  189. Key_Keep            = Text_Disable_Flag + 1- D: e: q( E( r. K5 k! e, ^
  190. Key_Once            = Key_Keep + $014 T/ C4 o- X/ e' g5 ]
  191. Key_Kemp            = Key_Once + $01
    ) G, `0 U8 N& }) y9 \. Y$ {
  192. Key_Temp            = Key_Kemp + $01. ~. X, R, l. h7 k+ D  }! |
  193. Key_Getv            = Key_Temp + $01+ g3 K. x" @. ^" R* z) s% ?
  194. ;==================================================* P* ^" h' D2 Z4 ~
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集
    3 [: O& }* }5 R4 M$ |: Q! ?
  196. Music_Item_Last     = Music_Item_Cur + $01
    3 ?4 Y) J5 w" O4 I0 B
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集! p' U- |! B8 I
  198. Music_Cur           = Music_Total + $01  ;当前曲目
    0 h0 S2 n6 u% r
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目
    $ L8 a  f9 B' T
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态
    5 v, B3 ]2 }: v% q' R7 q0 X
  201. ;==================================================- o9 E: {1 z% [4 J% _
  202. HEX_Data            = Music_Stop_State + $01
    ( g. M& U# w9 O5 l1 |
  203. DEC_H               = HEX_Data + $011 ]4 v8 h: Y6 G# x. ?
  204. DEC_T               = DEC_H + $01# [" _) j# H7 f0 B; P' |! S
  205. DEC_L               = DEC_T + $01
    7 t3 l1 @- t& g
  206. ;==================================================
    # R  t% O+ ~! z/ j. Q% [- c
  207. Time_S              = DEC_L + $01
    7 W4 `! J6 |7 @" c$ _! [( W+ ?& H
  208. Time_M              = Time_S + $01
    9 n2 R! I2 O/ }) W8 x( p; V  Z
  209. Time_H              = Time_M + $02/ ~- B+ y- G% z4 {
  210. Time_Cnt            = Time_H + $03  Z& L; f/ I; L! x% S. d

  211. 2 ]4 ?1 Y! Z2 L" ~! j7 V
  212. ;==================================================( j/ u& u! I/ J9 }/ M
  213. Music_Bank_8000     = Time_Cnt + 11 m4 n. b/ q6 Q
  214. Music_Bank_A000     = Music_Bank_8000 + 1
    6 d  B; D: F$ ~. i
  215. ;==================================================8 D. R9 h- W& ^2 |- Q
  216. Scroll_H            = Music_Bank_A000 + 1. u% D! m8 X2 w5 Q1 {
  217. Scroll_V            = Scroll_H + 1
    9 z) ?( k! [' g7 Q' ]% ~" b
  218. IRQ_Process_Index   = Scroll_V + 1/ Q$ Z3 _7 N2 A+ x9 F$ v
  219. ;--------------------------------------------------
    1 G% O) i8 l/ K9 e
  220. Page_Cur            = IRQ_Process_Index + $013 s6 O- J$ Z# y$ T! P
  221. Page_Cur_Index      = Page_Cur + $01
    9 D8 P" v, v- H" C* k+ U" ~
  222. Page_Cur_Cnt        = Page_Cur_Index + $01, a2 [( R: w) g, N4 I' ]! o
  223. Page_Last           = Page_Cur_Cnt + $01
    ' a7 C% u' O' g4 A1 Y# k
  224. Page_Last_Index     = Page_Last + $01# A8 b6 C. p+ [: p
  225. Page_Last_Cnt       = Page_Last_Index + $01; U" T1 `. H! v
  226. Use_Ram_End         = Page_Last_Cnt + $01
    * d5 n  ], l' G4 w( n4 w# y4 {
  227. ;======================================================================# ?2 t( H  C9 A; q& U
  228. ;音乐数据块
    ; T% \& R9 S: M& B

  229. 1 L5 Q1 A& j; \+ d5 P
  230. .IF SOUND_BAR_SHOW_ENABLE4 n) S; M4 F; w- y
  231. ' e! v! B0 R$ }( ?7 W. G
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK* N6 A- M( ^$ p- W
  233. .ORG $9000
    # A$ T2 I& F# b7 i/ h+ a
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"
    ! S& h; `) i- ?6 ]; w; D0 N( s! @

  235. ; J8 M8 ?9 G( }2 d
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    7 p7 A3 ~4 c  s7 U
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"
    " s' `5 O1 K" U+ @* K! v( Q
  238. $ t) r" I5 O5 n1 E: R' d
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    3 ]  k7 h1 }$ k, N2 O
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"" A) |6 @/ w* F7 p' @

  241. 1 i0 \- K( C0 g8 T6 j% T" ]
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    * i" K# I5 i  u: P" I1 m+ L
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    4 ?8 a0 k8 v/ |) a# y3 F* }
  244. ! G( z* l+ w( ]' \
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    + |( i. Y/ X7 Q% _9 T
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank": b$ L: d4 o6 S/ I: q% M

  247. " G0 n4 y( C+ t3 o) Y
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    7 F6 m- ?- h& o! T' C
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"6 A6 W/ |9 z/ H& m4 c
  250. 3 h: `/ Y1 g* o% B0 e
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    2 U  r8 W* r7 y
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    6 m  n( l; e. y& l

  253. # ^- p. h/ K% P7 y" d& x6 l. W& `
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    - R# I5 c, K* s/ h
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank"
    7 J6 K& t: [6 b/ g- L; k4 I
  256. * E' [4 p" k- X& L2 m7 s
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK
      e/ U% U! I2 X. @( s
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    1 _3 U! |( j. ^& d3 q
  259. 8 J5 k& z+ N6 a# G
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK
    4 v: E7 p7 U. ]" I$ n( w9 f
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    7 c. u# f( R& [- N$ V7 p- Y- s( F
  262. / r6 O  Q" i7 [" F3 e
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    ; h# G7 ?7 R' ^% d
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"
    1 E6 X3 o" ]. n) v7 J$ a% R

  265. ( c, I- j0 l2 Y# R! ^; z8 `
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK
    3 A$ `1 i5 m6 ]# U, f* {3 k* O
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    6 m1 d1 v3 x: L& I; a" g
  268. ( o6 g/ r0 ^) q2 l( a; v- n( C
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    - U1 `0 B' x1 O1 D3 ?  u4 J
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    7 E; T, B! X" s, n

  271. 2 B3 A2 m2 a3 E- `7 t
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    ; g7 ]9 e. _. S3 d
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"
    * G* O/ u/ j! o. s+ \
  274. - b3 y/ w  R. ]! n" Q; l( z
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK- u. h! t8 A" {3 k) `
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"# S) [: y" P- |$ m: H1 m
  277. & t3 Y8 l/ O/ B7 y0 J. t& Z/ @
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    9 V' B; t9 H- R6 ^
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    % n; @5 i" [' [/ n) ~* C3 ~

  280. + t' R2 M( Y+ D$ x) z
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK
    . o$ m# ^" i6 H( X* w4 W
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank"3 }- v  p& h  }9 j  z
  283. % N( z- J9 P1 v+ b/ ^4 {; O; r
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK5 [* |6 h6 r/ x; |$ e5 m
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"
    6 F% J& i* I* |5 @5 w5 m
  286. 9 c' M" f& g5 Z. P3 S- {  ~
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK# T0 x- n: ]. B5 a5 L* n0 ?1 h) F7 t
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank"
    5 _. L* T( ]% D4 q( E
  289. ( f! U: B" q) g4 h6 ]6 b5 @9 ~
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK. n$ Q' F1 g0 }# O; ^
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"7 k  _0 ?! ^  `# i3 }3 L% G

  292. 1 W* y& M  V" |/ @9 w$ o% j
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK& t* D; P5 y3 C0 T  F
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    0 p: O  S, ?( g1 n$ E# n" ?
  295. - v" W0 }% q0 {9 m( K( d  E  \$ e
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK# ^* v' d  b/ G0 {8 E3 T
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank". D0 I: t3 k( S, g2 T; O

  298. : v0 R+ W" a% l1 t) j7 f+ @
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK* l% R# [" a. {/ A) r
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank"
    ( Z: B  j' }3 m" Z, S% `( e
  301. / |! g0 u7 O. D$ w5 P
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
    / w, [' K2 u3 `& {$ g* ^  D8 n
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"3 A  A* ^# M% C. s; A1 B

  304. ' R6 G, z' Z# }7 s0 j, \
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK. n0 N- u& |6 ?$ x. |  g8 \  F, O
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank"
    ) x  Y7 f" `& z" `: E$ V

  307. ' z* c- {; Q- P2 _$ N; `
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK! O5 R1 _; ^6 N$ P: ~
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"
    2 i; x) M6 z( x+ a

  310. , x# y! a' x2 e' w
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK# b5 H/ ?+ h* F$ H# U( F
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"4 D2 S* R' w0 r* o5 d

  313. , d8 u* w  R( e3 S% Z
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK% r2 ?7 o+ V8 [: ]* b7 D
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"
    / F2 K5 k4 x3 e& w3 v
  316. 0 v9 P6 B& y, f* Z
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
      D2 H! I" k% @
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"( m2 y! ^1 u. b- I
  319. 1 }# O- k- @4 B7 v7 h/ G, K: m
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK1 @- W* x, b1 V% m& E( A: e& o
  321. .ORG $D400
    8 P6 A' p+ v- H. ?+ R
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    7 W: ?4 g2 F' p; X
  323. $ `: p4 r0 Q5 n- _" `# k) w7 I, o
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    - e8 W+ o$ ~7 S) @
  325. .ORG $D800
    ! ~) g) q/ s1 u- H9 [& Q  `' f
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"* y  f2 C5 T2 I8 _

  327. 7 p6 U5 a4 h, `# R
  328. 4 E; U3 T1 o3 x) \5 k6 ]3 q
  329. .ELSE/ T, s  ~' \7 S1 B( ^4 U
  330. - b; O3 i. b( D  k% V
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    1 ^: U( `9 i8 v: F& s2 t- A5 _
  332. .ORG $9000
    3 h, y0 s* T5 p. G! |8 M8 b: J
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"
    0 y- }, L6 K1 O2 N2 _
  334. * A2 {2 X6 ~2 @; V8 Q3 M
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    . w7 s& o  v, e% C
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"' V' x" I4 O; ~6 `& u' k* t

  337. : r; M& M1 \( h" {; y5 P; J
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK5 k( Y; {: s+ j3 Y
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"! n5 l2 e& K8 T7 W
  340. ! ^/ h5 t- l7 Z2 U2 f
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    " y% o- d( l, }
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"" e3 t& [; p, a. |2 x  T) i/ F& W
  343. ( R5 O/ f1 U9 J. m
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    7 h% ~4 g) L% @3 \
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank"3 W! f, _9 a. p" ?

  346. 6 I- b- _( l. H9 V
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    1 v6 u' F3 Z2 Y3 h
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    6 V5 N+ E' F/ i6 Y
  349. ' f" p& f* K% l/ o6 l
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    # \' @4 u+ U" ?1 E% k& T
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"& ~! n2 A3 R7 A% L
  352. : l0 `6 b0 k' m3 g8 D. \
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK# ~! y8 A1 ~. Z
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"
    9 F7 Q/ H$ A( F# k0 Y

  355. ; V0 F3 P& F. o- n
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK
    3 M+ ~8 j3 e' p+ j
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"9 U/ z) s0 {* C/ M6 h7 K; t' }
  358. + p! e* W, s  G6 o9 ~) \6 y
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK4 Y( k' N! ]' k* u7 \2 h7 F9 V. e
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    & }3 p  ]! Y9 {$ y4 K

  361. % O/ R# U4 M2 k$ V
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    6 e  n0 K. v, U1 Z) n7 `  ]6 @  s
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"
    4 _; S8 r5 c3 y9 S! C
  364. ; ^3 `# ~: x8 }, M' C; ^8 I
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK- w. y7 x/ W5 S3 z- u5 K
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"/ `7 P1 i" D0 S% b
  367.   G+ M4 ~9 G' o
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK( U% e6 E' h" F. R4 I
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    0 o" w, w* b! y9 X" |! A

  370. 4 P; S7 u5 s1 d
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK, \6 W  W" O; }5 ^0 C
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"
    ; B2 T$ w; h$ \" ?. x3 n

  373. 1 y2 v$ b; x* y2 Q9 W: l) [
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK1 O* b, d6 i+ a* O# w. j3 n& x5 O
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"; Y3 Z0 s) X) f1 I; n( P
  376. + b% `6 ]& d- s& `
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    ' u# U9 u+ j# {3 C! Z) a
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"! V8 ^: G3 \8 }9 j$ c5 Z, V" Y* u
  379. ) i" B6 D3 h- @) M* M
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK
    " x2 L. B3 r# n( j% s2 {
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"9 T' [0 L4 K9 j6 b5 W8 k$ }% y

  382. ' S4 D( e9 C2 n* k& y5 A+ o2 G
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    8 V6 h# Y# [: h# d/ M
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"7 |4 G6 T5 W) H" e
  385. 6 `1 N0 Q+ X( z5 B! ]8 @+ Q& A
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK' A$ x, b! f: Z$ l
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"
    : q- r% j5 ^8 F2 U3 N4 Z4 S% s3 t

  388. . i, a( {! E- e  d# e
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK9 }( t" B# J2 ~1 D% X8 [
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"9 d% P6 E6 {- Z0 y
  391. * c9 {- m; V& b0 ?) M
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK; S9 Q6 O8 H8 ^* j) c: d9 `
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"( p+ u6 I1 T0 c; g
  394. & I) m3 r4 ?' e) ?7 d- N
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK0 n2 `, b+ b* a0 _$ m7 o
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank"
    8 ]- q; a1 q+ u8 {1 k7 G
  397. , Y. R5 Z0 S- f  E/ N8 ]
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    : \9 E- b, X# ?0 L
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"
    / j6 I- ?/ t: T& M4 x3 |# s; z

  400. ! F) x! E, U& E* L
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK9 a8 I' _. }. H7 V# G/ `# |+ Z
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"2 [, P6 u" d, R; N9 |" T# \. V

  403. % j, a* ^- T- g. u; j* C
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    6 B4 L- `( q7 g6 N5 @# u! r# s8 a
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank"
    # i0 @: e& S& s2 J

  406. 2 ~" M0 C4 W1 Q8 D6 `9 j3 `2 h
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    9 m) d: n! S& k5 k2 V
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"" Z3 a) W: Z$ Z0 J

  409. 4 e& G9 e, Q& G& b; w
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK3 t5 {' {$ [. K7 R: w
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"- l# F$ ]5 W" h9 e1 t1 w# e
  412. 5 s( W  ?- l8 X8 o. N" c/ N- P
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK
    4 V1 E2 s( S4 F4 v% m* E
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"
      P/ s1 ~% q& n6 n: t9 w# b0 x
  415. 8 n( A) p, B9 J# ?+ O! X1 A; X
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    $ J; I, M( @/ E9 F! d
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    % k9 h$ V* o( s) {  P1 m5 |
  418. 4 Y) F, U3 C9 t- A
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK! Y9 m9 Y( J& [& L# t" V, Y( y, z
  420. .ORG $D4006 J; W: {7 f# U3 e
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"$ N/ f# ?0 |) ~

  422. # X* M# S: x& D8 a" Z3 s6 Q
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    ) I! X; O( J! C% `/ F
  424. .ORG $D800, d& [/ s/ f) Y2 F9 C/ j: M
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"* V4 ]9 v. l% w0 ~* I  n

  426. # i  C! T, y. @4 g
  427. .ENDIF. k% c1 I! u2 e
  428. 7 a" @" j9 O; t
  429. ;CHR图形数据
    . i  U9 U8 v% R$ f$ n5 Z
  430. ;======================================================================+ e4 q8 f& s( O; c' h( _
  431. .BANK CHR_DATA_BANK$ M- T, |6 c& U5 p/ f' [6 w
  432. .INCBIN "chr_bank/chr_data.chr"
    . x4 i+ Z1 E/ d7 o5 z3 s1 F- P5 `4 S
  433. * _/ D7 C2 G, g9 }
  434. ;======================================================================
      B' ~  M) v. G& Q0 j5 n9 l2 R
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK( S) C6 E/ y# O2 h, U- J
  436. .ORG PROGRAM_ADDR
    + S( I8 \4 q! V8 o3 d# K
  437. " K" D- X2 K" F, L
  438. ;==================================================$ m- J) l: k4 n( i2 `( T4 ^
  439. NmiProcess7 ~/ I9 f6 O. v. s. w; }2 j" Y

  440. 7 @% t& x* ]1 f( j5 \& t# v# X
  441. ;关闭屏幕控制9 O$ Y& X/ D% W1 H
  442. LDA #$00
      }, a8 E4 H. |
  443. STA PPU_CTRL
    " v+ @' U" N; v0 o
  444. : h+ A. m5 }) ]* N0 c! b
  445. ;没播放音乐就不需要触发IRQ
    " x" p  a7 Q! i2 T& ?( ~
  446. LDA <Music_Stop_State: J0 r8 i0 @' M
  447. BNE NmiNormal) A* r) Q, t$ m5 w0 K, ]
  448. % O! x$ `8 Q+ B5 f4 J
  449. ;重置IRQ索引
    : a9 t6 f3 @# N: K8 _& g" v4 F
  450. LDA #$009 `& N! g% T0 ^. {  I) V+ o
  451. STA <IRQ_Process_Index5 B* @1 A  F8 E; N

  452. / d* |- U6 U7 q
  453. ;时间秒数为空则跳过  |2 L5 a8 }) L! F4 ]
  454. LDA <Time_H# C- Z" f; m" G+ |7 y0 }/ a
  455. ORA <Time_M, i& T, U3 a# v- b, k
  456. ORA <Time_S
    , A, x! D1 B: U5 s
  457. BEQ EnableFirstIrq/ {  }8 m- L7 t. p9 D- Y. @

  458. " |! E3 m8 J) k% z8 S
  459. INC <Scroll_H
      ?! s* B: }# {' Z6 o. ~( N4 y# W
  460. 4 E9 g% Q! f, S' y
  461. EnableFirstIrq : |; o& Y4 w& L" l
  462. ;80条扫描线后触发IRQ
    % o7 i- X- {7 D8 u) v9 `
  463. LDA #IRQ_SCANLINE
      M0 g' ]) o9 c& f
  464. STA MMC3_IRQ_LATCH! l* W' U" t( K# e# R3 t
  465. STA MMC3_IRQ_RELOAD
    6 _" o0 I, A+ m: V# z
  466. STA MMC3_IRQ_ENABLE1 o: I9 j) A* g0 d" p, d5 }" W
  467. CLI- N$ L$ N9 m$ G9 H1 @
  468. % b# U- y3 F7 j, B5 P5 R
  469. NmiNormal# M! F& m. _3 z" w! r1 n7 W
  470.   |/ h$ i. Y2 Z! B7 ^( L) k8 \; P
  471. ;处理PPU图像
    + M" X3 m$ n2 `3 D, I" I$ o0 X: N
  472. JSR PPU_Proc
    $ P: [3 ~5 z8 D% l" h& J9 L

  473. - y2 M2 D- K  I& K: C; k
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化)
    + e) W$ E& H+ p. H
  475. LDA PPU_STATUS
    5 g3 R+ T! }1 t) I; p
  476. ;LDA #$00
    ' b! Q* Z5 N9 ?5 E4 ~
  477. ;STA PPU_OAM_ADDR1 `$ P9 M: T: l3 @* L- I% @- e, t
  478. LDA #OAM_TEMP_ADDR / $0100
    % }7 G% }% Y  C! n# K
  479. STA OAM_DMA5 t, ~  c9 u* V- B. _& z- ?8 I
  480. ' y5 b1 E: W1 C( D7 Z
  481. ;启用NMI中断
    8 r/ u3 `, _; V
  482. LDA Screen_Ctrl
    ; P) I, M2 e, m" \
  483. STA PPU_CTRL8 @% h  P' h5 R" K  Q9 g( L  ~
  484. 2 e- e# n8 v% L+ O% B! t
  485. LDA <Text_Disable_Flag
    : t# B# ^" ^. u. J6 Z
  486. AND #TEXT_DISABLE_RAM
    ) i+ j, g/ r5 |! k1 k
  487. BNE Nmi_Sound_Play9 p$ W  R) Y% }! F3 q

  488. 3 `, O/ P6 w: f$ Y% C" \
  489. ;处理手柄输入3 R2 w% T9 d+ Y( r0 E1 J4 [
  490. JSR Key_Proc* `9 V0 D' K3 ]7 t

  491. * Z% Z6 X( X9 U  T: L- g* |
  492. ;切换音乐(手柄触发)
    " B- E* q* ~$ s; `1 b" g6 B( s& A& }
  493. LDA <Time_Wait_Cnt
    & D. M$ s9 f" N( m
  494. BNE Nmi_Cursor_Arrow
    " d3 C; Z- h7 B# l* a; v+ E! v$ N+ p
  495. JSR Change_Select_Item( \, I! ?* P: H0 z, T

  496. ) y4 k/ f, R1 z
  497. Nmi_Cursor_Arrow
    ' S$ j8 Q3 z* o; m
  498. # b& n6 w4 z  x0 O0 \- U
  499. ;处理光标箭头
    % K4 J0 T3 X9 v3 W5 y  d" Y% _
  500. JSR Show_Arrow" t5 I0 D) l$ R$ L) h
  501. ! [% [) f2 x0 z2 c0 M- M* P/ T
  502. ;更新调色板/ K+ g3 H5 F- ]" C; \
  503. JSR Update_Palette_Data, [/ A' L2 R. P- E0 F: _; ^7 b

  504. 3 [6 k9 [  R0 v8 A0 u( Y% i
  505. ;显示时间(缓冲)
    ) ^; f+ A: v! ?- V& }( L
  506. JSR Time_Show
    3 G* Z) D/ Y+ _# C8 l

  507. 8 R' h" `) F% F  R
  508. ;音乐显示(缓冲)& p" _) T; t" Y& U- L
  509. .IF SOUND_BAR_SHOW_ENABLE
    $ d" n9 t; K5 y
  510. JSR Music_Vision
    - t. F6 F" i) h, g8 Z9 F/ y
  511. .ENDIF
    7 T9 C4 @3 V) O
  512. & K) ?, J1 U3 X! Q
  513. Nmi_Sound_Play3 V+ i+ Z8 Y; ~3 W" }2 Q6 e
  514. ;播放声音8 ~1 C' i) [7 m; Z, @
  515. LDA <Music_Stop_State) r% X' L7 m. _+ X: {2 K  ^
  516. BNE Nmi_Time_Wait_Set
    1 u5 j" S1 _& q3 }
  517. JSR Sound_Play_Proc
    . V& e, Q* d1 q
  518. ! Q, p  B" |  K
  519. ;播放计时
    4 m5 f2 G$ R: |/ B
  520. JSR Time_Count
    , p5 f# D: Y5 r! Z$ i

  521. 8 w8 T7 C$ c* w4 E5 u
  522. Nmi_Time_Wait_Set$ Y% }3 c* L% K! g" [
  523. LDA <Time_Wait_Cnt
    8 N( u8 y, N# [: T% R. z
  524. BEQ NmiNormalProcessEnd
    7 K- V6 j, E. A5 ?  s
  525. DEC <Time_Wait_Cnt
    + U$ F$ D. y4 M& w
  526. NmiNormalProcessEnd
    % O& I: P1 @3 h& G9 M9 E. o

  527. * r: l: l( T$ e2 N& P, n
  528. INC <Nmi_Time_Count
    / c9 {5 J, S: u
  529. 2 w: [$ e: A( D0 Q% D  W+ \' J
  530. RTS
    2 L" K/ I$ d: C. B! F
  531. 6 K  ]1 l/ e; o# L
  532. ;==================================================# i3 _1 f3 }+ m2 k$ z
  533. Init_MMC30 L" U" p' K/ D
  534. ;==============================% i3 K- j4 B& U, B7 l* u5 ^; @' h
  535. ;禁用IRQ) q! J, c' }: y( l& o% O
  536. STA MMC3_IRQ_DISABLE
    + U& ?) S9 x. x$ }6 }8 z- t1 U

  537. $ q) u# J( _# ?% M
  538. ;水平镜像
    ' m+ v* y" x4 z# P# U4 y
  539. LDA #$01
    / `1 x! D5 E; ?
  540. STA MMC3_MIRRORING
    7 d8 d" d7 ]; {5 O7 c
  541. " b  p4 S2 T7 F' L. Z6 J, C8 F
  542. ;初始化图形bank
    ; r. Z+ C5 B7 K$ Q& t% c/ Y
  543. JSR Init_MMC3_Chr_Bank0 z: _, P" W+ _
  544. ! x" Q- h) K3 ]+ H# `9 u/ Y
  545. RTS$ f. J& n$ g, H4 e2 H# Y% t
  546. ;==================================================/ R7 U* F$ j* E6 q( V
  547. ProgramBegin;主程序( ?6 B" p; G: E7 f8 _3 g
  548. LDA #$00
    ) {# z2 `. Z1 O& l% C  [8 W  Y( `4 N
  549. STA PPU_CTRL
    : j& b- y$ N+ w. y4 {9 Q8 G
  550. LDA #$00- Q5 ^# q7 Y. l) S" ^2 b2 j
  551. STA PPU_STATUS5 O* n/ k) T" k) P, p
  552. STA PPU_MASK& a2 ?. u2 k5 L' M
  553. STA JOY2_FRAME
    + [% j9 j2 I6 w& u, m. }' N6 R
  554. 0 y3 G7 }1 {( U+ `9 _5 L& H
  555. STA PPU_SCROLL
    0 h! Y/ n" g) C" o
  556. STA PPU_SCROLL
    ( Q- ]) }( k) I& X

  557. ! s% C8 Z! ?' n$ O  P8 r
  558. ;==================================================6 h1 f, n  U7 u( E
  559. LDX #$FF
    & F$ a5 Y9 m# k: t
  560. TXS
    # b1 r' k" S6 d: H4 U- ~
  561. 8 ?; [! `5 o- H4 G$ s$ H+ _9 f
  562. JSR Init_MMC3% N4 V# D! b: W6 E8 ]
  563. 1 i% t( F' F( ~1 P* o
  564. LDX #$02
    : [9 b: c9 D: ?# Y$ v6 M
  565. Check1
    # S9 }7 d. Y' B- ~5 \4 @! `- ?, n
  566. BIT PPU_STATUS
    ; M$ `; m" R& r" y3 ?
  567. BPL Check1  V# u* X# u1 A, x) h- \
  568. Check2
    + P, v, W( ^5 A$ n3 h1 `$ X
  569. BIT PPU_STATUS
    9 N) q3 t' Y  v! `2 W9 f* s
  570. BMI Check26 I) P( s9 m% A" {* y; w+ I& E
  571. ; Z8 p( u' n5 ~% Z
  572. LDA #$0F( ?3 i% a+ b* `" w7 l5 n
  573. STA APU_STATUS+ [* @& V8 X9 C9 B" D' u
  574. LDA #$C0
    " l- i" u; Q  D, z  G
  575. STA JOY2_FRAME/ O. u4 a" j) A  g, ?; u6 s; @- F4 n

  576. 3 B, Y) ~7 P/ M$ d
  577. LDA PPU_STATUS( E' W5 O1 Q' r* O7 s
  578. LDA #$109 a) z/ ]3 B- O. @1 @8 R7 M
  579. TAX; b2 g, W5 f/ a( }$ Z. A
  580. Check3
    1 Q: O+ S* _6 ~) B( a" V
  581. STA PPU_ADDRESS
    / [* l& T5 t+ K: W% P4 K* R
  582. STA PPU_ADDRESS  Z+ b  Y) o1 I
  583. EOR #$00- a4 d1 U3 ~9 Z3 V. E/ i
  584. DEX% \8 y: S& ~7 U- A/ C. f
  585. BNE Check3
    & n3 c- O3 K2 T1 N/ b( f
  586. ;==============================# Z) H7 |4 Q& _. p! s1 E# d8 L
  587. ;调色板清空& u" g* L5 O: n+ J- a
  588. LDA PPU_STATUS& G6 i8 d* W  o5 S  t" t% G3 t* i
  589. LDA #$3F
    ( ~. @. P- D* m7 [# [5 w
  590. STA PPU_ADDRESS) Y( _6 P* c9 [; p; \5 D
  591. LDA #$00
    / t! [# ]6 e1 \
  592. STA PPU_ADDRESS
    / A; d! ]+ K2 g
  593. LDA #$0F
    + Z7 \+ p- }" i* B
  594. Palette_Clear
    5 ?/ J. N% }" ^
  595. STA PPU_DATA$ r" V( l2 O- t
  596. INX
    " j- n' f& W" J6 x
  597. CPX #$20% d& d& v% g2 f! z/ H- B) T* s6 O6 i3 n
  598. BCC Palette_Clear3 t, ~" s0 d9 H9 R7 C2 G
  599. LDA #$00
    + H# z$ ~9 J% Y- L+ ?+ @6 @2 o
  600. STA APU_STATUS
    ! D* e" v1 s; w' e: ~0 ~! k$ j1 I
  601. " Z% a3 V) y" U% S6 u9 Q: q
  602. ;==============================( R3 A. ^5 g" C& `; y1 `" h
  603. ;RAM初始化
    ) @; t* m* X; L* }5 N
  604. RAM_Clear_All
    & J, N2 X+ z$ i5 M% [" a8 Z- H
  605. LDY #$00
      q( m7 c: m" ~/ i$ y1 S5 H
  606. LDX #$08
    , L! ]  Q7 _7 F* N2 q, z$ A+ c: l
  607. LDA #$00  {; q7 T* a2 ~1 k
  608. STA <$00
    % j+ |4 H* N9 I% R4 S" I, |
  609. STA <$016 R; K/ [. \8 {% V
  610. RAM_Clear_All_Start/ N7 r! O( H$ ]. m
  611. STA [$00],Y
    # |4 Y( E( c9 \$ l7 s
  612. INY1 c; f! _+ F5 Y0 L! E
  613. BNE RAM_Clear_All_Start" C* e* W: J( ?+ a
  614. INC <$01
    ! ]# g  P9 _2 H) M5 e
  615. DEX
    , g! a% w8 L2 p' r
  616. BNE RAM_Clear_All_Start
    , g+ ^3 g( n: M6 |, e1 R

  617. + F; E3 N# K# [9 x! T2 z; G9 u
  618. JSR VramClear
    0 {# p$ @1 b+ ~6 p2 Z  _# r
  619. JSR VramInit
    & X9 U  u8 y7 T: y# \
  620. JSR OAM_Ram_Init
      j& O# P! O2 f: p% x
  621. JSR Init_Palette_Addr) I  m. I+ Z, p$ Q% }
  622. : e1 I2 }* i" E% e! |) a7 t
  623. LDA #$FF
    2 C+ v+ K4 [3 c3 Z  {" u* I; x# ?
  624. STA Use_Ram_End" \8 }1 T. L; W& w
  625. ;==============================
    0 B9 a. |# E5 A' ~5 W" h
  626. ;初始化背景调色板' \+ f( k6 r: w
  627. JSR Set_Palette_Color0 h8 o2 @/ c: V/ ]: z: c# i
  628. JSR Set_NameTable_Attributes5 B6 k4 Z  Z# z2 v' Y* k4 e) D. Y

  629. 7 w  C. b7 u  g4 Z5 L- l
  630. LDA #$00
    . G- l* W1 R1 W% `* w
  631. STA PPU_OAM_ADDR
    % I$ q$ G6 V0 j; ?; \. O' Q
  632. LDA #OAM_TEMP_ADDR / $0100% r8 b& Z3 k$ j1 z  i$ @* C
  633. STA OAM_DMA+ z9 N* A- z; u5 @3 [3 d$ y

  634. & Y- }) O! H7 w& a0 d
  635. JSR Sound_Reset_Proc
    # ~% ^5 {+ o; c$ j* C; j/ Z
  636. JSR Set_Sound_Total1 t9 p1 @. o! _2 b9 t8 K: R
  637. 8 l/ L- V! E9 n6 |' a+ d7 e. h' c
  638. Init_Start_Music
    6 |  G/ P5 _' H$ R. H4 i
  639. LDX #$00- T, Z) k' T6 }; M  S, A
  640. Init_Start_Music_Write% i; S% c# s7 m- K% o! H
  641. LDA Sound_Start_Port,X" }0 p! z; y" A1 U/ w
  642. STA <Music_Cur,X  [% D+ L" e8 C! `5 u0 S
  643. INX$ I+ ?6 ~+ G/ ?1 }) C1 m. K# K
  644. CPX #ITEM_MAX_SIZE- I6 a- a9 ~/ O
  645. BCC Init_Start_Music_Write( Z! v1 Q& d  \; M3 Q1 {
  646. - ?# B( N+ P! E0 Z, Q( G: l
  647. JSR Show_Music_Text
    - q5 r% m3 C7 E9 K( n$ M
  648. 3 Q) W' T! u& p4 n. w9 g& t
  649. .IF SOUND_BAR_SHOW_ENABLE! n' k& u8 y& ^2 v$ ~. b7 j
  650. JSR Sound_Bar_Text_Set
    . j1 j/ n5 t, K5 u$ T$ B' {; J; P! Y7 A
  651. .ENDIF
    4 x) l9 ?4 z( C2 b* T! p

  652. 9 e: P3 F0 G; U) ?! m
  653. .IF Track_Name_Pos% j4 _2 v5 N) Y' Q) H, b: b& O3 e
  654. JSR Show_Track_Info
    " P6 W. B! A6 C' \+ n' {
  655. .ENDIF5 H& Y3 V, W7 ?  t- {% P
  656. 1 Q: R$ e5 f% G# |* e' a. b0 p
  657. JSR PPU_Proc
    5 z* s/ E, ~5 i4 ]; {
  658. ( l- V# S: T; n/ K, d: R
  659. ;==================================================& _& f, e" b) N* \6 j! a
  660. ;音乐bank初始化
    ' K6 M2 e, Q4 u5 R
  661. JSR Init_Sound_Bank
    ( M* ^6 o! p% p  C" X  z
  662. $ l2 n6 B& }/ x+ e* M
  663. JSR Music_Show0 Z! ?' \$ N9 L: h" v
  664. JSR Time_Show- {0 a5 ^4 s8 p/ x# U" H
  665. JSR Music_State_Show7 V3 \" v3 A6 m! b0 q' Q
  666. JSR Time_Delay
    4 m+ ?& _. e# |" X% ]* h, m( T
  667. : B. r. Z% ]- R
  668. LDA #$014 }0 a( r) {4 s& M0 |
  669. STA <Music_Stop_State
    : a# |7 ]* ?0 E
  670. " `% }. G1 b3 B) @- Q
  671. LDA #$88+ y; l5 ~' T* @4 M4 \) N( o( w/ C+ Q
  672. STA Screen_Ctrl
    : c9 ?& m6 Q0 E0 L- Z: [) B* ?
  673. STA PPU_CTRL
    ( Q% L( x$ b8 b! B" i. o" d: O# I; c

  674. ! |6 [8 J7 K4 o. k
  675. JSR Show_Page_Text6 T7 r4 t* y! [" Y% G, e# x

  676. # V  g) W) ~' u3 ]
  677. LDA #$10
    % \. k7 |7 a7 ]2 i$ K0 i$ [0 \- X
  678. STA <Time_Wait_Cnt
    4 z9 o6 g9 r' @9 E: c4 n7 n
  679. 7 c' O9 \: v) k. [, J! h
  680. Wait_Time_Over
    0 P8 ]; [0 W9 e/ J
  681. LDA <Time_Wait_Cnt
    7 O, U/ W. i9 ~, g  V
  682. BNE Wait_Time_Over" J% U6 N: R% E# Q. ~

  683. 7 d2 l5 Z# `# W/ x3 S
  684. JSR Show_Arrow
      y# f4 p# I+ H% i. Z& q* g
  685. LDA #OAM_TEMP_ADDR / $0100! n8 ^5 ]& m4 [+ {, H' }) c3 B2 R
  686. STA OAM_DMA5 r. U- {  P+ G( o  `8 `& |( F

  687. ' C) I, y" {2 n4 ]
  688. LDA #$1E
    $ O! a  y) Q; q1 d) k3 P" a
  689. STA Screen_State
    $ P; ]. U6 A, Q4 D' u
  690. 7 _9 B/ `, }6 D1 D
  691. LDX <Music_Item_Cur
    & A: R5 o/ p& c; o3 L% u
  692. LDA <Music_Cur,X
    7 R$ f- ~7 c( n7 b6 Q
  693. JSR Sound_Init_Proc2 C# i, }& N2 I4 f$ C+ s
  694. 3 E$ i' ?+ v3 e, [; [
  695. CLI
    1 ], P$ P' A% x. @, H" g
  696. JMP MainLoop) D# i- P+ h5 B& D$ [7 L$ K9 }

  697. ( ]5 u' n$ F  ?8 \9 o/ L/ Z" E
  698. ;==============================' b; x1 p0 w% d/ H' u0 Y0 e
  699. Time_Delay;延时等待! E& ~8 D9 \8 U6 J8 l/ S
  700. LDA PPU_STATUS) k  C, y. K4 n
  701. BPL Time_Delay
    $ a% c& f" v2 h  ^, K
  702. RTS  l# Y/ [/ y1 X* X2 z
  703. 3 b6 E) v$ x$ U* @( ~! H  g
  704. ;==============================& N: _+ c( J- v& _5 m8 t6 n
  705. OAM_Ram_Init;初始化精灵内存; X" W; t4 \, A2 z: w$ a' ^
  706. LDX #$00" R% w$ U0 s0 Y& @$ c1 ^$ [
  707. OAM_Ram_Init_Write
    * r( |% k3 e+ r( ~# Y/ l7 p
  708. LDA #$F8& X4 U* N9 N: w; l9 ^
  709. STA OAM_TEMP_ADDR,X, ?$ E* c/ X3 j' G. O7 U0 M
  710. INX
    1 g. o0 s4 d6 a+ U# X9 h+ w& }
  711. LDA #$F8# N; V6 v' c  e
  712. STA OAM_TEMP_ADDR,X" D5 f6 j: U( k# g
  713. INX
    5 p  a$ N7 ~- u7 Z0 G2 O% j
  714. LDA #$00
    ! M) @2 u7 N% ]. Z4 F+ c( x% A
  715. STA OAM_TEMP_ADDR,X
    % F# n# t/ Y+ u9 H& R2 D- f6 v
  716. INX
    " Z2 t5 ?8 A. }% W
  717. LDA #$F80 k; s6 \! O3 X
  718. STA OAM_TEMP_ADDR,X
    # N! v4 E% E( F, ]
  719. INX
    ! r+ Q  f1 N' ]4 Z1 g: i- W
  720. BNE OAM_Ram_Init_Write8 J3 L) e" N4 c0 ?4 `) _
  721. RTS$ z) j+ f0 E. j7 n
  722. ) X3 m2 O; Q1 p* R) z
  723. ;==============================5 d3 D& ~3 s. p3 T) l' Y, u
  724. VramClear;初始化图形内存/ C( o4 e! H' P5 v) K
  725. LDA #$20
    & Z& `, U  }- y; V5 ^0 T% P
  726. STA PPU_ADDRESS
    9 U/ c% o1 J: l
  727. LDA #$00$ ^" b8 L7 b5 ]' E5 S; ]
  728. STA PPU_ADDRESS
    ; z: z" o4 I* ~( B7 _
  729. LDA #$00$ k, X) J2 E8 D
  730. LDY #$00
    ( D' J2 V$ M8 V' ?5 a+ p: r
  731. LDX #$10
    9 R7 B9 u; C/ E% D1 ?3 |
  732. VramClearWrite0 E0 r6 {+ v' Y  l. H
  733. STA PPU_DATA/ Z& r8 w  m" Z
  734. INY
    * w7 \% ^% W0 L) A
  735. BNE VramClearWrite/ [; Z* H! c( y% v/ J4 H, F. c2 e
  736. DEX+ f( I+ r* w! G" R
  737. BNE VramClearWrite
    7 m7 X7 D6 I) ^! R: a) g  q' l
  738. RTS7 |! M8 ^, _6 j7 Z
  739. & u: g( u$ |0 X- l9 u
  740. ;==================================================- `# m; W) [( F/ u+ N0 H
  741. ;设置MMC3图像bank
    $ ^* w, S5 e0 }+ {1 v- x/ M
  742. Init_MMC3_Chr_Bank, f. l7 t3 K0 T* v, ]
  743. LDX #$05
      R: ^& p3 P- i! C
  744. Init_MMC3_Chr_Bank_Write1 ?" a! s+ R) m' y6 M
  745. STX MMC3_BANK_CTRL/ A+ y7 F. {8 n
  746. LDA MMC3_Chr_Bank_Data,X
    7 I9 U- `- ~2 l& \8 J
  747. STA MMC3_BANK_DATA9 n1 ]' n( d4 l- k9 Q0 x( r
  748. DEX
    4 T& }3 f2 E  Y" ]! @& y3 ]& Y9 j! M
  749. BPL Init_MMC3_Chr_Bank_Write
    9 S+ ?8 E  ?. ^9 U2 h1 |. m
  750. RTS
    - }: j* P; O5 W. l
  751. ;--------------------------------------------------
    ) `" B) G) D# W0 b/ M) p* d
  752. MMC3_Chr_Bank_Data
    / H5 i: A# Y, W$ {- B! ^9 M; l  x
  753. .DB $00,$02,$04,$05,$06,$073 b  ~$ M  D3 W9 m' E. m5 I& D+ Z% P

  754. . p  _* N- r' M( ]# v
  755. ;==============================9 ^3 D: Y) ]( s
  756. VramInit;初始化图形内存
    & f# |1 T  f4 K' D8 G1 k
  757. .IF CHR_RAM_ENABLE
    * p( b! T! s. e. X' [
  758. LDA #CHR_DATA_BANK9 K8 s& R! J, m8 |2 ]1 J
  759. JSR Switch_Bank_A0002 H8 W( H! Z4 w4 P
  760. LDA #LOW(CHR_DATA_ADDR)2 V" ]' V& o9 u; i6 k
  761. STA <Data_L
    0 w+ f3 u+ Y  i6 A) e
  762. LDA #HIGH(CHR_DATA_ADDR)0 L4 s4 w/ f( j7 F* f  Y
  763. STA <Data_H9 s6 r6 w9 l$ R) l9 r2 a
  764. LDY #$00+ T2 e4 F6 h2 h  k; [  W. [+ c
  765. LDX #$20" w# p: Y3 Q4 c3 v3 h  X
  766. LDA #$00
    % J* [/ B. w3 h6 q- j! S
  767. STA PPU_ADDRESS
    ! M. G+ @5 \1 a* r9 Z. D
  768. STA PPU_ADDRESS% M: T# Y" c$ \. n$ {7 }
  769. VramInitWrite
    0 w4 j; m- M! G7 b: O( Z) y
  770. LDA [Data_L],Y
    2 C: e) A4 w; H7 W( T" p. _' \
  771. STA PPU_DATA4 ]0 w; p" o4 p$ p( v  C1 R% x
  772. INY
    1 L3 E, g4 ]  f% @
  773. BNE VramInitWrite
    - k  Z; F5 M( @! g1 f
  774. INC <Data_H+ D. k! ~5 y: x/ m' q
  775. DEX* U' M4 V3 ^. N6 g
  776. BNE VramInitWrite
    9 n1 Z5 ^% A' v
  777. .ENDIF
    6 \$ I6 K0 C, U3 [
  778. RTS
    , x6 ^; Q2 h  n

  779. % |3 a  }, I% ]) |1 |3 `& m
  780. ;==============================4 ~; F% X& `: a5 ]" s; ]4 w
  781. ;音乐切换/ I. b* X( ~$ i2 [$ Y
  782. Music_Play_Change
    , A* {/ M# P" n4 I
  783. LDA <Key_Once; ]+ L0 ^# \- j
  784. AND #$FF* Z2 z. x' W6 i2 _0 H
  785. BEQ Music_Play_Change_Check; X) G' O# V8 c( g

  786. ; h; C9 ?# d( s* X( `, Z
  787. ;禁用音乐条刷新
    3 x, ^) w! R0 U8 O1 b' z9 ?
  788. LDA <Text_Disable_Flag* Q' D9 w; S/ n1 L
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME9 s+ D  l6 U2 U% \
  790. STA <Text_Disable_Flag
    $ B: b6 B2 _! F  T" K( `* v

  791. 8 N% _8 C6 C" ?8 L
  792. Music_Play_Change_Check. l5 G( z7 H, m! S$ o+ M8 T* N
  793. Music_arrow! Z* y# Q6 _, e% Y9 j3 Y
  794. LDA <Key_Once
    ( L5 x( h7 t+ @9 h+ i7 {
  795. AND #$0F
    7 n* ?0 D% M  S. @
  796. BEQ Music_Play_Change_End
    8 ^1 n7 v' |2 q- m
  797. JSR Music_Track_Change  Z# H6 @& p1 D3 F+ V; K
  798. JSR Sound_Reset_Proc1 i" n( G& ]9 J
  799. JSR Music_Show
    1 b9 x& @1 ]3 z2 i/ E
  800. Music_Play_Change_End
    5 U! L1 Q# c5 L
  801. RTS2 U/ B' ]2 U' \

  802. ' l! c# {" a: [$ Z3 z' x! ^* u  P9 b
  803. ;==============================& ?$ }6 p/ ^5 e; P/ O: X! d, D
  804. ;音乐曲目切换  Q; e- q  `" r2 ]+ W, o2 f
  805. Music_Track_Change& O+ p* {5 o/ X7 Y+ o
  806. LDX <Music_Item_Cur* V* K, g& x6 U  C, o# x: h
  807. LDA <Music_Cur,X. N+ U$ z# F! f
  808. STA <Music_Last
    ! F7 c6 M( g* p& Y/ F" E) |- }
  809. Music_Decrease  w3 R6 @7 t4 A" F
  810. LDA <Key_Once1 ?: `) K( d  d: O2 }- }
  811. AND #$42  i: J8 d% L0 [: m9 f3 B9 ~) N/ L
  812. BEQ Music_Increase8 @) D% s9 u7 {9 a! U
  813. LDA <Music_Cur,X
    $ ^2 [7 q: ~' _! z) M( Q
  814. BEQ Music_Increase. b/ `! j* _) V
  815. DEC <Music_Cur,X, ~+ ?8 I2 m6 `/ n; ]3 J3 b
  816. Music_Increase
    " ~5 O. z* q' q/ `  M
  817. LDA <Key_Once$ {, `2 l, k& ^& t
  818. AND #$811 p6 F9 j3 I' I! f4 A
  819. BEQ Music_Decrease_101 s, d3 A+ Q1 k
  820. JSR Set_Sound_Total
      m3 G) ~8 i- Q- C
  821. LDA <Music_Cur,X  ^# G, s7 b" }2 v+ `. q: H
  822. CMP Music_Total2 h/ m  y+ W7 a) f2 R: B
  823. BCS * + 4
    * Z2 `5 j0 l3 b$ |5 w; ^
  824. INC <Music_Cur,X# V$ L# F6 A1 c8 O5 f6 l6 S
  825. Music_Decrease_10
    , g9 b6 a* _& J' E% d" @$ Q
  826. LDA <Key_Once
    1 g" y1 k: x- L9 r1 J7 q5 P# _
  827. CMP #$042 p! r9 ?) m- w4 z) d' r
  828. BNE Music_Increase_10
    ' H3 e3 o5 u! N, R9 X
  829. LDA <Music_Cur,X7 V/ G! v. m* A9 f5 d
  830. CMP #107 m" E# j& R6 J" V3 v
  831. BCC Music_Start_Song_Min
    & G/ A$ [5 \+ S/ R: T
  832. LDA <Music_Cur,X
    ( k# n1 S9 ~( _$ ~8 H) ~- ~
  833. SEC
    & {) z+ q6 _" G# k3 _5 w* C# }2 P
  834. SBC #10
    ) {3 \3 \) {9 |: W1 V/ D3 X
  835. STA <Music_Cur,X
    9 s% z- Z( a% i' c' u/ z
  836. LDA #$00
    9 i. F! Z# d) y. N! N. m
  837. BEQ Music_Increase_100 Q8 z0 M4 I8 {
  838. Music_Start_Song_Min
    2 X; z6 P' m. f% M" J
  839. LDA #$00
    % ^8 p. x& \" X, z" W
  840. STA <Music_Cur,X
    + O) s2 C/ \% j  l, j
  841. Music_Increase_10
    & [: _7 i8 O/ P' q4 s
  842. LDA <Key_Once
    7 w$ ?" P+ @3 ]- ]% ^5 j
  843. CMP #$08
    " k) @* y( O9 ~  H" A' M' m
  844. BNE Music_Track_Change_End, K3 @; h: }+ N7 W+ W8 D
  845. LDA <Music_Cur,X
    ) h* {# F. P3 ~7 e* i
  846. CLC/ v4 }; j  R3 Y6 S
  847. ADC #10! \3 q0 x# H& _/ b/ D
  848. CMP Music_Total
    # g0 h8 x% d5 _/ L8 o; ~1 R
  849. BCS Music_Start_Song_Max2 [4 D. L" [. E% e9 g
  850. STA <Music_Cur,X
    2 h& x4 n4 K9 Y+ s8 Y* o
  851. LDA #00
    . ~( g! ]- A  ^) |5 `- s
  852. BEQ Music_Track_Change_End2 y7 b; q7 |0 }4 @/ ~
  853. Music_Start_Song_Max7 _3 l1 j0 k! V+ |
  854. LDA Music_Total
    , m, b% B  T5 x
  855. STA <Music_Cur,X. [( |8 b8 C5 x5 |: O: p
  856. Music_Track_Change_End! s" ~, m, U0 f' b( M  u  S5 X
  857. RTS
    & i( m2 k$ k2 s& d

  858. - j/ I& o& S) T8 D8 C
  859. ;==============================
    # B2 [) ~& q% x; |6 j
  860. ;按键处理
    7 N" N9 O0 S: c0 Y+ P/ _8 O3 d
  861. Key_Proc
    ! k1 |3 E8 S! C8 @. z
  862. JSR Key_Scan. N3 y  @8 j( ]9 R
  863. LDA <Key_Keep
    1 p9 }% P: g7 G# r% l1 x
  864. STA <Key_Temp7 V, L4 M7 ~+ y6 a8 G& K
  865. JSR Key_Scan
    ( `% H' A0 P; x% ~! U& f* Y4 D: H# ^% T
  866. LDA <Key_Keep# c8 L9 K, q! A: G
  867. CMP <Key_Temp3 i! c) R9 }; e( Z
  868. BEQ Key_Get_Once# S5 Z+ u7 e4 _
  869. LDA <Key_Kemp5 ^) T. F/ j7 L+ G- V
  870. STA <Key_Keep  l. W, m! K- x$ \+ `0 O5 ]
  871. Key_Get_Once; C: q. a1 N0 x+ s# |
  872. TAY
      _" L( V* F" v+ O" r
  873. EOR Key_Kemp; s0 K8 o3 h9 v& K
  874. AND <Key_Keep  P8 v/ v5 y3 M5 B; e7 L3 t
  875. STA <Key_Once$ H. v, H. Z; _, [
  876. STY <Key_Kemp
    % [. ^1 R& Y) {4 v, ~2 ~
  877. RTS
    9 m; U0 u: e0 j6 n
  878. ;------------------------------
    + l' B) e1 [# u  `
  879. ;按键扫描9 Y9 K* W1 P+ ?2 s& C8 N5 C% ?
  880. Key_Scan0 X, }/ G6 w* D+ |
  881. LDX #$01: A; |, O0 m* g4 ~
  882. STX JOY1_FRAME  r, l, O' T3 [' R" i
  883. DEX& {# _/ [/ K! Q" X! a* x$ T
  884. STX JOY1_FRAME2 V7 U- x1 V+ B
  885. LDX #$08
    0 U" T) W( i, Y* x7 k
  886. Key_Value9 f  J' p4 K; Y; u% p
  887. LDA JOY1_FRAME0 P! n2 I+ c4 E, n& a
  888. STA <Key_Getv6 J$ g/ O8 o* e1 v; z- \/ `' F
  889. LSR A
    $ S6 ?5 m' D/ A9 J/ u
  890. ORA <Key_Getv
    6 L' r" K. \8 H2 D, ?+ }) M. p
  891. LSR A* @' v. M4 L" _8 L- I  W: @3 R# L
  892. ROL <Key_Keep+ A5 z0 E0 w0 ^
  893. DEX, g) T2 @8 ], o3 Q; L2 T
  894. BNE Key_Value/ R+ q( C2 x7 X
  895. RTS
    " [& h6 t$ I  `) S) r0 M

  896. ' G4 O6 l. h1 n
  897. ;==============================6 h1 F4 h' V! Z: `; k7 T
  898. .IF SOUND_BAR_SHOW_ENABLE
    5 O( P! M8 u3 [: `
  899. ;音乐条显示
    6 R' H/ d( {/ s0 t% {: \
  900. Music_Vision
    4 E5 H$ ]. A0 w. i& w
  901. LDA <Text_Disable_Flag
    4 j1 h; [  m; ?4 n
  902. AND #TEXT_DISABLE_ITEM
    # c3 y! u  _/ q' J  i/ k) O
  903. BNE Music_Vision_End
    1 Y- {# n- d% W1 x9 T1 P2 \! S
  904. AND #TEXT_DISABLE_BAR0 f% F' P2 H# @, S0 j; A
  905. BNE Music_Vision_Set
      o9 G" n# v6 t
  906. LDX PPU_Cur
    ; M( f1 h9 \- E
  907. JSR Music_Animation8 c7 a% ~* T, s3 M
  908. STX PPU_Cur3 }, e8 y- n' w3 y6 r1 a. P
  909. Music_Vision_Set) G/ `- o! l& p
  910. LDA <Text_Disable_Flag% e' ~$ }4 K5 q
  911. AND #TEXT_DISABLE_BAR ^ $FF
    ! o# }3 k! k" c2 z' d4 x* v
  912. STA <Text_Disable_Flag7 A5 `( F+ W, K# h+ a" v; ^
  913. Music_Vision_End
    6 m. N& ?+ g) E1 v% \7 I
  914. RTS$ @+ I/ y+ z) w. u+ L( T
  915. ;------------------------------/ B9 P* j2 @" h
  916. ;音乐条显示处理* R; v6 Q' K, K. X
  917. Music_Animation
    6 g6 T! }1 ~* y/ F6 H( |7 x
  918. LDA #PPU_MODE_CNT_LINE1 }9 _7 i- Z) {; c; i2 |7 X/ l
  919. STA PPU_Addr,X
    ! D6 w& W* W/ k( D5 d- S" w
  920. INX; N' u! Q" {4 U2 d
  921. LDA #HIGH(Sound_Bar_Pos)' c# D) d) @3 t5 q" P1 Q3 i
  922. STA PPU_Addr,X
    - y2 Z  X3 w6 |) u0 `4 m
  923. INX
    4 y6 r: Y9 o, m& [. g: |$ t
  924. LDA #LOW(Sound_Bar_Pos): j* Q' i9 J& W" t1 Q3 G
  925. STA PPU_Addr,X
    4 h( t2 z- Q1 `3 J# y1 v* z
  926. INX
      b! y' t+ D9 O, @7 r! S. W
  927. LDA #$083 o, z* r( s% C, }2 M
  928. STA PPU_Addr,X
    / ^: T+ o8 C! e" z. @7 c- N5 J: j: x
  929. INX
    ( A: h7 ]0 {# i
  930. LDA Sound_Bar
    4 F$ d- o( H6 l/ M. u
  931. JSR Volume_Convert* S5 N: H9 p$ E

  932. 5 r. Q8 _! I* X" b% s
  933. JSR Volume_Set_Cnt
    ) e) w, R* S) E, ~8 \
  934. LDA Sound_Bar+$4
      x, v- J" k" H/ e3 r7 y
  935. JSR Volume_Convert8 q- u' I* D1 |. y% ~, S% f

  936. # B9 q* K5 D+ k- \% o
  937. JSR Volume_Set_Cnt) ~7 P2 T1 m' \0 A, V, C
  938. LDA Sound_Bar+$8
    8 b, a9 v# p7 ~4 B) S9 H
  939. JSR Volume_Convert% i! n* K, X; B# C

  940. : D6 k  C* Q' G
  941. JSR Volume_Set_Cnt
    5 D+ ?1 |0 k: z. {
  942. LDA Sound_Bar+$C
    , U- u4 m7 v- f, `0 S' N; e
  943. JSR Volume_Convert
    ; K1 l% R' ~4 d

  944. 6 H9 M/ e* O& J
  945. JSR Volume_Set_Cnt
    & Q/ d# M$ z. ]- ~7 Z
  946. / h% z- Q- @4 Q+ |' q1 d4 n5 {
  947. LDY #$10# @  i$ B. W5 y; T3 K" e- |
  948. LDA APU_STATUS
    8 g$ Q& \2 Y$ y. O$ {0 F
  949. AND #$10; N6 t+ C2 k& G' s# Z
  950. BNE Volume_Count
    / B/ v& b% U  m5 [& j$ b
  951. LDY #$00
    ; I2 R5 T" B, c
  952. BEQ Volume_Count
    & t( J% c8 T8 w) A, A
  953.   o0 ~* ~! P& L, E; l7 b: K
  954. ;------------------------------
    + b5 a( T' d4 P$ X- e' M4 E  H
  955. ;音乐条处理
    ; ?! `% Y0 ^/ P
  956. Volume_Convert
    3 A# ?6 E: b+ d
  957. AND #$0F
    + [, {% z: m) |1 m7 b* e
  958. TAY
    9 T0 ~- I& m+ I* P( ~
  959. Volume_Count4 s5 p9 H  [: X7 W2 I+ h
  960. LDA #$083 K. H( k: M+ ?% v4 V* D- ^9 G: y7 @5 [
  961. STA Sound_Bar_Cnt) {+ |5 X7 I4 N( N; z- s; p
  962. Volume_FILL
    $ E  m: Z# \: d
  963. DEY4 `/ w. ~7 @3 i) A& ~
  964. BEQ Volume_Half
    & o- ?+ P; j1 ^
  965. BMI Volume_Empty
    3 |- R6 a0 S$ W* s5 \) `* x' S* p
  966. DEY
    8 v' D4 i# b: i" v
  967. Volume_Full
    6 D. ^3 C  Q& L1 X
  968. LDA #$16
    ( F2 P$ r* @2 X9 I/ U
  969. BNE Volume_PPU8 [0 ^3 n, |4 D' P: b
  970. Volume_Half
    2 V' U0 L( N2 J* W
  971. LDA #$151 J' U# i" j, |. ?9 z( B
  972. BNE Volume_PPU% k  Y6 z% q6 K. y
  973. Volume_Empty
    # H1 ~6 m9 o& \* R# ]- N
  974. LDA #$14
    3 ]0 Y  g0 J( Q% Z) R' J
  975. Volume_PPU5 e2 c4 G$ H. |8 I. d, g
  976. STA PPU_Addr,X
    & t" K8 h% ^: d; r  e" ]3 _
  977. INX
    % ]9 V) i$ A: p* L  ]" W' H5 ^
  978. DEC Sound_Bar_Cnt* v2 ~6 W: {! H6 Q) T2 D$ ]
  979. BNE Volume_FILL2 s! U& N8 T9 J8 q
  980. RTS  z! h# {+ N: G" L% @
  981. $ x7 v9 [7 I" W2 @2 s& A) p
  982. Volume_Set_Cnt
    . u4 Y  c! _  I& Q! \
  983. LDA #PPU_MODE_CNT_LINE_NEXT2 p, F# U4 G! l' ^
  984. STA PPU_Addr,X
    % \) [, b, w" |) E5 e1 {0 V
  985. INX9 V) }$ @8 s. z/ D
  986. LDA #$08
    3 X) T1 t7 F4 D2 h$ ]* _0 u
  987. STA PPU_Addr,X+ A0 R8 ]) m* n' O; t
  988. INX. P, E* H) I4 n$ \
  989. RTS
    0 w9 q/ J" h' _+ F
  990. . O% q* K* B( d$ u. j* M5 W( ?
  991. .ENDIF+ K+ p+ x- M* a2 N! q* i
  992. # A% R+ _: H! Y
  993. ;==============================% \4 e. [" A6 T
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入6 Y( n3 N1 c- J* y5 H+ t0 L
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式6 u( [% V. u1 V7 s
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除7 r  H5 Z9 q$ M# g4 |2 N; T
  997. ;------------------------------
    + E# m  e/ Z( C% a* ]6 Q
  998. ;PPU处理
    0 J& Q! n5 V) e; T) W* N
  999. PPU_Proc: i5 p! y6 V( I5 L
  1000. LDX PPU_Cur5 V5 a1 I* w8 \( Z
  1001. LDA #$00- Y4 T# F. n+ K. Z, o# B
  1002. STA PPU_Cur
    $ ?7 ~9 L- J" ?+ K# T
  1003. STA PPU_Addr,X
    . z& ?% k; D4 b; N: a0 k2 @
  1004. LDA PPU_Addr. u, F4 `( F* ~0 p% X( l
  1005. BNE PPU_Proc_Beg+ ^8 {3 L& c) @% N% g% l
  1006. PPU_Proc_Ret- ^$ K5 p. z) K% s* i
  1007. RTS  x) ~$ s3 X: ~7 f4 r1 b
  1008. ( u! ~: D0 N" ~7 o- E% [- m, ]1 Y
  1009. ;------------------------------
    & G5 ]6 i  G1 ^# u  ]7 @
  1010. PPU_Mode_Return_Cnt  ;转下行模式
    + I  \. {+ e! ]$ Y/ u" P
  1011. INX9 S3 w/ R' l" r7 P
  1012. LDA PPU_Addr_L
    * d! j1 B" S$ b. Y( C8 @4 H% f# K
  1013. CLC
    + ?# L3 K0 E: s$ |* n. w& {
  1014. ADC #$20+ C* e5 J$ P, w5 m$ [4 ^% Z
  1015. STA PPU_Addr_L
    , m" w3 L0 w/ l7 b' n& F, H9 Z
  1016. BCC PPU_Mode_Return_Cnt_End
    - ?( `9 u" H) y5 k! N1 A/ E, C8 ~3 b
  1017. INC PPU_Addr_H
    * u: \1 e- g- t1 f* @
  1018. PPU_Mode_Return_Cnt_End
    9 m/ t3 e% c7 ]4 l
  1019. LDA PPU_Addr_H
    % Y( s5 W% W4 n& j
  1020. STA PPU_ADDRESS, e9 V4 U7 M, P5 }5 z
  1021. LDA PPU_Addr_L
    ! P$ K/ W( |1 Y7 h3 j# a, o
  1022. STA PPU_ADDRESS
    . H6 l( O% {4 L. Y
  1023. LDA PPU_Addr,X
    " g: L/ r3 J) \, W2 g# |4 E. o
  1024. TAY
    " j# A+ S8 K% T( Z( Y$ u9 _& [! j$ l
  1025. PPU_Mode_Return_Cnt_Write' t0 T/ _! X7 u1 H
  1026. INX- w1 I! @9 |, Y5 u0 u$ ~8 W; A
  1027. LDA PPU_Addr,X
    9 A' F! l  C$ T0 c/ `5 x* t7 P  D4 G8 X
  1028. STA PPU_DATA4 [: Q: ]7 ]# A  q( O. R7 e) x
  1029. DEY
    / }2 w9 c" t3 I% Z4 ^" N
  1030. BNE PPU_Mode_Return_Cnt_Write' d+ G5 \/ O. y
  1031. JMP PPU_Proc_End2 ?) T. K$ K  I0 ?; O% I, A

  1032. 5 d) L" s  C- F* E+ O5 {
  1033. ;------------------------------$ ~& f3 ?& T2 |) h
  1034. PPU_Proc_Beg  ;处理开始
    6 z' [, T/ Q2 X* g6 C/ ~
  1035. LDX #$00
    2 I  Y3 t' ~/ C; Z) z
  1036. STX PPU_MASK
    % X  U* Z0 p2 z" G0 m( F
  1037. ;------------------------------
    & o( z7 r2 c3 h8 @
  1038. PPU_Mode_Select  ;模式选择
    : h9 B. K: J% \
  1039. LDA PPU_Addr,X
      I% r& p& m! H; ^* ~' P$ g+ S9 T- N% Z5 Z
  1040. CMP #PPU_MODE_CNT_CLEAR
    + V7 p$ X# U' G0 d% ?: p
  1041. BEQ PPU_Proc_Clear
    ' O6 a* y: }; W8 d- e! |: w9 e/ z
  1042. CMP #PPU_MODE_CNT_LINE
    ( P: B7 H  I% p: D4 [2 v; ]
  1043. BEQ PPU_Proc_Cnt_Line
    * t/ G0 K/ o7 j
  1044. CMP #PPU_MODE_CNT_LINE_NEXT5 D# Y7 A. a2 N1 q( R  T4 ~; R
  1045. BEQ PPU_Mode_Return_Cnt
    : ]8 k$ m+ j+ v* G0 T
  1046. JMP PPU_Proc_End_Write
    9 X) n8 h# H9 W- P' t7 V
  1047. ;------------------------------
    + R8 ~7 \! b/ B. v9 X- R
  1048. PPU_Proc_End  ;单行写入结束8 \" l( `+ O  \, `
  1049. INX6 R: A3 w2 p! @" O8 N: \
  1050. LDA PPU_Addr,X% l) E* o% {1 c% K- l" P
  1051. BNE PPU_Mode_Select
    # B6 L( s! p6 C% M- X. v1 s: p# T
  1052. STA PPU_Addr3 K  o% ?" ?1 q5 C9 H1 q
  1053. JSR Update_Palette_Color( w% v  h! O7 B/ W. K
  1054.   X+ P& l3 c" R! X/ d- o4 [/ W
  1055. PPU_Proc_End_Write
    * I, [' E' _8 H+ c" u) O
  1056. LDA #$00
    # a8 R( b" M! J; T1 T% z4 m
  1057. STA PPU_ADDRESS
    ) K- U5 ?- d' m7 \5 p
  1058. STA PPU_ADDRESS3 f, a3 [  T% }. B1 b
  1059. LDA <Text_Disable_Flag# u. l" Q2 A4 h( T5 T
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF
    + b# q8 o/ E3 O& b7 `% _
  1061. STA <Text_Disable_Flag# E. U0 b8 }9 T2 q
  1062. LDA #Scroll_X5 E; K$ n9 S9 h$ x+ Y6 z
  1063. STA PPU_SCROLL: I' r  @: O" s5 W
  1064. LDA #Scroll_Y
    + M& F6 E& z, R; N/ s
  1065. STA PPU_SCROLL
    $ e; {+ \/ j( y9 [, E0 x5 y
  1066. LDA Screen_State
    1 f( D' B4 G! x9 a+ W. S% d
  1067. STA PPU_MASK
    . M& `; D* o& L1 G) o9 d1 f
  1068. RTS
    7 o- V+ b8 k7 @

  1069. 2 d' j6 [# \# V, L% \
  1070. PPU_Proc_Clear
    , s6 p' E" p! H8 N- V
  1071. INX6 Q! `, B$ I$ {( T' s7 [
  1072. LDA PPU_Addr,X
    ; x  E6 {$ L/ y- G- [  o
  1073. STA PPU_ADDRESS
    0 l" D. C6 ^* W
  1074. INX
    9 \0 J6 R7 D, m2 y" L  [! b
  1075. LDA PPU_Addr,X/ |  b# n% j( K6 b
  1076. STA PPU_ADDRESS
    ) @2 N# b' u* u
  1077. INX
    # d1 v% O6 ]) }% A
  1078. LDY PPU_Addr,X
    * w+ B. O% @2 i" j' t! b4 D
  1079. LDA #$00  b/ W4 i' u* X5 l6 M
  1080. PPU_Proc_Clear_Write! p& \+ H4 \; W6 f9 Y
  1081. STA PPU_DATA, d, e! i6 V& X
  1082. DEY
    * Y1 c# X5 H# P& S$ L# m. a
  1083. BNE PPU_Proc_Clear_Write
    + E( h5 ]+ y8 P: I
  1084. JMP PPU_Proc_End
    * u* l+ h( g# `& n- V

  1085. / I! j+ s1 b; w& M, Z5 {
  1086. PPU_Proc_Cnt_Line# H0 N' H' S8 g1 {" K* ^
  1087. INX) e: p5 D8 x0 v) l" w3 k- H
  1088. LDA PPU_Addr,X2 j7 D( Y- `: [- `5 _6 p  u
  1089. STA PPU_Addr_H
    3 z, Z. d3 z3 h# h; h
  1090. STA PPU_ADDRESS2 m" h2 l! w. z/ U
  1091. INX
    3 q6 x! t; E, t* C
  1092. LDA PPU_Addr,X
    2 a) N# ]4 w9 g1 {) D( B; C
  1093. STA PPU_Addr_L
    , ]; t7 e, e$ `9 ]& G  H
  1094. STA PPU_ADDRESS+ s6 T. N" I! X- l% {0 N; \" \0 ]9 t
  1095. INX
    + a& }6 f5 A& l/ F& ~# k
  1096. LDY PPU_Addr,X& x9 N0 a5 B; Q; ?6 `2 T
  1097. PPU_Proc_Cnt_Line_Write& K, n  V) N! d+ C  K' D
  1098. INX
    6 S1 [, P! _6 ^' Q+ ~) l; w2 a! w, i) q/ \
  1099. LDA PPU_Addr,X+ F) v- R: V+ g) ^0 @" d6 f& F8 l
  1100. STA PPU_DATA
    ; X  k4 s6 E" |8 {
  1101. DEY5 ]% E. O$ Q' I) F7 k" e/ B3 `
  1102. BNE PPU_Proc_Cnt_Line_Write
    3 N# t3 s8 }# b- j$ v2 A8 H& Y9 ]
  1103. JMP PPU_Proc_End
    9 D4 c7 m* B; o6 ?, h3 L. n
  1104. : T5 O9 l; S0 _+ I
  1105. ;==============================
    0 i) K# ~% G, e+ C3 D) B
  1106. HEX_To_Dec;十六进制转十进制+ p$ ]( b3 t6 Y  T* [& v  f# C  e
  1107. STA <HEX_Data
    ( x9 ^! i; [3 O% m* b
  1108. PHA* E. ~# f+ E9 R+ e
  1109. TXA/ J, u& M. X- A: k* v& {
  1110. PHA
    4 g. j* ~. W" [& [% K' c
  1111. LDX #$00
    3 o- m1 Q* H# u& e2 }* \
  1112. LDA #$00& I* }* k" f) J4 _- B# J3 h
  1113. HEX_Cln$ @5 P: \/ n8 y  @
  1114. STA <DEC_H,X$ c5 D( W0 H- C; k; s+ o
  1115. INX0 `& }" y. F" I) @  }+ h
  1116. CPX #$03) m# S% Q7 H& g5 `4 n  Q3 J
  1117. BCC HEX_Cln
    9 m% I8 B. M% C- F0 i5 k2 P9 `& N
  1118. LDA <HEX_Data, _( m& X5 v$ L) l4 C& J( O: B# _
  1119. ;------------------------------
    " }6 j% ]7 {% C) r
  1120. HEX_1003 H0 [5 s% [4 h0 D
  1121. CMP #100+ S7 d6 L4 r7 ~6 y2 o
  1122. BCC HEX_10
    0 Z2 F- q' x" E& X
  1123. SEC! |$ H4 M) G' N
  1124. SBC #100* o& v  X& `9 z+ d
  1125. INC <DEC_H
    ! K) i& g: x8 p( ]: k
  1126. BNE HEX_100" ~+ s& P# y  e6 {0 X: b
  1127. ;------------------------------* F/ |/ h# W1 l1 T6 \
  1128. HEX_10
      N' k: U. d0 e3 |
  1129. CMP #10. Q4 A# a" t. h: m% c' `2 Q# ]% w
  1130. BCC HEX_1+ F* z" M6 p( `5 d4 t
  1131. SEC
    ' t$ A/ I, [* i" g/ j4 U- r: p9 a
  1132. SBC #10
    ! r2 F6 M% n# C6 q9 p
  1133. INC <DEC_T1 P6 C% D3 ~6 i' o1 y
  1134. BNE HEX_10
    9 }  @0 @: i, r! U# f1 {3 P; m
  1135. ;------------------------------* ?& X- |( S' l8 P
  1136. HEX_1
    6 z  y% j- c4 ~
  1137. STA <DEC_L0 B+ E! |4 ~. s/ g4 |
  1138. PLA3 b  e( d  P; l# {
  1139. TAX
    & K" x# O% z  q8 \! k" f2 E7 c$ r9 t
  1140. PLA2 Q# `6 E4 V0 b) B" t
  1141. RTS4 ]& I- |* l' `& i: h2 D
  1142. & i% A! X' h* V5 [5 O
  1143. ;==============================
    : [7 P3 L  _. F1 ?) k
  1144. ;音乐曲目显示
    2 a5 {- L, q4 T9 {! Z1 V+ n
  1145. Music_Show
    1 h# q! ?6 q3 I* w8 H5 e" ^
  1146. LDX <Music_Item_Cur5 b) T9 ]- c: l% T
  1147. LDA <Music_Cur,X8 V5 q9 ^/ {2 N& Z" a/ i9 G
  1148. CLC
    " J4 R" p! y1 `# d9 n7 Y: A
  1149. ADC #$01
    3 ?8 @* B& K1 h8 M$ {
  1150. JSR HEX_To_Dec; n7 T* ]3 ]6 G- i0 S
  1151. LDX PPU_Cur. A* R: K1 a7 i6 _, [
  1152. LDA #PPU_MODE_CNT_LINE. w5 W) L2 Y: f9 d2 F/ m3 a6 n  P3 T0 }4 `
  1153. STA PPU_Addr,X7 W7 k: _# R4 u
  1154. INX7 |, Y* t0 A# G/ K! C3 g/ s
  1155. LDA #HIGH(Play_Index_Pos)# S6 h( w2 c, I& L
  1156. STA PPU_Addr,X) D' f2 \5 a5 k% R" R$ \/ K' {, I
  1157. INX/ L( h" A+ j1 b9 `$ v- h$ e
  1158. LDA #LOW(Play_Index_Pos)
    & x/ g3 {% W9 C* F, K
  1159. STA PPU_Addr,X
    * P) B* w" s7 v: F2 ^' g/ h  o8 J
  1160. INX
    / ]! Q  [) F6 ^
  1161. % c1 Q2 J# J  Z
  1162. LDA #$071 ^+ b4 q1 j, z' B( W; Y8 S/ L
  1163. BNE Music_Show_Length
    ( @' j- b5 t; f+ A9 F1 U
  1164. 5 t2 D* ~( |9 A6 U2 L2 Z
  1165. Music_Show_Length
    # O: E5 C5 U, K8 z. c
  1166. STA PPU_Addr,X
    2 Y8 \; G$ @2 p* `) k& h
  1167. INX
    2 z' m$ `5 ^4 P' N: P, r* K
  1168. ) ]3 ~. ~5 w' n2 H* h
  1169. LDA <DEC_H; x3 W) G5 s. {7 W0 E" u
  1170. ORA #'0'9 z- ~! f7 t+ x
  1171. STA PPU_Addr,X
    7 G( r- x% F/ }# l* P* Q
  1172. INX1 [6 n# J- T1 [1 V* z; t0 I
  1173. ! U3 ~# _1 A7 [
  1174. LDA <DEC_T
    ( M* \* X* N% h9 d) q- D
  1175. ORA #'0'
    ( a3 q+ @, a' G, S, X  O1 C0 Z+ X0 y
  1176. STA PPU_Addr,X
    7 U9 k- F, P& o2 R, U9 c
  1177. INX: ^! w& {- m% P& _# T
  1178. * i( [1 d! p& V+ e' K/ I3 m
  1179. LDA <DEC_L
    3 O$ e$ K% t- l" ^
  1180. ORA #'0'
    % M& x# Y6 b0 d9 s. n0 f* W9 d
  1181. STA PPU_Addr,X
    # W; k1 i6 }; C) R, p
  1182. INX2 f2 q% u& g6 h2 v
  1183. " [3 y) y8 ~& m, y5 i
  1184. LDA #'/'
    ) H- x& c: N" C- ^! z) ?8 P9 h6 R
  1185. STA PPU_Addr,X
    ' R0 ~" O. q0 g) S
  1186. INX
    . [7 ?+ V4 F; `" `! C
  1187. Music_Show_Total
    2 e9 ~$ a. D; x. k: B
  1188. LDA Music_Total  Y/ b" b# V2 ~5 i# D1 v4 L
  1189. CLC
    ! z! M) `0 }1 p2 h2 o
  1190. ADC #$01
    7 Y: {/ Q+ w+ A% b4 D' P; F
  1191. JSR HEX_To_Dec; k5 r  K. ~1 t
  1192. / s3 @7 j. q: \
  1193. LDA <DEC_H
    2 p8 r" Z: M; {) Y
  1194. ORA #'0') h! F; ^+ [- l( ]
  1195. STA PPU_Addr,X
    6 |$ r2 J; V0 s3 F3 t
  1196. INX
    ; |0 v% _$ w: Y8 d
  1197. 4 L* T0 k3 Q% U2 F  c. E: A# N
  1198. LDA <DEC_T/ r1 X1 S/ n8 Y' L2 g/ h' e
  1199. ORA #'0', ^% _& J: T$ z$ X  M
  1200. STA PPU_Addr,X
    4 U! v, \- `7 _5 a5 n
  1201. INX* B4 B, y! ]8 @7 c8 }+ Z
  1202. + p7 f% N5 v; c9 N7 A
  1203. LDA <DEC_L
    ( `! W9 y9 I& U
  1204. ORA #'0'
    # V" h: o& m; o" {( z
  1205. STA PPU_Addr,X
    ; g' N! T( q5 P! d8 h  D
  1206. INX5 _6 y) w, w- v; c& V" I
  1207. " {( P- _$ [! q
  1208. STX PPU_Cur
    5 G4 |2 N% G: u& o
  1209. Music_Show_End
    ' q0 d! a* ?0 x. Z
  1210. RTS
    ( j- b4 {. q' L6 i$ j/ D3 s
  1211. - N$ m% }3 Y% J3 ^* l
  1212. ;==============================, ]% c1 o- B% n  U9 n- y" Z
  1213. Time_Show;播放时间显示  T4 r. t9 k$ R# H  ^( u
  1214. LDA <Text_Disable_Flag; m3 W3 c7 J1 z) C+ n
  1215. AND #TEXT_DISABLE_ITEM
    5 Z: A, y4 ]0 ^  C. C/ S( X
  1216. BNE Time_Show_End
    ! G0 S9 ?3 o* V0 a3 c; z/ ~3 B  d- M
  1217. AND #TEXT_DISABLE_TIME( ^# s1 g: [9 W+ W6 E: S
  1218. BNE Time_Show_Enable2 r; i8 p# ~3 j' y& J1 B3 v; R

  1219. , c4 W6 `' R, I1 a9 }/ y& [# t
  1220. LDX PPU_Cur
    , J: j5 S: t& Y- g
  1221. LDA #PPU_MODE_CNT_LINE
    8 C# l9 ?9 e& o' B5 Q3 x
  1222. STA PPU_Addr,X" T* ]$ t4 m% D+ ]
  1223. INX* ~2 A1 ^8 i3 t* j% y, Z
  1224. LDA #HIGH(Play_Time_Pos)
    / |2 M: p! o4 g$ H0 P) f* U
  1225. STA PPU_Addr,X
    1 @3 c6 i. d# C5 h
  1226. INX
    7 i! G# B1 |+ {" C
  1227. LDA #LOW(Play_Time_Pos)
    ) o4 \7 w. \6 \. K
  1228. STA PPU_Addr,X, e0 L! ]6 @) Z8 j
  1229. INX
    - L0 k1 D$ K6 R; ^6 }
  1230. LDA #$08. u  o2 G4 i/ N( x7 ^3 ~
  1231. STA PPU_Addr,X
    9 W% z- E4 u( `) K
  1232. INX7 r9 @# a  @8 L; M9 Q& _  f
  1233. Time_Show_H
    ( x# ]9 _; B" ^8 \" T  H
  1234. LDA <Time_H
    2 z4 k+ Q) K" \2 h: H+ [. u
  1235. JSR HEX_To_Dec
    2 m0 y( X3 v2 N9 o3 v
  1236. JSR Time_Digit8 ~! [0 ?: I+ S8 A0 t5 ~( G! t6 u
  1237. LDA #':'
    8 T9 b+ q$ m$ P
  1238. STA PPU_Addr,X
    ; l: T6 j" I6 K8 z9 V: @. q; j- f2 ^
  1239. INX# e4 z0 P5 W; t
  1240. Time_Show_M) E# t* E/ \6 U! S8 x/ N
  1241. LDA <Time_M
    4 E! i! F8 f8 U4 k! e. F  Z
  1242. JSR HEX_To_Dec" D9 I9 l% a9 I$ R% A+ N
  1243. JSR Time_Digit5 \& v" _- z/ G9 E( c" y6 C; Q
  1244. LDA #':'
    6 O: W) F- |, Z* }' p. M
  1245. STA PPU_Addr,X
    ) q4 ~4 g" Q" s0 G. ?
  1246. INX  f7 V7 m$ G) |- c( h/ w2 I
  1247. Time_Show_S
    1 X/ [) ]8 [3 j  p" t
  1248. LDA <Time_S
    2 d, K0 U- p9 m3 ^3 v5 |0 {
  1249. JSR HEX_To_Dec
    : V1 ?3 B' P! @- a2 N2 {( G; {( V3 R
  1250. JSR Time_Digit
    % F5 ~) n9 M$ p* I4 c
  1251. STX PPU_Cur/ f1 ^7 I: v# d; l
  1252. Time_Show_Enable
    3 S5 X5 O, G/ J4 C$ v, A
  1253. LDA <Text_Disable_Flag3 e+ Z; I6 u- i$ W
  1254. AND #TEXT_DISABLE_TIME ^ $FF: H# J  |  q  ?" Q0 Y& R
  1255. STA <Text_Disable_Flag
    6 U) t  i- V+ Q! n* v% Z+ G, u- B, c
  1256. Time_Show_End" l: S, T& c) K% \$ O/ i! }7 L
  1257. RTS
    / w+ O- W5 i5 N( V! ?; f" Q
  1258. 2 ?% e! c3 v0 z- w4 D; F8 @/ I
  1259. Time_Digit0 v4 |) G$ A4 I" ~, @' V' N1 I
  1260. LDA <DEC_T
    / K& C4 R7 U# r: J7 T
  1261. ORA #'0'
    3 `7 F9 t+ u0 f) `) `
  1262. STA PPU_Addr,X
    . M$ ~7 f0 }  H* g1 v# I
  1263. INX2 K: ]8 L4 Q7 N8 J! E
  1264. LDA <DEC_L
    : B7 W5 J9 e& [8 a* @4 ]0 W
  1265. ORA #'0'
    # y* u5 r5 [" f! \6 n" e' W6 E
  1266. STA PPU_Addr,X7 {' n; x3 {4 W5 O0 i: I9 ~
  1267. INX
    7 `5 q1 \# Y+ p  c1 `1 c) N' b
  1268. RTS6 d( l, |' E+ H% ^, o$ K& p
  1269. 7 S' M2 [/ [9 S4 `+ V8 b, E- `
  1270. ;==============================
    5 q% b6 s' b( y" P* Y. Q
  1271. Time_Count;计时  i8 G( a: C! Q' f! h% `  K: M$ G
  1272. LDA <Music_Stop_State
    . P/ n) X4 M0 Y0 f
  1273. ORA <Time_Wait_Cnt1 V1 |+ N$ C$ ?7 \* v
  1274. BNE Time_Count_End) X- P% V+ n" Q' i5 \
  1275. INC <Time_Cnt/ U6 d$ r5 x( T6 \  R4 o+ x
  1276. LDA <Time_Cnt1 c6 v/ A9 x1 z( T( X
  1277. CMP #60
    ' ^3 w8 F" L  Q: B* S% \
  1278. BCC Time_Count_End- e) p: E" N4 D5 L4 Y$ s% `6 E* x
  1279. LDA #00
    8 P: X( j8 H: U9 b
  1280. STA <Time_Cnt1 c, s6 B" D& z2 P
  1281. INC <Time_S
    7 E; P& r; J9 z' I3 P$ g
  1282. ) P7 ~; e+ ?( s' @8 @3 u# V
  1283. Time_S_Cnt
    7 I0 v0 ?/ F  [$ b7 N+ S5 }
  1284. LDA <Time_S) t& j; Y: l( P" M& \
  1285. CMP #60+ K8 z' W% s! z" m2 f
  1286. BCC Time_Count_End
    4 w* V5 v& X" T" A- [
  1287. LDA #005 g" R: p5 E3 G4 M  n3 W6 g
  1288. STA <Time_S
    2 X+ }$ R5 N1 S5 K/ r% x
  1289. INC <Time_M' @9 d* T3 J" Z  K/ O5 M

  1290. " C6 K0 J+ w2 V+ p. @' m
  1291. Time_M_Cnt
    + Q. I8 ?7 M' T7 i
  1292. LDA <Time_M
    ' S0 K! n# x. W5 k4 S" w  R8 @$ ^7 P/ H
  1293. CMP #60
    ( C; _9 X4 M9 K8 A; B" ~8 R
  1294. BCC Time_Count_End
    , ^, g) H4 A. B$ X" o
  1295. LDA #00
    % E! c$ E5 N1 x* w4 g9 I0 z* `
  1296. STA <Time_M
    9 s5 S5 P% f8 J2 m
  1297. INC <Time_H' u% ?3 r! n* h1 l) U) X) u
  1298. # Q: S( U( d' O7 W
  1299. Time_H_Cnt6 E( B6 Y; A' K# L  H+ ^' ]! i
  1300. LDA <Time_H: Q0 _! r! b' \2 H. d
  1301. CMP #24/ a1 t8 @: `# |) R
  1302. BCC Time_Count_End
    - [+ ^  r+ r. `" ]9 G; X4 h# X
  1303. LDA #00! j/ M& A7 v, h/ O* ^5 n
  1304. STA <Time_H
    - Z8 w* L% g2 H( P% h' _" B; t
  1305. ( G* z, S+ k8 `* T
  1306. Time_Count_End% x( V4 T% B' O  I; _1 ~# ]: V
  1307. RTS. j( y0 @% d. r0 U, S7 f

  1308. + K- g* N+ u4 D/ v# g
  1309. ;==============================
    ( o( X. R. F: @; O
  1310. Time_ReSet;播放时间重置! [& D3 @' [4 A
  1311. LDA #$00- F" r' {( f' J
  1312. STA <Time_S1 Y5 u: p6 E# _
  1313. STA <Time_M 3 l/ [! h0 G8 \
  1314. STA <Time_H4 X9 q  @8 R0 l7 M8 A( I2 h
  1315. STA <Time_Cnt# |: l4 ?5 z. @- l  H
  1316. RTS* ~" L; {' G+ B: }3 L" F/ E
  1317. 3 X5 s) d0 I' u* n4 Q8 F
  1318. ;==============================0 a  v2 i( Y3 Z/ i) W
  1319. Music_Bar_ReSet;音乐条重置
    1 d, S/ {& g& a& p0 R
  1320. LDA #$006 V  q9 P! g4 T# W- f  |3 ]: y: ?% y
  1321. LDX #$00" w) f  o- t4 J$ w: u8 x6 u. L
  1322. Music_Bar_ReSet_Set0 W# o$ W; p3 ^" B8 b% I
  1323. STA Sound_Bar,X
    $ N9 }* B9 s( t, N2 J5 R/ A7 j
  1324. INX
    $ F- Q" c/ i% l; T1 x
  1325. CPX #$10
    . ?3 N3 U! |8 _6 K. Z" n7 S
  1326. BCC Music_Bar_ReSet_Set
    8 }; T; c- L" |
  1327. RTS, _+ T4 h8 Q* {! y" v

  1328. 0 G5 d: o2 p: R
  1329. ;==============================
    1 U/ J% k0 K+ X! I! _5 o
  1330. PPU_Data;PPU数据写入. n8 k/ t$ w. A7 W9 ]
  1331. STY <Data_L" E5 ]1 n2 n! @$ ~8 i0 |& o
  1332. STX <Data_H3 v" [1 R1 f# ^/ Z7 e: Y
  1333. LDY #$FF9 R" b2 r+ ]+ L7 {7 S5 l5 T5 c, P
  1334. LDX PPU_Cur
    : {$ G6 o" V4 ~, Z0 S
  1335. DEX3 R, j1 `; d$ W2 T# G) C
  1336. PPU_Data_Beg8 ^0 B7 q% P7 t* Z4 ?
  1337. INX) ?! E) K/ M3 B8 `* [3 k
  1338. INY" y% C2 V7 Z1 [) x* G/ e
  1339. LDA [Data_L],Y
    + E5 ]9 }2 _2 Q" U  a  y. e6 k
  1340. STA PPU_Addr,X
    ( n* v' I; U% q4 k
  1341. BNE PPU_Data_Beg
    " d% M7 d6 u* x" n9 d
  1342. STX PPU_Cur
    ( F, s% i; }7 R  F2 }8 o
  1343. PPU_Data_End, q) R& H( Z3 S. j  C8 }3 y% Y# G
  1344. RTS
    & y1 {5 x8 ]1 `9 h9 D
  1345. $ C- `5 ^! }( D8 N5 Q0 N
  1346. ;==============================7 y9 u9 a" \, K% r
  1347. Music_State_Show;播放状态显示) `, H: S& ^/ W, g# c) T
  1348. LDA <Music_Stop_State' b5 J; ]. p. W" F  K
  1349. BEQ Music_State_Show_Play5 v, ~/ ?9 o' }6 B' r) [& Y$ v  O
  1350. Music_State_Show_Stop' L9 Q0 C. s7 W* @* w8 ]' i' e
  1351. LDY #LOW(Music_State_Stop)
    8 `+ m' E. J% }1 U) d6 c
  1352. LDX #HIGH(Music_State_Stop)3 E. I$ F- E' @+ V% X  L5 Y7 ?
  1353. JSR PPU_Data6 ]( e) J! i, ~5 M
  1354. RTS( r( ^0 l/ }# D9 S, K
  1355. Music_State_Show_Play3 H* T, \7 D2 h( B0 N3 [' z
  1356. LDY #LOW(Music_State_Play)# _! q+ ^9 p$ T+ Q4 v8 D- R) b' F
  1357. LDX #HIGH(Music_State_Play)
    6 Q9 y1 }/ f+ Y" J; V" c3 |0 p
  1358. JSR PPU_Data- r* R, q9 b! B4 _' z
  1359. RTS! g2 q& e" Z+ x

  1360. - c, V9 y  ?9 p  s
  1361. .IF SOUND_BAR_SHOW_ENABLE2 r9 \$ w2 w8 \( W* w2 h
  1362. ;==============================3 V, e: `9 c, T( a+ e0 u
  1363. Sound_Bar_Text_Set;标题与音乐条初始化7 w% |# m: y. B3 Y
  1364. LDY #LOW(Sound_Bar_Text_Data)" b1 H$ m4 B5 y3 L) y
  1365. LDX #HIGH(Sound_Bar_Text_Data)
    - J4 j6 z/ i% K7 W3 Q  ?
  1366. JSR PPU_Data
    , \/ ^# K3 R6 H% n) w" N& G( [
  1367. RTS* d2 g. Y3 o9 ]3 z# u! [
  1368. . O% H9 b' X9 e8 t  Y" W0 a
  1369. .ENDIF3 G4 S3 \9 u, Q" l/ z

  1370. ! ^3 X* J& f. ^! Z+ z( H+ r6 w7 h
  1371. ;==============================% E& }2 G  B) e/ b' U7 O$ e
  1372. Set_NameTable_Attributes;设置命名表属性9 x) a, X7 X! ?; [
  1373. BIT PPU_STATUS
    8 ]( e' f' ?& ]5 C
  1374. LDA #$23
    3 _3 H' V  X: D1 W, U# E
  1375. STA PPU_ADDRESS
    + r# W2 \! T: G: X! `1 e% T" ?% q" p
  1376. LDA #$C0
    1 P" o  l& U6 X/ v# E4 N' T
  1377. STA PPU_ADDRESS
    & [; t* r9 x' s  a6 J: x$ z
  1378. LDX #$00. `& |' a- ^# E3 B+ t0 I
  1379. Set_NameTable_Attributes_Write
    ( N' }; @7 z3 v9 o
  1380. LDA Palette_Attributes,X
    3 X! z, O. D1 T% Z0 I
  1381. STA PPU_DATA
    8 t' e- t1 G# P# \
  1382. INX- f" |+ j) U# \4 G$ k
  1383. CPX #$40) {1 I1 \( R, G+ a: k& l: h# I
  1384. BCC Set_NameTable_Attributes_Write$ {0 n* W1 e* H5 n3 `2 t+ D
  1385. RTS
    ) l2 ?. S$ `. O" A
  1386. 4 K+ S1 A( r9 z) f' I. h5 ]% f
  1387. ;==============================5 X! A" F2 K! P1 f0 L3 g
  1388. Set_Palette_Color;设置调色板数据: c& d0 D" W, U8 i, p, q
  1389. BIT PPU_STATUS
    + Z# \& M' T$ y3 e' }# U: y/ k* a
  1390. LDA #$3F5 |/ `  f" D/ \' d& G- x
  1391. STA PPU_ADDRESS! t- R/ F9 K- \2 S7 n) k
  1392. LDA #$00+ Y0 ]! p7 t7 O& H6 q: N; Y9 m
  1393. STA PPU_ADDRESS* G& T6 g, u' ^& l! r# l
  1394. LDX #$00; ?! U7 j) z* |) d' g
  1395. Set_Palette_Color_Write2 d1 U! G& {+ C8 {6 F
  1396. LDA Palette_Data,X
    & y: o! L* G) C$ n7 H2 j& L
  1397. STA PPU_DATA8 U/ f: M! p& w2 l  @  A/ _# g
  1398. INX
    8 k4 F. [9 G! W* R3 ]" I9 k6 B
  1399. CPX #$20
    2 K$ I9 w3 P2 O. h
  1400. BCC Set_Palette_Color_Write; S% J3 a" J! @! h
  1401. RTS
    8 m, `$ @  ~1 N% G& m7 u# @# f, ?5 g- ?+ h

  1402. + e$ k$ m& P6 T2 M
  1403. ;==============================& u+ W8 F3 e5 N4 w$ R8 g
  1404. Init_Palette_Addr;初始化调色板数据
    ! P7 |* w( p2 x% Y& P6 v# a" m
  1405. LDX #$00+ j# X" c/ z. q$ q9 @8 O( |" a
  1406. Init_Palette_Addr_Write
    0 m& ?5 o3 O/ q9 I$ {
  1407. LDA Palette_Data,X# U/ |8 J3 Y8 l( ^
  1408. STA Palette_Addr,X
    ( c1 M5 q; F! `; e; b- D6 ^
  1409. INX
    & n) x/ |1 X& n5 Q  S
  1410. CPX #$204 n, d$ X% K* _
  1411. BCC Init_Palette_Addr_Write+ \' Z5 G! ^6 C- }
  1412. RTS' ~1 I- M" J9 H( h( o+ a1 F
  1413. & y# F3 B$ c' e% ]5 W
  1414. ;==============================1 Z# M4 s+ Q8 d7 x0 y5 f
  1415. Update_Palette_Color;更新调色板颜色9 q  f* Q- X3 Q# I
  1416. LDA <Palette_Update_Flag
    + H* N$ |+ x+ n- h; d& q
  1417. BEQ Update_Palette_Color_End2 v6 H' [/ J; `3 l- O% F
  1418. LDA #$3F
    9 v% H/ k3 c, L, Y: \3 S
  1419. STA PPU_ADDRESS
    * l6 [' o8 g- s( J* P) N
  1420. LDA #$0C' q" A- e1 y  _& l% e: O2 e& U' O
  1421. STA PPU_ADDRESS) t3 k; `7 I' E* S; G
  1422. LDX #$0C4 n" \1 S8 [/ H0 t
  1423. Update_Palette_Color_Write, c* i8 R- i/ L
  1424. LDA Palette_Addr,X; E8 S6 |! |, l$ _" M
  1425. STA PPU_DATA
    1 A, o9 B/ L0 k$ o% Z8 n
  1426. INX
    & A" [6 K& R" R$ L6 \( f' q
  1427. CPX #$140 a4 M2 w; h. Z6 ~
  1428. BCC Update_Palette_Color_Write
    . R5 R7 _. V8 ]2 ?5 c
  1429. LDA #$00- @% Z- I0 a  ^. k4 v" _3 A
  1430. STA <Palette_Update_Flag; [5 l9 a: @6 v) L
  1431. Update_Palette_Color_End
    / C7 d* ~7 u9 F4 n4 P6 Q
  1432. RTS
    " @; r/ U# N* {  |% o0 }

  1433. & A- B$ v# v3 [0 B' M. B
  1434. % F% Z! u0 B3 T" K4 @
  1435. Update_Sprite_Palette_Data- K6 n9 D0 u- ]: t' X
  1436. .DB $21
    ( n, M( V7 K8 [! H% J
  1437. .DB $21! M- r4 n: K# C/ o+ ^0 I
  1438. .DB $11) W3 Y1 L0 c  e4 ?6 m
  1439. .DB $01
    : J  P! \9 `+ h5 Z9 T/ \7 g
  1440. .DB $01* l& s8 k4 |, [4 b6 }. F: G
  1441. .DB $11
    % l! v+ v+ P: E; Y' c, z  j' I
  1442. .DB $21
    5 z/ F, G# A! `7 M3 X" ?
  1443. .DB $21' h( e' }6 d; d( {( a% \2 |/ w7 D
  1444. .DB $11/ @; ?" B! H, Q) c
  1445. .DB $01
    7 T8 b* l# I$ d" t# @
  1446. .DB $11
    $ n% |9 M) d6 h5 [
  1447. .DB $21* W9 W9 i- J8 C/ W$ \. `3 g7 R$ x/ N
  1448. .DB $21- T# Y3 e# e% _' q( U
  1449. .DB $11# y/ u! b# L' f) @# r) k+ K
  1450. .DB $01% y; i% I7 g8 o- f9 @
  1451. .DB $11( f1 p. K2 u3 u( {( @/ c$ n  R/ i  @
  1452. ;==============================, |/ y5 R3 F: B
  1453. Update_Palette_Data;更新调色板数据
    / w& n+ }- ~  L/ Z* C* Q2 T
  1454. LDA Nmi_Time_Count
    2 Q$ g! N6 X& M9 S, ]& X
  1455. AND #$08
    % O# P  G: r$ m3 k/ v! [  o
  1456. CMP #$08, a$ S7 D9 z& r
  1457. BNE Update_Bkg_Palette_Data
    ( E; x" Q) q  H4 w' p
  1458. ) Z& u: Z7 K# i) k3 d& N& J
  1459. Update_Sprite_Palette_Data_Set
    6 [& \% U5 m! k- H( g5 M
  1460. LDA Nmi_Time_Count
    - ?- F4 I5 S! F- p4 T
  1461. LSR A* M6 w& e4 m  O. L; @0 ?  p
  1462. LSR A! s7 k# U( U& X
  1463. LSR A4 I8 u1 V8 G( r$ g2 l* w+ I: ]
  1464. LSR A$ e* }8 E, q! }7 N5 n
  1465. AND #$0F8 s& C# q& A  a3 ^
  1466. TAX, s: o8 B: b7 n1 {/ y! P
  1467. LDA Update_Sprite_Palette_Data,X
    7 B/ E) u2 ^1 g9 Y7 m. {, @
  1468. STA Sprite_Palette_Update_Addr
    & \/ q( h2 `% l
  1469. LDA #$01
    & Y4 H/ }/ \! R7 {+ S: B2 \
  1470. STA <Palette_Update_Flag8 \9 p1 {3 o' f0 y' A9 I( N

  1471. 4 c* Q2 p8 P" W$ ^
  1472. Update_Bkg_Palette_Data" ?- X( w$ a+ x5 o5 I) g4 Y/ Y
  1473. LDA <Text_Disable_Flag
    7 n$ v/ I# K0 q$ U7 a6 O/ r6 G
  1474. AND #TEXT_DISABLE_RAM
    & X  Q0 }  o7 ~. m
  1475. BNE Update_Palette_Data_End* V  o9 G! b3 _0 {1 @; V. G8 T3 M
  1476. LDA <Music_Stop_State
    1 J6 g+ J: j( y' q# W
  1477. BNE Update_Palette_Data_End
    " J) \! s5 m$ D2 M2 A6 E+ ?- e, D

  1478. 6 m% e6 q6 f/ p% b. q4 R( l3 _2 d
  1479. Update_Palette_Data_Check
    6 z6 c! V& `% \, I
  1480. LDA Palette_Wait_Cnt) K' m! h6 U$ `0 p4 ~
  1481. BPL Update_Palette_Data_Check_Over
    ( g: N' B3 g5 g  _& |
  1482. LDA #PALETTE_UPDATE_INTERVAL2 E* ]8 _# u; S( g: U8 ~
  1483. STA Palette_Wait_Cnt0 y8 x# u" [5 V1 E! a" x! }
  1484. Update_Palette_Data_Check_Over
    4 D6 z. O- T! y5 o) A0 Y6 V" \
  1485. DEC Palette_Wait_Cnt
    " ]2 ~0 _% S& n6 }; i# `; L
  1486. BNE Update_Palette_Data_End
    5 J0 Q3 P1 a4 {. V5 U7 ^

  1487. 0 [, ^0 q3 x# d5 n
  1488. LDA <Text_Disable_Flag, a7 J  o5 ^$ W- i3 s7 y$ `, S, {
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    9 C7 e# y& V% p' O$ s4 m2 u
  1490. STA Text_Disable_Flag
    ' V# L  {: g( {3 c) G* O1 J
  1491. INC Palette_Update_Flag# m* ]. }: f0 ?; \# E# W) B
  1492. 3 l& ?! i$ x2 y6 X
  1493. LDA #PALETTE_UPDATE_INTERVAL
    & g# t* H) V; s0 |* n, ^9 r
  1494. STA Palette_Wait_Cnt/ `; R% Y0 s7 X: v

  1495. 7 ]4 B! U% G- k( u- m# x, `
  1496. LDA Bkg_Palette_Update_Addr3 T+ o! [1 G- h( j
  1497. CMP #PALETTE_UPDATE_MAX
    * J; v/ U- P3 q8 [5 }# [
  1498. BNE Update_Bkg_Palette_Data_Set0 ?: G! X: r. C# Y" g, a
  1499. LDA #PALETTE_UPDATE_MIN - 1# D1 N7 ^. j9 w+ J8 L
  1500. STA Bkg_Palette_Update_Addr
    + H6 m/ [: n, I$ |- S) a% m& O* m9 R
  1501. Update_Bkg_Palette_Data_Set
    ; l- v' Y% j5 x1 g7 w7 F2 d
  1502. INC Bkg_Palette_Update_Addr
    % F5 q9 \; O7 J: Z0 m
  1503.   T; A) }- |" y9 I% h9 w9 d
  1504. Update_Palette_Data_End  i! I2 a7 q1 H3 K
  1505. RTS
    5 ?% h8 g) n  r& s

  1506. $ \  I$ ?- K) U( }  T# l8 Z: \
  1507. ;==============================$ @3 v' d7 e  v" M1 J' k/ E/ u
  1508. Show_Music_Text;显示静态文本
    , q2 I/ }; b: d) m6 J" h# Y6 q
  1509. LDX #$00* }* H& `4 i" ~- ^2 q7 ]
  1510. Show_Music_Text_Set
    % s9 L: U. h2 E* Y0 V
  1511. LDA Static_Text_Data,X6 u$ E1 \* E5 n& {! V
  1512. STA <Data_L/ m# ?# V) t9 v7 Z/ Y
  1513. INX. O( T9 U1 D6 `& J8 X3 R: e! n
  1514. LDA Static_Text_Data,X$ ^4 ]; i! }% {+ P* P
  1515. STA <Data_H. i8 |6 r5 @! {; o$ {1 g
  1516. INX2 s% c" S* y$ o3 t& P$ x
  1517. LDY #$00
    / ?9 X7 J6 X- f; X, y
  1518. LDA [Data_L],Y
    0 O! A7 s* Y4 v- `
  1519. STA <Data_Cnt1 y% F" n$ r2 L2 _  D. V6 v4 Z
  1520. DEX
    ) t6 K0 {4 x2 o; T$ C% L
  1521. DEX
    " U, ^" G; t# T4 Y( K' |
  1522. LDA Static_Text_Pos,X
    + r2 t: o" ~' ?6 y
  1523. STA PPU_ADDRESS
    7 S0 Z" y8 d* p* d, O
  1524. INX
    $ f( _) F3 V- T% ?, @
  1525. LDA #$20, }; G& M5 Z, x5 g5 G
  1526. SEC/ y: n* B8 d6 m$ Y* v
  1527. SBC <Data_Cnt# o4 W8 K1 x2 ^' z! r: A( Y
  1528. LSR A
    3 }! E0 K5 h9 N
  1529. STA <Data_Buf9 i0 \4 F: J' G3 p8 x
  1530. LDA Static_Text_Pos,X1 t7 J) F: x' I% s( t" X
  1531. AND #$E0, B2 z! {. Q+ ^" c) u
  1532. CLC% Q: `  ], _& i# e  y
  1533. ADC <Data_Buf
    " m5 S0 e" _( z1 \9 i# m. |
  1534. STA PPU_ADDRESS5 O7 w' |# z, H& @8 x
  1535. INX( I/ @% N; k: [
  1536. Show_Music_Text_Set_Write$ v9 M7 F% @& T8 o5 a5 h
  1537. INY
    ' b+ U/ @4 m- w( b1 n4 x" O: r3 V
  1538. LDA [Data_L],Y
    9 s6 f; T) m) T3 x
  1539. STA PPU_DATA& Q8 Y' ^& \7 [: r
  1540. DEC <Data_Cnt
    # g: ^) h7 I( t  m
  1541. BNE Show_Music_Text_Set_Write  a1 ^8 c8 m) q$ }: C/ |
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos
    & m8 x, `+ O$ }7 y2 c/ V9 {; U
  1543. BCC Show_Music_Text_Set
    6 \+ C6 N  b0 w9 K1 }0 O! [* z
  1544. RTS3 g5 H4 f  q8 t! B

  1545. * X+ X2 A. i1 a+ v% J% I
  1546. ;==============================
    : `; e2 F; P, I+ |6 P
  1547. .IF Track_Name_Pos;显示曲目信息
    : }5 _- O; C) ^3 l- B+ g, X

  1548. " F: J" ^! [# D: W$ T/ d2 l
  1549. Clear_Track_Info
    5 d9 @6 w4 o+ }! o% H
  1550. PHA
    7 ?: x( I# J& F6 B& U) o; x
  1551. LDX <Music_Item_Cur: j4 f! w- Y9 E9 H' n7 |) a: \
  1552. LDA Track_Name_Addr_Flag,X% U+ ^1 p6 s% k8 Y4 }
  1553. BEQ Clear_Track_Info_End_Ex
    ! ^$ A0 G8 N* [% x8 h& h
  1554. PLA. c% E# m" I% c: P' G3 q7 s
  1555. 4 D2 J- z) g. v" l$ X0 `$ Q# C
  1556. LDX PPU_Cur
    + X. |/ ]- l# h; ?! o3 z$ B0 F
  1557. PHA: ]4 q, d7 p3 h' w6 J6 @/ I
  1558. LDA #PPU_MODE_CNT_CLEAR
    0 u9 r5 T; E1 ~$ z( |. n* P7 |
  1559. STA PPU_Addr,X, q) {  K& D4 m2 f" g
  1560. INX! |3 Q! e! ?3 t2 v, x: A% p$ c
  1561. PLA
    . G" M: S2 V9 P, m% ~! @' I" M
  1562. JSR Show_Get_Track_Name_Center_Pos% ~, A, e* g3 x3 D0 l: N
  1563. STX PPU_Cur" N  f0 Q: I! z  z
  1564. Clear_Track_Info_End
    ! Y5 j! w4 P, {- M9 _7 M
  1565. RTS
    5 B( b7 w; ^. o) w
  1566. Clear_Track_Info_End_Ex( ]7 u/ S# ~9 A+ o, n! N
  1567. PLA
    ; \+ `& y% e7 }! ]5 o: }
  1568. RTS
    3 u* f7 `3 u- e, m
  1569. + _% H% s0 O% g
  1570. Write_Track_Info$ R# K& S0 q: k, }
  1571. PHA
    0 i& |% E) g( A( F
  1572. LDX <Music_Item_Cur
    2 s; ^- `" t) S
  1573. LDA Track_Name_Addr_Flag,X6 }  ]0 F5 g% t+ g$ x
  1574. BEQ Write_Track_Info_End_Ex
    & K7 D0 g9 [, U1 \
  1575. PLA
    7 i* u/ l( ^  h  G

  1576. 8 G) \5 W3 x6 C$ t& {5 f- L% i
  1577. PHA
    ; r, A. I7 e. P8 A' u& r2 k$ S( U
  1578. LDX PPU_Cur4 t7 y4 Z* r4 A8 Q  I
  1579. LDA #PPU_MODE_CNT_LINE" E" Y- J5 |$ Q! c6 @
  1580. STA PPU_Addr,X" w' n* y% l- W/ [: R( {
  1581. INX
    * I, T' |5 ?/ [# g
  1582. PLA1 U* @# L9 i4 F+ g, {
  1583. JSR Show_Get_Track_Name_Center_Pos
    * U/ C* ~0 M1 T" E
  1584. Write_Track_Info_Data
    # J: L- d2 s, z  c8 C% n* X9 E
  1585. INY+ _3 q) b3 [! A0 t- H$ M
  1586. LDA [Data_L],Y% c" e9 K$ m, l$ P
  1587. STA PPU_Addr,X% b( X" W8 V2 J+ v* f
  1588. INX
    # U1 A' C) _& h3 O; B& P
  1589. DEC <Data_Cnt
    0 ^$ }$ d- y6 i% X! \
  1590. BNE Write_Track_Info_Data/ K7 C- ]& M& ]1 {; s. k- y8 f) o
  1591. STX PPU_Cur
    7 d4 J2 j' y; C) L) ?- k4 x
  1592. Write_Track_Info_End
    / H/ I0 y+ p, o. V
  1593. RTS
    / i: E& F9 D+ i8 d
  1594. Write_Track_Info_End_Ex+ K+ K0 V4 n' g! T' }
  1595. PLA8 V" @8 F. \! e- B6 p% ?0 ]. W
  1596. RTS( k1 Y, o& L! |
  1597. / r' S0 b7 Q; C6 {' X2 L4 u
  1598. Show_Track_Info
    ; j) {5 ?' z: M% F/ q$ _
  1599. Show_Track_Info_Clear3 H/ [" W4 M  }4 }2 d! V
  1600. LDA <Music_Last+ b2 F* s  t8 P  }) b8 u

  1601. * W' h) D; L3 G) T. x
  1602. JSR Clear_Track_Info
    - r* d+ J# d5 l# I( O4 N
  1603. 4 f5 s- Q. z& G0 I
  1604. LDX <Music_Item_Cur$ f: W; \6 \7 q' n/ J$ Q
  1605. LDA <Music_Cur,X
    ) b9 a+ y$ U% e4 @4 i
  1606. JSR Write_Track_Info
    ) _* ^1 N' r( R+ E4 D
  1607. RTS4 E+ z; D3 X" n$ J0 P0 O3 r

  1608. 7 A4 _. y2 _; b  v* R
  1609. ;==============================
    - w# R' M/ Q9 y1 p9 c
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置
    ' ~. s3 l  P# g) K; r9 u! T6 c

  1611. % x. A! `; c- C4 ~  \! B* G$ z: _& H
  1612. ;取出集合名索引
    ! L/ d; P: b5 t" l% h: ^
  1613. PHA/ W  @2 c" M$ `; ~8 W" H

  1614. 5 U- n$ r$ c& D2 R5 ?
  1615. LDA <Music_Item_Cur
    # y1 T. \6 R9 k* ^& w% ~
  1616. ASL A
    . A$ H# x- C2 c8 P
  1617. TAY
    : ?) |" {3 k1 c6 f2 z: H
  1618. LDA Track_Name_Addr_Port,Y
    - Q3 a0 H( k1 |3 A" A, L5 q
  1619. PHA
    & k5 ~+ Y: r% K# e4 t0 U
  1620. INY
    : a0 G  j5 _8 F/ }
  1621. LDA Track_Name_Addr_Port,Y! ^1 X8 d7 e) j9 n: O/ W
  1622. STA <Data_H
    ! L8 Y& g" `( J7 ?. T3 j
  1623. PLA, v5 y) I' R; @( m' D# y3 M
  1624. STA <Data_L
    ' U  S$ D6 A5 P5 v- I' }+ w

  1625. 4 w& h, P; D/ a5 i! Y4 n
  1626. PLA
    9 Z; r3 ?# w2 \# Z6 e* l7 K% N

  1627. 4 o% i' \" y1 V; Z1 }
  1628. ASL A
    * J, w6 ]. h6 S( }
  1629. TAY  p7 r; o! e; Y6 I: n* f& j/ T
  1630. LDA [Data_L],Y- ]/ j) o7 _+ X, \
  1631. PHA. j* \2 `1 i% C' [
  1632. INY' Y8 \* |+ F1 S/ W8 F+ s4 y: x
  1633. LDA [Data_L],Y
    ; J7 X+ o! J/ @: B  C
  1634. STA Data_H, M% o" X2 A) C/ B3 K0 k
  1635. PLA6 [+ X& }2 S2 O  g6 y
  1636. STA Data_L
    + j6 I! m, y9 o7 G; {  j

  1637. $ o( w+ l) e+ j
  1638. LDY #$002 R' u. g0 j& K' m; c: Q
  1639. LDA [Data_L],Y4 M. i. {& A/ b
  1640. STA <Data_Cnt
    8 N% c& l9 }8 x
  1641. LDA #$20% G2 z, S& X; G7 O
  1642. SEC5 `( f3 ?; z$ x
  1643. SBC <Data_Cnt- ^, [7 S* N- l
  1644. LSR A6 `# z& I1 n3 `* n1 x
  1645. STA <Data_Buf# U. L( m# c& X9 D& _& X
  1646. LDA #HIGH(Track_Name_Pos)
    ) X1 R* o0 j& \$ E0 i
  1647. STA PPU_Addr,X$ J$ S, ~: [4 }  b# j2 @/ r* L; w3 c
  1648. INX
    ) i4 c, Z! B+ z( N0 R$ _" D' O4 {
  1649. LDA #LOW(Track_Name_Pos)* w/ J) F) E/ v1 X5 m
  1650. AND #$E0% n, h4 R- {) A. V. Z& D
  1651. CLC
    8 h! g- b" w- K9 f, i$ {
  1652. ADC <Data_Buf
    ! l; D4 Z+ q& t# }2 z
  1653. STA PPU_Addr,X
    7 G+ e: C) h5 e0 I
  1654. INX
    $ T3 c# m9 X! \, P$ H
  1655. LDA <Data_Cnt+ [1 v, r) ^6 J& L
  1656. STA PPU_Addr,X, X+ c, m: ~  b" |* A
  1657. INX$ j1 o, m6 N; \
  1658. Show_Get_Pos_Center_End
    . }* L$ [; G2 b  }, \
  1659. RTS
    + m# p8 j/ D8 d( F& g
  1660. .ENDIF; E& ?8 o! M/ M; V
  1661. 9 G- W% N, k+ V
  1662. ;==============================: v! w: |8 O, q1 F; L. V" D
  1663. ;音乐端口清除$ A( D' ?4 o9 }, ~8 A+ |% \
  1664. Sound_Data_Clear
    # I& M9 }: o; ^
  1665. JSR Sound_Port_Clear
    % `1 V; B9 G( s5 F0 I& s- P
  1666. JSR Sound_Ram_Clear, Q6 ?: }3 x5 ^' r7 A1 W& `, ^
  1667. RTS
    - O. N7 \" n2 E4 S7 z* o- `
  1668. ( h: H9 m7 E# G; N! E. L; k
  1669. ;==============================
    + O( E+ S( V& X5 V! |! M
  1670. ;音乐端口清除
    4 @2 j  \6 _$ S8 d* _0 f* l- B
  1671. Sound_Port_Clear4 D% {5 [; n9 I6 b; |. E
  1672. LDA #$00
    6 O! {. V% a/ {6 O
  1673. STA APU_STATUS
    - e: r- }, i6 ^
  1674. LDX #$00
    0 s) d' H8 @1 Z* R
  1675. Sound_Port_Clear_Write) B. t0 v# d8 y
  1676. STA $4000,X. O" C9 Z# k: e7 U
  1677. INX
    8 ?2 O9 z9 P% }( E& v' k8 y6 D
  1678. CPX #$14
    . O- y4 }, {! l. B4 \" S8 H5 h
  1679. BCC Sound_Port_Clear_Write7 c7 F4 i8 e2 `  X0 _0 g9 w
  1680. RTS
    3 }* v4 P+ w) c/ q( z
  1681. & [% P1 \5 N7 W/ B
  1682. ;==============================; C( f, U) @: s% b3 R. V
  1683. Sound_Ram_Clear;RAM清除
    & H2 @5 l+ d( U2 a) _7 G
  1684. LDX #$00
    3 W4 H9 w0 b: A: o& S! i
  1685. LDA #$00
    0 v& e: t0 N; I1 A
  1686. Sound_Ram_Clear_1
    2 h' @4 {+ C& m- O/ i' I
  1687. STA Sound_Ram_Addr_1,X
    ! W: ]) r5 ]- n, g5 s
  1688. INX# ~+ Y3 m+ L+ B$ S# X# j
  1689. CPX #Sound_Ram_Addr_1_Size
    1 o8 z: ?( @# ~. c) n
  1690. BNE Sound_Ram_Clear_1. A$ B, P7 b- l: g/ N/ j3 p3 M
  1691. LDX #$00
    0 N; s. x6 k4 d" \" K; y
  1692. Sound_Ram_Clear_2
    0 ^2 x) x3 c/ g. g. O2 N
  1693. STA Sound_Ram_Addr_2,X% D8 F! o! m2 A7 A
  1694. INX$ ~1 a4 |( j, b: }/ m- @( \5 y
  1695. CPX #Sound_Ram_Addr_2_Size  b0 V4 s1 g. G9 ~: j
  1696. BNE Sound_Ram_Clear_2! u* G' C- X0 W3 t7 \' T
  1697. LDX #$00
    2 s4 ^! C+ [, z9 x& {
  1698. Sound_Ram_Clear_3$ U2 g& ~+ X2 O$ ~" ~. z
  1699. STA Sound_Ram_Addr_3,X" h$ U: M; r) _3 L& m) v
  1700. INX
    + ~& C9 I; F: a8 E
  1701. CPX #Sound_Ram_Addr_3_Size
    ( v$ f' M! W! h1 G3 x/ I1 U, H
  1702. BNE Sound_Ram_Clear_3: T* j; y: Z, |8 Z' S
  1703. LDX #$00
    1 Z0 y: V: _$ r) k2 ]1 [$ l' B# H
  1704. Sound_Ram_Clear_4  r" h8 }5 `8 l0 w/ ^
  1705. STA Sound_Ram_Addr_4,X
    . P) v1 B; f9 n; Y; A4 D
  1706. INX
    3 @4 o& {& X2 g  i
  1707. CPX #Sound_Ram_Addr_4_Size
    : Q6 }3 R. N0 m$ [9 \( [6 n) U
  1708. BNE Sound_Ram_Clear_44 D+ D6 x/ Y6 w4 Q$ ^
  1709. Sound_Ram_Clear_5
    ' I) Z4 n1 u+ f( b! i) J4 Q
  1710. STA Sound_Ram_Addr_5,X
    # d- {5 \; F# K$ u! p6 H
  1711. INX9 H7 u4 u& ^, {; u( N
  1712. CPX #Sound_Ram_Addr_5_Size: O: h0 w7 X7 m& w; \( l
  1713. BNE Sound_Ram_Clear_5
    $ \0 a: {: n- G; C8 b! v
  1714. RTS4 C/ u; J; H( C6 F6 n2 q  d

  1715. ( d% w$ F  P: k3 R
  1716. Get_Music_Collection_Name7 x7 L2 o% Y3 l' c
  1717. PHA
    , l* v, T2 l4 W# W0 {
  1718. LDA <Music_Item_Cur
    + B- G8 b) f2 C) T0 D2 J: ?* M
  1719. ASL A
    7 B+ S: ]( F$ h# N1 e- L6 W$ f
  1720. TAY5 m2 M8 D5 p4 y9 v
  1721. LDA Music_Collection_Name,Y
    . S. G3 Q1 z: V
  1722. STA <Data_L
    6 N- P3 x- l, Q
  1723. INY; _0 c  _% G- V
  1724. LDA Music_Collection_Name,Y
    3 `, C/ i. Y) p. [# A
  1725. STA <Data_H
    0 W) m7 _4 }* u* c- A2 n; Z! A) ]
  1726. PLA9 u$ D* I9 g+ h. ^
  1727. RTS7 q; k  E% P9 w! J$ |' O
  1728. 5 j: N, ^6 X+ Q3 a' E: H
  1729. Set_Sound_Total
    3 E; c: }) C  M0 S) U5 {
  1730. LDY <Music_Item_Cur  L" r6 m! Z+ Q) b) Y- @- T
  1731. LDA Sound_Total_Port,Y" H- s3 F# n7 [% F0 O
  1732. SEC
    6 i7 m( r" C/ d$ H
  1733. SBC #$01, h7 [. J: K9 `6 j: w6 J
  1734. STA <Music_Total
    0 I( D0 f, h+ Z# w, V  a  ]
  1735. RTS
    / K0 u% y9 o, Q8 q7 D
  1736. * W7 Q- B9 L; n' ^4 k9 o" U
  1737. Get_Sound_Start! T) l/ ?* I3 U- ]' j
  1738. LDY <Music_Item_Cur+ H6 j, w$ `3 q5 G1 c
  1739. LDA Sound_Start_Port,Y
    7 y: q; G0 N, z
  1740. RTS
    6 Z& T2 b' g1 _% i. j7 v( D$ w9 g
  1741. 0 e% M$ @5 y8 \+ N. \1 t
  1742. Set_Sound_Init_Port
    $ V- b' I+ q$ D+ L0 N; T3 a3 T- F# a
  1743. PHA+ \5 b# ], B7 R4 v
  1744. LDA #$20; x6 B/ C  [+ ~0 m* N# U/ `
  1745. STA <JSR_Addr_Op
    7 p- a( D- g% D% h/ @+ z, V) O8 f) o
  1746. LDA <Music_Item_Cur
    . O1 Y* W( Y& j$ M3 O( A
  1747. ASL A2 N* x' U3 U( l/ v% E- b) m! P
  1748. TAY
    * t9 m9 D& J- y1 i7 b, M
  1749. LDA Sound_Init_Port,Y; B7 `2 L- a8 h$ u( v- |8 [  B! D
  1750. STA <JSR_Addr_L
    6 m1 I6 M1 G+ V- z  R9 T
  1751. INY! i7 _. Q, s9 A8 _) u
  1752. LDA Sound_Init_Port,Y
    . s0 G" k5 b5 E" @( G
  1753. STA <JSR_Addr_H6 @" ~6 |- N, J! t* G7 Z7 m
  1754. LDA #$609 |- W! A" `, b) I8 E+ ~5 p
  1755. STA <JSR_Addr_Rts
    5 r6 j( [4 b7 J1 A4 L5 `
  1756. PLA- |4 l# z/ ~5 r
  1757. RTS( y. P: X5 }6 }" ]  P

  1758. ; ]2 D9 k0 C  S
  1759. Set_Sound_Play_Port' m9 n7 J* [% O/ c) G1 m0 ^
  1760. PHA" o" U/ q& _0 X, E3 e) s
  1761. LDA #$203 [$ I/ j) ]7 |# ?+ Y9 {7 g) a
  1762. STA <JSR_Addr_Op
    ( z- U. b4 l  y
  1763. LDA <Music_Item_Cur+ L) ^5 Z/ f3 A( q  f
  1764. ASL A' o% T0 @' G* P5 q" t' l' m
  1765. TAY+ y+ x' A  g0 F( t( m
  1766. LDA Sound_Play_Port,Y
    5 }2 q% U3 v/ S2 t
  1767. STA <JSR_Addr_L
    6 {* C6 R% w( `( K' j) T- @
  1768. INY: i% ~* ?) K& {! z4 Q& f
  1769. LDA Sound_Play_Port,Y2 t4 f/ M' U  l4 U1 A4 P: j: v. X
  1770. STA <JSR_Addr_H  r4 ^3 `6 d5 m! T6 l& O
  1771. LDA #$60
    ) L! m# r3 w  x5 w' y& ^2 q! ?
  1772. STA <JSR_Addr_Rts
    & D0 Y# k' S, F2 ]
  1773. PLA6 J3 K6 m. q; @! {4 ^
  1774. RTS
    6 c9 u7 f+ X3 @, V
  1775. 7 J* X+ N& R( Z! L$ u
  1776. Set_Sound_Reset_Port
    & Y' w: ?" j7 S  m" d1 a
  1777. PHA
    ) i! s* d1 A$ @' E6 ~# k( J9 b" a
  1778. LDA #$208 X! I6 O2 E+ c
  1779. STA <JSR_Addr_Op
    8 T% t( Z! [2 [
  1780. LDA <Music_Item_Cur4 _4 M% N& P/ [
  1781. ASL A5 D, T% W% c1 J' y$ p# t6 ?) g
  1782. TAY* G' u( m: L4 m! E
  1783. LDA Sound_Reset_Port,Y" c) |; F7 r2 W' x
  1784. STA <JSR_Addr_L- B* B: r" r. T+ n& a! N0 W6 S
  1785. INY
    7 N5 ^9 F3 G% A
  1786. LDA Sound_Reset_Port,Y: y2 }9 Q6 W$ U+ P7 ~7 a, `# {
  1787. STA <JSR_Addr_H
    ( Q* z8 Z; s1 [5 C: w* w3 l
  1788. LDA #$60
    0 `* ?) ~* ]5 k4 X/ X/ }. V
  1789. STA <JSR_Addr_Rts
    ! P; i- F0 y" R( F0 a
  1790. PLA
    ' ]" U- ?+ X4 Q7 v& A
  1791. RTS
    # u5 K+ h+ x' X. p5 |

  1792. # O9 u+ F- B9 c: f
  1793. ;初始化音乐bank% y& x' s0 ]3 @/ e! H! T
  1794. Init_Sound_Bank8 D8 k4 W$ Q3 F  Y) s
  1795. LDY <Music_Item_Cur. |( s# S' k, a$ j8 ^
  1796. LDA Sound_Bank_8000,Y: O$ L3 |3 z# x8 ?( g3 V! s" X
  1797. STA <Music_Bank_8000
    0 e, \  M/ U: w0 l
  1798. LDY <Music_Item_Cur5 b# a  |4 ~9 m( B
  1799. LDA Sound_Bank_A000,Y
    # u" G" Z7 }2 b! H& h
  1800. STA <Music_Bank_A000
    ) _1 {" P7 c+ X0 n
  1801. RTS& N( [" N  W( o/ D4 Y; f& V
  1802. 8 B  H" n  x2 X6 t; u4 G7 f
  1803. ;==================================================* x. `7 T: z+ v/ f- P/ J6 S
  1804. Sound_State_Reset;音乐状态重置; N$ `) |; p9 W  `  m' x9 |& J
  1805. JSR Music_Bar_ReSet        ;重置音乐条: p9 C5 E7 j+ m2 U! g+ o
  1806. JSR Time_ReSet             ;重置播放时间2 `  n  o0 U) A' W
  1807. 3 i- E: s& M1 w: G( u  S) `3 I1 B
  1808. LDA #$00
    : K/ ^; |% {9 A1 K
  1809. STA <Music_Stop_State2 L* I" O; ]' y; U* l% n. O% \1 x$ t
  1810. JSR Music_State_Show       ;显示播放状态
    1 f' I9 D# C# W! |- _% J

  1811.   H6 ~7 k* X! X- l% b
  1812. .IF Track_Name_Pos
      w8 g$ `2 @, w% u7 U; a0 w
  1813. JSR Show_Track_Info        ;音乐曲目名显示: h9 j5 ^& R+ _/ v
  1814. .ENDIF
    " M$ T. ~6 L2 w* c. x9 D) ~# j& W

  1815.   K( I: s$ X) u: ^( |. e0 F" a
  1816. RTS$ N2 I; H/ m# }. U" a* M/ B

  1817. . J* N% g; R/ L  m; R8 e
  1818. ;==================================================
    , w2 ^7 L/ V: x2 u' Q6 t
  1819. Sound_Init_Proc;音乐初始化处理8 H2 ~' ~5 H$ a. a
  1820. PHA8 D6 n5 F3 j: s6 g8 q" {$ R# U
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址/ z2 L3 S7 F2 W9 v6 z9 t9 C, {
  1822. LDA #$00# e0 ?, W" o; o# [( Z
  1823. STA <Scroll_H               ;重设水平滚动
      L" R0 V# ]# v- s
  1824. LDA #$0F/ i: h6 ~9 }) F5 g
  1825. STA APU_STATUS
    ) S8 q" i3 F: j
  1826. PLA
    7 M' W$ Y- f; [5 F
  1827. JSR Sound_Init             ;音乐初始化# Q' _+ T8 h' A; ~2 q
  1828. JSR Sound_State_Reset      ;重置音乐播放状态) Z1 U8 @( w2 b% y( w
  1829. RTS
    . h' Y) C' ?2 V# k  N

  1830. ' T* \2 ?( d4 C, [
  1831. ;==================================================& g- b1 e* Y/ S- e/ I
  1832. Sound_Play_Proc;音乐播放处理
    - l' h7 W+ I8 [# w5 Q9 O
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址
    : W, r5 Y2 E3 {
  1834. JSR Sound_Play             ;音乐播放. {/ ~0 M6 a/ c, R2 U
  1835. RTS
    - O6 V+ I4 o6 ]2 n- u6 j& |

  1836.   p+ G2 [# u7 @" s  i. s, j% g
  1837. ;==================================================
    5 u+ U/ H7 ~  {1 Y: [
  1838. Sound_Reset_Proc;音乐重置处理7 \5 ]$ q4 e& ^0 h
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址* p& u2 Y2 p2 F9 t$ K
  1840. LDA <JSR_Addr_L
    8 H* P$ t- D+ O- c
  1841. ORA <JSR_Addr_H. |! o( L0 s. \1 L, ]+ s
  1842. BEQ Sound_Reset_Proc_Default6 }6 t5 U9 W' y6 s+ C' V
  1843. JSR Sound_Reset            ;执行音乐重置* d% q+ ?4 i1 B& t. m( S9 z
  1844. JMP Sound_Reset_Proc_Init_Sound5 ^- R5 ], X+ l8 L4 K2 R2 x8 f

  1845. ; t3 V, f6 [; t
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理
    * j/ p* `% m( D0 H9 O2 D+ _
  1847. - E8 o. u6 r& x5 [) B
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断, F3 ^' z" V+ |* c% L5 j: g- p
  1849. LDA #$00
    3 j( Y% r6 p4 D! T7 l8 R' C
  1850. STA PPU_CTRL6 a  f/ |% C' _" }; L9 W# y+ Y

  1851. 8 ?$ T5 x/ G! m4 `
  1852. JSR Sound_Data_Clear
    ; n9 D! ]. ^$ f/ D
  1853. 3 F/ n/ w( y' l8 u: o
  1854. Sound_Reset_Proc_Default_Wait
    - S, B9 H) f! c5 T
  1855. LDA PPU_STATUS7 \- V+ w/ e) x. S, r1 a/ ?
  1856. BPL Sound_Reset_Proc_Default_Wait. Y7 z* y; l: `/ j

  1857. / F8 l5 ~% [5 @& V+ @5 e
  1858. LDA #$00
    % J1 B/ s) ^+ @
  1859. STA PPU_ADDRESS
    - {( D9 I/ M8 j
  1860. STA PPU_ADDRESS8 b1 _% C1 p4 }$ T# H6 q) c
  1861. STA PPU_SCROLL
    6 t3 U% E5 s' l! X
  1862. STA PPU_SCROLL
    ( U8 S9 l& n, }% d5 N; e1 n- V

  1863. 3 x5 l7 D$ z# d# x- p3 w& I% D3 T# b
  1864. ;恢复PPU控制
    , [# W# x" H: u7 e9 Q0 o
  1865. LDA Screen_Ctrl
    * l5 G3 X8 r2 Q- Z% N
  1866. STA PPU_CTRL
    1 E8 k1 \* I" {5 r! w

  1867. 6 i" z8 k3 e1 d4 G+ K) X  H
  1868. Sound_Reset_Proc_Init_Sound
    - U' G0 ~$ x4 }' r" F5 f
  1869. LDA <Music_Stop_State) [7 `. T8 S8 l' f5 G8 y
  1870. BNE Sound_Reset_Proc_End/ f3 |) U. J; q1 I
  1871. LDX <Music_Item_Cur" W; y; ^0 x& ^8 j- h) U0 T
  1872. LDA <Music_Cur,X1 [9 i5 X. w' N
  1873. JSR Sound_Init_Proc# J! o2 s9 j  v! S
  1874. Sound_Reset_Proc_End% j4 w/ C: B# n0 ^8 C/ x
  1875. RTS- R3 a, ~6 x7 F5 F

  1876. 0 a# p% w5 a. I* T+ C
  1877. ;==================================================
    & F1 z1 j2 u  y1 r8 Q
  1878. Clear_Item_Text;清除页项目
    0 R8 S$ k9 l: [) ~) Z
  1879. LDX PPU_Cur
    - i3 t+ Z+ v/ f2 \
  1880. LDA #PPU_MODE_CNT_CLEAR
    % J% C1 b- g0 J, b! @0 x8 g, k
  1881. STA PPU_Addr,X1 X- k' ]0 D' _# j: t
  1882. INX, L* J% d' c2 y0 A

  1883. $ {+ W& c3 ?8 {/ p
  1884. LDA <Page_Last& \2 ]+ I$ `* W# R! H% c& x. w4 s0 H
  1885. SEC
    $ i6 _3 s3 A" A" U+ d: d/ c: ]& M8 |
  1886. SBC <Page_Last_Index% l" A- k2 z) y$ I" r4 B
  1887. ASL A
    4 @' q- J, f* Y: s4 S) E4 S
  1888. " s3 P2 r3 y' S# b/ k, w+ B* @. }
  1889. TAY3 ?: P  G& x) N. Z! g
  1890. LDA Item_Pos_Data,Y8 F, k, p9 t) l# K' o
  1891. PHA
    * x* w1 A) K" t/ y  [8 \0 q6 V, u# k
  1892. INY
    & N5 [2 q, j( B
  1893. LDA Item_Pos_Data,Y
    $ L0 N2 g0 A2 j
  1894. STA PPU_Addr,X! H$ L8 B- M9 h. p$ p% n& i
  1895. INX
    ; V+ p0 H  l1 m+ x7 l
  1896. PLA
    / X+ P/ z2 ]+ r6 r
  1897. STA PPU_Addr,X8 H+ I9 `; ^9 g) n
  1898. INX; U" O& i  _0 t. Y5 k  h

  1899. # L& m/ U9 g* J' g
  1900. LDA <Page_Last+ L5 }! g% K8 j. h8 F1 K. }+ A0 c
  1901. ASL A
    " H. k2 {/ P. H! F
  1902. TAY
    1 \% Z* ?0 o# X
  1903. LDA Music_Collection_Name,Y4 t4 P5 v/ J5 u. R% e# A
  1904. STA <Data_L- F: J, _" N$ Q; p8 d" k( H; ?! x
  1905. INY1 d/ K! M, V$ r2 @1 l5 R  r0 f& j
  1906. LDA Music_Collection_Name,Y
    $ H# U" \& r, M5 V6 ]; k
  1907. STA <Data_H7 U- v* V% t% }
  1908. 6 a5 ]# A8 _5 n) I5 k
  1909. LDY #$00
    # J/ g% z4 U  k) B* K, g
  1910. LDA [Data_L],Y
    # l* w  y' t$ ], R, K, a
  1911. STA PPU_Addr,X
    , `! Y% V$ A. o- |1 K3 P
  1912. INX3 X( |: N& h! l: L- h5 E  L6 C2 r
  1913. Clear_Item_Text_End
    9 @0 o5 n; ?: }/ X8 g; I
  1914. STX PPU_Cur
    7 y* k0 w5 C  f* K, O6 i
  1915. RTS
    ( R, o+ i* ]: M  [0 H% h

  1916. # T, c. e' W& s4 g8 O( K
  1917. ;==================================================
      M1 P3 C6 w( T% q
  1918. Show_Item_Text;显示页项目- O0 S! B( ?' c- [, A4 K# A5 O  j
  1919. LDX PPU_Cur
    # O4 _( F) G1 F0 K' V* `
  1920. LDA #PPU_MODE_CNT_LINE
    6 o6 `* z! v* j2 E* c5 l/ W
  1921. STA PPU_Addr,X! y0 p9 L1 H7 z3 q2 |# o7 E. U
  1922. INX
    8 K8 G7 g  e5 {% ]! |5 `$ h
  1923. LDA Page_Cur* U. g  }& O! K' ]3 Z- _
  1924. SEC
    $ P% |( k% K, l$ ~5 ^: d7 W3 S9 L
  1925. SBC <Page_Cur_Index
    : `" ?5 {9 D# d. k% k0 H6 B
  1926. ASL A3 C* q/ H. Q% X3 I- j/ A
  1927. TAY  y  |. q% V" \( a
  1928. LDA Item_Pos_Data,Y
    ' r, `8 t4 y2 A2 R* c
  1929. PHA6 N0 n) k* h; i$ M5 w
  1930. INY
    # ]8 Z% l) x0 d: U; N
  1931. LDA Item_Pos_Data,Y/ a6 x; w3 v  S! c9 l3 l6 B
  1932. STA PPU_Addr,X  W) ~' ?7 ~1 B, S) J
  1933. INX! M& g2 {, m7 d6 o: {
  1934. PLA
    + Z; p/ D( N% s, \2 R2 ~
  1935. STA PPU_Addr,X
    ( d; ^% {' N' Z% k: J7 P
  1936. INX
    6 q) q, R* }# J
  1937. , M% L' b) ~# P6 @9 r) h) r
  1938. LDA Page_Cur
    7 T4 v) u; M/ e1 m- M
  1939. ASL A
    1 L, A1 F" Z: N: J0 v7 N1 d
  1940. TAY1 `8 U! U, w0 R4 d0 x$ `
  1941. LDA Music_Collection_Name,Y: |: l  `8 Q6 e  N" k, Q
  1942. STA <Data_L6 @1 g) T6 T: q8 \) G0 m- f
  1943. INY) j6 y, J* u) H
  1944. LDA Music_Collection_Name,Y
    ) J' w9 [1 {7 }8 I: ~0 h" z
  1945. STA <Data_H7 T$ T7 i9 w, m( S
  1946. * ~7 p, v. ?4 o
  1947. LDY #$00: @! }2 Q8 L3 i
  1948. LDA [Data_L],Y! Q- [1 i3 e4 X/ R, L' u
  1949. STA PPU_Addr,X
    # W6 `1 D. W0 I6 I2 n; z! Y0 z
  1950. STA Data_Cnt
    / O9 c6 q+ D: |
  1951. INX/ I6 h' N5 Y" X6 n8 @2 J
  1952. , k, B! A8 k3 T- Y+ {
  1953. INY. h$ y9 O( ^0 b0 P$ l" i1 D, d6 H0 o
  1954. Show_Item_Text_Write% `( p( _; ~$ f7 u6 m& q
  1955. LDA [Data_L],Y
    % c  g2 m3 S. f. @
  1956. STA PPU_Addr,X& |/ @( M8 e; j) T9 f& f# @0 i) h
  1957. INY
    ( u3 ]! ~6 M3 p4 G7 y
  1958. INX
    2 B, i$ n4 o& N" T) m4 d! @5 l# \: {4 V
  1959. DEC Data_Cnt
    7 K9 C7 |  y. C/ U3 V6 C
  1960. BNE Show_Item_Text_Write+ ]: l" r9 r& r9 ~' Z4 R

  1961.   ]$ ]3 V7 T6 z7 t$ h
  1962. Show_Item_Text_End( n% u% M2 a1 _, e2 D$ D, `
  1963. STX PPU_Cur
    1 n. {1 u! W, @" g' n" Q/ o+ W
  1964. RTS3 B& C( Y: V+ }2 f  A: \
  1965. $ ]! X7 D& u2 Q/ Z  B1 R4 {
  1966. ;==================================================
    ( F# \6 ^/ ?# n: K( E) w6 ]
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量
    * C. i. j4 H5 K7 t) v
  1968. STA <Data_Buf. p3 ]# k6 b. G3 M! T
  1969. LDA #$00: N# h4 J2 P% |! w; D- C. X
  1970. Get_Page_Index_Calc
    & I) }( h% h. \+ r' K0 k
  1971. CLC( r3 E% G  H8 e3 J+ O
  1972. ADC #PAGE_SIZE
    ; U  l( p$ K, {
  1973. CMP <Data_Buf
    ; Q. F; ~  R% K* t% _
  1974. BCC Get_Page_Index_Calc4 M% i) \* g6 X+ D( ~0 Z2 {
  1975. BEQ Get_Page_Index_Calc_End/ @8 ^( D( V$ x5 Z
  1976. SEC0 {; H/ z4 t8 k/ ], w$ O
  1977. SBC #PAGE_SIZE- ^/ k9 l- B$ Q
  1978. Get_Page_Index_Calc_End
    . f3 K! e( g2 q$ J
  1979. STA <Data_Buf" c0 T! p: y' d# {% p& a7 V1 n
  1980. Get_Page_Index_Cnt+ N% C: ?$ a- T/ t
  1981. LDA #PAGE_SIZE( y# k7 [/ y, R' |% ^% T* c# `
  1982. STA Data_Cnt2 q4 H: V5 M* [+ C+ l

  1983.   K; F9 s! l+ i4 w9 ?- s
  1984. LDA <Data_Buf% R9 a; e  X  |9 e
  1985. CLC
    ; B1 h0 Y3 |+ u$ x2 r
  1986. ADC #PAGE_SIZE8 W4 d: N" {7 ^. M7 y( ^3 W1 x
  1987. CMP #ITEM_MAX_SIZE
    5 L1 h4 B0 r& e1 U9 T  m
  1988. BCC Get_Page_Index_Cnt_End
    ! T9 w5 S7 e/ K5 |
  1989. 2 B+ b' U3 j" y! |: x
  1990. LDA #ITEM_MAX_SIZE+ [# v+ H2 H/ \5 C
  1991. SEC
    ( \5 I, _3 S+ N/ x/ T
  1992. SBC <Data_Buf
    , d2 a- z$ f3 N& F
  1993. STA <Data_Cnt
    5 u' D# {6 o$ g7 Y2 y; T: ?$ i( Y
  1994. ' w+ u9 m  [4 m' R% q, n9 T7 L2 p
  1995. Get_Page_Index_Cnt_End2 w0 F! j, D5 E% s9 e2 J/ F
  1996. RTS
    0 }8 F/ q. {9 D( w! n# t3 ~

  1997. ) _2 v8 n4 }- S) s$ g! }
  1998. ;==================================================% n9 u) a2 r2 s3 @7 e  _6 ^
  1999. Get_Last_Page_Start_Index: T; A: i. M: r8 k' R% e8 T
  2000. LDA <Music_Item_Last
    2 T9 ]) K, o+ I2 R/ [% q5 ?
  2001. JSR Get_Page_Start_Index1 U2 N& ~+ `# I2 i* D! ~
  2002. LDA Data_Buf
    . @$ U/ ^+ I9 w) e- l" P
  2003. STA Page_Last
    5 S2 `9 g  Z) I$ Q- V; i1 p' x
  2004. STA Page_Last_Index/ W% \6 _. W( n1 r& k+ a  W* N% g
  2005. LDA Data_Cnt
    - ], C7 R! @' a# F; j0 T8 s6 t
  2006. STA Page_Last_Cnt4 h" |( L5 ^8 b* s% C- j4 C
  2007. RTS
      g' q& c4 B* V

  2008. / c/ c' x3 Y% A! `6 T& c; }
  2009. ;==================================================+ |9 ^! g. m8 e- K
  2010. Get_Cur_Page_Start_Index& s$ S6 D' z& R7 I7 K% o8 ?4 `
  2011. LDA <Music_Item_Cur$ V' L, E% t/ W# k) G3 f3 @
  2012. JSR Get_Page_Start_Index& }  i6 i/ w: R( v: G, z& Q* J
  2013. LDA Data_Buf9 l8 s$ z! z$ {' T- @! V  a
  2014. STA Page_Cur! z; ?- F  {+ |+ X; ^
  2015. STA Page_Cur_Index9 J; `) r- R  R. Q! K! Y7 @/ l
  2016. LDA Data_Cnt! |) N# j- E- f: n2 O& }* }  s
  2017. STA Page_Cur_Cnt& _; ^# Z% V) M) b0 _& y7 b* k( \* S
  2018. RTS& \8 a. [# Z* A* x1 b: C! P/ v

  2019. & F+ s- W) _  H9 P8 s0 I; ?) X$ e
  2020. ;==================================================2 P, A- S# @5 R4 i7 q
  2021. Show_Page_Text;显示页文本
    + s" X3 w! n9 |  ?  s8 C
  2022. LDA <Text_Disable_Flag
    & I' E' {% @+ `" G
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM
    . o5 k2 F/ X; c6 Q( T; j
  2024. STA <Text_Disable_Flag+ s+ V2 ^: m3 N* f7 ?" d

  2025. / h' ^* Z4 ~% s9 i/ g
  2026. JSR Get_Last_Page_Start_Index
    ! g1 O" H) E) c0 u( b
  2027. JSR Get_Cur_Page_Start_Index" l  h/ z( q3 h1 y) }4 R
  2028. / S9 d1 l5 ~  N. U( \* c7 q) g
  2029. Show_Page_Text_Set) B( ?: q! E  Y( n9 E5 g: f& L
  2030. 8 `4 H8 S, U# _: [
  2031. Clear_Page_Last_Item;清理上一页% b. L* w- j# n
  2032. LDA Page_Last_Cnt! G. l/ A. D, M- h. _4 h
  2033. BEQ Clear_Page_Last_Item_End
    * ]7 e& h  ~. ^# H( K
  2034. JSR Clear_Item_Text
    4 ~% j( @: ~' k" h- z: q  s5 O2 F
  2035. INC Page_Last
    9 a9 S' m2 A8 l) y. }
  2036. DEC Page_Last_Cnt
    7 G; Z6 p+ y6 X. _0 |( }! h
  2037. Clear_Page_Last_Item_End
    ( w. I" q& Y7 v: ~# E7 ~) [7 u

  2038. + O8 X2 l; _1 u/ j8 ^5 b/ F( q- k
  2039. Show_Page_Cur_Item;显示当前页' v2 v* c, s6 ~8 R  }* K. g
  2040. LDA Page_Cur_Cnt
    6 P& O, g' E$ d) }2 H+ N# f
  2041. BEQ Show_Page_Cur_Item_End* u1 t, u0 z9 i3 B: M3 _0 Q
  2042. JSR Show_Item_Text
    7 K2 B: k# g( z- Q
  2043. INC Page_Cur
    ' X* X' T2 n3 l: S
  2044. DEC Page_Cur_Cnt& q7 [; O4 R8 z5 V% {3 n" L
  2045. Show_Page_Cur_Item_End& V$ ~: O4 U. d& H+ \
  2046. 4 b! s% E. K$ g
  2047. INC <Time_Wait_Cnt, ^- i& M+ U4 S' o/ D! g8 ^! P
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作" I* y  e3 X5 C+ V" M, e; ]  e2 e' W: h$ C
  2049. LDA <Time_Wait_Cnt
    4 B) A+ g8 ]% i2 K
  2050. BNE Show_Page_Text_Set_Wait0 ]6 e/ `2 b3 t7 a9 o" U

  2051. & `/ C1 K6 c9 u$ t
  2052. LDA Page_Last_Cnt
    : ~' {: @! x9 N7 n( L* S
  2053. ORA Page_Cur_Cnt5 C9 [; o2 ^1 `* O0 y5 t2 S$ }
  2054. BNE Show_Page_Text_Set
    9 L7 z* i1 M  l4 }
  2055. LDA <Text_Disable_Flag) l+ L0 H. F* x7 i) V! [7 q
  2056. AND #TEXT_DISABLE_ITEM ^ $FF
    & }: z  C3 S- f
  2057. STA <Text_Disable_Flag
    ) `0 B5 @1 ^; E2 ]7 y+ i
  2058. RTS! s) Y2 H" D! c! q

  2059. 7 j2 }5 M$ k. a9 `
  2060. ;==================================================% r6 A$ i6 V. H+ q
  2061. Last_Item;上一项5 ~  b0 n' ~/ X% `* _
  2062. JSR Clear_Last_Track_Name* P# r$ I: g$ U0 L6 z7 C/ J  b
  2063. JSR Disable_Text_Draw1 S; v2 v1 k" s4 U2 a: w2 a" f
  2064. " F; _+ l. W3 ~3 ?( R# n. g$ J5 x8 M
  2065. LDA <Music_Item_Cur0 ]& B5 n; j' r/ i7 @
  2066. STA <Music_Item_Last
    . I1 P- Q" h4 S" |; n& H9 n

  2067. 4 a/ A! l( w. h3 i+ F
  2068. JSR Get_Last_Page_Start_Index% l8 }" U; m9 g
  2069. ; G1 X# P6 r7 A- W+ m- E3 W! F
  2070. LDA #$00, c6 }  T) V: {2 k/ C
  2071. STA Data_Buf
    4 v9 l$ V: E. x) Z. X( j; x3 ^5 J5 k
  2072. 1 n  \& n- R4 L1 M" v- \
  2073. LDA <Page_Last
    3 K, U  T; w* S9 G) Q
  2074. CMP <Music_Item_Cur
    , f' L8 ~. I' N0 n7 V/ _
  2075. BNE Last_Item_Begin
    $ U# B4 }; T( T

  2076. 6 x4 q6 ]1 ?( z) M! l* ~1 s5 v% ^
  2077. LDA #$01
    7 @) c. o- p4 j6 }9 o
  2078. STA Data_Buf
    $ T, I. l7 @* G' Y" q; h) V# I$ J
  2079. Last_Item_Begin, g6 v% K& D: |: M5 w! t" B
  2080. LDA <Music_Item_Cur" o* G5 {4 J) L" \) W  N5 c
  2081. BNE Last_Item_Set& ?, R& u! |% H# Y) F3 R
  2082. LDA #ITEM_MAX_INDEX + 1  |8 z' y$ o/ i/ v% r3 Q9 O  m
  2083. STA <Music_Item_Cur
    ) r" r2 }% V# D1 [/ [) }* Y

  2084. 5 ?( A$ P  x5 {* q7 M8 K6 z  O
  2085. Last_Item_Set# ^' y, C/ C8 v
  2086. DEC <Music_Item_Cur! e7 n9 |( Y& _- l
  2087. LDA <Music_Item_Cur
      D2 r  P/ _% Y, q
  2088. JSR Reset_Current_Music. Q% N; y/ R" m; ~+ o' D

  2089. : ]- R& X9 d8 @% H- Q
  2090. Last_Item_Play7 v: `$ o  p6 q' c. j! U
  2091. LDA Data_Buf
    6 A9 F) k2 q9 ^) D* Z1 ~
  2092. BEQ Last_Item_End  j2 V$ ^5 v  l3 l/ K
  2093. JSR Show_Page_Text, F5 f- z7 j) I" A2 Z
  2094. Last_Item_End
    4 P5 K1 d- `$ K$ b
  2095. RTS
    ( S; o9 l9 ]+ }/ X! M. B

  2096. & l& J. V* }0 O2 f
  2097. ;==================================================
    6 |. F" U, c( i4 I7 U8 `: c
  2098. Next_Item;下一项: A: t! a2 @* Z+ X& M
  2099. JSR Clear_Last_Track_Name
    # c$ a5 l  ^, M0 X8 z
  2100. JSR Disable_Text_Draw2 \: P/ L* l4 t5 b) _& K2 y

  2101. & k* D. p2 x# K
  2102. LDA <Music_Item_Cur
    $ g' h$ ~, F  s% |! [* x! o" V
  2103. STA <Music_Item_Last3 |7 ]: X) |) T# m
  2104. 0 G& h( {; G; y7 t# f
  2105. JSR Get_Last_Page_Start_Index
    7 Z  ^) ^0 \0 ^2 I0 V8 F9 U2 ?

  2106. / `7 k: a4 \( D; Z- Y" z
  2107. LDA #$007 Z( u) h6 ?8 H6 k/ |" b% ?4 B
  2108. STA Data_Buf4 {" W  O% g- y

  2109. $ J6 }$ `7 q% @/ y+ `/ F
  2110. LDA <Page_Last1 e% f: t' v9 E3 e7 d
  2111. CLC* z3 C9 |* B7 Q3 Y# H9 C8 \; \& E
  2112. ADC <Page_Last_Cnt
    ) d0 {( B. `% \; G6 [) W" A
  2113. SEC
    2 L! [( V9 @" g
  2114. SBC #$01, q: a1 I3 r  l) K% ^% d
  2115. CMP <Music_Item_Cur+ p/ n6 \! [5 G! t
  2116. BNE Next_Item_Begin
    # E2 `2 @. ?! e/ d* L

  2117. 5 O) V) q  i9 ~/ l
  2118. LDA #$012 R) \% z1 h+ F# N2 e( ]8 F/ W
  2119. STA Data_Buf
    6 k9 u" c8 {' o
  2120. Next_Item_Begin
    8 k  v7 J$ E$ n; Z# |
  2121. LDA <Music_Item_Cur! }2 j! P0 t. ]% B9 y' q0 b
  2122. CMP #ITEM_MAX_INDEX& Z9 c" ^+ D1 {5 ~* w
  2123. BCC Next_Item_Set4 T# \+ L- U3 t* v
  2124. LDA #$FF' K5 O# X- Z$ ?  Z/ I) n
  2125. STA <Music_Item_Cur
    + k4 T0 K( U2 `4 z: h% R% G. j
  2126. Next_Item_Set2 E/ Y; e) a  M! X
  2127. INC <Music_Item_Cur/ S# O% p% h6 K+ {( [. d5 R
  2128. LDA <Music_Item_Cur
    5 C' d% `% }5 |+ J3 f1 Q( M8 W
  2129. LDA <Music_Item_Cur
    1 u+ i8 U6 b5 t: ?, p
  2130. JSR Reset_Current_Music
    & @! E4 P' b( B0 p- s8 x# S9 N
  2131. Next_Item_Play" ~& ^+ }% o! z9 `0 R! R) f* Z
  2132. LDA Data_Buf
    ) c! }+ p  O$ ?/ R9 T# |
  2133. BEQ Next_Item_End
    - P8 i: _* G, n
  2134. JSR Show_Page_Text* m  }9 k4 f; p! s. z8 E) O+ S
  2135. Next_Item_End
    4 U* y7 l0 S+ ~
  2136. RTS
    9 h9 {( z5 u1 H& L
  2137. ; M  d/ P& l7 H% [
  2138. ;==================================================6 T, [  j0 i" `
  2139. Last_Page;上一页
    $ E) e" J9 i3 C: T! y. b
  2140. RTS
    $ x0 }; }3 H' A# ~& Q8 u

  2141. , t& D1 k& o% |2 b8 @
  2142. ;==================================================, X* I4 I9 y9 R) n" E0 J  R
  2143. Next_Page;下一页; l( g; h9 s  P# S  z: V6 t
  2144. LDA #PAGE_MAX_INDEX
    * T  t( I' A$ H- m' v, u
  2145. CMP #$010 b4 w- ?  W8 M
  2146. BEQ Next_Page_End6 G1 C8 N! S' ^
  2147. / a- {' K2 H7 p) ~
  2148. LDA <Music_Item_Cur
    ( x0 ^3 U- X, h9 r& `7 ]2 K/ O( T
  2149. STA <Music_Item_Last: u, c' \* t, S- q5 r

  2150. 3 U1 `6 r+ V1 g& W& U8 x  u7 j3 J
  2151. JSR Get_Last_Page_Start_Index6 V2 z/ w5 d- Y$ L
  2152. 6 C0 N+ q- q" a  F4 X* n' Q* G
  2153. LDA <Page_Last_Index
    - z6 d" h2 N! @+ L1 n
  2154. CMP #PAGE_MAX_INDEX
    5 ~) \* E, N" W) `9 f; m
  2155. BCS Next_Page_In_End_Page
    2 @1 {  p6 z. N  P

  2156. + g0 Z) C2 M; w2 Q/ w
  2157. Next_Page_Not_End_Page;不是在最后一页2 D7 ]5 R( @/ F: Z8 y
  2158. LDA <Music_Item_Cur
      F9 M6 G$ @) S' Y
  2159. CLC4 }, {) m- ]* J  ?
  2160. ADC #PAGE_SIZE
    2 D9 q' P4 z+ k
  2161. CMP #ITEM_MAX_SIZE
    5 B* t4 K$ B( D6 Y
  2162. BCC Next_Page_Not_End_Page_Less( u- r/ G# F" N& `
  2163. LDA <Music_Item_Cur: j% X! l( i' T& A8 Q" p# D, w
  2164. SEC
    # E- U! f; _6 h
  2165. SBC <Page_Last_Index
    ) q) c+ K! b% i5 E( ^+ U8 h
  2166. CLC; u6 G! T$ a% Y6 ~2 l
  2167. ADC #PAGE_MAX_INDEX
    $ s) D6 a8 j5 m" k
  2168. CMP #ITEM_MAX_SIZE
    % C! M- d! X" k
  2169. BCC Next_Page_Not_End_Page_Less/ k9 }! p2 l' d& g) S
  2170. LDA #ITEM_MAX_INDEX2 M% ?! |& ?, V! h% i3 t# J& O
  2171. Next_Page_Not_End_Page_Less
    7 f% p) d5 Q0 {
  2172. STA <Music_Item_Cur
    ) z" p* s. t. B7 ]: L. O/ H
  2173. JMP Next_Page_Reset3 `/ }# G' ?9 T8 [9 a

  2174. 9 l5 _; n- e! V* J# h1 ?
  2175. Next_Page_In_End_Page;在最后一页
    3 w+ b2 f3 ^/ O1 ]/ C7 h
  2176. LDA <Music_Item_Cur/ Y! H" L9 w% k5 Z* |, o+ J
  2177. SEC
    9 G4 Z  `1 _5 ~; X- _
  2178. SBC <Page_Last_Index1 B1 Q% a) L5 T: ^; I. Y
  2179. STA <Music_Item_Cur
    1 P5 N( h  W, n. [2 J* E8 I
  2180. ( Y! S1 Z' M$ F+ F& Y
  2181. Next_Page_Reset* J8 e: f; T7 ^3 d
  2182. LDA <Music_Item_Cur' o& Q+ h1 ]$ v' U( X9 e' F0 K7 M
  2183. JSR Reset_Current_Music! B$ D3 T; q8 M( B' z
  2184. JSR Show_Page_Text" C+ n! W: h6 l6 R
  2185. Next_Page_End  f" x  C! F- |) y3 D9 o
  2186. RTS  ?8 Y3 r0 f  h; X1 U# T  r

  2187. ' |9 F& T/ p  y7 w
  2188. ;==================================================
    ! K) g$ [! L( i* r$ l
  2189. Disable_Text_Draw;禁用音乐条刷新
      p( N# A$ Y5 }, H; ?
  2190. LDA <Text_Disable_Flag
    2 R  I! ^3 B: t/ g( w  K, o: @$ [
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    ' }0 L/ i3 K% b$ @5 g% u
  2192. STA <Text_Disable_Flag
    6 B4 u% {2 @4 {2 _& Y; F
  2193. RTS
    % S, A# f! [$ m1 S% V+ q; C& e
  2194. % P/ C. Y# D3 J
  2195. ;==================================================
    6 |( A- w- ^+ L, E. n
  2196. Clear_Last_Track_Name;清除上次曲目名
    & ]# n& N6 W- x* ^& H
  2197. LDX <Music_Item_Cur* N! @. k  `: c* s5 z( V9 p) T
  2198. LDA <Music_Cur,X
    3 P* I6 L% |5 N* Z
  2199. .IF Track_Name_Pos
    7 B/ o, a4 Y) x! J2 K1 v+ O, P
  2200. JSR Clear_Track_Info
    : k# K; j) n, l% r5 W; t
  2201. .ENDIF+ z& G* }5 T. F. i$ ?
  2202. RTS! }! d5 s9 J: Y
  2203. ( v5 _4 s% p" U+ x: P, y
  2204. ;==================================================
    $ I5 w4 m4 I9 `' Y" g
  2205. Reset_Current_Music;重设当前曲目
    2 d5 ?7 S3 x7 x: y$ m! d
  2206. 0 r9 m) y. K1 G3 q, x6 {' u# j- T
  2207. ;写入当前总曲目% P. X0 T/ v6 e# Z/ f0 ~
  2208. JSR Set_Sound_Total
    5 d: e2 O* K8 G& C! a) V& f  }
  2209. LDX <Music_Item_Cur- M: r- h: o# r) d2 ~

  2210. & U5 |  l* o' [+ V, i
  2211. LDA #$00
    0 e+ k) f3 ]+ N2 q5 c' ~0 b" t2 P
  2212. STA <Music_Last
    ' _1 @, y9 {: }; Z0 t

  2213.   V+ c5 a1 b% j
  2214. JSR Sound_Reset_Proc
    2 a7 p- g9 G2 v
  2215. JSR Music_Show
    2 P; A! V, J5 n% k: L' l% l
  2216. RTS6 Q2 i7 M8 B) X+ Q: s; \5 {
  2217. * E1 j+ |" I1 L8 B1 X7 P
  2218. ;==================================================
    + H: s& b: q5 E+ S6 f6 g
  2219. Music_Song_Stop;音乐停止
    8 V- _$ _) z' ]1 E- p
  2220. LDA #$01. T  K0 S7 i! J
  2221. STA <Music_Stop_State/ Q6 P* q& D& l- T, L0 r  ~7 x
  2222. JSR Music_Bar_ReSet
    3 N) Z" M& p$ ^3 y+ r  h/ r
  2223. JSR Time_ReSet# {$ I8 X0 U& h8 c4 t# W
  2224. JSR Sound_Data_Clear
    # M8 ]$ }/ U0 a+ i: g& {0 Z/ v  H
  2225. JSR Music_State_Show  }6 f4 R4 T, z& g+ \! d
  2226. RTS
    ! e# n; [/ @: E7 g

  2227. , C8 [) J+ ^& w, c  o' G
  2228. ;==================================================
    , t: T5 @( w. U; ~
  2229. Music_Song_Play;音乐播放
    & P6 ^9 t" A9 j2 F% d
  2230. LDA #$00
    % J9 s: ~8 ~7 p& c+ c
  2231. STA <Music_Stop_State
    1 c* Y7 W. C$ J% |! [5 t9 C4 ?% |( p
  2232. LDX <Music_Item_Cur
    ; N* O; F% e5 R9 x/ c' m+ G
  2233. LDA <Music_Cur,X
    ( G* k! s( C8 E# E+ z
  2234. JSR Sound_Init_Proc
    0 R. H7 D+ h1 ]7 ?
  2235. RTS
    4 N& P5 G5 g5 b0 O
  2236. ( z# ?% ~+ U2 ~8 g
  2237. ;==================================================
    . X/ c' W# c6 D* w. J& C0 Z7 t
  2238. Music_Song_Last_10;上10曲
    * V. A! {1 B0 j# o+ w& \
  2239. JSR Clear_Last_Track_Name
    ' j/ ^! I- Q" r0 M
  2240. JSR Disable_Text_Draw
    + M2 o1 ~6 u" g
  2241. LDX <Music_Item_Cur
    ( a" f; F0 n5 V7 A) q6 x& W
  2242. JSR Set_Sound_Total
    $ U) A( o# }. N0 z7 E9 T
  2243. LDA <Music_Cur,X
    7 _" ^4 a0 u8 A" B, n9 P
  2244. SEC
    ' P9 n& Q# a/ c# z5 ?$ p- c
  2245. SBC #10
    ! D9 Y: a2 |4 S; ?$ L$ ^
  2246. BCS Music_Song_Last_10_Set
    . J" H# d9 U  D6 [. n, b& D
  2247. LDA #$00; T' G( f% L% h' A( `
  2248. Music_Song_Last_10_Set
    . Q, R( d- H$ c$ k: [# C
  2249. STA <Music_Cur,X: w! r/ [6 l$ r$ |5 s# b3 n9 N: J; d
  2250. JSR Sound_Reset_Proc5 j8 {1 e9 F1 U% v$ }1 h8 E/ ~8 _
  2251. JSR Music_Show7 d3 x* h- k; ^. Y
  2252. Music_Song_Last_10_End
    ) m: o. ?( B$ C& {4 x
  2253. RTS
    $ N- R# V+ B+ Q1 D8 N; c% V

  2254. $ o& f7 G0 v; y/ E$ R+ T8 B; u
  2255. ;==================================================
    9 P  _( u2 T7 j4 U! \
  2256. Music_Song_Next_10;下10曲
    0 I  K! Q) S# U' i; R
  2257. JSR Clear_Last_Track_Name: ?/ q2 P# n6 U$ ~8 t5 K5 ~
  2258. JSR Disable_Text_Draw
    3 K  M/ K; y2 f  d) F; z7 b
  2259. LDX <Music_Item_Cur4 d8 N1 b1 }8 R  E7 v# S9 a
  2260. JSR Set_Sound_Total* V1 ]+ F0 f7 k0 Q7 D& ^
  2261. LDA <Music_Cur,X
    - k' l& z5 o7 v( a+ X' _
  2262. CLC( O+ x- g4 v: E
  2263. ADC #10
    " }/ j. Y( m3 v" t2 O. {
  2264. CMP Music_Total! s2 K; S* Q# v
  2265. BCC Music_Song_Next_10_Set
    ; J2 J7 q/ \1 M- @* \
  2266. LDA Music_Total. f5 v9 r8 a8 Y2 P9 K9 g/ t
  2267. Music_Song_Next_10_Set
    , e8 b, M. g$ ^3 s, m$ b9 ?$ \
  2268. STA <Music_Cur,X
    ; m5 `" i/ @" c5 O8 Y+ d; t
  2269. JSR Sound_Reset_Proc. ?# Y* L9 g3 K) ?- r  T
  2270. JSR Music_Show
    ( |- A+ z4 G2 a
  2271. Music_Song_Next_10_End
    6 R/ u; L0 K# d, J# ~( A
  2272. RTS
    $ t( R0 i% U4 a

  2273. / M0 T4 T8 T( |; a; ^4 W  B
  2274. ;==================================================* u- t7 G4 |, i- X( x
  2275. Music_Song_Last;上一曲
      f* X- \! ^# ~: v
  2276. JSR Clear_Last_Track_Name
    % E* }; r/ r! ~
  2277. JSR Disable_Text_Draw
    4 _; U0 h% t2 R: Z, e4 [
  2278. LDX <Music_Item_Cur
    6 b, q0 R3 J- d1 y8 v  K
  2279. JSR Set_Sound_Total: Q( q3 t6 ]* m8 [  B' S; O
  2280. LDA <Music_Cur,X
    ' c1 @# Y, ?: R. i3 Y' l+ u% ?
  2281. BEQ Music_Song_Last_Set# A' U' A) a. t, N
  2282. DEC <Music_Cur,X
    ) p( U$ F9 y& D9 t
  2283. Music_Song_Last_Set% g. D1 b0 U- o  {, K7 R( t: E% c+ m, i
  2284. JSR Sound_Reset_Proc7 t: n. f& e5 w0 e9 T' k
  2285. JSR Music_Show& R" i2 T" H2 F. f4 @" Q3 Z
  2286. Music_Song_Last_End0 y/ ~8 ~5 ]$ I* p5 c3 l" X7 }
  2287. RTS
    2 G5 j6 [2 z/ N; X

  2288. ( t/ G) L& u: {& Z8 S, Q7 }
  2289. ;==================================================" G0 K& F& g8 G2 u, E
  2290. Music_Song_Next;下一曲& `6 ]( @6 [: y
  2291. JSR Clear_Last_Track_Name# C, o& M" g1 |. s
  2292. JSR Disable_Text_Draw! K; P* Z) M8 y4 z( a# D
  2293. LDX <Music_Item_Cur
    & k& l5 Q( ~$ x: p& @1 m
  2294. JSR Set_Sound_Total
    $ a. I: i9 N. c
  2295. LDA <Music_Cur,X
    . y9 E3 q6 X! Z8 e
  2296. CMP Music_Total5 ~5 R; m! S$ w/ g
  2297. BCS Music_Song_Next_Set
    : E  o# b( O8 b
  2298. INC <Music_Cur,X
    0 z0 A3 J1 C* M6 l. X' J
  2299. Music_Song_Next_Set4 ~$ j8 b. T- G/ Z2 S# J/ t% N
  2300. JSR Sound_Reset_Proc
    ) N+ ~1 Y) _* p0 l+ F( F& ?! _
  2301. JSR Music_Show! h, j/ l9 i9 _- d5 g; O; W
  2302. Music_Song_Next_End8 T6 y+ S! `: L, S$ z- O8 Q
  2303. RTS/ r1 g+ e% ^! l! A. M6 h% e
  2304. 1 {3 E7 B5 Q9 U; [- v- L4 W
  2305. ;==================================================
    ( ?) ?& g# H: u1 l& O+ _
  2306. Change_Select_Item;改变当前选择项
    ' X/ H2 u' D0 `% l5 _8 R- q
  2307. ;--------------------------------------------------
    1 C) A, d6 Z( q5 ]! u( ^$ e
  2308. Change_Select_Stop_Play_Item;停止/播放& k/ S3 f, C9 Q8 D4 u
  2309. LDA <Key_Once
    1 ?: o+ M# R: |+ D! P- r% n6 y0 L) n
  2310. CMP #$10
    & y1 R8 t* x( ?* t% ?
  2311. BNE Change_Select_Last_Item
    6 v0 P9 `* k( e0 W% h% O7 f
  2312. LDA <Music_Stop_State
    . i, J& P+ i, R1 F
  2313. BNE Change_Select_Play
    0 S* G+ ?2 F8 q" {5 U5 p2 r
  2314. JSR Music_Song_Stop
    4 x2 u9 W. |* a  O  h+ D
  2315. LDA <Music_Stop_State' n, X" l! F# `9 P
  2316. RTS
    5 N* _9 H" l/ W& X$ x
  2317. 1 ?5 ^6 |2 G0 A' j) ^
  2318. Change_Select_Play
    ! H7 X1 N$ E6 F6 S6 B  Q& H
  2319. JSR Music_Song_Play7 v6 f: h0 }5 `2 f- }& M* M2 O* R, b* Q
  2320. RTS& W# \9 R1 i5 e2 _

  2321. ! U9 R, G: p8 `! V5 Y2 S4 x
  2322. ;--------------------------------------------------1 L" R! I  H& w) T! o
  2323. Change_Select_Last_Item;上一个专辑
    ; h& `3 }9 x+ t2 M
  2324. LDA <Text_Disable_Flag5 J( A8 b: N9 z) K) B" y, E
  2325. AND #TEXT_DISABLE_ITEM
    / K" `: @* M% K7 q, v1 ?
  2326. BNE Change_Select_Item_End. z1 L7 N0 C3 u( ^) w9 V7 H
  2327. LDA <Key_Once
    / u5 y" K* Y# z& [5 O) y- y& \( g# m1 J
  2328. CMP #$08
    / X% A# P7 i8 f' P. N. W
  2329. BNE Change_Select_Next_Item
    8 Y1 e. ?8 V* W: L9 U
  2330. JSR Last_Item
    2 O% Y/ s: z9 d7 y- K
  2331. ;--------------------------------------------------
    1 @; }7 z# p% c0 [& C( U
  2332. Change_Select_Next_Item;下一个专辑
    ) s( p) H5 o# G( L. L5 F
  2333. LDA <Key_Once
    8 U9 F1 z# n; Z, W* [; `3 @; X
  2334. CMP #$04
    ; \; o/ i! S0 }& W: R; U
  2335. BNE Change_Select_Last_10
    2 f1 q: X; |* c# w  \5 Q
  2336. JSR Next_Item6 |8 G. N2 b, u. M6 L5 o
  2337. LDA <Music_Item_Cur
    8 ?$ j$ L& D  v1 e
  2338. JSR Get_Page_Start_Index9 Q5 U% f% j+ l6 h, {  ~9 _2 R+ }
  2339. ;--------------------------------------------------! ?7 o5 m5 _0 t
  2340. Change_Select_Last_10;前10曲
    " Z: [& F3 h/ h9 F; k
  2341. LDA <Key_Once
    % T; B' B. y* V0 D
  2342. CMP #$40+ R5 G4 y4 q6 B9 X5 Y
  2343. BNE Change_Select_Next_10# R, e1 F+ {  D  I& ~# F* q
  2344. JSR Music_Song_Last_104 q5 [( _4 H7 N
  2345. ;--------------------------------------------------" F) T4 N' v% c  v$ n0 X) k
  2346. Change_Select_Next_10;后10曲
    $ _/ V. q% m; b( o, I% d8 @
  2347. LDA <Key_Once  g+ t8 I4 w& X
  2348. CMP #$80
    $ F% o( ^' ~+ Z  r
  2349. BNE Change_Select_Last
      |9 [( ?9 Z' e# C& e$ q
  2350. JSR Music_Song_Next_10" j* P: r4 c( f
  2351. ;--------------------------------------------------8 T! e! c1 m2 V0 Z3 z
  2352. Change_Select_Last;上一曲
    ' f/ x" z7 b6 B+ {" ~. n- U& A& [
  2353. LDA <Key_Once& F$ d) {) `' |% ]+ Y
  2354. CMP #$02
    9 O0 g5 t" U/ d+ ?
  2355. BNE Change_Select_Next
    * m2 K) L/ h8 {5 R' Y; D: ~; s
  2356. JSR Music_Song_Last! I4 c; ]; u' r( ]+ u& ]! [( ^
  2357. ;--------------------------------------------------
    ) u; Q) z0 k3 I! c% D
  2358. Change_Select_Next;下一曲
    # Y' Y3 i" s  G: x4 y: l+ Z
  2359. LDA <Key_Once
    - M, q; V3 @7 }& u+ P: \' ]% ~
  2360. CMP #$01& a' ]2 {9 R3 k( _- @( m
  2361. BNE Change_Page_Next
    ' C5 w* f# i' {6 j4 P) r! V
  2362. JSR Music_Song_Next
    : u% z! |/ l% R" K% u
  2363. ;--------------------------------------------------. K. u# Z# @# K) ^, J8 _
  2364. Change_Page_Next;下一页
    & L- _  t8 z2 ~8 o4 y8 w
  2365. LDA <Key_Once! b  o5 v$ x0 b+ D
  2366. CMP #$20) ^" b/ F: v' k' Q4 `/ j( l
  2367. BNE Change_Select_Item_End
    & b& e! p& D- W4 L
  2368. JSR Next_Page
    9 Q( V- L3 v8 _/ i
  2369. ;--------------------------------------------------
    4 ~0 a  H; S' u
  2370. Change_Select_Item_End
    / {- }) Z' K  h* Q/ C5 E) t1 }
  2371. RTS0 }! \3 T! T% O2 J" r9 D
  2372. : x7 Y! Z" L! S) [2 N8 @% ~
  2373. ;==================================================
    8 w: w3 `1 n8 k( I
  2374. Show_Arrow;显示箭头光标
    ) G4 l& s( U$ A7 i6 Y6 l3 c" K
  2375. LDA <Music_Item_Cur. ^# Q, O# j. e+ o1 L/ X( J% n
  2376. JSR Get_Page_Start_Index; a+ V* r& B5 i
  2377. LDA #$00
    2 v' i0 E' z7 f
  2378. STA PPU_OAM_ADDR
    # Y2 @& k3 C/ s
  2379. LDA <Music_Item_Cur, @7 ]- u" B, l( a6 w' l
  2380. SEC
    8 z; T9 O" c  x' e* t+ l1 f
  2381. SBC <Data_Buf7 C; p8 ^4 y- Z5 s' c3 R* y
  2382. ASL A
    + q8 m8 S& k2 n9 U" e, j
  2383. ASL A  O8 N3 z# U2 k3 t5 N
  2384. ASL A. i  K* p+ B, L, f
  2385. ASL A& @1 r' A$ F8 l8 h" e. I: h* c
  2386. CLC; s9 c- N% i, J5 g6 b
  2387. ADC #ARROW_Y_OFFSET" [  j1 G9 ?* `' {- H1 W
  2388. STA OAM_TEMP_ADDR + $000 e4 O: F$ Q: q( \
  2389. ;STA PPU_OAM_DATA* W2 n3 w" t# I  l4 D$ `
  2390. LDA #$1F& r+ ^5 l! |. }0 P
  2391. STA OAM_TEMP_ADDR + $01/ g. P6 D6 d+ {" o
  2392. ;STA PPU_OAM_DATA  W7 s1 r! N" p, x0 t7 g9 N
  2393. LDA #$00* U" m& K: }  `3 c+ y  b
  2394. STA OAM_TEMP_ADDR + $02
    2 b2 Q# ^. V% V4 p
  2395. ;STA PPU_OAM_DATA7 m) W/ i0 I' V9 r9 I( B
  2396. LDA #ARROW_X_OFFSET
    ( p! [. L- z9 i9 R( Q$ L. R1 ]
  2397. STA OAM_TEMP_ADDR + $03
    % _/ h! a* d. \. ~
  2398. ;STA PPU_OAM_DATA
    7 c2 x. I+ F, s4 f, p
  2399. RTS: k: h1 s0 m$ T, I9 L
  2400. 0 _. p: J; E8 V0 ^' v
  2401. ;--------------------------------------------------
    # y/ g% a& a7 z' s4 W' P. `
  2402. ;命名表数据
    1 S/ t4 K2 e6 ~1 s+ R5 B  [
  2403. Palette_Attributes
    7 M6 k0 d3 `8 G6 r$ l2 k5 D, J
  2404. .IF SOUND_BAR_SHOW_ENABLE$ o2 v( y& ~% e$ w
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55. H! G8 B2 o' c: Y+ G5 K# p
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55( z4 l7 s: ]& B& @6 d: D, J( y
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75" z2 T0 q5 J" N; D& d" }$ |
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA& L! Z6 m+ g& c  Q; e& a; |7 ~
  2409. .ELSE
    7 |8 H8 L: N1 }; Q+ r! a
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    " q3 J0 _% C* C* Y' A4 F
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    ( i$ l* B: j; t+ A
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75- F" ?' ]& D+ f7 I4 V% q& Q$ n# D) @
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
    ( X+ y9 Q- a+ j' d# J: ~: ?5 U
  2414. .ENDIF
    ( u% \8 t$ R" E. @* @
  2415. : y$ g3 M. K/ E
  2416. ;--------------------------------------------------5 d# n9 N4 d( i+ J, @2 b$ T
  2417. ;调色板数据# a: p5 y3 `- P
  2418. Palette_Data
    ( V: N' Q1 Z1 e  j0 ^( f5 U
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F+ Q* V  I. T5 B0 E. d
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F
    . ]  V0 k4 e) t) K. a" @# p
  2421. 5 P7 Y# u* u. Q6 x5 p0 `* m
  2422. ;--------------------------------------------------
    7 c; b* n; @4 @6 @6 j$ Z
  2423. Static_Text_Data. I% X& o8 ^) R& Y5 v; ^6 @. R
  2424. .WORD Static_Text_Caption_Data
    - q0 ?+ Q- h* N" E  Q5 v
  2425. .WORD Static_Text_Author_Data
    . Y$ T- \! c' L* o4 b& D5 m
  2426. .WORD Static_Text_Date_Data
    % M/ n3 C! W- V( v
  2427. Static_Text_Data_End7 M, I! v8 {& D" v' i9 g( N

  2428. $ Y" k' M" l8 _$ n/ T+ L
  2429. ;--------------------------------------------------% V5 ?2 I* i9 M) x: o
  2430. Static_Text_Pos
    1 E! F, {; t! c8 z9 B6 u3 e9 w* Q5 |
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)
    # m. l+ m# R( W6 D+ D2 ~7 `
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos)1 I9 B" r3 t6 t( @% Q) ]2 D
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos)# R# o7 {$ y; L0 G4 D
  2434. Static_Text_Pos_End
    + I1 ?' ^5 ^/ e3 w0 ]
  2435. 2 z5 J: Q! \) y* \$ o' q& L) E
  2436. ;--------------------------------------------------# z5 B# U) n9 s4 Y( v' y
  2437. Music_State_Stop
    % C3 E" D8 A  p, P# w
  2438. .IF SOUND_BAR_SHOW_ENABLE
    5 B! k4 E3 }8 ?: g& n& w
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    # }& o) Y) w1 }. v- K: x
  2440. ELSE
    " g' F" M& O- q5 C9 [
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$004 U+ h  _$ Q5 P. k) j
  2442. .ENDIF9 r/ L. o. @  S* J
  2443. Music_State_Play+ \* U2 i0 w/ _0 c  n
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$008 A6 W% e! ]- Z  O

  2445. $ N  e& x& G6 P' [
  2446. ;--------------------------------------------------
    3 ^, T8 y. o7 s
  2447. Sound_Bar_Text_Data;声音类型文本
    % ~0 Z' r9 l6 [# g
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-"
    1 K, B" @& J2 O) y7 I2 J4 P8 K. A
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-"
    8 c: |2 U7 k+ L( ~- k
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-"
    8 k5 \+ F  V; }8 M) k; J! S
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"6 Z* }+ Q- p, d: f% X8 m  O
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00
    : c5 y6 }. ?/ d, L5 o
  2453. 9 E) f7 N* |6 j; N( C9 g1 t# M' }
  2454. .IF Track_Name_Pos# v# N7 `( e2 c8 g
  2455. 6 M, k" W& N1 P& X
  2456. ;--------------------------------------------------; |2 i/ v! K7 m) S+ M+ W0 e- _- m$ h
  2457. Track_Name_Addr_00;曲目名地址索引( e$ G( N: r: T* G1 t
  2458. .WORD Trackr_00_01
    , z! e5 T3 F  ]1 m) S5 W2 o

  2459. 8 ?- n2 |. t# J1 x4 q, [6 i8 r
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"8 y( r; w7 _/ ?
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"$ k# l$ \) L, y! @0 T
  2462. 7 n7 S, d, P+ }$ R: W8 j3 t- C
  2463. ;--------------------------------------------------
    6 ~* J' C, j2 Q$ H9 m+ S$ H; `
  2464. Track_Name_Addr_01;曲目名地址索引
    6 m* e+ n6 u9 x5 N6 J
  2465. .WORD Trackr_01_01* @- _* e% @. C$ r- z2 K+ `  O
  2466. 7 Q  c0 ?; L, N! Y5 w8 A
  2467. ;==================================================
    1 L! ?4 Y- r7 a5 A: m
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1"& q* B( S& j4 f6 l/ N
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2"& D# p6 |- q. C
  2470. 3 D9 [; `: B4 p
  2471. ;==================================================
    3 k/ A. ~0 m; `
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引
    # P) h- ?- [# @: c& v
  2473. .WORD Track_Name_Addr_00
    " S6 T( H* Z3 O9 m
  2474. .WORD Track_Name_Addr_01
    6 p: u! f# b* R$ }
  2475. .WORD Track_Name_Addr_01* u* e! Q8 L, T

  2476. # u3 A. S  ?) B/ h4 W3 v3 M
  2477. .ENDIF
    : K/ c5 K# b* J. ]
  2478. $ A; p; X3 K4 n5 J$ W8 q  X
  2479. ;--------------------------------------------------
    5 R- B- Z& V5 `
  2480. Static_Text_Caption_Data;静态文本数据3 ^7 z6 ]- {  Y' L. D
  2481. .DB 16
    & i. Z9 ^, w! K4 J! ~, f
  2482. .DB "FC MUSIC 12 IN 1"
    9 [" N  a/ W+ K) y- Q. p
  2483. Static_Text_Author_Data
    6 |- @) k8 r4 b$ p3 B9 u
  2484. .DB 259 }% R6 Y. Q( L
  2485. .DB "EXTRACTED BY FLAMECYCLONE"
    + r4 Q5 y' g; j2 ?
  2486. Static_Text_Date_Data+ C( Z( I0 r6 G% _8 a
  2487. .DB 10
    8 b/ K8 p1 s8 K# E! Q
  2488. .DB "2023.07.23"6 c$ X+ \5 C% K0 G$ b" q, N8 m

  2489. 0 }4 h0 n; B+ W- X/ V
  2490. ;==================================================
    % i$ j# g" S/ c' E6 h
  2491. Music_Collection_Name               ;专辑名间接索引9 S" _4 Q! p& V" X+ N" q% B7 P9 |
  2492. .DW Music_Collection_Name_002 R. s; }/ T; c5 Q6 ^
  2493. .DW Music_Collection_Name_01
    # `5 [% Y1 X, q' [
  2494. .DW Music_Collection_Name_02
    8 C) Z' {/ {  q  |
  2495. .DW Music_Collection_Name_03/ d2 D1 q0 ^2 F6 [$ Z* a
  2496. .DW Music_Collection_Name_04
    + D% y( K# k4 I8 E( ~" s6 H
  2497. .DW Music_Collection_Name_05
    # {8 }" Y7 ]9 m* r& H
  2498. .DW Music_Collection_Name_066 E/ s; q6 N# u( J* h# L* N
  2499. .DW Music_Collection_Name_07
    ( r! j; S6 Q6 Q. A& `
  2500. .DW Music_Collection_Name_08
    6 Q0 J5 t9 }) f' A; f, V6 v
  2501. .DW Music_Collection_Name_092 O1 K8 e. [, T& t8 [
  2502. .DW Music_Collection_Name_10
    . U1 k. L' W" t$ Z- `
  2503. .DW Music_Collection_Name_11
    / [: A0 ?& o7 o6 a0 X0 ^  E: S" o0 G

  2504.   d! ]  K8 u# H7 v
  2505. ;==================================================
    2 d% K4 ?% Z$ ?; [: ?
  2506. Music_Collection_Name_00            ;专辑名文本数据
    & Q, D2 |# y5 k# n' |; O; ~1 z
  2507. .DB 11,"1.RAF WORLD"7 O6 T+ s9 D  x0 \$ v8 a% {
  2508. Music_Collection_Name_01
    : _% j0 w" x5 Z$ U* O( }
  2509. .DB 15,"2.FINAL MISSION"* ]9 E$ B+ Y0 c# ^) }7 T4 {
  2510. Music_Collection_Name_02' d8 A  ~( K4 z4 D. g; `
  2511. .DB 06,"3.KAGE"0 u% w. ~4 m* N7 R
  2512. Music_Collection_Name_03
    * d" P/ Z0 q, i  ~+ q6 K. @
  2513. .DB 16,"4.DOUBLE DRAGON"9 b! @  f4 E7 {
  2514. Music_Collection_Name_04& p, H2 e2 U0 L* T6 G+ i) x
  2515. .DB 17,"5.DOUBLE DRAGON 2"
      F; T) J( _7 x0 H# S. Z
  2516. Music_Collection_Name_05
    1 y" x4 I/ B) n( l# R6 s
  2517. .DB 17,"6.DOUBLE DRAGON 3"
    $ A6 p5 ?. g; A/ F( ]& ?: a( B
  2518. Music_Collection_Name_06  L- J8 U( |9 D( c; t- ]+ B* \
  2519. .DB 09,"7.ROCKMAN"
    ( g' ~. x4 r6 Y# B
  2520. Music_Collection_Name_074 w9 Y/ I6 U; m) J
  2521. .DB 12,"8.ROCKMAN 2"6 u6 A& Z2 |" ]9 T
  2522. Music_Collection_Name_08
    ! f4 j( b+ }  {
  2523. .DB 12,"9.ROCKMAN 3"! c+ O3 A) i+ N' c7 l, o. Y
  2524. Music_Collection_Name_09, V* G3 t& U, A- i) A' V
  2525. .DB 12,"10.ROCKMAN 4"
    $ }% |; w: {# M: r" u7 l3 [
  2526. Music_Collection_Name_10, r- m- T8 `' V& W
  2527. .DB 12,"11.ROCKMAN 5"2 k( Y+ z$ m8 M* e! [* r5 M
  2528. Music_Collection_Name_11
    8 a1 V/ V) u- A( y
  2529. .DB 12,"12.ROCKMAN 6"( x0 ]) }5 u! N( p

  2530. 3 y2 F  n- A: _+ G
  2531. ;==================================================/ k2 F+ _# C( W7 C3 |+ u* s
  2532. Track_Name_Addr_Flag                ;显示曲目名标记& z6 c, i2 A) O+ d- F" Q; i% _4 C
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,0) U) I0 l! [- |2 W8 C; b$ I

  2534. - S! ?5 m9 k+ u8 K
  2535. ;==================================================2 i5 g" m# J/ ~. q
  2536. Item_Pos_Data                         ;光标箭头位置
    + A( V( |" F0 [3 s6 Q
  2537. .WORD ITEM_SHOW_POS( O; b2 P7 _" l2 P, H6 L
  2538. .WORD ITEM_SHOW_POS + $0040  ?4 Y+ b" m5 t- j: r$ I. `+ s. B+ `' N0 a
  2539. .WORD ITEM_SHOW_POS + $0080
    ! X/ U: T: g, L& r6 z
  2540. .WORD ITEM_SHOW_POS + $00C04 W' C3 M: q8 X
  2541. .WORD ITEM_SHOW_POS + $01008 @- K, V. |% k/ {# w! o+ n0 D
  2542. .WORD ITEM_SHOW_POS + $0140
    2 |6 e  a; ]$ o# Z9 N5 B

  2543. ; |  P5 D, c5 }+ M0 J
  2544. ;==================================================4 B8 [" z' [' b
  2545. Sound_Init_Port                 ;音乐初始化入口地址
    ) E) P- H- f5 j& b
  2546. .DW $BFC8* ~4 c7 ?6 l( Y- f
  2547. .DW $D7F0/ }5 e( R; A. `
  2548. .DW $9FC0$ O2 C7 m& {. f5 g- G8 s
  2549. .DW $BF70* y. `; ]% R+ K
  2550. .DW $8003
    1 F$ e- }: k+ S( _6 v
  2551. .DW $BF30
    & O" U5 r! @# n4 t
  2552. .DW $9003  K0 ^  a: P* I0 c* H9 r
  2553. .DW $80034 T) l4 t# \' Y1 V! n7 b) \: r6 d
  2554. .DW $80034 N% {& o  K# T; c
  2555. .DW $8003
    ) X% w2 u& e4 V3 n1 H, k* z
  2556. .DW $8003" u  w9 H* `) C7 w: y8 G8 i; Z
  2557. .DW $8003
    0 p" `  P, Y. c5 t, V
  2558. : v5 W2 X+ b" i* M
  2559. ;==================================================
    % C- i3 M  X& F* @3 y* p( R: f
  2560. Sound_Play_Port                   ;音乐播放入口地址
    # X# C7 H' I% Q% f$ Y
  2561. .DW $8000
    8 G+ a( [  s6 f- b/ F% z
  2562. .DW $8001
    & R! K  U8 r1 a5 r- X5 @! d
  2563. .DW $A000
    , _+ a5 v  T+ |" t6 l+ c
  2564. .DW $8003
    / L" M( y) u- r. j4 G' J2 a
  2565. .DW $8000
    # \) R* p1 B, z7 s; A
  2566. .DW $8003
    % H/ z& z& M7 d( R" ]) r
  2567. .DW $9000
    ; U4 T8 U6 {' _) X' _0 `
  2568. .DW $8000
    7 u; J2 ~& O. N; ?/ {
  2569. .DW $8000. f8 \" k* M! W. ?- ?9 x* r4 V
  2570. .DW $8000
    - P' k: v1 i/ ~' D
  2571. .DW $8000" i2 o+ g- z9 J+ Y- Q, s
  2572. .DW $8000# V7 k9 P% x- H$ b
  2573. $ L' g+ G' z# H. V8 V
  2574. ;==================================================
    " j. l! v/ i5 {0 z& N, v
  2575. Sound_Reset_Port                  ;音乐重置入口地址
    & U$ \% Z4 N1 h8 L2 q( l) N
  2576. .DW $0000
    5 m) S( l% z4 b6 X# J! ?. s( d
  2577. .DW $0000% a7 W. D% A$ _
  2578. .DW $0000; R0 K: E3 P" H: r2 s2 y+ a0 b
  2579. .DW $0000
    ) [# K0 l' }2 r
  2580. .DW $0000
    . L7 H: ?" ]3 c0 {
  2581. .DW $0000$ Q) ]8 w6 X& I- T
  2582. .DW $0000
    . G, W; k5 K6 U  Z* U) Y) ?: D
  2583. .DW $0000: a. J, G  m+ B1 r  J  |
  2584. .DW $0000
    2 J/ q, G: N9 w" U# @! h* W. u
  2585. .DW $0000
    , M7 X9 u) }/ Y
  2586. .DW $0000
    ' `& ~4 F. s) P9 C! j
  2587. .DW $0000% S$ T5 L' H# p0 _

  2588. + i( C8 C  N. R! _, i# C
  2589. ;==================================================
    $ w' ~% |% g  n. ]" V& C) @1 t# d
  2590. Sound_Total_Port                          ;曲目总数
    2 F% B+ d- I7 g' b) j$ ~
  2591. .DB 38- R' I% }! N7 Z$ ~" ]" A
  2592. .DB 33
    9 W$ ~: z3 d3 }$ D( f* N/ X. [% ~1 ^% V. U
  2593. .DB 491 N, S* m9 B$ V: C& t* U* B3 d
  2594. .DB 411 ^: A/ U- l+ f# o- [: ?. N5 n
  2595. .DB 83( l+ j; J; G& y! m% S- w9 ]
  2596. .DB 70
    * S; @- n9 [" v8 o$ d- t, l
  2597. .DB 50
    ) D0 J6 S# d/ _9 c& c
  2598. .DB 67
    ; b+ i. \4 J: [; Z5 ^+ h
  2599. .DB 57
    ( H2 c8 `6 @! ^" c
  2600. .DB 71
      i0 ]7 S9 k# P; ~7 ?0 B
  2601. .DB 76& ]5 z' w' t, y; v$ f$ {
  2602. .DB 102" ?+ r9 Z/ g5 j  G, K9 ?
  2603. 5 P" s! e- O1 H( J, i
  2604. ;==================================================
    ( U7 b/ `, @6 g9 f- q$ J
  2605. Sound_Start_Port                      ;起始播放曲目4 `. H9 {7 ~8 X) `+ W+ w
  2606. .DB 00
    1 g0 c0 L6 s$ W2 Z6 d
  2607. .DB 00
    1 R, b0 O$ U' K; w0 g4 v
  2608. .DB 00
    * _% M0 J. x! z$ T8 L
  2609. .DB 00; ~$ a. R8 c2 ]' @5 X9 a6 s- q; l/ a
  2610. .DB 00  N* ~( s9 d$ q. Z1 ]2 m! k( S
  2611. .DB 00
    % ]' x5 @+ r9 z. o4 J
  2612. .DB 00
    ; D: t- u! _/ P/ t* n3 h8 l9 ?
  2613. .DB 004 O, {4 p" N* e" J, D) P
  2614. .DB 00
    9 s: |8 e, ~" s6 e
  2615. .DB 00) X3 V) q' i* x8 b( M( X" Y
  2616. .DB 00
    4 t# Z! \& W* m/ O% u* _9 }. E( S
  2617. .DB 005 r5 Y! D4 k0 D

  2618. $ R$ s: o7 n% n! w& z
  2619. ;==================================================% C1 a7 N0 {4 i4 C
  2620. Sound_Bank_8000                      ;专辑bank_8000
    , s. n! l, |4 m8 ]
  2621. .DB $104 Y  V0 W, A, Q: l# F
  2622. .DB $12
    0 r( ^% B$ }, ?) J  E
  2623. .DB $145 ~2 @  ~/ w. Y  c( Q$ U
  2624. .DB $16. `6 ~; B. D1 f+ e
  2625. .DB $18
    ; x2 Z4 Y: p9 ~: e& b  ]6 [! V
  2626. .DB $1A
    ' {+ o; c, j# C4 ~3 L$ z, J0 r

  2627. $ G3 x* ^. v3 S( E+ r& d
  2628. .DB $005 P: K2 g+ r$ R. `
  2629. .DB $02
    # e) T5 H. k# G! F# c: I- w% r
  2630. .DB $0D# Y. Y5 C* i0 z4 a( R& t2 X  F* o6 l
  2631. .DB $04; }% }& ]+ d5 ~6 W$ {3 _
  2632. .DB $07
    " U) Y. }  h. k+ g7 _
  2633. .DB $0A
    - c0 D$ a, S- s2 T

  2634. . o% F# `* i1 M1 m6 j0 |$ w
  2635. + \' D3 q* H3 i, t  E0 v; `8 Y
  2636. ;==================================================4 Q( ]2 i& p+ n' P8 a0 L% P$ j
  2637. Sound_Bank_A000                      ;专辑bank_A0009 t# z0 t# w' K# C( y
  2638. .DB $11
    ' x+ B2 [, A3 ^( I$ n
  2639. .DB $13
    - j, N/ ?( E- g6 E8 ^  ~0 k" c
  2640. .DB $15
    7 `6 Z' x9 |1 v
  2641. .DB $17
    1 u9 @" ]! j/ w) q8 o
  2642. .DB $194 }: a+ |2 U& m0 E4 Y
  2643. .DB $1B
    5 q0 w+ I9 y9 f

  2644. : J+ D+ {3 _4 D; t
  2645. .DB $01
      N4 E) c* ~; d" F% e
  2646. .DB $03% A6 o0 J, ~* g4 Y% y. k/ W
  2647. .DB $0E% g. }# a& G. O$ h7 C
  2648. .DB $05
    4 A# `4 [6 g) ~
  2649. .DB $08
    , e. F% O8 f- B
  2650. .DB $0B
    ) ?, a7 Z8 R4 x$ m# t

  2651. : d: w) |% s! N
  2652. + f' H  x5 Y# @, m, V
  2653. ;==================================================; T5 k0 [! M8 D& ~) Z& I
  2654. .BANK RESET_BANK & BANK_DATA_MASK  v% U3 d7 c1 w- Z% T2 m# T
  2655. .ORG RESET_ADDR
    + x% y) P4 |7 i6 c

  2656. - @5 B+ u2 }7 i1 E7 n8 \
  2657. ;==================================================
    9 z' f! M2 n1 {2 H* h' m
  2658. Switch_Bank_8000;切换bank到8000-9FFF3 x& K+ |6 V/ \7 T  B0 U$ s5 r! i
  2659. PHA
    + K/ |) `( p* ?9 o( f$ l
  2660. LDA #$06/ W! N# v+ F' [" p  M7 X
  2661. STA MMC3_BANK_CTRL
    8 t) d3 K. Q9 u5 g& H, Q
  2662. PLA
    0 K) X. b8 q- U1 p/ @
  2663. STA MMC3_BANK_DATA
    + n, R6 z3 A" e. I
  2664. RTS
    8 V' t3 w- p9 J* u- N

  2665. - }) z2 [- W: K, b* ^
  2666. ;==================================================! i8 M. e7 N* F, v: G
  2667. Switch_Bank_A000;切换bank到A000-BFFF
    ; f7 q+ l! W/ w
  2668. PHA3 ~, g( _; X2 |* {& }1 m
  2669. LDA #$07
    % y( |* e! r6 N7 N7 h! e
  2670. STA MMC3_BANK_CTRL
    6 Q0 l( J3 p1 f
  2671. PLA
    # U4 l/ @& q8 E8 s* F& b
  2672. STA MMC3_BANK_DATA5 R/ J; y3 y. ?$ `
  2673. RTS3 c3 K3 ~/ y" V4 a% N+ U
  2674. * N2 M2 }, a4 g& i8 `/ A
  2675. ;==================================================0 }: H( r- l. q7 i0 ^& @
  2676. Switch_Main_Bank;切到主程序bank2 k2 k  P- c! f( ~! W, J
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK% H) q# Y" l1 U3 K
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank4 d0 |* h; W+ B% }
  2679. RTS
    " @' f! P+ K* M5 o% L

  2680. 7 z( s" K  c$ Q8 L& a0 W
  2681. ;==================================================
    + ^/ L9 j6 \! g. D' H% `0 }
  2682. Sound_Reset;音乐重设(如果有的话)/ t. O6 u* k. L4 B, I
  2683. JSR Switch_Music_Bank  ;切换到音乐bank
    / S6 O7 g. H3 _! n- P
  2684. JSR JSR_Addr_Op        ;执行音乐重置( J2 `6 F+ ^0 b( T5 v( s
  2685. JSR Switch_Main_Bank   ;切回主程序
    - O/ I5 v4 W) C0 ~+ C6 u2 Z
  2686. RTS, B! F; X- N4 y0 I+ ?: v) u
  2687. 6 q; M3 q- b* r$ ^! a' x1 \2 ~
  2688. ;==================================================& z- a) `+ N( |& Q! g  {0 x, z
  2689. Switch_Music_Bank;切换音乐bank& t- v4 F  v. z& x" R8 y
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号
    . H1 Z: o; I! i2 d* ?
  2691. LDA <Music_Bank_80005 l* K- C% M7 k' k
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank) Q3 q* [, A; R7 e7 H
  2693. LDA <Music_Bank_A000; Q6 R; V0 N$ }
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank: }7 b$ [6 L6 a& |
  2695. RTS4 _! K- s  o' {5 K1 H2 D" r3 \) Q
  2696. ! V( `6 P: y* y" P8 z
  2697. ;==================================================- f. w  p% t8 ^/ [
  2698. Sound_Init;音乐初始化& D/ j& Y/ s6 A- U$ i, D
  2699. PHA1 E0 W3 O2 r2 {$ A! p
  2700. JSR Switch_Music_Bank  ;切换到音乐bank! X+ y1 H8 Q* l# i# O% ?/ ~
  2701. PLA3 R, ]0 J( i/ d* E
  2702. JSR JSR_Addr_Op        ;执行音乐初始化
    7 K2 M3 m4 h( g4 ]# n8 i7 _  v. r
  2703. JSR Switch_Main_Bank   ;切回主程序1 c* n/ i8 l# L" k$ ~
  2704. RTS' k1 _7 h1 Q: o
  2705. 9 q2 o0 {2 G0 Z& V7 o% \& `- _! o
  2706. ;==================================================8 @# }3 s) W1 n2 \8 ^" z
  2707. Sound_Play;音乐播放
    9 @# w0 B) O% Z0 z8 N! V% @/ p
  2708. JSR Switch_Music_Bank  ;切换到音乐bank2 D3 ^# B" x; p* K" }
  2709. JSR JSR_Addr_Op        ;执行音乐播放- `4 Q& H) ]6 D8 G3 w/ \
  2710. JSR Switch_Main_Bank   ;切回主程序
    ; p1 s$ w# Q/ I( i
  2711. RTS; |  i4 i/ |! P, q- t) _
  2712.   U, T1 p; \) @7 m) b  I3 X) m; D5 @
  2713. ;==================================================0 d# k# g) O# m+ n- {; Q: V# _
  2714. MainLoop;死循环3 t& v4 [5 x1 a7 x/ {5 K7 T
  2715. JMP MainLoop
    4 m( S% ~* u( n9 A3 d

  2716. , O( y( l( a2 S6 P: b  e) d
  2717. IRQ_SUBPROCESS_JMP = 0" |, m/ h; a9 g& Z

  2718. * R" D  u# Q( p& B, g, _# V
  2719. .IF IRQ_SUBPROCESS_JMP
    ' a; w: f& c  o6 r, d
  2720. ;==================================================
    $ c; g' {: G4 W* v- [
  2721. IRQ_Process_0;IRQ处理过程0: i$ w! q6 L. V$ h
  2722. + |; a# e7 Q) g
  2723. ;15条扫描线后触发IRQ' O# ^4 v- y8 n0 w: N2 ^
  2724. LDA #15
    : [& }- v) u5 {9 a3 c2 E" ~0 s
  2725. STA MMC3_IRQ_LATCH
    ; V. n/ `+ z. W; X# B8 r
  2726. * p. D4 I5 z4 |! J, a
  2727. ;设置屏幕滚动; b. [! P3 \8 M: A& M+ T3 y' w; v
  2728. LDA <Scroll_H
    : |1 W" n4 l) p5 F
  2729. STA PPU_SCROLL
    0 j5 j9 _, _, O1 |8 \9 \6 k
  2730. STA PPU_SCROLL
    6 o' L6 O6 M( i3 D

  2731.   q, y  X$ d* E, g: Q; q$ i
  2732. IRQ_Process_0_End
      V( q/ ~; t" H  P
  2733. INC <IRQ_Process_Index
    & V8 b3 ~1 g$ A  C" c$ a3 }
  2734. JMP IrqProgramEnd
    ; j. n2 ^; D- C5 S  _0 b* l7 @

  2735. 0 ^5 ]3 B& M) s& u
  2736. ;==================================================
    3 ~: Z& v3 K# _, V( f
  2737. IRQ_Process_1;IRQ处理过程14 ?8 i& t3 G1 F# |
  2738. ; N1 M* I0 {3 w! [
  2739. LDA #551 y4 k3 R9 z7 j" ?) @8 A
  2740. STA MMC3_IRQ_LATCH
    + \' `9 L4 V. B, J2 Q
  2741.   {4 R: }( E& ?# b/ j% }
  2742. ;设置屏幕滚动5 ^7 A+ U/ x; ?& Z6 m. x  Z" m9 a
  2743. LDA #$008 t" m7 G& \/ T
  2744. STA PPU_SCROLL
    + Z- N8 c5 n* z  j; W% V
  2745. STA PPU_SCROLL
    , |! e. ?  O0 V% s9 p

  2746. ( }7 R; A7 i+ @: _
  2747. INC <IRQ_Process_Index
    . K2 h; p) ?$ l0 O# `
  2748. JMP IrqProgramEnd
    " |  {* |3 I! U  o- s
  2749. 5 `; A( T7 U* \/ C: g7 M9 i
  2750. ;==================================================
    0 c. s- D& }2 R- s8 Z' [
  2751. IRQ_Process_2;IRQ处理过程25 v+ I; D0 M' s
  2752. 2 {! h8 m! D. ]% _
  2753. LDA #15
    " ~" G  U6 D* D' g
  2754. STA MMC3_IRQ_LATCH% ~& U% z' q3 y

  2755. # R) I# I- f# l6 S/ k7 l  w; X
  2756. ;设置屏幕滚动' c* V5 E! p4 C& q" Z! T  ~
  2757. LDA #$00
    2 k: X1 t6 J: j4 d' i) r2 b. x  a# _
  2758. SEC
    ! N/ X) z, r: G. a% S
  2759. SBC <Scroll_H
    - c0 `" M( q* I
  2760. STA PPU_SCROLL
    9 j, E" v* e1 Y& n4 `1 M. [- q
  2761. STA PPU_SCROLL& G2 R# f! w) N. e/ v- d, i3 E

  2762. 0 Y$ [4 L9 T. D! w- p" t& h, u- a
  2763. INC <IRQ_Process_Index
    2 R$ M1 M7 x% _. u. f
  2764. JMP IrqProgramEnd
    ( G: ^& ^. i- f# P
  2765.   G& w; h) h# S
  2766. ;==================================================3 ^, Z1 X, @( t8 j9 r9 H6 g
  2767. IRQ_Process_3;IRQ处理过程3
    6 s2 }. K! Z4 z7 N
  2768. / P. e# M7 H; P7 R( b2 F4 M
  2769. ;设置屏幕滚动7 V' F7 V3 \, P( r" H
  2770. LDA <Scroll_H  y5 k- F; \" j/ d( @- H$ T  o1 d; j
  2771. STA PPU_SCROLL+ ]* ~1 h1 U% s9 T( n
  2772. STA PPU_SCROLL/ ^/ g& E5 o. J- }
  2773. # Q& y* G! o* ?  R& x  c
  2774. ;禁用IRQ9 ]: L0 @5 Q4 d; ]* n. H
  2775. STA MMC3_IRQ_DISABLE1 l* p8 w0 I, w1 F# t
  2776. JMP IrqProgramEnd
      v4 v" V% D9 Y9 V
  2777. " R3 L& n$ |, s% g% F: j+ z/ p+ Z
  2778. IrqProcessAddr
    5 @3 T4 ^6 p6 B4 |; o5 ?
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_3
    + c, e0 C# N8 ?+ l6 l6 t$ A7 g' m
  2780. 1 V/ v5 I1 [' Q' ]. ~" M
  2781. .ENDIF
    ) ]% `) f! z& h  U( l

  2782. - Q1 L7 W( a" X8 @2 h* s# o
  2783. ;==================================================5 K4 u1 n: S7 h8 A; S4 {; ^4 G- e8 b
  2784. ;IRQ滚动模式常量
    - X/ @0 P9 @' o( |) Q' Q/ C
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动
      N8 p! R- ?5 i" Y2 s- e
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动
    8 U' O' N! v- V/ f# @
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动% m( V# X$ H7 ~. n0 t. ~/ t
  2788. ! v& F. T+ ~7 q5 Y
  2789. ;IRQ扫描线数据5 N; X$ F# ?( c, v/ A9 u$ ?/ m
  2790. IRQ_Scanline_Data
    " _: l. d5 l# X! c& B
  2791. .DB 8
    / Y) E0 Q- p, S$ s$ E
  2792. .DB 54, o% x. \$ ^7 M8 H
  2793. .DB 8
    3 x/ e' Z& D, P. s
  2794. .DB 00 ;关闭IRQ1 ^% @  C* G1 j* t: U) d# r

  2795. ' e0 j* H4 c$ p: K
  2796. ;IRQ滚动控制模式
    7 f+ v$ h- i) T3 n# [
  2797. IRQ_Scanline_Mode: F5 J6 x! U: N; u* x
  2798. .DB IRQ_SCROLL_MODE_ZERO
    5 ], e/ O( o" `% o
  2799. .DB IRQ_SCROLL_MODE_ZERO" l+ Q" O1 I0 I
  2800. .DB IRQ_SCROLL_MODE_RIGHT+ n: ?! f" `1 y: M4 P. W
  2801. .DB IRQ_SCROLL_MODE_LEFT
    ) L- S5 m7 w6 i! {2 u8 h

  2802. 7 C0 E4 j  s# e8 H
  2803. ;==================================================+ }% H6 }! q6 q
  2804. ;IRQ处理8 [; b9 P. r' j- ?
  2805. IRQ_Process
    ! B% H# D) Z( p: ^
  2806. LDX <IRQ_Process_Index
    ) g: K1 p+ p* Y' q- i% Q) J  I* D
  2807. LDA IRQ_Scanline_Data,X
    0 j7 T7 j, v: W' Y
  2808. BNE IRQ_Process_Latch8 N2 c( v3 A+ @+ [9 ]* S- P
  2809. IRQ_Process_Disable;禁用IRQ( ~; a3 V7 a: ?! t; F
  2810. STA MMC3_IRQ_DISABLE
    - J( [$ j" f5 z  ~9 d& s
  2811. STA IRQ_Process_Index* c. B7 ?+ N0 y
  2812. BEQ IRQ_Process_Scroll
    9 Y8 @. @5 _$ e( V3 t. c
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线3 K; D( p6 _1 P4 j
  2814. STA MMC3_IRQ_LATCH+ H- G; V/ g  A! L9 s8 K. W
  2815. INC <IRQ_Process_Index
    ; Q* z; h8 C& j& m) l
  2816. IRQ_Process_Scroll;IRQ滚动控制! o! X0 Z/ V; _3 m" x5 X, P
  2817. LDA IRQ_Scanline_Mode,X. G( i5 v6 k2 g" s: S! V
  2818. CMP #IRQ_SCROLL_MODE_LEFT
    6 W  T: n  e6 @. ~
  2819. BEQ IRQ_Process_Scroll_Left" _  x: ~9 ]0 n# R
  2820. CMP #IRQ_SCROLL_MODE_RIGHT
    ; V4 K8 U* j) x& [* T$ ]; n
  2821. BEQ IRQ_Process_Scroll_Right
    6 T; v1 C- l, ^1 Y% w: z: \/ w
  2822. IRQ_Process_Scroll_Zero;不滚动
    / m" x% y# u) w4 u) v8 [
  2823. LDA #$00
    # X6 Y" @" G% l2 e! d
  2824. STA PPU_SCROLL
      a7 n4 O% o& a$ J5 i7 V! ^6 i
  2825. STA PPU_SCROLL
    / y5 q% p" \8 L- v7 o6 J
  2826. RTS3 x' ?' Z+ J7 f2 y# c  Z+ W# u! P
  2827. IRQ_Process_Scroll_Left;向左滚动
      M; k$ e* y+ F) Q
  2828. LDA <Scroll_H
    / l! z# a+ }# G% ~0 i3 B
  2829. STA PPU_SCROLL
    * d' ]6 q. A" z$ j; v* Y8 y' Q: @
  2830. STA PPU_SCROLL. H* c6 U+ q! t, k3 i
  2831. RTS
    . h, c2 W0 l7 V5 A
  2832. IRQ_Process_Scroll_Right;向右滚动
    # K4 J5 C' Q# k
  2833. LDA #$00
    9 y2 H) Q4 e$ g+ C0 m" D( {
  2834. SEC
    ; R4 d+ P4 c# I
  2835. SBC <Scroll_H
    1 y2 ?0 W2 s& ?, U' V/ N7 E/ J9 m
  2836. STA PPU_SCROLL
    . z, R" v4 E% w3 O4 a$ l# V
  2837. STA PPU_SCROLL
    ; ~; ~/ P& U" _5 e) x! h
  2838. RTS) ~0 f9 v6 y. O# Y% f
  2839. 8 s/ N3 T# X5 D; ?5 H
  2840. ;==================================================! `: w( N/ V2 _+ A4 P/ w) e) W3 H- f
  2841. NmiProgram;Nmi中断处理
    ! t' s, E. D1 H* F
  2842. PHA
    9 i7 W1 ~' Y" P; K1 X
  2843. TXA
    1 o) Q  |5 P, ^  {6 k  x2 N% b
  2844. PHA/ Q2 B9 Q0 m- v& ]" \3 K9 R
  2845. TYA" l8 Y9 q, k8 k, J, T. g! H
  2846. PHA
    ( p1 Q1 G/ u7 @/ N
  2847. 1 Z& z3 c  g$ |1 A% ^* r* @3 G
  2848. ;读取清除Vblank标志, 防止重复进入
    ; l% ~9 m: K# t6 ]8 g) G7 a
  2849. BIT PPU_STATUS
    + D- f* i5 G# {1 }/ W, o5 X; A7 I
  2850. * q7 k% i6 z, x" j2 o" @+ @; H% |
  2851. ;切换主程序bank0 N2 T6 t) r. G, l
  2852. JSR Switch_Main_Bank
    % ^# X$ d8 ~# j3 y
  2853. + R  |# N% y) [7 u! T
  2854. ;Nmi处理
    + m9 ?! [2 @1 |
  2855. JSR NmiProcess
    ' T4 ^0 U# S* G0 a" o$ D" z3 P+ e; L

  2856. * w3 {+ k6 H9 t. I1 R
  2857. Nmi_Proc_End' L9 P% t7 l4 w- [2 m+ [  E
  2858. PLA. r; Y2 p3 l6 k2 R" ~: o9 r' ?
  2859. TAY
      E$ y+ Y, B3 U3 U+ {, H
  2860. PLA
    & l% f1 l9 ?! e6 g  ~
  2861. TAX
    5 c7 |2 v% j8 O& @
  2862. PLA* ?% t' I; X; v4 X8 f
  2863. RTI) {  U6 y# Z2 x

  2864. # K; k  ]5 s% y% r6 ?
  2865. ;==================================================' B  r8 c1 N. P
  2866. ResetProgram;重置中断处理& i, p+ O- K1 T5 c6 d9 g- j' d
  2867. SEI
    0 l4 @- s! F' H9 Q1 Q  |
  2868. CLD
    $ c7 V/ o. {  K! Q$ |
  2869. LDA #$00
    ' c% Q% i# b" Z8 x: z3 M
  2870. STA PPU_CTRL0 @$ t# E/ L0 g, g: l$ r
  2871. STA PPU_MASK: j) T. p" _5 |: o7 u
  2872. ( w; D0 a5 V6 u: M% E* c( S$ f
  2873. ;切换主程序bank
    . H* y% J" R( _5 n
  2874. JSR Switch_Main_Bank$ ]9 i7 l+ L+ S, v! `* _) g1 a
  2875.   E0 J# ~) e( N" W) T
  2876. ;程序处理开始
    1 y4 G7 Q1 A4 I' O, n3 F
  2877. JMP ProgramBegin
    % c/ \( e; P0 D) v6 L* O6 g8 i
  2878. - c. c- N# I7 I# p
  2879. ;==================================================) D; u/ O7 u! Y+ S" i+ J: g+ v1 f
  2880. IrqProgram;Irq中断处理
    2 c6 m, t6 ^+ |* P- t) W6 B
  2881. PHA
    7 P, }6 X, m% l% I" r2 Z
  2882. TXA
    0 b" d3 g6 o! Q3 \$ e& R" X8 Q
  2883. PHA9 [' z5 h' U5 m; g
  2884. TYA4 ^* |+ M! X  D9 M
  2885. PHA
    2 F! @; @3 P: [; P. Q  U, g
  2886. 5 I7 U  p5 Q$ @) f: q4 b) z1 W
  2887. ;关闭IRQ
    ' ]5 o; l$ ]1 a/ D6 @
  2888. STA MMC3_IRQ_DISABLE
    ' K( y: H1 g8 U

  2889. 7 \& v* g, H' ~4 @# O, P/ Q/ Y
  2890. ;允许下个IRQ触发
      H) j" R; r6 A* H) @: p1 `, Z
  2891. STA MMC3_IRQ_ENABLE
    8 J+ G4 f) X5 e: \7 t9 C' c/ A

  2892. 0 M6 O. o+ Q6 O) X. }
  2893. .IF IRQ_SUBPROCESS_JMP8 }1 |& I7 j2 S/ s. ?
  2894. 5 t( K' Z/ z1 l5 ?: C4 y
  2895. ;执行IRQ过程8 g1 A! {, ]  ^) x  T
  2896. LDA <Data_L8 ?) G- y5 o( |: ?& N' G3 N
  2897. PHA
    ! d+ e+ M& ^# D! ]  B+ B, a/ @! H
  2898. LDA <Data_H4 ]8 h8 A! P* G2 g2 z* u/ s* a
  2899. PHA' L$ p9 J) }) L! H; o/ p3 J
  2900. LDA <IRQ_Process_Index
    - V* Z! T0 d& ~7 J
  2901. ASL A
    . g- S  }) U* G. g
  2902. TAY
    ) Z+ G+ e, _, S" A1 Z3 c7 N4 R
  2903. LDA IrqProcessAddr,Y
    / O" M- t& Z! A5 k" ~$ r0 p
  2904. STA <Data_L
    " y1 r& N7 @9 ^. y
  2905. INY: Q7 n/ p# k  x. Y! f  u. T4 J
  2906. LDA IrqProcessAddr,Y
    ; d3 b# A# ~+ X2 W+ _9 z
  2907. STA <Data_H
    9 x% ~2 R8 {2 a
  2908. JMP [Data_L]) w0 J2 ^+ n0 ~

  2909. 3 q2 Z7 w  z$ s
  2910. .ELSE0 X1 j- B: _! V* k9 h( `$ l

  2911. / l+ N/ j' N5 X( I2 L
  2912. JSR IRQ_Process5 |/ R! q: w7 _" H+ V# S" t

  2913. : \/ k- U" P1 [' u1 a! L
  2914. .ENDIF/ C7 b7 S0 E; R0 m0 }$ {! @1 X
  2915. ( D1 E& L: }% D( K( ?5 c: F4 _; X2 Z
  2916. IrqProgramEnd" Q7 s1 W& u$ z$ y6 x
  2917. .IF IRQ_SUBPROCESS_JMP7 g6 b% O) E, Z  Z
  2918. PLA
    1 Y( O' k5 v" \4 y
  2919. STA <Data_H. S+ X/ ]: w" X& S+ w
  2920. PLA
    $ v: W% o9 d% s8 D
  2921. STA <Data_L( I% Z- @$ c0 p- \4 @, d
  2922. .ENDIF
    0 d% E* w& @2 L( j
  2923. PLA
    : U& C7 ^; ?. t5 O% `. l) |3 b
  2924. TAY! f* m, ~9 u8 B5 r5 A0 p- _
  2925. PLA
    ! B: d8 L8 s' P- u/ C& y
  2926. TAX
    ( O5 h- |. F; x. f" w$ P5 X* [
  2927. PLA7 d2 ^' T  }" j
  2928. RTI
    3 O0 p% F8 \' o- z! o# B' ]6 T9 Y; r  |

  2929. 2 O6 L' B" T0 o+ n" ~
  2930. .ORG $FFFA
    4 u6 O6 I9 p8 B
  2931. .WORD NmiProgram0 n! G* Q' H( V3 B" g: w: z8 ?
  2932. .WORD ResetProgram' ^, h, }/ |6 {, Z3 T
  2933. .WORD IrqProgram% v$ G1 X. |1 V
  2934. ) @* ~. n8 F- }! {2 X. l; t
  2935. .BANK RESET_BANK & BANK_DATA_MASK
    . w  [# |9 h! K! _; M7 Z( x7 o; L
  2936. .IF SOUND_BAR_SHOW_ENABLE. P: P. r& O' D; P" _
  2937. & H" o* }8 U, P: c5 o, d5 q* J0 E
  2938. .ORG $FE00
    ! _; F7 n4 j: K2 n
  2939. PHA2 _0 H* H+ c" f7 O' H
  2940. STY $07BA: k! u& A7 D- R6 M+ P/ D6 x
  2941. LDA #$8D, @" M0 I9 y7 q7 x( A+ ]6 C
  2942. STA $07BC! U& ?! U9 V7 `+ m. t1 ]9 k8 V
  2943. TYA) x* x# x6 p; t9 D
  2944. CLC
    ' i6 h8 M% g$ |0 h* l5 I
  2945. ADC #LOW(Sound_Bar)
    # x* P8 H& {( W6 l# Y
  2946. STA $07BD( F- B# w7 n7 {7 ^& U$ [9 B
  2947. LDA #HIGH(Sound_Bar)8 t4 T8 f" H' O* {$ D5 @6 ]
  2948. STA $07BE
    / v3 I2 x! Z# ?+ m- L& D
  2949. LDA #$60
    . }2 B7 p5 V, z0 H1 U
  2950. STA $07BF$ i( q1 M: w3 z4 w# m& x  l# g" R1 l
  2951. PLA
    1 D/ N8 t  R  [4 L
  2952. RTS" F5 _7 ~3 c( O' W$ F% q
  2953. " R* c5 X6 {# _' ?% K; g
  2954. .ORG $FE20: F& u0 d' M, v% ~) S$ I
  2955. STA $07BA
    / I1 I$ b0 x) A( M2 T  V. h* A
  2956. CLC
    9 T/ ?, I/ E' U1 X. t
  2957. ADC #LOW(Sound_Bar)$ H! ]; Z3 c+ h& W2 e' Y5 U
  2958. STA $07BD, l2 G# E3 k6 a. J8 U
  2959. LDA #$8D) W3 d+ [3 Q3 U7 e" u9 n
  2960. STA $07BC* j( M# [$ J" G3 Y6 ^# e# ]  ~
  2961. LDA #HIGH(Sound_Bar)" o/ N: H: U4 z& w% d
  2962. STA $07BE$ F9 m! u" r! ]& z5 G
  2963. LDA #$60
    % f( H6 g) v' @: N; ?
  2964. STA $07BF
    + h) S1 T- U% E3 X7 m
  2965. RTS  }7 F* C9 {  O# A# |* y8 m' c
  2966. " J  X, v& p' u. N' S
  2967. .ORG $FE40
    1 c5 E$ ^5 g, D6 B" i
  2968. PHA7 M5 G& }9 s# e# T- \4 e
  2969. STY $07F1
    % D, t" t3 z2 q# W0 q
  2970. LDA #$8D4 O0 \" n) f) b3 L% V( W! J
  2971. STA $07F35 Z% \# u9 N4 [" g3 p# v" U
  2972. TYA- A6 s* K: P  U& x7 P* p
  2973. CLC1 U, u* ^9 `, ^& j
  2974. ADC #LOW(Sound_Bar)! g4 Z3 G% P4 W0 I
  2975. STA $07F4
    1 ?7 Y6 k3 S  }  f
  2976. LDA #HIGH(Sound_Bar)2 H4 @& {8 e8 c4 F
  2977. STA $07F55 ]/ r, g& P. n+ X' q( k
  2978. LDA #$60
    : h! c' i& E* D: @
  2979. STA $07F6/ d1 X4 m2 a$ D8 R4 J
  2980. PLA
    6 i4 ?  E" ?5 I, Y' R% |
  2981. RTS& a! y/ u! v+ t2 P  W

  2982. : S( o9 s+ |6 O7 s, G! T' M/ h
  2983. .ORG $FE60! s; q3 q; C4 B( Z' U3 o& O' }
  2984. STA $07F1
      H. r2 y' P$ L# F* y
  2985. CLC
    + [6 N* u9 r8 i0 P3 L
  2986. ADC #LOW(Sound_Bar)7 P1 X6 d5 U8 F. E5 e
  2987. STA $07F43 v+ }* g# e6 n* p  p) {( m. G
  2988. LDA #$8D/ `0 q! w9 w: M& n; m
  2989. STA $07F3
    3 A, h" B) L; b5 W; ~/ k5 M
  2990. LDA #HIGH(Sound_Bar)7 D9 t# g0 C  m6 C0 J4 q( P
  2991. STA $07F57 r5 @3 F. Z: X
  2992. LDA #$60
    + A2 F2 @& t  _6 `1 E5 A
  2993. STA $07F6
    " r2 }' y; V  K$ N2 T' s
  2994. RTS
    # ^6 K. c$ A* O
  2995. : [$ ~. `8 h/ _" }5 v5 Y
  2996. .ORG $FF408 S1 }' M# B0 b! Z2 x
  2997. STA $4000. e# v) d6 r( ~8 e( |8 [+ n5 m
  2998. STA Sound_Bar + $00' t5 W& x8 Q3 r( H: |4 J! K  c
  2999. RTS5 V/ `( L2 i# j2 c
  3000. 4 C+ g6 [8 ?6 `# f
  3001. .ORG $FF48
    ' ^2 N( D, I) n- j) ]: K- T+ S
  3002. STA $4004
    9 W0 ]5 v. t& A$ t% C$ H$ Y6 f4 S
  3003. STA Sound_Bar + $048 W. c4 S0 g# w5 h# Z. O1 N
  3004. RTS9 m4 J" r- y  r9 @
  3005. . ?. J5 a3 H! c2 l9 p
  3006. .ORG $FF503 O3 n1 b* g$ {2 j( F( N/ o+ i
  3007. STA $40089 l( s6 ?+ k, r: j
  3008. STA Sound_Bar + $08; [6 p- v6 q( p
  3009. RTS
    7 ^! b) Y- R  g9 f& r4 _9 y/ u

  3010.   x1 K! F. C1 q$ i: W, C4 c- d
  3011. .ORG $FF58
    0 x6 k8 {; V; J$ w% b& N6 a, T
  3012. STA $400C, R7 N8 m' j; b! t
  3013. STA Sound_Bar + $0C
    & H: x2 @8 ^/ H- H& B
  3014. RTS
    & w3 U' F& C" v( N# B
  3015. 9 A0 d1 {9 Q2 N$ `5 L* d
  3016. .ORG $FF60& q6 G- N4 m& H$ @! s/ Z2 b% D
  3017. STX $4000
    / n7 D  }& U0 }; y5 I- y
  3018. STX Sound_Bar + $003 k7 L: B4 V) l+ O4 V6 ?7 _
  3019. RTS
    ; _2 Q5 l- s' F0 i, P

  3020. $ h# `3 e! d- p" T" E: o
  3021. .ORG $FF68
    ' w, U/ [& G# e, A. V1 X. s. ?
  3022. STX $4004
    ' r2 ^) u( q8 D2 k: @
  3023. STX Sound_Bar + $04
    ' B" y+ e  p: h
  3024. RTS1 u2 l7 {9 K- R+ s+ d! Y8 N
  3025. # q7 ]% ]/ H& p6 r, x
  3026. .ORG $FF703 \* T% J/ \! Z% v, e
  3027. STX $4008
    - B1 Z9 Z+ j3 X5 L" P. X: j. u
  3028. STX Sound_Bar + $08/ n. D8 C1 O% [1 I0 I
  3029. RTS0 r1 ]0 D0 O2 M" J. [) B: W4 C

  3030. - e. s" y& x  Z+ x- Q
  3031. .ORG $FF78
    8 O  B- v1 m: j
  3032. STX $400C+ Y% ^- A* ^3 o5 z1 u
  3033. STX Sound_Bar + $0C% M8 |/ w/ ~) U8 n
  3034. RTS
    $ \3 W" ]3 ~/ m; C
  3035. ( m4 ^1 ]0 X+ |5 ]7 g% o
  3036. .ORG $FF80
    2 ]+ ^7 a- Q2 S$ J: c/ F# L
  3037. STY $4000) A  V$ P/ u# @& |# r( g$ d. j
  3038. STY Sound_Bar + $005 ]. Z3 B. v2 [! [8 L! M: _
  3039. RTS8 T" w8 }. v+ a$ ?) G# l

  3040. , l8 F4 t% d" c% K% Y. j3 O. @1 F
  3041. .ORG $FF884 {  t$ u8 l$ B% S( s/ h! K
  3042. STY $4004
    : j& o2 _' B( F% ?) |9 o
  3043. STY Sound_Bar + $04
    3 t( O/ d! R" \
  3044. RTS
    ; f/ q5 w' `6 j/ J7 _* k; v
  3045. 4 s6 T5 N' F0 b8 T) z) D
  3046. .ORG $FF903 P& [, N. F* r- s2 E
  3047. STY $4008% B4 w/ L/ Z4 c/ l
  3048. STY Sound_Bar + $08
    7 d8 R: x5 w: o$ D& V; S& A, b
  3049. RTS0 m9 {0 M( Y1 }0 n! d/ p
  3050. . }$ [! F8 g. p. n2 W5 u
  3051. .ORG $FF98
    - E# s& z/ C# R4 ?4 n  j
  3052. STY $400C
    ' C& p( R" |4 s6 X+ o$ E
  3053. STY Sound_Bar + $0C% ~" O& p" q& Y  q( \
  3054. RTS
    $ u9 y1 ?$ k/ H2 D8 s. D

  3055. & [, c& b/ l; O$ A( T5 @
  3056. .ORG $FFA0. j4 R' p; q8 s, [  a
  3057. STA $4000,X, q' x5 \3 Q. x7 ]5 S& H% Q
  3058. STA Sound_Bar + $00,X. [* K$ t; t. ]$ v; Z  l. \
  3059. RTS: y; ]* {3 ^4 }  t5 B1 h
  3060. ! h/ z- V9 t4 r: R8 I/ @6 J
  3061. .ORG $FFA8
    % K- r' i. K- _1 x, `+ t7 }* N
  3062. STA $4000,Y
    8 n: ]7 p* x# g8 }) B
  3063. STA Sound_Bar + $00,Y
    4 h8 k* J' P8 ^, N1 |
  3064. RTS$ k& P! R# ?. a2 \+ h# V
  3065. ) K! {8 Y! Z5 P, w9 K
  3066. .ORG $FFB0
    * P$ c' P% l. z) P" a
  3067. STA $4004,X0 a  A. `0 U7 x, }! N, x/ i$ O
  3068. STA Sound_Bar + $04,X. i$ ?8 S; e. ]6 E/ w
  3069. RTS
    * D; P2 ^* D6 i- F+ j, Q. G7 P2 J

  3070. ! w' b' Z' C- Q8 e# B
  3071. .ORG $FFB8
    5 j/ Y. w3 e& o7 F7 H! c& a/ ]- c5 o
  3072. STA $4004,Y
    7 E% S/ b! p0 ^2 h. E; U5 d7 B( p
  3073. STA Sound_Bar + $04,Y. e; m' Z+ _. P
  3074. RTS
    6 m% Q5 B' E* T" i
  3075. , W& S( N. z  q7 B9 g4 i+ v8 X- y
  3076. .ORG $FFC0
    ) k6 r& i/ ~. C  Z
  3077. STA $4008,X, o* b  P9 B  k  T' F
  3078. STA Sound_Bar + $08,X
    " O& h9 o6 b% s+ u
  3079. RTS, ]( K9 i; r5 d! i

  3080. $ i2 \8 P  `5 p+ k1 h9 n1 q
  3081. .ORG $FFC8. @3 `, R  V8 }$ f. x7 Y
  3082. STA $4008,Y: d( X9 r: I% o$ |% i& N9 }5 k
  3083. STA Sound_Bar + $08,Y2 q9 E; j% A3 n4 c9 M3 i
  3084. RTS
    1 ~! D3 z  y7 o4 E) n1 ~! e+ ^

  3085. ( A' f0 B) h9 z2 X+ k1 h" j" V1 l
  3086. .ORG $FFD0$ z+ h6 |- N0 l# m
  3087. STA $400C,X
    9 B) [( q1 a; Z$ k  Z' x* I0 N
  3088. STA Sound_Bar + $0C,X
    : K1 Y& ^$ W' O* a
  3089. RTS! k: ~$ L* m8 C" M* w- Q9 O

  3090. ( J$ |4 W& [+ ?  H8 C
  3091. .ORG $FFD8
    * E' D( p7 k" e+ M4 }6 X
  3092. STA $400C,Y: `; W; \' w% a2 b3 O' i
  3093. STA Sound_Bar + $0C,Y
    : @2 |3 J5 ], K3 |% r
  3094. RTS2 E. J" k8 k  H( F6 \- ~2 b  T# J

  3095. . c- O9 A7 R# _; }* y1 D" m
  3096. .ENDIF
    1 p  N  b3 s9 r: R
复制代码
6 x3 _# K% F: S
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

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:34 , Processed in 1.106446 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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