EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑 . F7 H0 [7 o- a0 n0 E7 @5 w* X# f
& Y( T9 s" t% Z
[FC][音乐12 IN 1]
+ [$ ^% N5 W( ]/ m9 U6 S: \# G0 z时间: 2023.07.23
, W% `" L3 |2 b" ]作者: FlameCyclone+ n+ t+ ]. j6 n, K. q
0 e' x; u, C; V  K6 U( N7 l, O
收录音乐内容:
! b# n- `# J7 ~( j1.Raf世界& ]0 Q, g) v% D
2.最终任务
: m. s" m. ]+ N: z% |/ {3.赤影战士2 j' t- r% V* F( h- A. q. W
4.双截龙
6 g9 l1 E8 s2 z3 v$ O5.双截龙2
1 `9 l9 y% Y+ p; j$ r7 f6.双截龙3
; ~$ g4 F+ W" b' h, Y7.洛克人
6 C( D% c/ m7 l8.洛克人2( A% ?2 C& b4 X+ Q3 E! Y; d  n
9.洛克人3
1 c8 i) s+ j4 ?5 D* a10.洛克人49 b0 N: f6 R% B( T& `- O7 l1 [
11.洛克人5
! F& e# u. S; P  u12.洛克人6" t0 l0 Q4 ?7 e4 B- b
* s- R( n# g' D; \
操作:
1 r/ w  E5 H0 @0 K+ Y9 C上键:         上一个专辑' D0 v5 [1 |# C
下键:         下一个专辑
% R6 q6 ~% e: f0 R# E& k左键:         上一曲/ P1 Y% R( R) B) @% F) |
右键:         下一曲
- b, U+ d9 S3 u, eB/A键:        前10曲/后10曲7 J3 \' w, n) |) u9 n
选择键:       下一页+ J/ K/ t2 u, N, o7 c
开始键:       停止/播放7 x5 d) E& i3 a- s
( H4 R/ H' v0 y
http://flamecyclone.ysepan.com/9 j+ \  K# A  {4 R+ c  j
% ^1 b5 T% y7 c3 W7 K- l9 G
1 m8 e. l6 ^. h. i

4 k! w, s/ |; J4 ]
$ G5 c1 q6 @0 ^% L, v6 S0 _  \+ |
  1. ;[FC音乐][播放器模板]
    5 k9 I+ a2 H' t' \% F
  2. ;FlameCyclone 20230710
    ' ?  ]/ `. `6 p; E7 m# g8 |: i
  3. $ d1 U) @& W( `0 j$ i
  4. ;文件头, [5 h% i$ Y( F: n* w
  5. ;======================================================================
    0 u+ Z* v5 x+ X$ M
  6. .INESPRG 16                                             ;16KB PRG 数量, e" S; o2 D9 h% |3 Z: w# V+ k
  7. .INESCHR 1                                               ;8KB CHR 数量' K* [* \6 i1 N) o# z2 \9 M
  8. .INESMAP 4                                                   ;mapper 4
    $ n# a2 j7 \0 A
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直7 `3 J& ?) L; i
  10. ' x' R# D; g+ P+ I/ t% r) D
  11. ;==================================================
    ! Y2 I$ S. _) K8 Z1 ?$ T
  12. SOUND_BAR_SHOW_ENABLE       = 1/ b3 J1 j$ F, h' j* J! `; F: r
  13. ;==================================================: v8 T  t  M* f4 F
  14. BANK_DATA_MASK              = $1F
    - w! G$ T% T( T. K3 u4 V  P) H
  15. CHR_RAM_ENABLE              = 0
    2 j2 y. w, N0 o; i* B' D
  16. IRQ_SCANLINE                = 136, @0 u- R5 w% o: c" G# g( W
  17. ;==================================================
    ; O  Y6 y+ j9 _
  18. SOUND_DATA_BANK_00          = $00
    + e: a- u/ J, U" G5 d
  19. SOUND_DATA_BANK_01          = $011 t& d$ r. G4 z' a# u" U
  20. SOUND_DATA_BANK_02          = $02
    7 U9 p1 [+ D- z  F1 t
  21. SOUND_DATA_BANK_03          = $039 l: [5 K. |5 @. D( W# j
  22. SOUND_DATA_BANK_04          = $04
    & @0 j/ `; S6 |) L/ `
  23. SOUND_DATA_BANK_05          = $05
    0 ~" Z* ]  ^. }) q1 ]# P
  24. SOUND_DATA_BANK_06          = $06
    . `3 |0 o" l7 P$ R8 S1 f$ G
  25. SOUND_DATA_BANK_07          = $07
    " X0 o& D9 ~2 ]/ i5 v# e* q
  26. SOUND_DATA_BANK_08          = $08
    ) o6 e9 m) I0 C$ J5 C1 I, |( d
  27. SOUND_DATA_BANK_09          = $09- w, ?( c- R# {. G
  28. SOUND_DATA_BANK_0A          = $0A- e6 ]4 s4 ]6 ]8 h
  29. SOUND_DATA_BANK_0B          = $0B
    % g2 v8 t8 T0 K
  30. SOUND_DATA_BANK_0C          = $0C6 r' P0 K) c; w4 k8 F; H: n% ~
  31. SOUND_DATA_BANK_0D          = $0D% h6 |# ~6 P3 y) x  F1 Z3 b
  32. SOUND_DATA_BANK_0E          = $0E
    & k( p+ ~4 s  g8 C0 d7 Z" t
  33. SOUND_DATA_BANK_0F          = $0F$ c$ `+ i0 a1 j. w

  34. 9 T! o6 l3 d- l  W. n+ ?$ Z4 k
  35. SOUND_DATA_BANK_10          = $10
    , H! [0 A/ D  A/ M* k) v, |5 B2 F
  36. SOUND_DATA_BANK_11          = $11
    : Y! C1 }# {2 I; |" F/ q* J
  37. SOUND_DATA_BANK_12          = $126 m4 ~0 I' L& V. y- f" R8 s: o
  38. SOUND_DATA_BANK_13          = $138 }5 ]1 J- ?4 A
  39. SOUND_DATA_BANK_14          = $14) l- J/ X- |; `4 [6 ~% u4 }
  40. SOUND_DATA_BANK_15          = $15; R1 K# }4 W' R$ Q4 q1 T# O5 V
  41. SOUND_DATA_BANK_16          = $164 H& c( A, B' x( m5 x
  42. SOUND_DATA_BANK_17          = $17% }3 y) L) t  s9 B1 j
  43. SOUND_DATA_BANK_18          = $18
    9 [* B% y6 b; h
  44. SOUND_DATA_BANK_19          = $19
    # D8 L4 u' ]3 B0 g  q5 [
  45. SOUND_DATA_BANK_1A          = $1A
    . m' l) P% B4 M+ [
  46. SOUND_DATA_BANK_1B          = $1B0 h" Q4 v) n2 A% y# J% }* q, _% P
  47. SOUND_DATA_BANK_1C          = $1C+ T1 P' E! M! [" }: I4 L
  48. SOUND_DATA_BANK_1D          = $1D
    ; Y, S; P4 m7 h: A

  49. * g9 k+ |; _  X2 W
  50. SOUND_DATA_BANK_C000        = $1E. u2 K+ r" _1 H, v5 d1 P6 I
  51. SOUND_DATA_BANK_E000        = $1F
    $ j. {. j- n! B* |# m0 f8 U+ k
  52. ;-------------------------------------------------
    , |! o5 I3 a" H# t# q  U# d" r& A
  53. CHR_DATA_BANK               = $203 i. t9 t6 O+ v! Q- N
  54. CHR_DATA_ADDR               = $A000( o  \$ C! \) Q1 I8 M
  55. ;-------------------------------------------------
    / y9 Z" I" [/ S4 y! O1 h8 J2 `
  56. PROGRAM_BANK                = $00
      W; k6 s2 b6 s9 ]/ ]' ~
  57. PROGRAM_ADDR                = $80001 ^! e& C, e# {+ a" ?. B
  58. ;-------------------------------------------------
    3 M6 {# |5 _& n4 M& y: q
  59. RESET_BANK                  = $1F1 N/ A4 J4 m& d6 w
  60. RESET_ADDR                  = $FD00
      t, F' O$ [+ u7 {3 j
  61. 6 {3 i0 v- P0 ]- B3 e
  62. ;==================================================
    + i: y4 w1 [. }/ b
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数
    9 q- i. [* m: _. W, D7 J
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引( I2 d$ V- y+ p$ J
  65. PAGE_SIZE           = 5                     ;每页节目数1 h6 j" I6 W" i' k

  66. 4 ^9 O  H1 R# ?
  67. ;==================================================
    3 L' }% v2 @( H% `$ u) h, O
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除6 Z, Y% T* |, ~+ G7 F8 c8 o
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数" r: ^8 p! P% N
  70. .ELSE
    ; u; y3 F" h6 T/ l+ K5 t) F
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数
    - ~5 m* N) w% G5 _, I) r+ }
  72. .ENDIF
    - a) @+ f6 r, x

  73. 8 h& A3 t, P2 J/ Z3 V
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引' v: F3 k+ Y& p7 X6 j+ F

  75. : n! P1 p( y7 W+ j" R, @% y
  76. ;==================================================$ J) T# p7 C/ W  q/ y  r# j
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置
    5 |% ~, w3 `" r) Y) H7 `
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 2
    $ F9 \6 g! j; p1 g  K
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;
    9 v& Z+ _/ C# U) Y9 [9 m
  80. ;==================================================% B2 D" z" V: l# }/ W$ ^" e: R
  81. Caption_Text_Pos    = $204D ;标题文本位置0 k9 P% g! g1 H! k+ h0 A0 y
  82. Author_Text_Pos     = $2324 ;作者文本位置) t0 S% A; [$ A( V' k4 i
  83. Date_Text_Pos       = $236B ;日期文本位置
    $ u% K. |  d* V8 u8 g  u
  84. ;------------------------------
    " B7 V6 y! s1 ]) A& X
  85. ;------------------------------5 r6 f. q# _/ o  M; I+ B3 ~! O; _5 |
  86. .IF SOUND_BAR_SHOW_ENABLE# e2 z% \( K  H& s

  87. 6 F: g$ Y# P8 }. n" |  Q
  88. Play_Index_Pos      = $2273 ;当前曲目位置
    4 u/ [- `) L. d, r( t
  89. Play_Time_Pos       = $22B3 ;播放时间位置
    ; O7 i9 ^7 A) r4 w- H% i
  90. Play_State_Pos      = $22F3 ;播放状态位置, |6 T5 q5 }* M6 v

  91. 2 q0 Z4 t, Y0 C
  92. .ELSE
    / {2 g& x  Q+ Z8 {% M5 P
  93. # |" z- ]' Y6 Z& B: \7 O3 n0 x
  94. Play_Index_Pos      = $226C ;当前曲目位置% l) X! v+ C2 X4 n3 }. G
  95. Play_Time_Pos       = $22AC ;播放时间位置7 n) C  R$ [6 u6 t: l+ ?
  96. Play_State_Pos      = $22EC ;播放状态位置% W$ L0 m0 O( d! u9 U% z) L6 n1 L

  97. 9 |$ {, t9 [4 Z& k
  98. .ENDIF  f' @. |5 W' ~6 v5 c8 N
  99. ;------------------------------
    4 O- f! Q  Z) ~' a& ]
  100. Track_Name_Pos      = $222B ;曲目文本位置
    4 X0 P1 m, T. ]5 `. u+ G- Q
  101. ;Track_Name_Pos      = $00 ;曲目文本位置
    4 o1 S; B5 d0 Y! s# u. w) X
  102. Sound_Track_Pos     = $2265 ;声道文本位置
    7 }* s! G+ H$ i0 P( w
  103. Sound_Bar_Pos       = $2269 ;音乐条位置- ?, L3 Z4 d: j5 T
  104. ;==================================================
    * |/ R0 E+ R! b. _% o0 {
  105. Scroll_X = $00' [% M, J4 m( |  d- R+ Y: j1 b" c
  106. Scroll_Y = $00
    ! ]. u1 w! w% l0 u% {$ l8 d% I' J
  107. ;==================================================+ s) ?: f. [* {4 }8 N
  108. Sound_Ram_Addr_1       = $0100
    9 C! Z  y  U+ |( y' R( M/ L6 p
  109. Sound_Ram_Addr_1_Size  = $802 K3 d/ \& G5 p2 g4 ~
  110. Sound_Ram_Addr_2       = $0090
    + S" B0 T) P5 d5 D
  111. Sound_Ram_Addr_2_Size  = $70
    % P& \8 F. U- {8 H# R& m
  112. Sound_Ram_Addr_3       = $0700
    ) o* r4 [9 c- ?, k3 [+ T
  113. Sound_Ram_Addr_3_Size  = $002 r$ G0 h" {9 X- H+ X, u$ K1 Y
  114. Sound_Ram_Addr_4       = $0400
    3 G/ V$ i+ Z1 m3 y8 z! o% q# ~
  115. Sound_Ram_Addr_4_Size  = $00! t# l2 V$ \% b4 R7 F
  116. Sound_Ram_Addr_5       = $0500
    2 U2 z4 }3 I  a5 s; t1 b% F* h; ^7 ?
  117. Sound_Ram_Addr_5_Size  = $40
    + @( g( N. x9 o* R; \
  118. 2 g6 {7 J/ o! A! o/ ]9 o. x$ d7 D
  119. OAM_TEMP_ADDR   = $0300  s: ]/ S6 D% A7 b+ s# S3 u

  120. , L6 ^) o& }, Z# J6 J# O  s
  121. ;==================================================4 U, x  K/ f( W  D2 N$ M$ Q
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器
    $ T% U( A  Z3 d
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器
    8 w( N1 ?3 i  f9 v2 @$ C) s
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位  C. X0 S' g0 P/ z/ C, ^: C
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加12 f/ B+ [6 w7 d3 C3 G
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加1
    2 O. P" p, v. o- m
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器 % T: @) _+ s8 m4 H1 i& y
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加
    : l; i; d2 |/ X8 f
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32
    $ O9 M- O. B, j' Q
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存
    / D% \: @7 n0 S' l' {$ Z* L9 C
  131. APU_STATUS              =   $4015   ;声音通道切换
    . R4 C3 D  z. d& I: X
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通9 F% [' l8 F9 L- b3 P$ {" b
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通
    ) j9 t+ {/ E: k8 m5 m
  134. ;==================================================
    7 S( z' N7 i  L! @
  135. MMC3_BANK_CTRL          =   $8000  B4 V2 {, E7 G- e: e* N
  136. MMC3_BANK_DATA          =   $8001+ o' s1 H$ s; ~4 ^! J
  137. MMC3_MIRRORING          =   $A000% U4 ^7 t" h1 C7 M* Q9 g
  138. MMC3_PRG_RAM_PROTECT    =   $A0010 j$ k# f, y' Y
  139. MMC3_IRQ_LATCH          =   $C000
    5 f/ f/ ]( }& u/ j
  140. MMC3_IRQ_RELOAD         =   $C001! e0 m' D' K! P* Z
  141. MMC3_IRQ_DISABLE        =   $E000
    . p/ E  F0 q; D! a0 p( z  I; e1 b
  142. MMC3_IRQ_ENABLE         =   $E001' B& {' b7 s0 Z5 e. A3 c  A& p9 e

  143. & ^1 ?  G) W8 \+ c* M" N$ |, u
  144. ;==================================================+ I9 L7 A/ L( g9 t! x! Y6 @
  145. PPU_Addr        = $0200- y' ^/ e/ w' a( o/ A
  146. Palette_Addr    = $02C0
      x- w$ F6 u( j' h% t
  147. Sound_Bar       = PPU_Addr+$E0
    - S6 ~8 l+ N6 |" {; A
  148. ;==================================================
    ( I/ V% d! q: j- }2 o2 r
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D
    4 |3 K9 Z' a3 D8 t- G
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$11
    3 f  y: u! G6 `, @& r- n! ^  X
  151. PALETTE_UPDATE_MAX      = $2C
    0 H! O7 @3 ]+ Y* F
  152. PALETTE_UPDATE_MIN      = $21
    1 i7 B' l* i: n
  153. PALETTE_UPDATE_INTERVAL = 60
    3 U" A# u1 F" B
  154. ;==================================================0 X0 [0 z8 j% ]& C
  155. Sound_Bar_Cnt       = PPU_Addr+$F0. R% @1 }. V' B* Q5 h0 {( \
  156. PPU_Cur             = Sound_Bar_Cnt+$02
    1 E* J. D' i# ?0 v
  157. PPU_Addr_H          = PPU_Cur+$03
      ?: Y" H! i  ?4 c/ O) G: A# g$ p
  158. PPU_Addr_L          = PPU_Addr_H+$043 U" r/ [8 v! {0 e$ L# V9 Z! a
  159. Screen_Ctrl         = PPU_Addr_L+$01
    $ w* Z& j4 u. i+ E) k3 K) u1 N( K
  160. Screen_State        = Screen_Ctrl+$01
    : E% G  `* }5 P) L/ \4 A
  161. ;==================================================% `+ E1 \3 i6 e: T) E9 L
  162. Use_Ram_Begin       = $501 D( t( o8 H, {- }; {
  163. ;==================================================
    % Q9 N' @* Z" y
  164. JSR_Addr_Op         = Use_Ram_Begin. i7 S  W% N( K" P& W. z6 \
  165. JSR_Addr_L          = JSR_Addr_Op + $01
    2 w5 L0 t+ H& I; x6 j2 M
  166. JSR_Addr_H          = JSR_Addr_L + $01
    % S3 S7 t$ t1 q) H) z7 b6 u
  167. JSR_Addr_Rts        = JSR_Addr_H + $01( z9 U0 s7 N( [4 x4 Q
  168. Data_L              = JSR_Addr_Rts + $012 R, Y; N! @, n- O- o" d) g% e
  169. Data_H              = Data_L + $01
    % `( z2 o& f6 R/ q# C  u: Y
  170. Data_Cnt            = Data_H + $01
    2 [$ O9 \6 _! t# X) e
  171. Data_Buf            = Data_Cnt + $013 [  o3 Z; S4 n1 }0 J: B- A
  172. Nmi_Time_Count      = Data_Buf + $01) X% }( a. @' e6 Y- \3 S: ]
  173. Time_Wait_Cnt       = Nmi_Time_Count + $01
    4 k) {: ^* o. o* e2 @( K
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $01( V2 u2 s" s" O* ^3 t7 ]% x7 n. g4 q

  175. ! T4 a# v! F. O: o; p% J/ B
  176. ;调色板刷新标志1 {& P# {: \1 `9 C) m, [8 ]7 g
  177. Palette_Update_Flag = Palette_Wait_Cnt + $01
    6 o2 [+ }' ?( n/ B4 y" R2 j
  178. ' `1 m- b7 D3 F% Z! ]$ T
  179. ;当前帧文本写入禁用标志( M) {3 K: U- w. e% x3 O! `
  180. Text_Disable_Flag   = Palette_Update_Flag + $01
    ) x- i* m. ]  A
  181. * a, T) c0 s& O- R) u; t
  182. ;==================================================
    3 Z, r2 _5 o2 R/ R, Y: t  V
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动. N( Z( C$ j% O* f# p2 ^
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条
    " A2 _+ M- n& y& r1 {6 b5 [
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间
    $ J' E# o1 s$ {! k5 ^" a2 a
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间: l- q  j! ^6 z+ T
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间! S5 H1 B) P- a2 d9 [1 x
  188. ;==================================================
    ; f  M& q% R. x9 u! g/ N
  189. Key_Keep            = Text_Disable_Flag + 1
    & y; B- P" K  C
  190. Key_Once            = Key_Keep + $019 p: |3 W) ]/ ]0 H- T
  191. Key_Kemp            = Key_Once + $01* }3 [; e9 x6 I3 A8 \. j7 V
  192. Key_Temp            = Key_Kemp + $013 T+ [9 f/ F* e- ?6 U) c
  193. Key_Getv            = Key_Temp + $013 }/ a- h  h! ^; V) v$ C8 _5 b
  194. ;==================================================
    & w* W% H9 t6 ?8 @2 U% R+ c
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集
      L! C2 J  ]! j, w. l/ ?6 ^3 r
  196. Music_Item_Last     = Music_Item_Cur + $01
    % X& v! S( k6 x9 P+ I8 y9 H" j
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集
    : F: G6 a, k8 L) M
  198. Music_Cur           = Music_Total + $01  ;当前曲目, |+ D$ S- U# [$ t8 j1 M$ a, H
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目
    4 I, E$ }* r* W
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态
    # ?# l2 i3 l( G# ^- U- T9 c  w
  201. ;==================================================* _, h; I4 W7 F: S
  202. HEX_Data            = Music_Stop_State + $01
    ' [" ]1 U) Z! t3 J7 A
  203. DEC_H               = HEX_Data + $01& J* c/ G6 Q& m  h  K8 T  S1 k% s
  204. DEC_T               = DEC_H + $01( a0 r+ G. M% ]) ^; n  ^
  205. DEC_L               = DEC_T + $01
    % C. H: T: F# l
  206. ;==================================================& \9 L3 Y9 F8 I" d1 q( l  ]
  207. Time_S              = DEC_L + $01
    9 p7 s, B5 P# ~# r
  208. Time_M              = Time_S + $01" _2 U  U! c3 M! Z
  209. Time_H              = Time_M + $02! @) U: N( Z" t, i+ D% z- N
  210. Time_Cnt            = Time_H + $03
    : w) R1 e7 `: M) S& Q

  211. ( ^) r' c9 Z, f2 y- J7 ~5 Y; w: t
  212. ;==================================================' u1 ?  J* j) j$ J( H
  213. Music_Bank_8000     = Time_Cnt + 1
    + L) H/ Y5 p$ r
  214. Music_Bank_A000     = Music_Bank_8000 + 1$ d3 n: p% u- O
  215. ;==================================================
    ( P% S/ K- a* Z  `1 g- E
  216. Scroll_H            = Music_Bank_A000 + 11 Q. f5 v. D. K2 T8 U6 w6 X( l( z
  217. Scroll_V            = Scroll_H + 1
    % O2 C; p% c- g) ]3 p4 r- j  a
  218. IRQ_Process_Index   = Scroll_V + 1
    % I' {7 z& @8 V5 `/ s
  219. ;--------------------------------------------------  g7 y: [- L+ H/ {6 x5 ~" m
  220. Page_Cur            = IRQ_Process_Index + $01& q: E2 M; U! A$ H1 K0 n
  221. Page_Cur_Index      = Page_Cur + $01) U7 U$ C8 k; E# K
  222. Page_Cur_Cnt        = Page_Cur_Index + $01
      `- u" k3 A/ \) o4 {' m
  223. Page_Last           = Page_Cur_Cnt + $01$ r' d; i1 f, i; |6 u( h
  224. Page_Last_Index     = Page_Last + $01
    + A1 W+ \1 K  v$ H% E
  225. Page_Last_Cnt       = Page_Last_Index + $01
    # P9 g; y0 e- ^1 o- _( h. w# k
  226. Use_Ram_End         = Page_Last_Cnt + $01
    / A" f$ c: A/ R& Q4 K
  227. ;======================================================================3 i1 j$ a# [4 r" [% ^  \
  228. ;音乐数据块
    " _5 k4 n4 M# o0 z
  229. 4 |7 F; ~4 n( C$ z7 m; L# |3 h
  230. .IF SOUND_BAR_SHOW_ENABLE
      c: O% Q2 t+ W  E, P9 ]3 l& d$ q
  231. ' y3 r% n% p- {- ^' s/ z: @
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    0 ^/ o; ]& V# T5 R" W' W
  233. .ORG $9000
    4 ~' E9 J# T3 W& R4 h
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"3 K/ {9 Q5 i# h1 A' k3 k9 E

  235. " l" T% k7 L' f+ R# s& ~( O8 j
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK; z! g! I  y- D
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"
    5 M3 ]4 x6 v! P2 Z3 l0 H& _5 }

  238. + d! f5 _9 D2 T4 L
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    1 ?% l5 D0 M( [& l3 I$ s
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"
    8 m1 j* ]5 ^- \& s; r( V. H
  241. . Z' {) h. a! e
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    0 [+ ~/ {1 Y& K5 l
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    & H, ?3 P: d$ m7 G( @, B; u
  244. 5 `5 V/ a- a' w3 i* P' G
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    * F9 n' y( [" a( h# x, `3 [
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank". Y2 ], Q$ b' X2 n

  247. $ J8 d0 i0 X: I$ J9 q# v7 a
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK. v& b" M9 r2 N4 s% Z9 h
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    3 T, F( v( P" t8 s8 \( O
  250. ' Y9 _  |7 K$ H' u4 T8 g
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK# ]. @2 }% I$ Q- v5 V
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    . r( P, ?# z2 R. h3 R" J: I6 y9 Z

  253. ! Q5 {9 \- }. b. q- x/ j/ T: z1 a, u
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK6 j! L4 g' d2 B& F) T7 ]3 U  t! Q
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank") H  u1 L; {9 r

  256. 6 j" O9 t& T& Y4 U" n) V
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK7 S, r) N7 Y; p6 g) r, G( L  M
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    ; p) J* v7 ^& U

  259.   ^! A2 h7 Y% F% m/ P& X
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK
    7 L; l6 n$ b( Z" i: C, g
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"
    ; J1 G% h' @( X  h  S9 z+ O
  262. + j2 c% B8 {; O3 E
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK$ X+ h6 N; y1 H  A, u- ^# J) A
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"
    , S: W- I2 V7 j

  265.   J. \3 J" l$ n3 g3 a7 P' M5 t
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK6 ~. S0 x0 D  V: |6 I  D' t& p
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank": p5 f, A/ v8 m" a; ]9 B5 n) j

  268. ; V8 D9 J. G: p7 y5 b* `* D' \% i$ R
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    " X2 ]: }8 ^2 T* Z
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"5 }. n% G9 r3 i, w* _/ \+ K
  271. 5 s- A8 A& A5 |( `$ v
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    ! c! ^  q3 X3 K5 Y. n/ @) N  X3 @
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"
    , j* [) E4 j4 r. ~& q; p0 e/ V

  274. + U# _5 e% j4 z2 n$ [1 o% ^
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK6 _& G! t! \; I) F# X4 }
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"4 M6 Q0 s; G- n% k9 t) v

  277. ( i' ^& c, R* H, Q1 i# u7 Q: m/ X
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK6 A! l2 c6 [4 l  h& F6 J
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank") y- \9 Y! |$ S. u% ~% O; P

  280. + R) R7 `( K1 `" k" X
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK
    ) u4 o2 ?# ]3 j4 {
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank"
    2 X- H4 i& ]4 M) f" i" S: I- q

  283. 9 C+ W7 |2 l0 x6 o
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    2 ]( j7 b! o- s: G9 C
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"4 i/ I2 f2 a) O  l& N

  286. ( u% N3 Z5 t& y  N6 i) Z
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    5 L! F! D% y4 @8 j! Z' r+ I
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank". b! r3 \9 \% o  \
  289. , n  @. Y4 l) a) h, B, o; c
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK
    + z, F* n" ]( G
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"% L1 h! k( |" x( w9 P

  292. ' {, {4 Q1 t  X- C$ x$ H2 v
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK9 `, |$ W" ^, s9 y5 x' s1 y4 z& }+ ]
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"" T5 V" D: G, \+ n5 S' W

  295. 6 d% m  A" C2 u( j
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK+ j9 g) I, [) N( h2 g
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank"
    * b- E# w0 p2 N% m' y+ Q
  298. : S! B3 w% s6 s% Y' Z
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK* q# Q8 w5 B, }$ R4 t; q  J3 o
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank"
    " x9 B: A/ t' E; C7 r4 ]

  301. - G7 b1 u) s" H) [7 X- z
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK, O& J% }1 ^7 x) [$ a
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    3 j; N! d# E4 W  W( T
  304. * x6 E5 @8 L% U  k- q
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    0 t9 |9 Q0 z" C; M- G7 i  |
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank"
    % G* C0 _# N4 V) B
  307. , K- A9 |- K7 L2 w$ o  H
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK( E3 v# Y6 x6 i2 K( \7 n- I
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"8 `; {: o% H* k. `2 b2 c) @/ W
  310. + b2 Q$ m# E% |9 }, ?
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK0 U2 x+ t5 u) v" U2 Q
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"# V# ]( f* J: |9 Q( s2 \' A

  313. ' t0 O/ f4 `9 d+ T/ l
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK# o* [* K7 A; W. }) G7 w
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"
    ' b/ f/ }+ s; g8 G% a' \- A0 h
  316. 1 K) K# M( Q" _0 Q1 s
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    ; r% A2 v* G) r. o- D+ N, b0 k
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    / A1 v0 Z$ v+ q6 c9 R6 X# F
  319. 0 b$ H4 P' z/ ^; o- ~( H& D
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK, S7 i4 I& f  I) D* T1 M
  321. .ORG $D400' `( E' ?+ L3 O6 G2 Y4 V+ O
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"' N1 w: V% J" ^, N* M( G
  323. 0 g- U3 Y5 }* k( G8 @% [+ Z' R
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK9 h" Z: M4 `& P6 k0 E- l1 [5 r5 n
  325. .ORG $D800  m+ M- c; ?+ e6 w
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"9 b$ u  a# @8 [6 D6 ~* }+ s1 V7 u& t

  327. ( X6 w. Y4 x3 z) R: \
  328. " f8 E2 f  e6 s& Z7 Z( I
  329. .ELSE
    ' \9 w' |* D+ {$ x6 w4 a: l

  330. : B/ V# H" `7 X# M3 V$ n; Q" l
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    & s  O3 T, R, G2 J) q
  332. .ORG $9000* ]: k7 h- m% C$ ^
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"
    9 |( Q2 _" X) N( w( W

  334. : h- ~' p: s8 A
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    7 \' O8 @1 T2 A' ]+ V0 l/ k1 o2 n
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"
    1 I# j) @  C- T3 j
  337. , d) J4 U% `% l
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK& @) p8 F7 y& z! b& \3 x
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"
    ! o' |2 l7 A( k1 T  l/ d

  340. + t; k6 J( S, Z  Q& c6 |
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    9 e/ `( u" Z  _8 J& H3 [
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    8 e' \: C; U  R, m& P$ O! a

  343. - T! E, w, K+ f+ \$ c4 P0 X
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK2 U7 ~5 s- |! T* y3 H$ p: w0 g! z$ d
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank"
    8 d# ?7 _8 x2 u/ H
  346. 9 V: q2 p+ m, I* D# |+ V
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    # v( H$ @* C& m) T- O9 A  R
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"% F' F! {# i( l$ |
  349. * J& x6 j: T5 m6 a  j% A1 H
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK+ i6 V/ ~! v+ V6 Y; s$ P  R! E
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank", E$ N7 s- g$ T( M9 K
  352. / O$ R3 }) ?% |% Z+ J, P
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    / z; m3 h0 N1 C$ A
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"3 n& V+ |' |! _8 o

  355. # ?1 H& }0 @+ ?
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK1 e7 ~8 T' H. i
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    1 m7 Y' y* u+ v/ O5 L. ]

  358. ) M) S0 e/ o& r6 m5 n. u9 ?
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK# Z* J) v& V* x3 B9 V# y4 Q8 O) k
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"* k, o& }' M/ d7 X  E' f* `

  361. # o; L$ `# }! i, ?/ B3 w
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK7 b, h8 E) A5 {+ ~& Y4 ^
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"
    : g( ^7 [7 b" j  c8 L/ R2 ?
  364.   D0 i, ^" B, c2 |& H5 C$ U$ T
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK2 w1 Y* \! l5 }! |2 F) d: n
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    * H) R) D1 E! v9 A

  367. 6 z! U5 [* F5 U5 Q+ L
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    $ ~$ V4 m. x6 ^8 u/ p! S- v  ^& H# w
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"- ?8 Z( M/ E! l: z( X+ i0 l# m

  370. ) Y9 x/ V& W9 X5 S
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK; ^+ N  J) y- y) _  }
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"
    5 o/ V* Q* z. i# G
  373. 8 `3 O1 @. o" O# V. Z
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    $ y5 B9 `$ i8 n9 i
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank": s1 V( [! i- A

  376. ' l# z( p$ c( [; o# W& D$ a2 T
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK( G3 y8 g+ i9 x7 b6 m/ M; g/ B
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    # z; J) Q# c* E! z, x; H% W3 a# v4 A/ M
  379. & _1 D+ s6 K9 v
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK9 }8 {0 {" i2 R  {  I0 j7 |. V; h
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"( E2 d1 j2 S9 N: a% p
  382. 3 x8 h4 ?  M7 H
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK; D# p! `: e2 B. U* ?' K' r, v
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"$ ~2 Z2 J7 g( K: R3 M
  385. 7 q" [. y# j- o* L8 e) q
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    5 l  i% O5 p# O3 g3 q; h$ a
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"9 L! a8 h4 P! R. X

  388. 2 A# @% f7 S% J
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK
    & G* C- w( }% Q; I, E7 F( w/ X! Y
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    5 \& V7 b2 E: W1 e% z8 q" `8 U

  391. , v! I7 e; X$ v+ C) v1 ?4 [
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    $ Y' A( [2 z2 h4 b
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    7 x* B0 K& Q; e' A7 B
  394. , \( l0 T& `# J+ u7 Z% l
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
    6 E7 J, V# {1 O. d1 \2 E1 R/ E
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank"  H! ~; S( G8 c; P5 o) {4 i

  397. 1 K3 s9 {3 `1 L9 B1 M* R
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK) {0 d( P- ]$ W' d' v
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"
    # w# \, @3 A. p* [- z. x

  400. 4 t+ A' E2 j3 H( p' V
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
    & M0 v) Y1 E* V' a3 w) G
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"- e8 `4 {8 Q0 e5 b/ O  d' t
  403. 3 r% g* `4 l  J' g3 m7 |! ~
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    4 n& @# t3 ?+ s: Z
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank", p7 d2 l. w% F9 \' N7 C8 c
  406. ! r# N4 n+ ]- m
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    , i+ M9 ~* ^7 y4 n' q  G
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"
    ; a& m: [2 Z+ N
  409. 1 r( {6 Y1 ]- A! D" C3 R$ V0 o( ]
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK
    ) P- O6 |, t6 ]  @7 M. q$ X$ N6 W0 R
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"  c, o& C  u& L& v/ O, Q
  412. " j8 e1 t7 D9 b% o# V$ e, W* v
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK, i  z6 |2 Q2 T5 z8 ]& b
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"
      i. J8 u- v. [( U# J& |. S: q7 [

  415. 1 R, p$ R: \  j- m# u2 x1 z
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK$ n  f3 N& N2 ~( d7 K3 a' m
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    # L) v* Q* y$ o  l7 _' S. _  R- \
  418. 7 A. V8 R* v0 @8 U3 {
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK$ F8 l; O9 V. M9 _4 k, j
  420. .ORG $D400
    7 Z  A  W$ a& h0 g1 a# F
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    8 Q$ q# E9 O( ~) J7 U
  422. 1 b: Y. k# m/ Z6 L4 h& r. F/ J3 F
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK. G* ?' M+ S0 d' g  a
  424. .ORG $D800
    3 T' u4 k( R- K# y
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"+ t/ s( y) @( F3 V# ^3 h+ T/ d

  426. 2 v  G7 l. m2 Y1 B
  427. .ENDIF$ P7 N/ O* w# h5 B  l1 w

  428. ) I- s0 C% r0 Z
  429. ;CHR图形数据
    / ?( K  T) j1 Y" x4 z; ?2 W: z/ t9 q
  430. ;======================================================================- }) G/ Z# y' ~6 Q& z
  431. .BANK CHR_DATA_BANK) b1 I0 ~7 _% @/ a& ^$ R4 w
  432. .INCBIN "chr_bank/chr_data.chr"
    4 H6 l$ r8 l8 S- @
  433. / q$ [8 E7 k, q9 V/ C  `* I3 I
  434. ;======================================================================
    " T; z6 a/ H' ~7 L% t' b
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK
    % j/ d: K4 i2 O5 ~; [/ A
  436. .ORG PROGRAM_ADDR
    + a8 i' C8 t9 K" c7 n) k

  437. # T3 {8 Q6 @  ?" E
  438. ;==================================================
    " Q+ e: D+ G  ~; a7 I% U+ ^
  439. NmiProcess
    ' @# L: a2 ^& g6 l! K1 p# j

  440. ' v& f) \' J! F; z) V; B" z
  441. ;关闭屏幕控制
    7 n/ @* m5 m2 w1 i& g; d7 z) D! `
  442. LDA #$000 m: W; p4 b& g- X( S4 x6 x
  443. STA PPU_CTRL
    ) F4 z1 R. v7 z, V; y4 u- K

  444. 0 p" a7 F  ]3 Z5 y: A6 k
  445. ;没播放音乐就不需要触发IRQ
    , K7 u4 W6 W# l0 p- \
  446. LDA <Music_Stop_State
    2 U" a! j3 b' R/ W
  447. BNE NmiNormal# v9 K: f: S0 Z/ h% O0 A* _
  448. 1 n2 ?4 o" W; K+ u* Z! R, W
  449. ;重置IRQ索引
    9 L* j% K2 X1 a/ O; O  n9 @5 e7 A! ^, B
  450. LDA #$00
    " h+ A: C3 Q3 H, M- Y/ `
  451. STA <IRQ_Process_Index
    9 h" i  h4 T7 P! r* @$ L/ w, D

  452. , ?  b$ D0 A! q
  453. ;时间秒数为空则跳过
    6 M: A' s' J- |
  454. LDA <Time_H
    : J2 t0 G! J( K9 r
  455. ORA <Time_M
    " T1 R2 _: w. m5 [
  456. ORA <Time_S
    8 s) I8 z( z. A6 L: o7 H* V
  457. BEQ EnableFirstIrq! p0 }; U1 m6 X: y% C5 G9 m. N$ I

  458. 8 p. G  o! ?6 r  z3 l" Z0 u6 h( n
  459. INC <Scroll_H& B) D  Q+ M5 E. O6 Q1 \# ?
  460. ' V8 j9 o* G& N8 o4 D& D. L
  461. EnableFirstIrq 3 J  ]+ W: r( z( [
  462. ;80条扫描线后触发IRQ) d, w" I9 o: ~7 z! e# B
  463. LDA #IRQ_SCANLINE+ l7 l8 s; }! f" |; v
  464. STA MMC3_IRQ_LATCH
    5 W: q. Z, j" |3 F  |2 f8 ]
  465. STA MMC3_IRQ_RELOAD
    3 U8 }6 D7 y" O! V& c+ k
  466. STA MMC3_IRQ_ENABLE
    6 a( D* G. k: l4 @0 y$ a
  467. CLI
    ' q& E* g1 i5 s

  468. 5 R! L  Q4 Q7 a/ V
  469. NmiNormal: ~. K5 k" P; S# ^
  470. 4 I5 Z8 K: ~, c: P
  471. ;处理PPU图像- `4 A# |) G) r
  472. JSR PPU_Proc0 S! f0 Z) E# {
  473. ) T$ M" _5 G' H( R
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化)8 R- ?" |% @& C) [7 c8 d
  475. LDA PPU_STATUS/ D; P3 m4 t6 e+ M- t- r" j$ t
  476. ;LDA #$00
    , B+ Z/ h1 q+ U# S  X/ a
  477. ;STA PPU_OAM_ADDR7 e! l  G  Y0 k. P* j2 h; g
  478. LDA #OAM_TEMP_ADDR / $0100
    # N, s4 o( H" W5 ^7 e6 a2 m+ Z
  479. STA OAM_DMA
    + m$ p; B; t7 x' n

  480. 8 ^% F0 m9 G/ v- G" }
  481. ;启用NMI中断
    1 q, z# r7 K: G. O
  482. LDA Screen_Ctrl! @( [# C! v: a5 }2 `# F9 y' t
  483. STA PPU_CTRL
    ' L' P$ c6 V2 K1 g+ _8 j: Q

  484. 1 l3 I$ o9 @$ e5 j7 D3 b
  485. LDA <Text_Disable_Flag
    + Y: L7 H# ]+ T' i$ S+ _
  486. AND #TEXT_DISABLE_RAM' M: N7 z4 }( n( e0 L9 R
  487. BNE Nmi_Sound_Play
    2 |+ c; k! x  Q; z/ k8 J

  488. 5 v# y4 r' i- X. c9 o  H1 ^2 e
  489. ;处理手柄输入. }6 x. o8 i! L$ K4 z  Y
  490. JSR Key_Proc- _' v9 c. @" w+ ?+ Q1 P# v* e
  491. : o/ m1 G# g. I4 X, l! w( G
  492. ;切换音乐(手柄触发)- Q3 C3 ~  o  |; n6 [, k8 u, O
  493. LDA <Time_Wait_Cnt
    : m' X$ A" g1 ]+ `1 ]" J
  494. BNE Nmi_Cursor_Arrow
    / L/ l! g8 {0 o, C! m
  495. JSR Change_Select_Item% Y  _4 [/ k- t1 S; \' S1 d* f

  496. 9 f/ H# s" D. N. A3 L- k% r
  497. Nmi_Cursor_Arrow
    # A9 `# G+ c0 [+ ?# ^2 u6 r

  498. 1 f# F1 {- G% |7 l5 z
  499. ;处理光标箭头
    : F! I' @4 j: b  N' N; i! l
  500. JSR Show_Arrow4 N. ]5 [5 q5 S

  501. # w" _. j  g9 n
  502. ;更新调色板# ]% ^9 m, k0 o/ O" n
  503. JSR Update_Palette_Data. d+ R" P! f) y; b- w

  504. 1 N  U9 f8 y& M" v* H
  505. ;显示时间(缓冲)) d, F& g6 _$ S" P8 f3 b
  506. JSR Time_Show
    6 }4 F6 u, |6 B) p5 S: m
  507.   q" }( U6 x7 D/ s  y7 V
  508. ;音乐显示(缓冲)
    $ f4 Z9 R$ G/ C. D6 g, q
  509. .IF SOUND_BAR_SHOW_ENABLE
    6 W+ o  c1 t2 m) [# i9 [$ j
  510. JSR Music_Vision
    1 r2 K$ ]) J5 G6 P6 m9 |* S! H0 [
  511. .ENDIF
    1 b1 q( B5 H' Y  n; U7 N2 L/ L

  512. : l! G0 S4 S+ S: S
  513. Nmi_Sound_Play
    . S7 l, f2 ~6 D+ Q1 T
  514. ;播放声音) |* }4 H) E% K5 E( j( ~0 A1 g! x
  515. LDA <Music_Stop_State
    5 o4 F6 b# Y! K1 V% r( M3 U- M
  516. BNE Nmi_Time_Wait_Set
    ! l4 O  F( {2 y6 _
  517. JSR Sound_Play_Proc
    % ~. t: s. `+ @2 V( a8 q/ R3 E0 i
  518. / i( L; X0 [, p6 S/ _. H: |- l) R. H
  519. ;播放计时
    * Z. O2 L8 k4 R' F. f7 d7 C# `2 K: B
  520. JSR Time_Count
    % W6 h$ D+ o1 Z9 x% H. q% {

  521. 5 g+ a& j& |' K+ J
  522. Nmi_Time_Wait_Set
    8 M% E4 h) L$ v! z2 q5 i
  523. LDA <Time_Wait_Cnt
    5 z2 @0 C( _- c) g" q
  524. BEQ NmiNormalProcessEnd
    % B2 [1 B( i  _2 w1 M
  525. DEC <Time_Wait_Cnt
    7 K  {4 _4 F/ ^; U; Z/ ?0 K3 H* ]
  526. NmiNormalProcessEnd
    7 o( v+ a& t% W& r$ z5 f
  527. 5 W! N4 u& o0 d  p, Z. |3 N- e
  528. INC <Nmi_Time_Count! ~, b+ E6 p6 q
  529. / V' Y/ Z, w  y5 x7 G) U: W) @
  530. RTS
    # w, ]2 `6 N# i4 q
  531. 0 p, E9 m. ?  d" C8 i1 m) s
  532. ;==================================================0 `! |/ j/ x9 @3 _6 q% Z" \9 h5 H. Q
  533. Init_MMC3
    , G6 O. F+ i7 {$ x2 e1 p4 f
  534. ;==============================
    3 C$ |: V7 K* w) }6 h; S# l
  535. ;禁用IRQ
    . ^8 x1 i, }8 v, J( V+ ~' D: v
  536. STA MMC3_IRQ_DISABLE! i! G( s" z% z0 |: ^; s9 I
  537. " |5 z, T% M7 i: w: t! d% r0 v
  538. ;水平镜像4 o$ z6 [( u/ E8 o5 n  _
  539. LDA #$01
    9 ?6 k7 Y! [& u8 ]/ u
  540. STA MMC3_MIRRORING$ w4 R" S7 g* R' p6 n
  541. 4 O. v+ h& ^0 f. j- G
  542. ;初始化图形bank7 E* D6 E6 \* T! o7 r
  543. JSR Init_MMC3_Chr_Bank
    0 X# R+ i$ f* d  z' C# r

  544. 8 S/ g) x1 D; ?! D% z, Q% ?
  545. RTS/ Y2 p# i+ w" C6 J, \! G$ h# C+ U
  546. ;==================================================
    : e- }+ y& p$ E& n0 |
  547. ProgramBegin;主程序
    + \8 Z. k) w2 s* J7 h! Q0 _0 \
  548. LDA #$00% J! Z7 D: X/ B3 L
  549. STA PPU_CTRL8 b' N, T3 Z, q* T# G# a. y1 p
  550. LDA #$009 r. O* _8 b& S/ g$ e: U/ l$ n
  551. STA PPU_STATUS5 a/ j+ S& k5 e5 a4 s7 G1 ]7 d. d
  552. STA PPU_MASK  @1 O) e: I) P: c% C5 y/ R
  553. STA JOY2_FRAME, E1 ~# o0 ^+ N3 h

  554. & ^, h! L% O# }. m( a, ~3 E5 T
  555. STA PPU_SCROLL! w8 m; O1 B" ]% h# {
  556. STA PPU_SCROLL3 p% W! F7 I+ o- ^3 V6 Y8 P
  557. + K  v( g7 H& Z8 p; \
  558. ;==================================================- @+ j  ?5 r" c* }
  559. LDX #$FF
    $ G4 P8 V8 J  |3 d5 t
  560. TXS% k; R% c3 y8 ~. w' O/ o0 e: B

  561. : ^) l( x% k& K4 q9 [  }8 _3 J
  562. JSR Init_MMC30 _3 G) M" c) h/ U: f1 g

  563. - W( n( U6 N0 v
  564. LDX #$02+ i! T6 {3 B/ w; a
  565. Check1
    8 [2 w+ m: A- M" O( m& ?# Q1 I1 l
  566. BIT PPU_STATUS2 T2 i9 x# w! ?: c  V' _
  567. BPL Check1
    ( e9 P2 ?) C0 @% D- A6 x
  568. Check2, `' R9 ]2 @1 D' U4 n7 U* |
  569. BIT PPU_STATUS
    : o8 x# i9 i$ T4 @+ J  B6 \
  570. BMI Check2% _, O- q8 x6 @! e. N6 X3 E% y  c, k7 `

  571. 8 W3 b, p6 c: p4 q3 p- o: k; f
  572. LDA #$0F
    1 q) H! ]/ a7 f6 g3 m. {
  573. STA APU_STATUS. A. n% @! P3 z6 P1 c
  574. LDA #$C0" g2 O; r1 S) A+ w, C8 Q- v. L. g6 e
  575. STA JOY2_FRAME
    6 z2 K4 M1 ~9 x; P  I" s& C/ L

  576. ! n( a, o( ~, z- K. L
  577. LDA PPU_STATUS9 m/ j, ?. a- B  C8 o$ v. \$ M
  578. LDA #$10
    ! Y7 j5 }0 H& k9 z, |- X
  579. TAX0 z( u% `; y2 k2 E' q8 i
  580. Check3) N6 [! c& ^7 l/ S
  581. STA PPU_ADDRESS! K! c- `* m4 d. E1 ~. u1 ~
  582. STA PPU_ADDRESS* v; _, z  J) S( G6 }7 v
  583. EOR #$00) `/ U8 C$ V# {% L' A* m
  584. DEX& d) |& v7 ]. i# g! L4 a9 t
  585. BNE Check3' Q  f: g4 L# r7 [8 O- i, {
  586. ;==============================
    0 d! N& g. A4 a  r# h# m6 X. Y
  587. ;调色板清空1 m" E# Q- c% w2 `3 o/ Y6 ^6 x
  588. LDA PPU_STATUS8 a6 m9 B7 }$ ~! y
  589. LDA #$3F
    " Z2 H6 x8 z5 S
  590. STA PPU_ADDRESS
    7 m" u5 v! W+ g; z2 \; H
  591. LDA #$008 i# o( T: Q. t0 \
  592. STA PPU_ADDRESS
    ! ^/ l$ D  _6 `: z) K. w, Y# o
  593. LDA #$0F% q5 ^, o6 V4 u
  594. Palette_Clear
    , V" r' d3 Y1 `" R; t
  595. STA PPU_DATA5 [( _4 j. \/ V! ~
  596. INX
    9 a$ b. f$ E  f7 g
  597. CPX #$20
    " h, d; M& |: h; l/ m
  598. BCC Palette_Clear
    : O. t, M' w* u# k2 \" u8 R2 j' f
  599. LDA #$00; w$ Z  r1 w. Q& i; v
  600. STA APU_STATUS
    3 A9 Y- @; c, m# @5 r  k
  601. 0 |# @$ B2 K! U
  602. ;==============================" S7 f, J# l9 }4 U  c. W! f9 U2 e
  603. ;RAM初始化* `0 ~3 b7 V% U6 a0 S
  604. RAM_Clear_All
    . B  |+ U$ z5 g. @& A, R' U: P
  605. LDY #$00+ O) ?% Z9 H' A8 m3 V
  606. LDX #$08) u" g1 F8 s% l( ^+ L" u3 x
  607. LDA #$00
    ; K' ^- ^' [, @& C3 u, ~
  608. STA <$004 _- H' m! s* u2 M2 T
  609. STA <$01
    / S; d: i- h9 j& Q
  610. RAM_Clear_All_Start( @* q0 W, }4 x7 J% B* Y
  611. STA [$00],Y
    ' x  S! L- A# @3 q
  612. INY
    ) j3 V' f7 d& }
  613. BNE RAM_Clear_All_Start
    ' h# F1 p! Y6 f% P
  614. INC <$01
    ! y: M# P5 L4 T# Q) A
  615. DEX
    * \2 s& r5 f, L+ d
  616. BNE RAM_Clear_All_Start
      M, k1 v! R  ~1 ~: I$ w, E* ~& I
  617. 6 E4 G  w  K$ a4 B+ u$ u, I: L' s- u
  618. JSR VramClear
    # u$ Z, O' B3 v
  619. JSR VramInit3 w# x( L7 F0 |) {$ m" K
  620. JSR OAM_Ram_Init- ?3 z$ p- u3 ~5 k3 j
  621. JSR Init_Palette_Addr3 `. m1 l6 Z1 Z' s% ~5 o
  622. . }! \7 w/ S6 W7 z0 ^% l
  623. LDA #$FF" I6 r3 Z' _0 R$ F
  624. STA Use_Ram_End/ C0 ?7 S% s9 P
  625. ;==============================  M6 u; ^! D% x- r/ @
  626. ;初始化背景调色板2 s. f3 l2 h" H* j' ^
  627. JSR Set_Palette_Color
    4 M1 r) m* F; k' P: x1 H: N
  628. JSR Set_NameTable_Attributes! f( `. P3 q: R" @& d: s% T

  629. ' C4 e: E1 Y5 U* K+ H7 i7 G
  630. LDA #$00) C  s% \! o, D! W; @" v' A: @
  631. STA PPU_OAM_ADDR! q3 k8 b6 O( e% m' P: J) T4 A- v1 f
  632. LDA #OAM_TEMP_ADDR / $01001 [2 K" a: m+ f3 g( Z/ _/ w
  633. STA OAM_DMA
    % R& _4 U+ _  [& A5 a- j

  634. * Z7 z! ^1 v3 }8 j
  635. JSR Sound_Reset_Proc3 D0 x# r0 J4 c# ^, D
  636. JSR Set_Sound_Total
    - P. G, P- v; a
  637. - q7 D' c% p- _
  638. Init_Start_Music
    1 F$ ~% H9 v) n& g% @% B
  639. LDX #$00
    3 t# b$ d  I6 i0 i( i; _$ w. U
  640. Init_Start_Music_Write$ q% R6 l* `' {
  641. LDA Sound_Start_Port,X
    + L; d  J& l! a9 I' G
  642. STA <Music_Cur,X
    1 ?$ r0 Z5 \+ C& U& `9 b
  643. INX
      c- b% r: m) |! e, T
  644. CPX #ITEM_MAX_SIZE
    ) P7 Q2 N' r2 H* K2 _$ z% {
  645. BCC Init_Start_Music_Write
    ) J7 I' D4 b8 b( T* n& U

  646. + j/ a+ Q* p" @; o
  647. JSR Show_Music_Text
    ; B/ _4 z& r3 m9 ~7 F

  648. 8 M& `4 J/ A. p% U+ D9 ^
  649. .IF SOUND_BAR_SHOW_ENABLE
    . n+ c( L7 n0 c9 J0 _4 I/ e$ `  \
  650. JSR Sound_Bar_Text_Set5 m( J: u( g! F  |
  651. .ENDIF' o8 r$ K- P( ~! R' M$ t4 [

  652. 2 L5 G* U3 d7 f+ |& c2 x$ C0 |
  653. .IF Track_Name_Pos! }/ R) j6 k# {/ p5 |' N
  654. JSR Show_Track_Info9 C$ F& P' U& R7 r6 D* @
  655. .ENDIF
    9 K" u- T& x  p( H) u

  656.   W8 ?/ ?! U# ?
  657. JSR PPU_Proc
    7 F! Q! s7 H. m1 x; r6 G& A
  658. 3 c% t. f/ `2 o5 }, z
  659. ;==================================================
    3 s0 |" d4 h) ]% [) r. @2 J2 L& a' t; h
  660. ;音乐bank初始化 9 p; z8 X& }! V1 W
  661. JSR Init_Sound_Bank
    " p+ Q  N8 I! Y, S: X" B8 a
  662. 7 s3 F- q8 P% N2 V- G0 M* b/ I6 H. \+ R
  663. JSR Music_Show
    9 K2 m+ k4 |, ~/ e5 Q$ i- R1 q& d
  664. JSR Time_Show& q& [+ S- A# q8 M
  665. JSR Music_State_Show$ k$ R7 _8 `, P' o. h5 V8 p5 P
  666. JSR Time_Delay
    % n) I  j: G4 ]
  667. 5 N& x/ m) S- }0 ?# K
  668. LDA #$01/ a, y* @" `3 s/ d5 s6 t' p( v
  669. STA <Music_Stop_State+ u0 a$ W  R$ l2 @- l

  670. 3 ], x7 o( s4 e. ]* n. G
  671. LDA #$88
    ' x: |% l8 Q- T- o% k- d1 C
  672. STA Screen_Ctrl
    3 ]$ ]3 V; r. N7 g, j! X6 R3 ]
  673. STA PPU_CTRL3 \0 n% x/ u& v, @8 j

  674. $ p* a8 b+ f3 b
  675. JSR Show_Page_Text! m3 s( N- D2 g" R/ \

  676. 1 |! u' |( d2 E
  677. LDA #$10* U# w! P- W8 ~, j9 |
  678. STA <Time_Wait_Cnt- j" G) T8 m% C6 C

  679. 0 d* Y# g  _% c7 j+ O
  680. Wait_Time_Over
    / u; n/ |# u% T% N7 ~
  681. LDA <Time_Wait_Cnt7 i  A# Y& y7 R. T" }* N/ ^4 b1 k
  682. BNE Wait_Time_Over
    1 j" Q. `% m# X9 X7 X' f  I* t$ p

  683. ( f5 `) H- `* J# p" D& {
  684. JSR Show_Arrow2 A; h' E; S$ W
  685. LDA #OAM_TEMP_ADDR / $0100" L2 `* y+ M6 Q4 i) H0 S
  686. STA OAM_DMA3 j8 F! W$ ^3 L* z; [3 F
  687. : d, \5 K* ~: a, z) K! E' a  E
  688. LDA #$1E5 ^* y# f& c! j( f  s- p6 ^
  689. STA Screen_State/ |- c6 O# Y& @0 S- _

  690. : F0 {8 k. Y: e7 g* h
  691. LDX <Music_Item_Cur+ @( a3 t8 o1 e4 r: P
  692. LDA <Music_Cur,X
    . `/ t. }  z! y' r7 r) B# g8 F
  693. JSR Sound_Init_Proc
    1 g1 w7 i8 a8 }# j! h, R  N6 Z& ]9 m

  694. ! Z( {' L# z0 |- u# @
  695. CLI! b$ M( ^9 i! z  {
  696. JMP MainLoop2 `7 [6 G( O  q' _% b
  697. 5 g8 F, N! @, ]- W% L
  698. ;==============================, M0 ]: }, U7 t3 L) b! |! p
  699. Time_Delay;延时等待0 g0 j8 j" i1 b- G! m8 T
  700. LDA PPU_STATUS
    . B. s! k3 u. C! ?! M
  701. BPL Time_Delay: u* b/ `' |: c" V- B
  702. RTS0 O+ z. x9 E$ T3 l" `, u
  703.   S& Y$ g9 W8 a) X4 B
  704. ;==============================% b+ y8 U, h: c7 i
  705. OAM_Ram_Init;初始化精灵内存5 s1 p( K3 ^& \) i
  706. LDX #$00
    + s' n8 `+ A* l8 Q9 Z0 b+ Q) J- V7 B+ x
  707. OAM_Ram_Init_Write
    % H5 R- J( Z8 S$ P2 h3 j% p
  708. LDA #$F89 X) c  y1 m1 S  q. k4 E
  709. STA OAM_TEMP_ADDR,X
    ( t& V! g  |/ e  [; N8 A; q
  710. INX  L5 ]5 n: Q4 c2 u% u, G5 T
  711. LDA #$F8
    & }9 j& E- m' c3 S/ @
  712. STA OAM_TEMP_ADDR,X
    0 H2 t7 u. U9 f5 {
  713. INX
    6 x& l, p2 E& O! r8 B
  714. LDA #$00
    2 y4 T* O) Y! L  k
  715. STA OAM_TEMP_ADDR,X
    + k2 D6 U4 }, [) w. u3 c! f+ ?
  716. INX' X2 S1 Y5 d4 l4 Q/ ?( j
  717. LDA #$F8
    1 ?) \% H6 k- z" x
  718. STA OAM_TEMP_ADDR,X5 T% @1 e% _5 m' @$ j0 i2 p
  719. INX
    # ~7 @0 Z) ?4 D& P
  720. BNE OAM_Ram_Init_Write9 W; @' `$ Q9 O2 @9 M" W* B
  721. RTS5 t& v4 w3 x# G8 ?" _7 g' `

  722. , z4 o+ @/ n2 c- I0 g4 X! {
  723. ;==============================
    * H7 y" q  h$ [
  724. VramClear;初始化图形内存& b" o6 ^" U0 t
  725. LDA #$20% @! \+ F1 R# g& R  b
  726. STA PPU_ADDRESS* x% z: {3 z5 T
  727. LDA #$00) r) Y8 ^) I& _7 Q$ ?
  728. STA PPU_ADDRESS( h9 s4 u; U+ d6 B" |' ?
  729. LDA #$00' f6 p4 x+ M2 o! y! O
  730. LDY #$006 f- u$ q" p' L4 d# ~, k9 a
  731. LDX #$10- Z; D5 g7 x- m' M% q. f+ h
  732. VramClearWrite
    ) f- t# H0 o7 a2 s. ?1 _; v
  733. STA PPU_DATA
    7 @' D: \0 G: `7 v+ y
  734. INY
    1 s3 E) C$ f! [9 o
  735. BNE VramClearWrite* @$ O7 L4 M. v) i& v
  736. DEX: x# i4 h& h* C! h( _" a3 n% |
  737. BNE VramClearWrite! l; a2 J  y$ N/ S+ N- A# Q
  738. RTS% E( m0 c4 M0 q$ V7 \& ^- I& w

  739.   _6 S" {$ ?7 J8 N' r
  740. ;==================================================
    4 o$ z& J) M2 ]
  741. ;设置MMC3图像bank: W' y2 e- G' |! J0 P
  742. Init_MMC3_Chr_Bank
    % M! r) S+ @1 J% d) a  G
  743. LDX #$05
    # Z5 p' G6 U) I& _
  744. Init_MMC3_Chr_Bank_Write9 d$ h& X4 s& F  {6 q
  745. STX MMC3_BANK_CTRL$ V$ u% y# p4 Q( U
  746. LDA MMC3_Chr_Bank_Data,X+ s' h7 I7 S, ^7 s' O; z* Q
  747. STA MMC3_BANK_DATA
    7 p  e) j/ Q* n
  748. DEX  s4 W" m) r) T; Z
  749. BPL Init_MMC3_Chr_Bank_Write! L* t! I! t9 N- X7 M% k% K
  750. RTS) O8 b+ R! k( O- O7 _- j
  751. ;--------------------------------------------------
    8 {/ j: U" _- T; Q3 k6 C
  752. MMC3_Chr_Bank_Data/ `; X" z; `( _" j3 Y
  753. .DB $00,$02,$04,$05,$06,$07
    8 y0 i; G: n" \* @
  754. 4 g4 T4 @) y; d5 C- [% r
  755. ;==============================
      [* a6 E! p8 d" U4 q! Y
  756. VramInit;初始化图形内存6 e3 x9 c2 H& s9 L# x7 p
  757. .IF CHR_RAM_ENABLE$ s' _5 x, t7 a2 R( e! d& `
  758. LDA #CHR_DATA_BANK
    , y. U6 P; j% S7 P
  759. JSR Switch_Bank_A0003 H4 }( L. v! G' z& ]
  760. LDA #LOW(CHR_DATA_ADDR)
    ' O5 _. ?0 |1 M; A
  761. STA <Data_L
    . t! |" w  c0 V! A. j
  762. LDA #HIGH(CHR_DATA_ADDR)0 @# l% H9 J. I
  763. STA <Data_H
    : R9 J# J; D, u: E1 r4 R
  764. LDY #$00: z5 l8 z8 q. F
  765. LDX #$20
    : Z6 i! V- }3 z) |7 @- X
  766. LDA #$00
    . K! e) ], i0 r' U7 z1 |
  767. STA PPU_ADDRESS
    & [8 }( a/ u$ ]
  768. STA PPU_ADDRESS, s8 m+ Z6 O; J7 a' L
  769. VramInitWrite. ]& \: C* O2 T5 t, G- H, n
  770. LDA [Data_L],Y
    : o" f2 {9 H) G6 v  g7 R
  771. STA PPU_DATA# B  f( f. N- b* F- w. c! j
  772. INY; H0 e8 C8 X# q' y2 A
  773. BNE VramInitWrite5 N7 `" j1 v2 K* f
  774. INC <Data_H% r+ b0 Z1 T4 l, Y$ r1 \1 l; s0 s
  775. DEX
      o" _9 K* M4 f. c' D
  776. BNE VramInitWrite: W! Q6 l# A, w1 @7 `
  777. .ENDIF5 d6 n+ ?4 \* Y9 w9 \
  778. RTS
    ' V: y$ v5 J: W& Q: K) Y
  779. 2 v9 u- W6 B* S6 @% C4 @
  780. ;==============================
    2 B" t0 o$ e/ A; \3 J" j: |
  781. ;音乐切换
    ! U0 I- g. {: H' s6 |/ V
  782. Music_Play_Change
    * X* i5 u. z5 r9 G+ @, R1 c3 L% K: z
  783. LDA <Key_Once
    % ~/ A, ~: C( C
  784. AND #$FF
    . R" W1 T3 y* h8 r$ B' p
  785. BEQ Music_Play_Change_Check
    & j& o& l% [5 h( H

  786. 2 N9 Y. L2 ~; s5 }0 X* Y
  787. ;禁用音乐条刷新5 @/ u8 l, W4 E+ V- F4 {
  788. LDA <Text_Disable_Flag
    0 f( F4 B: j- N. B7 B
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME% V  T5 Q1 e% u( Z
  790. STA <Text_Disable_Flag
    ! f5 {" L3 v% Q3 J+ H# [
  791. " |( k8 T) [3 w  K
  792. Music_Play_Change_Check
      H- L( Y1 u) S" M$ S
  793. Music_arrow* L3 j* }8 |4 a) X
  794. LDA <Key_Once7 _; j; B9 N9 j! r  z( m3 b
  795. AND #$0F
    ' g0 N0 Y% v9 k5 u* e' a# r" k
  796. BEQ Music_Play_Change_End8 `5 n* r: d1 N% U" V, V
  797. JSR Music_Track_Change: k; W+ f" r& i0 J* w1 d
  798. JSR Sound_Reset_Proc
    " {2 D7 ^: V2 [' x* y. Q) t
  799. JSR Music_Show
    6 k9 S/ n3 w6 d% U  u% [
  800. Music_Play_Change_End
    5 ~0 U: l% Y/ l% x, W! N% Q
  801. RTS
    ! P! g: C4 ?: [" A) P1 Q, Z0 k4 m3 ]
  802. 2 w  L  u, _5 v9 n2 ^3 a, I) D- M
  803. ;==============================% G: i$ _/ k2 N
  804. ;音乐曲目切换; L. A* Q& T" I, }9 Z3 ^; T
  805. Music_Track_Change
    3 ?7 V2 Y2 x  K/ C4 P
  806. LDX <Music_Item_Cur- \4 W6 O" _8 B  p4 O# c( M: F% F- ^
  807. LDA <Music_Cur,X  L( ~  j# [# U: N! Y
  808. STA <Music_Last& h; a1 ~5 v0 L
  809. Music_Decrease3 m/ R+ C5 i* o& S* o8 L$ s% `5 w
  810. LDA <Key_Once4 H: @, ?& S) t  w& T
  811. AND #$42
    0 z: e3 z" \) f; J/ f- Q* G
  812. BEQ Music_Increase6 c5 R. z* b0 C! L
  813. LDA <Music_Cur,X
    5 C- w6 X0 l$ X; g& X
  814. BEQ Music_Increase
    4 K0 k+ S5 P! u9 Z& [+ {
  815. DEC <Music_Cur,X
    8 v9 y0 y+ t" e
  816. Music_Increase
    ; j# h) @$ k3 f8 R9 m+ F# X
  817. LDA <Key_Once
    * \" G& r8 t1 _$ q
  818. AND #$81
    0 h3 H1 P6 ^2 V8 O% u
  819. BEQ Music_Decrease_101 Y! ^: q6 s9 O: p/ }' }# H
  820. JSR Set_Sound_Total
    , T2 I; Q: r7 b; j& h. L
  821. LDA <Music_Cur,X+ I5 \' ]$ C& ]8 O
  822. CMP Music_Total9 f5 E- a5 S$ o  T& u' I
  823. BCS * + 4/ ?: L: B5 W/ }; R) \
  824. INC <Music_Cur,X8 d0 g& q) S3 {
  825. Music_Decrease_10
    & ], j* k8 ?- ]
  826. LDA <Key_Once
    6 s5 M7 s, Q8 Y! y" {! K/ R# z
  827. CMP #$045 @' V( d6 v/ j! g: J
  828. BNE Music_Increase_10
    5 R& h: ~  c7 J9 v( I8 D
  829. LDA <Music_Cur,X
    2 y0 H' o) E7 c) T
  830. CMP #10
    ! g# W0 b/ M5 H
  831. BCC Music_Start_Song_Min
    9 D/ G* I& [- r# ~+ T: G  V
  832. LDA <Music_Cur,X  o# {4 I- g0 i8 s5 H4 d
  833. SEC
    - y9 ^/ W( q7 }3 {% w9 z1 `9 S5 \* m; D
  834. SBC #10
    " \# o2 r& i8 u' p$ w& T! T  a
  835. STA <Music_Cur,X
    4 q; f: p5 a  K" c' K) h3 S7 S. A
  836. LDA #$00
    * z) U  s( p/ g  T0 Q7 }1 D
  837. BEQ Music_Increase_10- j; W2 u/ A6 G. S- V% F
  838. Music_Start_Song_Min
    9 X2 ]7 C- Y+ p/ b
  839. LDA #$00# R7 G- w8 z, j. H% q; W
  840. STA <Music_Cur,X* Z4 `( }1 n6 F
  841. Music_Increase_10
    7 P0 K" H3 _+ w7 ~. V: O- ~' R
  842. LDA <Key_Once4 Z7 U7 ^; \3 |  v# n! ~% O* d4 D
  843. CMP #$08
    1 {! @; I" `/ I! h9 t
  844. BNE Music_Track_Change_End5 b3 R+ A+ a) {) X
  845. LDA <Music_Cur,X2 D& f) }) Z- \7 V$ k
  846. CLC* E7 k0 N- c; {7 t
  847. ADC #10! r! ^. M0 F+ i, w( V3 [5 x
  848. CMP Music_Total
    ( R$ A. n: R' C( D
  849. BCS Music_Start_Song_Max
    ; w: W" I" w) v0 Q; Y' D
  850. STA <Music_Cur,X  N4 V# H" e% B8 n
  851. LDA #00
    3 F: Z* U3 k$ F8 V& b& F: P
  852. BEQ Music_Track_Change_End' J! L) {( ?) g; U
  853. Music_Start_Song_Max
    ) t  i1 A& }9 W
  854. LDA Music_Total
    ) h* \: Y7 Q6 u9 ?: a
  855. STA <Music_Cur,X: O9 S2 J8 B1 V  ^8 k
  856. Music_Track_Change_End: o& D+ i% `" K0 O
  857. RTS1 j* J9 V' z# b+ V9 i8 \

  858. ; v3 Y( U( R4 U3 r) f* y
  859. ;==============================0 o( ]7 R  Q) ?% Y1 r
  860. ;按键处理
    9 H; E( `- S6 \' U- Q
  861. Key_Proc
    / @  {' t0 q! }2 `, \& }% s
  862. JSR Key_Scan
    5 K8 C4 P$ i- v, m) |: I. ^8 ]
  863. LDA <Key_Keep6 E! M! H6 @: R' |2 @
  864. STA <Key_Temp
    . ^. R# B' A! Y+ [& P9 j9 h( Y
  865. JSR Key_Scan
    0 m! r$ k* A, j
  866. LDA <Key_Keep
    $ `, X5 p# s4 v0 E4 O1 l
  867. CMP <Key_Temp/ g* ?9 E$ `6 L
  868. BEQ Key_Get_Once
    6 o$ B: W6 m! [5 B$ J
  869. LDA <Key_Kemp
    ! u+ T* W2 I* {. R4 `
  870. STA <Key_Keep
    # I/ K5 q1 Q# G# `' k( v( v+ ~
  871. Key_Get_Once: q7 x/ j( T8 G8 G3 }
  872. TAY
    $ ~% ?5 Z" _) P! n3 t# q
  873. EOR Key_Kemp
    6 h  c  p; Z. N7 O7 j  q9 S* E2 k
  874. AND <Key_Keep
    / H$ @' {( @* y  j/ t$ T% {$ Y
  875. STA <Key_Once9 e+ k0 O9 T/ C/ u
  876. STY <Key_Kemp. E; s+ h, _( l* x
  877. RTS
    $ W7 N0 m( z7 b& ]3 D) J
  878. ;------------------------------
    ( V9 H' e6 S9 @, J& n$ F  l
  879. ;按键扫描
    - R+ H$ w5 p7 I6 @
  880. Key_Scan
    / M7 i- o- F& V/ A
  881. LDX #$01/ \& p7 W' U! G" T+ ~$ Z
  882. STX JOY1_FRAME# ^. t% |8 z( b# H0 r! f
  883. DEX
    5 w' n' R; j7 x# D
  884. STX JOY1_FRAME
    2 v" U/ W! e- A# h; J( W0 \
  885. LDX #$08+ C% J4 D$ n) m3 d8 T
  886. Key_Value% L- V4 ~( q7 R# {
  887. LDA JOY1_FRAME5 V5 Y* F, P0 t# d6 I. K
  888. STA <Key_Getv0 N$ V# |* v6 t
  889. LSR A) n  c! {. u3 Q( H8 y% j
  890. ORA <Key_Getv! _2 Q! [5 m- c
  891. LSR A
    5 h& C  g) i: S: R1 w
  892. ROL <Key_Keep1 P$ s# Z8 _* J( f' ?! h# s# T% o7 ]& j/ _( h
  893. DEX
    * @1 Y/ @1 A% ?; W4 ]
  894. BNE Key_Value
    9 z4 y' z' I% W# b8 E& n9 d+ c
  895. RTS
    ) \0 U  y4 d8 B7 d/ N0 g- \7 W0 L7 r

  896. ( D/ }7 Y: l1 X4 c6 w$ v/ S$ E
  897. ;==============================
    5 o  I0 |) P( [+ ]4 n- @
  898. .IF SOUND_BAR_SHOW_ENABLE
    + ~$ u% R5 h+ a% u* b
  899. ;音乐条显示2 e0 G5 h6 T- K; j
  900. Music_Vision
    + V+ G6 ^& o4 {# d+ v0 T, R& v# @- H' q
  901. LDA <Text_Disable_Flag+ {2 @0 R1 I' G- S9 O9 ^
  902. AND #TEXT_DISABLE_ITEM! f9 T6 D# T- n
  903. BNE Music_Vision_End2 T6 q; T7 ]9 ?& u. {! [
  904. AND #TEXT_DISABLE_BAR
    + ~/ k8 ]0 ?% m2 _5 G$ j
  905. BNE Music_Vision_Set0 c' s! m3 L) G3 R1 P  n% s' L4 J4 c4 n
  906. LDX PPU_Cur, t  a* u. T  n+ ]6 Z% t
  907. JSR Music_Animation; Y. U) Y- l& l; Y& P
  908. STX PPU_Cur
    & H" K& Q, }5 O% [- [
  909. Music_Vision_Set
    $ v5 l9 }: Z2 X4 U) w( ]1 u' n
  910. LDA <Text_Disable_Flag# h+ d0 k3 O8 o& N1 }( y" l
  911. AND #TEXT_DISABLE_BAR ^ $FF' k5 }9 o0 R; h6 b. n& r
  912. STA <Text_Disable_Flag
    & B# x& H! [% F5 g4 t" n9 z
  913. Music_Vision_End
    7 J+ a' d* R; B- L* H/ u
  914. RTS
    5 F8 V6 J5 k5 h6 p
  915. ;------------------------------8 ^' C1 {4 H* q" j; `
  916. ;音乐条显示处理
    # \3 z/ k, p4 K  t) b5 p4 o  L
  917. Music_Animation. k6 {1 C! V5 B: t
  918. LDA #PPU_MODE_CNT_LINE
    7 L: X7 K. Z( |& p* P6 R; r
  919. STA PPU_Addr,X
    * T; V. ?4 V8 A6 _9 K' \
  920. INX
    0 }: X4 ?7 f7 e! d9 i
  921. LDA #HIGH(Sound_Bar_Pos)
    9 w5 S% a" @$ M% E
  922. STA PPU_Addr,X0 P8 T, n; f) y" c/ z" P9 G
  923. INX
    * A( _3 P' |+ Y$ ~
  924. LDA #LOW(Sound_Bar_Pos)2 \  l% n) _( o5 x0 ]0 F, [
  925. STA PPU_Addr,X1 w+ ~- V2 F4 ~. J+ x
  926. INX  J  X: Z* U: p+ J( i0 f7 n
  927. LDA #$08
    ( a5 K7 C9 N6 ~0 N5 ?* e( Q
  928. STA PPU_Addr,X
    4 O# d/ M2 b+ [" n! K
  929. INX4 m3 r* t# \1 C( m. d
  930. LDA Sound_Bar
    8 P- m. b+ R, j2 y# y! U
  931. JSR Volume_Convert, o$ m- F* F' ?3 g* X
  932. 2 B, M& Z5 r! ?( U6 H5 X/ f; }( u) `
  933. JSR Volume_Set_Cnt7 M: Y9 u1 p  f- {; t' u
  934. LDA Sound_Bar+$4
    * I8 d- m! L3 y( N1 K
  935. JSR Volume_Convert" Q7 F+ C6 [: E

  936. ( E1 k3 z. D8 Y1 B/ T% ~
  937. JSR Volume_Set_Cnt% X! [; h; w! X( {
  938. LDA Sound_Bar+$8
    ; W5 k1 r0 w1 e( g  h9 _
  939. JSR Volume_Convert
    8 ~8 `) h" j7 n0 [: F" |+ N

  940. " I, T7 x1 K( l2 N
  941. JSR Volume_Set_Cnt
    ! q0 {6 g6 N! P$ X1 l
  942. LDA Sound_Bar+$C
    ) \+ i+ B$ J. a0 s
  943. JSR Volume_Convert: J8 P# {! f3 v5 ?" H$ F# Q7 N

  944. " O( u2 Z8 E+ m* N* k
  945. JSR Volume_Set_Cnt  {, Z0 e* h8 h4 ~& B

  946. & O4 S3 _" ~- k, @8 q& ?" u
  947. LDY #$106 C% b- Z' z% g/ k/ a. j
  948. LDA APU_STATUS3 D& }7 o7 {& B) K9 e. e
  949. AND #$10
    ; `4 }& K: C6 ~9 A% A6 d
  950. BNE Volume_Count; N; ]' i5 k/ F- B0 V# Y
  951. LDY #$007 \& x9 E7 V5 Y
  952. BEQ Volume_Count
    * K$ l- |7 S! x" ^! z# u
  953. $ m/ N* X5 S# L7 I7 k, S# Y
  954. ;------------------------------# j! S7 }$ R4 u% N- D) e7 o5 |) s
  955. ;音乐条处理
    # }& s/ Z8 e3 _5 {: j4 B5 K
  956. Volume_Convert
    6 ?$ }# d+ ?8 c
  957. AND #$0F
    1 [/ z( E; `! R" c
  958. TAY
    * z8 F( U2 s/ O2 Q" I
  959. Volume_Count- I. l& u: S# y7 |; q/ _
  960. LDA #$08
    0 M' I! L9 N! N' Y0 V, d; i
  961. STA Sound_Bar_Cnt5 W0 f' ^1 P+ A: j4 S# Z( D$ w
  962. Volume_FILL1 m0 R& \' J! \4 L; S
  963. DEY
    % A" i- O% v7 a- }5 e( Q
  964. BEQ Volume_Half& m  z) i3 C% q3 h
  965. BMI Volume_Empty( x9 ~) D& y' H0 I
  966. DEY
    * x2 k, S7 C! N! Y5 V
  967. Volume_Full/ n9 j5 Y0 J& B# B( d
  968. LDA #$16# Q, C/ o/ v: P
  969. BNE Volume_PPU: i: d/ X9 v4 }8 A
  970. Volume_Half' I. i/ g4 K9 e3 P: C
  971. LDA #$158 r( y8 F* Q; \/ C& M
  972. BNE Volume_PPU
    . H  |* O7 y5 t, Q
  973. Volume_Empty
    * N0 u$ ?3 [; R, [6 C
  974. LDA #$14
    : I$ o1 [: n) y4 k
  975. Volume_PPU
    . f7 v1 n0 h* H; }2 ]
  976. STA PPU_Addr,X
    $ d/ D7 ^" [0 ~! I" D: c
  977. INX
    $ T% i( E- n! {- N6 u
  978. DEC Sound_Bar_Cnt
    ( }' g4 _; v9 l& p
  979. BNE Volume_FILL
    - g8 X& Q5 b' e# k& p4 i
  980. RTS
    ! m2 U- Q  U8 d

  981. ! t4 v' L1 q# i, U9 X$ Y( W
  982. Volume_Set_Cnt% ^2 F$ O( w0 X7 e. ?
  983. LDA #PPU_MODE_CNT_LINE_NEXT' m5 a. U; u/ c8 D' \' d
  984. STA PPU_Addr,X
    * u7 N9 B, V/ M4 @7 s+ l/ g" F
  985. INX6 p: q6 N# V# i2 x: q& K
  986. LDA #$08
      i# ?, C' t% x2 b
  987. STA PPU_Addr,X
    ! y& }% [/ _! R- Y( w* J
  988. INX8 N& G) `! y7 w: P, g8 P$ [
  989. RTS( R3 O# B: y/ P! R8 x

  990. ; e) ~) i+ U( U" W/ v- M; z( J
  991. .ENDIF& @7 t: C7 v' s) v2 O
  992. 8 K* H2 U, |# u
  993. ;==============================
    7 \. L; R1 [- ]) F
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入9 _0 E$ d  L8 z0 j7 H, D
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式8 w- [9 x: u  w8 f! D
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除
    4 S* b9 t6 z5 h! B
  997. ;------------------------------
    - z: L- a; Q: @
  998. ;PPU处理6 t4 W. E" a6 [) Q
  999. PPU_Proc. Z3 e/ M9 X( ?6 u
  1000. LDX PPU_Cur- X) f$ |. {: L
  1001. LDA #$00
    ) v* H3 t: t, J. x
  1002. STA PPU_Cur
    ! o6 p0 k3 |3 V4 }4 n( b$ Q
  1003. STA PPU_Addr,X; q9 ]& E8 k# h+ g/ Z) c! v( d
  1004. LDA PPU_Addr
    / @8 s: y. g  }" s3 i; v4 |+ d
  1005. BNE PPU_Proc_Beg
    ) ~- A4 c4 W8 x' v
  1006. PPU_Proc_Ret7 h3 W' z& I( L& v7 A- S
  1007. RTS
    % ~$ i- T( u; r( y

  1008. 4 C# F$ M% d' ^
  1009. ;------------------------------9 W- i! N. F. N& l2 [
  1010. PPU_Mode_Return_Cnt  ;转下行模式% c3 f6 Z; [1 W2 v. D
  1011. INX
    7 l  t( V2 a& r5 S
  1012. LDA PPU_Addr_L
    * |; ~" Z2 Z3 O, @- }2 [
  1013. CLC' `4 S2 S0 X6 \3 S% M  S6 u& O
  1014. ADC #$20. |' L- L% P# V
  1015. STA PPU_Addr_L: i' K2 `* L! S5 ?2 m
  1016. BCC PPU_Mode_Return_Cnt_End
    % {& m, b( J# ]5 o- R$ W
  1017. INC PPU_Addr_H% i, b  C% J& Z
  1018. PPU_Mode_Return_Cnt_End# R) v3 x+ x3 L3 o9 N; t: M
  1019. LDA PPU_Addr_H+ n3 {; O9 l9 W7 B; W
  1020. STA PPU_ADDRESS
    ) s2 q5 c9 w5 k3 Z
  1021. LDA PPU_Addr_L
    $ E' j+ R) z3 ]' @/ P0 o& K
  1022. STA PPU_ADDRESS
    3 c" y% }& f. ~5 a, _* D9 D
  1023. LDA PPU_Addr,X. a0 d5 y+ ]" |: o- b* V# N
  1024. TAY% ]: T1 R- _$ U+ J7 I" I
  1025. PPU_Mode_Return_Cnt_Write6 L2 ?9 Q6 y6 S" l6 r& a; a: J* U
  1026. INX, L4 K. m( C1 ~: F' I+ b
  1027. LDA PPU_Addr,X
    5 k2 T+ D4 z4 C$ P3 y
  1028. STA PPU_DATA1 n* J) c5 L+ N& Q; t0 p
  1029. DEY9 d3 g4 n+ P; [$ ]
  1030. BNE PPU_Mode_Return_Cnt_Write. y. U! q) M5 \; Q& B9 P
  1031. JMP PPU_Proc_End
    0 }, g% ~( ?* T( I: u9 _

  1032. ; ^6 r' N% i, ?# f# K: Y1 y
  1033. ;------------------------------
    * d! f' o' @4 |# R1 p7 ^5 }2 K
  1034. PPU_Proc_Beg  ;处理开始1 m3 e* w5 t& e
  1035. LDX #$00
    " F3 {1 r- Z! U) l
  1036. STX PPU_MASK4 s$ g; W/ q# w
  1037. ;------------------------------5 R3 u( ~/ ]. O$ k7 L: L" [2 @
  1038. PPU_Mode_Select  ;模式选择
    , a$ N. p* a9 B1 z" W% c
  1039. LDA PPU_Addr,X  @& A% w  i- |, U' R; B  ~; J
  1040. CMP #PPU_MODE_CNT_CLEAR
    8 V6 @: t, v' G
  1041. BEQ PPU_Proc_Clear
    / b- f& K3 C; d: P" `
  1042. CMP #PPU_MODE_CNT_LINE
    8 {) q1 l: U( ]2 k3 |' y6 {
  1043. BEQ PPU_Proc_Cnt_Line
    # u) i3 U, E4 {
  1044. CMP #PPU_MODE_CNT_LINE_NEXT
    3 i0 a0 L. g( s' t' ?2 v8 F
  1045. BEQ PPU_Mode_Return_Cnt% q( a( c" D: @1 F' i9 L( a. A2 W
  1046. JMP PPU_Proc_End_Write  z% A! ^. F4 K& [8 G2 g
  1047. ;------------------------------: ^' K, f( c' P+ K
  1048. PPU_Proc_End  ;单行写入结束+ V6 f/ q+ M! r4 S' s2 p# K4 w
  1049. INX
    5 i6 |, S) f3 P' r
  1050. LDA PPU_Addr,X
    - Y& D: L" H) y0 q; k) W, n. ~- j
  1051. BNE PPU_Mode_Select" H! g/ T0 f' K- q5 o2 k
  1052. STA PPU_Addr9 I/ D, z; b4 ]; Z  `6 W6 \
  1053. JSR Update_Palette_Color
    / q: G; w0 I, ~

  1054. ) y( E7 t8 [1 B8 M5 O2 ?2 G
  1055. PPU_Proc_End_Write
    ( ^2 w. f( q6 A- F. _1 l- q
  1056. LDA #$00
    3 ~! o# e1 O4 u8 G' j
  1057. STA PPU_ADDRESS) b# A1 g) G/ q1 e3 s& \; k7 p
  1058. STA PPU_ADDRESS
    + u: M" d3 Y$ W7 }
  1059. LDA <Text_Disable_Flag
    : O. |' U( T4 r) h$ ~& t
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF
    5 w8 X* c9 K( l) A- v" y; T, _9 U
  1061. STA <Text_Disable_Flag% Q3 ~  D! F" E& K: b
  1062. LDA #Scroll_X
    % r( ^) H% d7 b2 [3 T
  1063. STA PPU_SCROLL; c- X& r  G$ U9 D; M6 d" a
  1064. LDA #Scroll_Y
    $ I/ _  Y, o8 F4 j& r  ^+ Q
  1065. STA PPU_SCROLL: V8 W/ @4 h" @  s4 M; G( N
  1066. LDA Screen_State
    - q7 ^' Q! h6 v& l4 a# [* F$ p! n" C
  1067. STA PPU_MASK: p6 I8 M1 @) r+ }; g3 x' g
  1068. RTS
    $ s" F) M9 F. y0 m! |, ~' F2 q( ?& D- J
  1069. 2 [4 f0 F! e2 t3 m
  1070. PPU_Proc_Clear7 Q# y7 |, E0 n
  1071. INX
    , {( w0 R6 |  I6 p& R& q# _( E
  1072. LDA PPU_Addr,X
    4 M0 `6 L5 E3 A/ M! B2 I
  1073. STA PPU_ADDRESS/ e% g: j  u" P" Y1 q$ Z$ d9 c: f
  1074. INX8 `, q" U9 l) V5 H" G/ ]" i
  1075. LDA PPU_Addr,X" z# r+ R8 X5 A: F
  1076. STA PPU_ADDRESS
    ! X( O" k8 q9 L0 \6 H2 p6 e+ z
  1077. INX
    8 H8 a$ x" {# S9 U4 U4 Q
  1078. LDY PPU_Addr,X
    4 {0 U8 G1 [# u8 p! ^6 x% N/ |
  1079. LDA #$00
    1 x% Z0 l6 z* w
  1080. PPU_Proc_Clear_Write& v* C4 v6 q& J4 w$ X' R! g
  1081. STA PPU_DATA9 E; S9 y! V8 d8 P
  1082. DEY
    . R5 C* c1 S' |4 k" l
  1083. BNE PPU_Proc_Clear_Write: {; w  b0 b( [, @0 o
  1084. JMP PPU_Proc_End
    , `5 f  H8 W6 i" |$ F0 l' M$ a  r
  1085. 8 t: P6 t% L0 K/ O7 |
  1086. PPU_Proc_Cnt_Line
    ) P4 T/ Z' t% z4 f
  1087. INX  D1 `& g' i: S, D( R
  1088. LDA PPU_Addr,X
    : u9 Y$ f; M# \% l/ \
  1089. STA PPU_Addr_H1 v9 W9 w7 v1 F+ b" T7 O
  1090. STA PPU_ADDRESS$ C( W' k5 X" j* E9 D4 L; L
  1091. INX
    : n* \; ^! A6 Z  K! ?. Y
  1092. LDA PPU_Addr,X0 V2 ^: l& a( F
  1093. STA PPU_Addr_L
    * ?  r& B& X% i2 e( M
  1094. STA PPU_ADDRESS
    % q* }8 i. F5 l1 H4 X
  1095. INX- G3 @+ i5 r9 t' Z" [) I  ]
  1096. LDY PPU_Addr,X
    * D- w  z9 u" h
  1097. PPU_Proc_Cnt_Line_Write
    ! H4 b: n2 m1 k$ T7 F: R
  1098. INX6 I, C% ]3 K: x& ?2 O
  1099. LDA PPU_Addr,X
    - }7 a1 K2 ?4 D
  1100. STA PPU_DATA
    . H8 r" u+ E! q! W
  1101. DEY8 m$ @6 Q0 }3 [  S/ Q
  1102. BNE PPU_Proc_Cnt_Line_Write
    ' G- V% Y& z9 o( J7 Q# m& \7 p
  1103. JMP PPU_Proc_End
    5 i+ V# h, Y* `
  1104. 7 K5 V1 |+ p& t6 Z' Y
  1105. ;==============================+ _) \4 F& r- c5 ]
  1106. HEX_To_Dec;十六进制转十进制
    8 Y% T4 L* ^% o3 d# g$ u3 N( M
  1107. STA <HEX_Data
    ) F5 R3 V) d5 ^2 B& G
  1108. PHA
    4 E. b# D, e/ y
  1109. TXA
    2 e3 U: O5 J: \
  1110. PHA/ l4 M! w; u6 ]& g- U! [: Y4 N( t8 j
  1111. LDX #$00
    / s* v  ~6 [# x) ~
  1112. LDA #$00% J2 D1 x) h3 N4 K" b  I) b& o- |8 T
  1113. HEX_Cln$ p) U0 l, w7 ~; J: {' s/ m1 r$ r
  1114. STA <DEC_H,X$ Y; X+ U6 F5 f- T3 {1 F
  1115. INX
    ) y/ X! U" ]& M4 i$ `
  1116. CPX #$03
    # K( P- x+ D  ~) W$ I
  1117. BCC HEX_Cln
    8 K& [- _" l$ o- \- ]9 E- a% Z
  1118. LDA <HEX_Data
    . _/ t7 c5 d+ M" r
  1119. ;------------------------------
    4 J  x: o) v# ]4 @* A
  1120. HEX_100
    4 @) R* e! v3 d' F9 q0 }6 J
  1121. CMP #100
    7 H, k' D" P6 Q* g
  1122. BCC HEX_10  |+ W# v$ F# g) x0 B5 R
  1123. SEC/ ^" V( e) }7 @0 g, Y
  1124. SBC #100
    2 Y' n; P4 x8 Y& d! M. |! g& [. b' P7 m
  1125. INC <DEC_H9 e5 }4 {+ c  M6 \: f" f
  1126. BNE HEX_1004 z; V$ X1 ?% y" m( C' i6 q
  1127. ;------------------------------
      ^! I  I6 g6 G7 s2 u; r
  1128. HEX_10$ e* W! e( q. h8 n* z+ [6 `
  1129. CMP #10
    $ T/ e+ N  Z  q6 J
  1130. BCC HEX_1
    & x; p  R4 z0 k& A1 C7 |" I
  1131. SEC
    ' {8 |- T& Z% e4 t  ^; X  r. W# v
  1132. SBC #108 j6 M' r" ?: M& z- |  i
  1133. INC <DEC_T/ F! x: l" O" w: C* p+ Y
  1134. BNE HEX_10
    6 D2 J& v* z6 N3 \* D
  1135. ;------------------------------
    % `: Y7 b; B# O" K, J+ v7 _
  1136. HEX_1
    6 @' P3 R% z: W
  1137. STA <DEC_L
    # p) B. O9 q0 M; h; |
  1138. PLA
    / x+ D5 G# G- V6 _0 ]
  1139. TAX( u/ h5 q, e  p- e! j
  1140. PLA
    " F) Z" |* ^* ?
  1141. RTS
    6 m/ J( M: G) b% i
  1142. 1 [1 J$ ]' V% l+ a
  1143. ;==============================
    # I0 ^1 v$ n# y1 f' p
  1144. ;音乐曲目显示
    - L" ]: f3 f6 c/ `' i/ ~* v
  1145. Music_Show
    ! s4 c+ l( c: o1 \
  1146. LDX <Music_Item_Cur
    5 T3 w" H! e; b3 X# v& J9 d
  1147. LDA <Music_Cur,X: L8 p" R- N2 l; ^  {
  1148. CLC
    : b9 Z7 L! _" \5 E4 ~: H4 c8 D' L
  1149. ADC #$01
    " t% O2 V- r. A7 H( ~+ Z( U! {# e
  1150. JSR HEX_To_Dec
      p4 N0 ?9 J1 ]$ @. Z
  1151. LDX PPU_Cur
    7 N, I3 _. U6 p% x* {: ?5 F
  1152. LDA #PPU_MODE_CNT_LINE
    ! M4 |0 h& u4 W- G) _
  1153. STA PPU_Addr,X
    3 O% |2 p0 t3 b% s! f
  1154. INX
    : X  J( \  U, d- g6 z  u$ ^) R) {3 D5 r
  1155. LDA #HIGH(Play_Index_Pos)2 a' M0 J1 O2 X$ A( m3 g. [
  1156. STA PPU_Addr,X+ }0 b) {3 B* M
  1157. INX' M; X3 w  L1 B$ L$ x# w
  1158. LDA #LOW(Play_Index_Pos)
    / P2 j. b! ]8 ^3 v: \" [
  1159. STA PPU_Addr,X% e# |$ v  p% Z' z% H% D( M
  1160. INX2 t7 [0 y3 ?/ O2 A; a" M
  1161. & v& ]# m5 q4 V6 S' B' e% X
  1162. LDA #$071 [' n. r  P: M  e
  1163. BNE Music_Show_Length
    1 K5 r; x. F0 H* N  M" D

  1164. ' N/ \9 w4 `; M, I  R( M
  1165. Music_Show_Length
    ' H( K0 O; f: N; ]  u, q+ k. K
  1166. STA PPU_Addr,X( j' T! E8 y* {5 m7 ?  f) C, ?  P
  1167. INX* j' N8 b, }# j) _
  1168. " x4 M/ b# s. J; ^: e
  1169. LDA <DEC_H
    3 H) u5 |& s. T( E) A4 M1 Z
  1170. ORA #'0'
    0 e3 }- ^( Q$ p0 Y( u
  1171. STA PPU_Addr,X
    5 |/ O- m1 W" P0 e
  1172. INX
    - S; i5 @5 B6 ?6 h- e

  1173. ( J' k; k' ?0 k8 \: X
  1174. LDA <DEC_T" B5 ]& V3 @/ W
  1175. ORA #'0'2 f' T/ X9 N) u. ]
  1176. STA PPU_Addr,X
    - a" Z3 \/ \/ H4 M0 M
  1177. INX
    # d  p4 K5 [9 L* X% v9 i1 @

  1178. 0 R- E) P1 K( z. q/ u' Y
  1179. LDA <DEC_L
    5 I$ S( q7 D6 X3 ^; m$ \
  1180. ORA #'0'
    - V% `( v! ^9 w
  1181. STA PPU_Addr,X: x) ~) P$ N1 j7 @8 e' @6 o# }
  1182. INX
    , b) R! ~2 S, |* F6 Z8 i3 @* v
  1183. 6 V2 \1 w1 ~1 _& a$ U+ K  Y
  1184. LDA #'/'
    " r6 \# Z+ s; ]' @2 i* v
  1185. STA PPU_Addr,X
    + C! F# b: A6 N, _3 X' v
  1186. INX
    ! e6 ^5 ]( `  p7 `9 |% B% |! a9 S
  1187. Music_Show_Total5 ^- a& G) U+ w6 H4 W$ e% b/ S4 Z
  1188. LDA Music_Total+ A, o: J/ a6 t- ?  X
  1189. CLC+ V. _$ I5 J% u& {
  1190. ADC #$01
      a( q0 F4 I/ V8 l4 Y: ?
  1191. JSR HEX_To_Dec
    ! Z7 c# \6 ]/ P3 v

  1192. 7 u9 K& Y+ k1 b" y
  1193. LDA <DEC_H: D& w$ n7 R5 y0 z
  1194. ORA #'0'
      Q4 @* s! B( {6 h8 [2 ^
  1195. STA PPU_Addr,X
    + m$ `6 ]1 K: J# ]. l% B
  1196. INX5 M( m# z3 R  R+ {: W
  1197. 7 x6 m- M/ w1 i' E7 q. x5 _
  1198. LDA <DEC_T
    9 ]" E! d8 R4 Z( a; x6 Q
  1199. ORA #'0'" k, j5 C5 E. B" q  Q
  1200. STA PPU_Addr,X
    0 E$ U7 b6 K# |% X8 E; [3 s3 v( j
  1201. INX$ g: q" _: [! @7 b5 _3 R+ ]
  1202. ' s* A* S; O1 n
  1203. LDA <DEC_L! l* Q/ {8 `3 T. [  J* B0 {9 u
  1204. ORA #'0'
    3 ^8 l5 g) C/ q* b9 E
  1205. STA PPU_Addr,X! c) O1 t( Y7 i; s
  1206. INX% e; q# z( i/ Q. y8 R2 z0 p

  1207.   I4 x  a9 Q# d
  1208. STX PPU_Cur
    2 }9 J0 l7 a  {& [, g9 \* }8 q
  1209. Music_Show_End; K8 j9 m% _3 h$ |+ j0 C/ A8 C
  1210. RTS
    8 `8 T. {( A' C( y& G' }
  1211. 9 Z2 E' X; {9 P, r
  1212. ;==============================
    ) Y7 l: Y* F# J( Y' P! L
  1213. Time_Show;播放时间显示2 n! k: ]4 j7 P" S% e) n  a% `! Q
  1214. LDA <Text_Disable_Flag
    ) [4 ~( B* B2 t
  1215. AND #TEXT_DISABLE_ITEM& p" L# {  h/ f
  1216. BNE Time_Show_End' i2 X. G- @  }$ T9 E
  1217. AND #TEXT_DISABLE_TIME% k) I  w6 V4 {0 W5 t$ Y4 U' a3 I
  1218. BNE Time_Show_Enable
    - T; u' G3 S0 j" x+ O
  1219. % i! C- U5 a( ]& Y
  1220. LDX PPU_Cur$ D1 _: V; H* q( k. _9 `2 Y
  1221. LDA #PPU_MODE_CNT_LINE
    # V4 |. y% Z$ _: P' S
  1222. STA PPU_Addr,X) S! n$ _2 t7 n6 d# F
  1223. INX& D6 C+ b- \' l
  1224. LDA #HIGH(Play_Time_Pos)
    ! E$ n( \, k  W+ d+ d
  1225. STA PPU_Addr,X7 W5 f% C1 ]/ u3 v
  1226. INX$ M' B# L4 ^) z3 d' ]3 f$ N
  1227. LDA #LOW(Play_Time_Pos). M( m' s' c- }9 q& R9 _0 n, x
  1228. STA PPU_Addr,X
    / M& @1 E, E) M" @: J  J
  1229. INX, C. B5 k# J4 ]; O( \
  1230. LDA #$08
    1 W1 w* A: X! F2 d
  1231. STA PPU_Addr,X
    8 r# U, H; Q+ a" W7 ]
  1232. INX$ V: ^* I2 n5 b: u2 l$ b
  1233. Time_Show_H# ]5 e- u# w/ O7 W+ _) y% r7 M
  1234. LDA <Time_H4 S2 b% f, ^! u8 ~$ l
  1235. JSR HEX_To_Dec: K) G; ~) A6 z& A8 q
  1236. JSR Time_Digit
    5 ]4 f8 \% P) @* A+ S  U  {
  1237. LDA #':'5 E+ s. k: l' Q* e) B! n! L
  1238. STA PPU_Addr,X5 u. I2 `6 Z0 R; z  N
  1239. INX: S( z8 u( T1 Q: k5 K2 S% a2 o
  1240. Time_Show_M# `7 }: w2 l/ o
  1241. LDA <Time_M
    - `) H+ }; y, a+ T4 d
  1242. JSR HEX_To_Dec
    ' j& E; E) p; s8 O
  1243. JSR Time_Digit
    # V7 O6 g6 I) o- I6 z6 S
  1244. LDA #':'
    9 ~7 R  v3 A2 O) D/ m. }. f
  1245. STA PPU_Addr,X% p9 T* Z4 w) M2 g6 N- \
  1246. INX; t+ [/ X  L: x' y0 I* \' H
  1247. Time_Show_S
    $ \2 T4 u5 T& n  c
  1248. LDA <Time_S
    - }2 a, G0 u1 v: h( q
  1249. JSR HEX_To_Dec, T2 F( q7 J* w  g3 z( k
  1250. JSR Time_Digit, \% z) c4 o4 W- v
  1251. STX PPU_Cur6 h) f- }2 _" A+ C# |. \
  1252. Time_Show_Enable8 g% a: W# s  v# [
  1253. LDA <Text_Disable_Flag
    4 @1 M% F. b5 f3 y. y
  1254. AND #TEXT_DISABLE_TIME ^ $FF. D: ~' ?& [8 D" w7 R. G- c
  1255. STA <Text_Disable_Flag2 }/ p4 {5 V! G2 ]  ^. m5 _
  1256. Time_Show_End
      i& f. f/ P( ^% @
  1257. RTS
    , k* @7 v7 l( h
  1258. ' F! b) D! n0 X' g/ d+ {
  1259. Time_Digit
    + G  L( `/ {! N" U3 o# [* _7 T  V
  1260. LDA <DEC_T% o/ V. j) b5 ~4 [* q
  1261. ORA #'0'  s7 ?4 r/ W. q5 Q+ I
  1262. STA PPU_Addr,X0 Q7 g( _1 x- l- w! M4 n0 G
  1263. INX
    & K( W- ^1 a) t1 W5 ~2 E
  1264. LDA <DEC_L- h8 V: i8 m1 O% Z: \
  1265. ORA #'0'
    " }) z; \4 O. d
  1266. STA PPU_Addr,X) L( t& V7 P7 `3 b
  1267. INX; r9 e, I' S* y0 k# `9 Q
  1268. RTS
    . L! u7 g" {# Z

  1269. - n1 a3 y. w8 q$ h0 \8 X
  1270. ;==============================
    ! `0 \0 ~) G8 E1 ]" K' t# C
  1271. Time_Count;计时
    ( L6 V8 I9 U2 @& e, V+ j" ]
  1272. LDA <Music_Stop_State
    . z. G6 Q7 P; o) @( M
  1273. ORA <Time_Wait_Cnt
    & o% j/ ^& J0 E6 t5 |6 `# N$ B
  1274. BNE Time_Count_End
    " I: k4 k5 f7 T. p6 [( R3 u
  1275. INC <Time_Cnt' S' j6 E$ C8 i5 N2 q* o
  1276. LDA <Time_Cnt/ Z3 d5 o  g/ y& N% T3 d9 F* o
  1277. CMP #60: ?7 L7 @7 l# l
  1278. BCC Time_Count_End) ~( L: R9 \4 O( L: q
  1279. LDA #00
    6 U  m# T7 _! P0 k
  1280. STA <Time_Cnt
    , N- _: ?: a+ N* \! R  f& d
  1281. INC <Time_S* @" M( d. y+ Y

  1282. % C5 D3 j6 B8 N9 K" @6 Q( B
  1283. Time_S_Cnt% M3 ]8 n1 j: v
  1284. LDA <Time_S# l# ^+ `: K; L' c
  1285. CMP #604 V$ |* y) W2 {, i6 l; K
  1286. BCC Time_Count_End
    * G+ O+ N: E  ~& s
  1287. LDA #00
    * H6 z9 F5 C$ @" H  a
  1288. STA <Time_S, y1 V. J- S5 q" g- s
  1289. INC <Time_M; I9 ?) V0 C) z  z% s% ^+ ~1 l
  1290. 0 |) g- `9 R8 u7 z4 `! R
  1291. Time_M_Cnt
    4 Z! a! A$ r# P
  1292. LDA <Time_M
    + J: J  y1 H1 _+ D6 c
  1293. CMP #60
    8 R' H' Z" u' W' {+ t2 j
  1294. BCC Time_Count_End
    " {/ k* U8 E/ a% ^+ Q
  1295. LDA #00
    " c; i. Z8 B& B3 N3 H  E+ ]
  1296. STA <Time_M
    & z- c* t8 u6 K5 C' @) S
  1297. INC <Time_H
    ' V9 F0 R3 E) F4 o

  1298. ! Y6 `8 Q* _9 X( F' o% I* \
  1299. Time_H_Cnt4 V4 R# S% I# `
  1300. LDA <Time_H
    ( f3 V* T0 \( r; p
  1301. CMP #24
    4 T+ @2 A' w% w
  1302. BCC Time_Count_End$ v7 `& J7 E+ N
  1303. LDA #00
    3 G2 D0 d4 F* f
  1304. STA <Time_H- K1 z+ O" C) g0 \" C/ |
  1305. 9 _7 ~& Q) [" q) R5 f
  1306. Time_Count_End# x) J+ E* ^! N" L- h
  1307. RTS
    7 P1 w. q5 D& _: k5 A
  1308. ! l' A8 o) o5 `9 C7 u6 G
  1309. ;==============================
    " s9 I* Z7 n6 f! f) H! J# N( V
  1310. Time_ReSet;播放时间重置
    4 q% r$ u; k; U& B+ j* q
  1311. LDA #$00
    6 B# D' J* e6 e) }
  1312. STA <Time_S7 ?; q: D' h) K
  1313. STA <Time_M . R3 R' Z2 t% t
  1314. STA <Time_H
    ! _( Y7 f1 z, F3 b1 E
  1315. STA <Time_Cnt
    7 R& m: C- ]1 x2 t
  1316. RTS/ J$ p! C0 B. D; N1 {/ l& n: o3 A
  1317. 1 F- _4 {( O" p: a6 D2 ~6 T6 h# u
  1318. ;==============================: l) r" j* }; [* ]0 v
  1319. Music_Bar_ReSet;音乐条重置
    , \. W. J5 ~$ S- q) h
  1320. LDA #$00
    1 b6 k' q' l: A& P6 q
  1321. LDX #$00) ^& f& s0 a" O3 k9 d& \. C
  1322. Music_Bar_ReSet_Set
    ! L2 _2 ?7 }% P. h' r7 b. I5 }
  1323. STA Sound_Bar,X* S% s6 g) x) X/ h0 v0 |# M
  1324. INX0 e! m, _0 l# w& G  }) e
  1325. CPX #$10$ k3 e3 Q9 E" E6 E; W9 ^
  1326. BCC Music_Bar_ReSet_Set
    ( V0 X- B; b+ T+ u
  1327. RTS
    . |* n2 \% j9 X# }) g
  1328. . j1 M% F. U: Y5 o2 Q1 E
  1329. ;==============================
    9 z& `4 I$ g( y+ W/ I' _
  1330. PPU_Data;PPU数据写入/ U# i* q6 ]/ ?1 B/ i2 ~
  1331. STY <Data_L; e9 T3 ^" |' o: N& f
  1332. STX <Data_H
    ( p$ }/ w: q9 q$ r. u+ E) c4 f+ ?
  1333. LDY #$FF
    1 a& ]1 N# v; c% V; T9 E4 A1 m
  1334. LDX PPU_Cur
    . J( t, _5 y3 r' F& i1 P4 {4 q: X: `6 u
  1335. DEX% d) C# Y3 Q0 z) @* O4 C/ L
  1336. PPU_Data_Beg4 B. a+ w% D8 v
  1337. INX
    9 _3 u& _4 O% k- V; R7 F& J
  1338. INY
    & @6 _8 F7 u% K  ^" m+ i4 E: ]
  1339. LDA [Data_L],Y
    5 Q/ ?* a+ D- a4 s5 p( k
  1340. STA PPU_Addr,X) U& e) F$ g# F' l9 x( F$ H$ K
  1341. BNE PPU_Data_Beg
    / l1 L5 }7 y& _6 t
  1342. STX PPU_Cur
    " m3 O  j8 U& [8 l
  1343. PPU_Data_End
    9 n2 A2 ?- e5 Y. @+ [- ]' g* q4 e5 p
  1344. RTS! g+ t9 x# d8 h2 _" W4 p
  1345. 6 s" d5 w. D) N4 R# M& O
  1346. ;==============================
    ) l- q6 D6 J9 F4 G3 i4 H& R7 D
  1347. Music_State_Show;播放状态显示" C3 m  B. g! r# X4 L) }
  1348. LDA <Music_Stop_State: p+ m7 V& T6 v4 r8 }
  1349. BEQ Music_State_Show_Play  I/ f; v3 C0 G  A$ s
  1350. Music_State_Show_Stop$ g1 F5 d2 n' a, i" i
  1351. LDY #LOW(Music_State_Stop); O7 `& {  N$ n. B2 w5 W
  1352. LDX #HIGH(Music_State_Stop)* w; x) D' e4 B& L; V4 M# i
  1353. JSR PPU_Data
    6 b' g1 {3 o9 S) w$ w
  1354. RTS
    * r4 x) Y; X" o: b0 C
  1355. Music_State_Show_Play' V4 G4 o9 l2 R' ]& J! `) a
  1356. LDY #LOW(Music_State_Play)
    ) [7 A7 c' S2 `
  1357. LDX #HIGH(Music_State_Play)
    0 ^6 ]3 j: g$ }* z% ?
  1358. JSR PPU_Data
    7 d* G$ \- M5 R' v6 U
  1359. RTS  e$ \9 Z/ ^4 z7 U5 F

  1360. + N8 N8 W: i8 U( ?6 s
  1361. .IF SOUND_BAR_SHOW_ENABLE
    " M: H8 m& }0 o6 e/ G
  1362. ;==============================# v; o4 e8 k' ?  s
  1363. Sound_Bar_Text_Set;标题与音乐条初始化' n: j/ ?# w( N2 \% Z* `
  1364. LDY #LOW(Sound_Bar_Text_Data)
    8 w8 v8 j: f; @8 G! o% C
  1365. LDX #HIGH(Sound_Bar_Text_Data)7 T* U- U7 Q$ G' _( x9 i5 Z/ m
  1366. JSR PPU_Data
    ) ?/ y1 |6 a) ~3 P
  1367. RTS
    5 }) I. A' k& @. I8 ]) b9 n- T8 ?9 z

  1368. 0 @9 i4 w4 o3 ]0 I2 e" L) a
  1369. .ENDIF
    2 v& C3 f' Q6 C* c
  1370. # }0 |6 W9 [8 s% L* u
  1371. ;==============================
    8 N4 L" S5 L8 z, A, ^
  1372. Set_NameTable_Attributes;设置命名表属性( f) M+ X, ^# w  e0 x+ H
  1373. BIT PPU_STATUS
    8 a6 D9 s( ~% C5 L
  1374. LDA #$232 O+ o+ P! A3 y
  1375. STA PPU_ADDRESS4 `' |& y9 }. w2 u# S
  1376. LDA #$C0
    & o& K; B' _9 P, D4 s& y/ f) G( J
  1377. STA PPU_ADDRESS
      O) u2 c# _3 M3 s$ s
  1378. LDX #$00  Z2 R4 t, M- s" E% B, {
  1379. Set_NameTable_Attributes_Write* S- \& U% r, F- H" Y( m* H
  1380. LDA Palette_Attributes,X
    ( }. o8 h8 ^2 L0 W" }
  1381. STA PPU_DATA
    7 e- G+ x5 y1 l; K0 w' y
  1382. INX
    4 u! O, s3 o) W. i& q
  1383. CPX #$40
    ; ~$ a! X: E* G; Q4 x! ]' e
  1384. BCC Set_NameTable_Attributes_Write
    + E/ B; W0 s$ O3 m1 T
  1385. RTS- z$ m7 q+ j( F; p6 y
  1386. 8 M2 Y; g; G( s/ P6 K
  1387. ;==============================
    . I' A" h7 Q. w! t' u
  1388. Set_Palette_Color;设置调色板数据& E( o) y" l- g; j
  1389. BIT PPU_STATUS
    / j. X1 w- i" P, n) y
  1390. LDA #$3F5 ^. a4 V  u6 u0 `# H/ f6 d7 k
  1391. STA PPU_ADDRESS
    & K7 {/ e2 r1 P$ o6 E6 A' M! G
  1392. LDA #$00# ^! b8 l6 F; @* A" n2 i, v7 h
  1393. STA PPU_ADDRESS2 q3 j) Z) M# w& y
  1394. LDX #$00
    % u9 ~( [1 ^' {
  1395. Set_Palette_Color_Write: G) k3 r! g/ [( s9 A$ P
  1396. LDA Palette_Data,X
    7 `( ]( X7 i3 u* E3 W  [) r/ d
  1397. STA PPU_DATA
    9 C& N" Y1 D" E) s
  1398. INX$ e. p2 @0 Y4 t# Z# r
  1399. CPX #$20$ ?5 A* T) z+ x) b2 a( [* J- @
  1400. BCC Set_Palette_Color_Write
    . y4 e- \. `; t! b& l9 C" o9 s
  1401. RTS8 E- B/ V$ Q) F. e1 O
  1402. , \, w0 i5 z  N0 K. R3 n- p
  1403. ;==============================1 R2 q" A# k9 d- `9 m
  1404. Init_Palette_Addr;初始化调色板数据2 O, W! T5 P( @( V* D" P: o
  1405. LDX #$00
    4 s- [5 K. C( Z2 M/ S  k, ]
  1406. Init_Palette_Addr_Write
    * u0 K+ G. k3 N9 H- n
  1407. LDA Palette_Data,X
    1 K( Q; y! {5 t5 T1 \
  1408. STA Palette_Addr,X6 L3 O7 _9 [; j0 g9 B: _
  1409. INX  m2 S9 j. o) P. L4 w
  1410. CPX #$20
    # E" l0 M8 X3 w3 o' e
  1411. BCC Init_Palette_Addr_Write
    1 L6 j9 S4 h- ~
  1412. RTS. S- H  A9 f* z7 V. V

  1413. + e7 m+ g3 M) e+ q
  1414. ;==============================
    $ l( h6 C( i3 y% e+ j! f8 B) W' C% c
  1415. Update_Palette_Color;更新调色板颜色/ d* e1 e( e2 `4 H" k0 e7 p
  1416. LDA <Palette_Update_Flag
    3 l1 |2 I+ w& e# e" ?$ m7 T) y
  1417. BEQ Update_Palette_Color_End
    6 ]8 U6 C  S$ `; P# x; r: Z
  1418. LDA #$3F7 N' j# j" n" C! U6 e
  1419. STA PPU_ADDRESS" P9 j; u. D1 x: i# V% E' L0 _
  1420. LDA #$0C
    ; g) P4 d5 L3 a9 l7 S
  1421. STA PPU_ADDRESS! H" B( v  I: S) S1 P
  1422. LDX #$0C4 z+ Z0 z) N, I+ ~# R
  1423. Update_Palette_Color_Write
    ( E) [7 X& _. j8 \4 h
  1424. LDA Palette_Addr,X
    7 L' C* V. E# M6 i  f0 F, W; a+ K4 Q" i
  1425. STA PPU_DATA
    ; r  k& i& I. y
  1426. INX
    3 H- x$ h" [6 i& m3 y& A4 p* @
  1427. CPX #$14
    7 }* r9 e0 }8 _
  1428. BCC Update_Palette_Color_Write2 W! `; d* E7 D) T' H6 P
  1429. LDA #$00
    6 C2 b9 B- Q0 I
  1430. STA <Palette_Update_Flag
    / f  s$ j! M- k7 Q( h7 p6 \
  1431. Update_Palette_Color_End* V& |' H8 Z+ Q( i, ?3 E
  1432. RTS; ^+ e+ @- d' Z$ L7 o  {" b

  1433. : b; x2 R9 |% z4 F  B

  1434. 9 S6 E& o$ n. X2 K
  1435. Update_Sprite_Palette_Data9 t9 T( O- p5 [2 y& E- U% j3 M
  1436. .DB $21
    $ m) a  B& K; F- L' ?% K
  1437. .DB $21& L$ W( X8 b- x. X9 i
  1438. .DB $11
    ( A3 t5 F  M; P5 v2 o% Z+ Z5 ]7 O
  1439. .DB $01
    ( n1 Y9 l( C2 G$ L+ M/ A  u, g
  1440. .DB $01  }8 M/ m1 P" {3 G7 z0 u- v4 m
  1441. .DB $11
    5 e) e: O! V  Q+ {
  1442. .DB $21
    1 N/ S& @) q) S
  1443. .DB $21/ E8 v) o* `8 M6 p
  1444. .DB $11
    * d7 B' {* ]: H2 |* D1 c" k4 Q2 ]; Q
  1445. .DB $013 `- e! g9 Q) K( A
  1446. .DB $11* y8 M! j2 c  r0 |9 j
  1447. .DB $216 l; L4 ]( r* K* _% e: n
  1448. .DB $21
    7 u, ^' M+ p' \# B
  1449. .DB $11
    - ~7 c/ ]% W- z; G& f  O+ S1 Z
  1450. .DB $01
    3 K! K+ U9 P$ H; [* e' C$ X% b' ^& k
  1451. .DB $11  W+ u2 s, `0 Z$ ?
  1452. ;==============================
    $ M! r! y+ P" W
  1453. Update_Palette_Data;更新调色板数据  i9 z' A1 |5 }' [* W! h# z
  1454. LDA Nmi_Time_Count
    8 b/ p1 Q( t& w1 y2 s
  1455. AND #$08
    ( d4 [5 X) Q* C
  1456. CMP #$085 o3 c3 T& K) H3 R/ a
  1457. BNE Update_Bkg_Palette_Data; q$ Q) N3 K$ \" U0 n3 Y
  1458. # r( G! ]4 {0 j' ?- K
  1459. Update_Sprite_Palette_Data_Set
    9 }: ~2 E1 f3 e4 X% v7 D
  1460. LDA Nmi_Time_Count& z$ u9 J! w3 [9 d7 K( I
  1461. LSR A
    / P7 M1 H5 u$ c+ n* b& h3 x6 C
  1462. LSR A" i; L2 S$ M' q4 _1 i
  1463. LSR A
    ( p" g) V. D% _) ^6 i' L
  1464. LSR A
    2 v/ ~3 j1 d; U9 E) h% b, j3 N
  1465. AND #$0F
    , g( `) y5 A5 {* u9 }' X  H  d: k/ Q. z
  1466. TAX0 d$ n( |, O/ A  k; \
  1467. LDA Update_Sprite_Palette_Data,X
    9 {* C: }6 r! R5 b
  1468. STA Sprite_Palette_Update_Addr0 a4 L# @+ F" V, D
  1469. LDA #$01$ d) e" i! D( @
  1470. STA <Palette_Update_Flag+ l( U% d9 g) b, W- c+ d# w; ?& J

  1471. 6 t: T5 N7 p. a3 i
  1472. Update_Bkg_Palette_Data* Y* q" a$ F$ S3 I% b1 R
  1473. LDA <Text_Disable_Flag" h& s" a2 ]! y$ _- d
  1474. AND #TEXT_DISABLE_RAM
    # ^$ u) \& G8 p% ?1 d& {; u
  1475. BNE Update_Palette_Data_End
    , ^" S* r) h  k
  1476. LDA <Music_Stop_State
    " Z# o. L& t) Z" B
  1477. BNE Update_Palette_Data_End, V5 J4 ?2 }2 t8 F; q/ T* p8 `
  1478. # c' B/ l0 k( o; T2 X
  1479. Update_Palette_Data_Check
    ' H8 X/ Y( |! O( F8 q6 V- O9 @
  1480. LDA Palette_Wait_Cnt
    ; k& O6 P8 Z" f9 T9 V$ o3 ^
  1481. BPL Update_Palette_Data_Check_Over, W* o/ C& C9 D6 }% v- N- f
  1482. LDA #PALETTE_UPDATE_INTERVAL
    1 C5 b; U0 D8 H9 x
  1483. STA Palette_Wait_Cnt+ z3 k5 z& L$ T1 M/ Z7 ^" ~
  1484. Update_Palette_Data_Check_Over
    ! G+ W8 h0 v0 y! M% M2 Q3 ^
  1485. DEC Palette_Wait_Cnt
    ' H0 q# _* _' G% w8 J/ P
  1486. BNE Update_Palette_Data_End
    ; J: K! K% ~# o# V
  1487. $ f! j1 u) x& n( l- B2 S
  1488. LDA <Text_Disable_Flag
    4 y0 ?1 K+ r  V- N
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME5 `3 K2 ?2 U5 s- s5 |7 M
  1490. STA Text_Disable_Flag
    ! Y8 k4 m/ F- \5 V. L
  1491. INC Palette_Update_Flag; M8 j% q$ G! ~+ l( [* }

  1492. # C& Z# i8 N3 z/ H/ c$ X
  1493. LDA #PALETTE_UPDATE_INTERVAL
    % T' X1 f. ~* m* n) W+ M; i& r
  1494. STA Palette_Wait_Cnt
    $ `  x& x! f1 ^$ _8 b+ R; @

  1495. # _% R( O5 L: ~/ m4 b
  1496. LDA Bkg_Palette_Update_Addr
    ! F2 ?! U7 }9 q" g( A( a
  1497. CMP #PALETTE_UPDATE_MAX
    7 t* D* G) v, g
  1498. BNE Update_Bkg_Palette_Data_Set
    , Z2 I* V# c+ @1 a" c$ w
  1499. LDA #PALETTE_UPDATE_MIN - 14 [2 y6 G2 W/ H
  1500. STA Bkg_Palette_Update_Addr) r: S4 U  K1 u/ ]
  1501. Update_Bkg_Palette_Data_Set9 p# [$ c. b5 f$ D
  1502. INC Bkg_Palette_Update_Addr+ N/ c4 `, e- |

  1503. & \6 e' I9 G: J2 O  p7 E$ V* b
  1504. Update_Palette_Data_End
    0 J& U6 L9 g9 ?: Y
  1505. RTS0 a- D1 Y9 s# \$ U) n2 E( W
  1506.   x. q' G* A0 O% ?4 V/ ~" b; S
  1507. ;==============================
    $ E& m* Q, q0 X2 V) w
  1508. Show_Music_Text;显示静态文本
    3 j. C" G/ y/ [
  1509. LDX #$00( A: h) m* G" `7 M
  1510. Show_Music_Text_Set9 D  q( v, W) `# x7 G9 ]+ @
  1511. LDA Static_Text_Data,X6 G5 n9 u' L4 u# L
  1512. STA <Data_L' n$ t1 w  G+ ^' U; _9 w
  1513. INX
    6 J1 r: Q$ ^; z3 G( {: p, L# F* I
  1514. LDA Static_Text_Data,X8 `" o) X* a# c! o3 ~9 N+ ]
  1515. STA <Data_H
    ( {- Z4 w" {* \
  1516. INX
    : }2 |9 M" r, }: `% m
  1517. LDY #$001 X6 m5 E1 \7 `, c
  1518. LDA [Data_L],Y
    # c  l! c! y4 H5 u- Q
  1519. STA <Data_Cnt6 q& S$ x' t0 K( R' c) e3 D
  1520. DEX& B( M% o6 ^$ _, x5 }7 E
  1521. DEX+ }4 G  v- Q2 j) X" E
  1522. LDA Static_Text_Pos,X
    / D4 j: D& ]+ h( F
  1523. STA PPU_ADDRESS
    . M6 S% A/ T# K) p( v; ]' {+ X
  1524. INX
    1 x: o* A0 y3 k/ @0 t
  1525. LDA #$20
    ! Z4 H  R& u; K  }! v
  1526. SEC
    0 T6 i: D6 o; w/ O8 l3 _0 {6 y) G
  1527. SBC <Data_Cnt) d3 E, Q. P( ^
  1528. LSR A
    ) ~" g0 a. b" w7 G* u3 L) u& ^' C
  1529. STA <Data_Buf! H; I8 S4 c4 s# V7 T3 L7 ^- n
  1530. LDA Static_Text_Pos,X8 ~! A/ `8 n) L# c2 h
  1531. AND #$E00 Y" L( W: b& r
  1532. CLC
    ( M1 i) B4 L2 h& Q
  1533. ADC <Data_Buf# ^1 M7 s& L# X7 X
  1534. STA PPU_ADDRESS$ W* C& V5 Q9 M2 k
  1535. INX0 `6 p$ ~7 e8 U& ?- v. f
  1536. Show_Music_Text_Set_Write# U% u- ]9 w# R9 ~9 ^- y% l& T
  1537. INY, ?7 J# Y  B  C5 P' v4 x  D$ I% a6 m
  1538. LDA [Data_L],Y) }, }) z. p- g: ~( F! a- c
  1539. STA PPU_DATA
    * S3 V" Q" F" m; w" W9 w( p
  1540. DEC <Data_Cnt/ A# E% U/ O8 ?9 ]/ F
  1541. BNE Show_Music_Text_Set_Write# {2 C' J  W3 R! g; l4 c& }
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos4 J9 d# O$ Q! C6 ~# y
  1543. BCC Show_Music_Text_Set5 O- ?7 D  |. y* L% N2 }4 [* \5 x
  1544. RTS$ o2 m4 y' E2 O. |* Q$ B

  1545. - d( z( @8 s* v
  1546. ;==============================1 M" P  x: B5 ]4 v( [0 `
  1547. .IF Track_Name_Pos;显示曲目信息- ~; L. ?6 F, F  T* q( s5 {

  1548. % y5 ]: M2 s  Q
  1549. Clear_Track_Info
    2 d( y0 i/ f  w5 A. B
  1550. PHA
    0 h, k  z, s: [1 i9 s' V
  1551. LDX <Music_Item_Cur1 S4 o5 \9 F* x
  1552. LDA Track_Name_Addr_Flag,X4 [1 H1 a. ~, e+ d* t3 v; y- W
  1553. BEQ Clear_Track_Info_End_Ex# U& J' a$ B2 f# I$ O$ L
  1554. PLA6 p- [" q. Y+ f( l7 m6 S
  1555. 1 H' p  z8 z' G
  1556. LDX PPU_Cur
    1 |1 W& z* q' J2 x  V: V' r( ^
  1557. PHA- g! n$ ]" f' o' b: R6 y# k
  1558. LDA #PPU_MODE_CNT_CLEAR
    - B$ Y+ L* i9 @. R6 h8 Q
  1559. STA PPU_Addr,X
    ) k* p/ I3 p7 X9 Y, n' b. z  d
  1560. INX
    , a) i. Y; ?( |9 q4 G8 Z/ M3 S+ ?
  1561. PLA
    5 N1 I; F- ?' ?/ h! n
  1562. JSR Show_Get_Track_Name_Center_Pos3 m/ L% X' u/ B3 B7 M4 z
  1563. STX PPU_Cur1 I, i( y' L$ l
  1564. Clear_Track_Info_End. ~# x) g' O7 T+ T5 B. R3 y
  1565. RTS
    4 L/ I1 q+ Z% G* J6 K0 V
  1566. Clear_Track_Info_End_Ex
    * m! y7 B: f; I4 j9 x0 `  E
  1567. PLA
    ) \& r  F! D, Y! j- p
  1568. RTS! X" h( |3 e, {# ?- w: }. e

  1569. * s2 Z* T. w0 m! L2 q" _
  1570. Write_Track_Info
    + k) n: T, @1 x% Z: A% |
  1571. PHA" l& J1 ]- W& h4 n; B7 M) m
  1572. LDX <Music_Item_Cur
    6 H* ]. I7 Y5 g7 _- `
  1573. LDA Track_Name_Addr_Flag,X! D# P5 v7 G7 x  ^
  1574. BEQ Write_Track_Info_End_Ex/ i+ n6 T0 L) Z8 v) ]
  1575. PLA; Q2 t* ]# v9 R) q6 [3 y

  1576. 4 a' y# R: `4 ~" X! t
  1577. PHA
    # R9 ^7 F/ C6 {; ^  \
  1578. LDX PPU_Cur
    # B) X. W1 h/ v
  1579. LDA #PPU_MODE_CNT_LINE$ d1 h9 w' ~' d
  1580. STA PPU_Addr,X
    ) y9 q) a, S& k" |: F
  1581. INX
    4 }/ O8 K$ k& K6 n( d; [$ k% E1 c, E
  1582. PLA" W* a  \4 [! P. U( m9 V
  1583. JSR Show_Get_Track_Name_Center_Pos  h8 T* N3 a# _" l0 F
  1584. Write_Track_Info_Data4 e) X( m" o% t0 K
  1585. INY
    ) Q0 k" c$ P' @2 @
  1586. LDA [Data_L],Y. q4 h$ H2 j7 V: |( Q
  1587. STA PPU_Addr,X
    % h  ^- K5 l1 I+ z
  1588. INX+ B: u. U4 s8 o' z( A- T# t( N6 ?
  1589. DEC <Data_Cnt  v/ b. r7 {" R% c3 v/ h$ o
  1590. BNE Write_Track_Info_Data9 k, y% N" {3 [% D+ \
  1591. STX PPU_Cur
    , z: p* P, w8 d, r
  1592. Write_Track_Info_End, W& f6 S1 W4 {9 V+ G( I
  1593. RTS: o" p$ C& v0 ~: `5 C! N' a. G- H
  1594. Write_Track_Info_End_Ex8 j. Y  z! K8 J& O7 J+ v: K
  1595. PLA, T9 \$ ]  ]  _% z& K6 @
  1596. RTS  t8 T% K6 x9 Q( ?, J$ O6 ]# j

  1597. / [1 M. w9 ?# |2 o
  1598. Show_Track_Info' H/ I* }5 a4 ]0 [8 S
  1599. Show_Track_Info_Clear9 b% v9 v' N$ |( y
  1600. LDA <Music_Last
    * I0 G3 V6 d9 a
  1601. 5 p2 j: y+ C) |# l% r/ |' F1 d
  1602. JSR Clear_Track_Info
    : p# l) s" s: a% L  J7 E$ S

  1603. $ M. F; S$ \, |$ q5 y
  1604. LDX <Music_Item_Cur5 z" j6 B5 T2 U. g
  1605. LDA <Music_Cur,X
    1 ^: q$ z. q5 j2 m* ]: d1 `
  1606. JSR Write_Track_Info4 p6 C9 K: g5 M0 \- R2 o: k
  1607. RTS
    6 _. ^0 `6 j6 @

  1608. 3 |8 L) n( M6 l0 c. ~* L
  1609. ;==============================  b. c6 X# s& u; b) H! C7 I( f
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置" l) S  b, [% X" }

  1611. 8 j- |6 Q4 `' S9 Q; ?
  1612. ;取出集合名索引
    9 @. y& m6 Y! k* ]; W5 z* r
  1613. PHA4 i/ B4 v- o& f/ v0 A2 N
  1614. + Q3 l5 m1 e4 K4 Y  @* p
  1615. LDA <Music_Item_Cur
    2 ?* z. ~7 U" ^8 X% ^/ f
  1616. ASL A
    5 V. {, ^, ^, D
  1617. TAY
    4 Q, ?; O) U7 R5 l' Y' }
  1618. LDA Track_Name_Addr_Port,Y+ A$ ^6 I1 O& R; J4 g. e
  1619. PHA: }6 S" j. r2 M5 g9 H& o
  1620. INY
    . K+ E0 p' J& i+ i" x# T
  1621. LDA Track_Name_Addr_Port,Y/ ]5 M6 i+ w, e
  1622. STA <Data_H
    % Q/ c# C/ Z: \
  1623. PLA& v- K- e; n9 N* ?8 X9 w
  1624. STA <Data_L0 C( ]# A7 v5 x2 ^% @+ b# Q6 O& ^

  1625. $ }) {, a: u; A
  1626. PLA7 b4 }  R8 f& W% I* S  a

  1627. ' G6 s3 D' k! \2 M( H
  1628. ASL A
    4 q/ ~' L3 p0 j" `' s
  1629. TAY& t" G2 c, C: @2 Z% \$ t3 w
  1630. LDA [Data_L],Y% b( S4 ~5 P8 f
  1631. PHA! j3 u, U1 X- n8 ?# ?. p
  1632. INY
    : V- t- b5 ~! f1 `8 R
  1633. LDA [Data_L],Y2 p5 I+ d8 f$ o; H8 D7 s! V6 c  g
  1634. STA Data_H; q( l1 m# R, o: [. q* d0 u9 G+ D
  1635. PLA
    + ~8 ^' y8 B8 ]; T" ~- h
  1636. STA Data_L
    2 M8 b$ X, ~% f2 ~, z

  1637. % ~8 m9 P- X' g+ V* F, Y, V
  1638. LDY #$008 {1 f& L- C; \* a, C$ `
  1639. LDA [Data_L],Y  e+ k: h: d5 @/ ?, e
  1640. STA <Data_Cnt
    , y6 B* f: E$ F5 [4 |
  1641. LDA #$20- x8 W& {9 ?7 b3 s2 B
  1642. SEC' F/ |! W& Y2 D/ H
  1643. SBC <Data_Cnt9 Z7 R6 ?' K/ @5 `- }! d2 n9 I! H( q
  1644. LSR A( g1 c2 ~  Y$ i+ a' S/ h
  1645. STA <Data_Buf
    . x9 r2 T3 z& K; R" M. ^
  1646. LDA #HIGH(Track_Name_Pos)
      m& I* r0 F) H0 v) o% @
  1647. STA PPU_Addr,X+ ^% r. `' d: `- Z* [7 y8 [. S7 q8 \
  1648. INX
    ! {+ {$ b5 _' U4 f" A5 d- d
  1649. LDA #LOW(Track_Name_Pos)( y- F0 k2 G2 ~6 g" x6 Q3 M# Y2 i0 k
  1650. AND #$E0$ m; m3 ~6 @/ r
  1651. CLC- ?, v! R2 _3 O7 g! c( a
  1652. ADC <Data_Buf: h/ I2 v+ D! x4 x/ M  C
  1653. STA PPU_Addr,X& w, S. d6 v- f2 }. K
  1654. INX6 y4 ]2 Y& c' W
  1655. LDA <Data_Cnt, m5 p0 ]) ?8 f. g
  1656. STA PPU_Addr,X+ w  G0 s6 u0 Y
  1657. INX! T! U/ p* r* p* l+ H
  1658. Show_Get_Pos_Center_End2 L( Z# `+ q! r, _6 t' T: {; q
  1659. RTS
    & q; h, x& P. K/ N
  1660. .ENDIF
    - m( u* G3 r: x0 U5 `, X

  1661. 7 l4 d4 u" i# L5 G8 P1 {/ P; k; D
  1662. ;==============================
    ) o. m' Z. s) S$ i5 w
  1663. ;音乐端口清除
    1 K) w4 b1 l: F+ I; J. w9 j
  1664. Sound_Data_Clear
    - k1 ^- v3 i6 t* _
  1665. JSR Sound_Port_Clear' Z7 c0 x, }2 F# s
  1666. JSR Sound_Ram_Clear
    ; f- C0 y% v: T
  1667. RTS1 k: H/ K6 j9 ?

  1668.   R( w' Y3 z' {$ \5 c- V
  1669. ;==============================- ^* v" Q  Z0 |6 [
  1670. ;音乐端口清除
    * `6 M; R. a, j5 v1 H  ^
  1671. Sound_Port_Clear2 `" U& O- O' M2 \7 o& N' r
  1672. LDA #$00
    . p+ E, r- T( [# s- Q4 r
  1673. STA APU_STATUS' g- Q( O4 l% T4 i! b9 y: p3 i
  1674. LDX #$00( G! {1 n( K8 j, R
  1675. Sound_Port_Clear_Write6 Q1 Z4 r: R- O9 l5 F4 n7 \2 t
  1676. STA $4000,X2 w$ x5 w' x9 f4 q, Z: I; |
  1677. INX
    % w5 q6 {* i7 J1 |- n: i9 n" D
  1678. CPX #$14; c# r: {" P- v7 X
  1679. BCC Sound_Port_Clear_Write% D/ A' `& G8 ~8 E
  1680. RTS
    * @  g% M( j" {* f
  1681. & ~( x& f% H7 d" {' N- l
  1682. ;==============================
    6 }  f1 b# y2 \/ c" D/ s/ a
  1683. Sound_Ram_Clear;RAM清除
    # ]( z: A" T0 _3 W, Z! y
  1684. LDX #$00+ }6 P; {+ E+ r# {- X
  1685. LDA #$00
    1 R/ T' }/ z+ l  M% Q3 M" K0 V* H
  1686. Sound_Ram_Clear_1& Z, X  e  r5 S0 a2 H9 ~' G5 I
  1687. STA Sound_Ram_Addr_1,X: K# ?4 M6 b% \
  1688. INX% e% w! M6 F- t; V) b3 D5 u- |- W/ I6 {
  1689. CPX #Sound_Ram_Addr_1_Size
    $ Z9 q% w7 _8 Q7 y7 r& \# x+ V
  1690. BNE Sound_Ram_Clear_1. ?* r' q: H% g; }5 D5 b% F
  1691. LDX #$00( z7 m# X. k1 A$ M% {, s
  1692. Sound_Ram_Clear_2
    ! v9 ?0 T- X# ^8 m4 X0 x
  1693. STA Sound_Ram_Addr_2,X
    ; }% G+ O9 B5 s* L" |
  1694. INX
    . T, e' b# X  G. z  ^/ t* R. u
  1695. CPX #Sound_Ram_Addr_2_Size
    5 V& Y- C& u5 u) ~6 f  s
  1696. BNE Sound_Ram_Clear_2; Z/ D: A2 x4 p; Y" {" R' c. t
  1697. LDX #$00& m+ \* a  k( ?) s9 k# U3 X* i$ v
  1698. Sound_Ram_Clear_3
    , t, z/ Z5 z) ^  h
  1699. STA Sound_Ram_Addr_3,X
    ) m- Q9 f9 [, s. ^# L
  1700. INX" }* p- ^  a8 d  \5 l4 i
  1701. CPX #Sound_Ram_Addr_3_Size* o( O/ N% _. t' L7 F
  1702. BNE Sound_Ram_Clear_36 X" ?8 b& J0 j6 C5 @! q$ n' m
  1703. LDX #$00
    1 C& q) K' W0 s% @
  1704. Sound_Ram_Clear_44 s% Q$ V3 C7 _
  1705. STA Sound_Ram_Addr_4,X
    " [! t6 j5 p5 d' d; S( t* `. d
  1706. INX
    $ J4 \% T" a# b  l: v" I% v" D
  1707. CPX #Sound_Ram_Addr_4_Size
    7 O8 `- `, t" B0 }5 q. j
  1708. BNE Sound_Ram_Clear_4
    , W1 _  l+ C, s4 T
  1709. Sound_Ram_Clear_5
    - P( F; E% K% d6 m) {& X8 U
  1710. STA Sound_Ram_Addr_5,X
    & `+ e( y! G7 X. _
  1711. INX7 {5 H) `+ @6 u2 h" a
  1712. CPX #Sound_Ram_Addr_5_Size$ p; l& b' n. p5 M6 e+ O
  1713. BNE Sound_Ram_Clear_5
    5 O# R/ ?/ G* ^% }
  1714. RTS; ]4 w5 f& z% V: H/ K5 o! O0 t
  1715.   C' p; Q8 U# p+ N
  1716. Get_Music_Collection_Name6 v* L% z1 f8 _1 l, r% u- Q
  1717. PHA
    # q$ H" U  y: t
  1718. LDA <Music_Item_Cur
    5 U0 R) y) V. i; m; u- K/ g% a
  1719. ASL A
    9 G( n. }3 ?& ]0 z/ |% m7 q" T
  1720. TAY
    3 S. w- i- G) n$ ]8 h4 T
  1721. LDA Music_Collection_Name,Y
      w" k! X2 u" S) d' m6 {
  1722. STA <Data_L
    * _% h% y! e( o  J7 d
  1723. INY
    + Y/ T/ x3 S/ R) @& ]
  1724. LDA Music_Collection_Name,Y
    0 i* ]- E+ M; x+ t  b# \) ^
  1725. STA <Data_H2 {" l; @" y% I4 R9 G; @9 b2 ]
  1726. PLA
    3 o- L8 `3 ?/ F; N8 x
  1727. RTS
    ! p1 m% T0 g5 d: ~& L) p. H

  1728. ' r) C7 F$ c9 q
  1729. Set_Sound_Total
    ! z* P  h2 ^; M
  1730. LDY <Music_Item_Cur& K# E2 O5 A; K* @
  1731. LDA Sound_Total_Port,Y
    / @1 h( v: V2 g  r" W6 g
  1732. SEC
    - l! k% G/ L! v5 d
  1733. SBC #$01
    4 Z5 n( J9 r  S9 |
  1734. STA <Music_Total
    ' n' i5 c# M9 v6 F9 s9 y1 n
  1735. RTS
    ! D, n# _9 S( W( m

  1736. , T1 ^8 q9 ?: X2 I" ?1 [4 S
  1737. Get_Sound_Start
    ; e' b- q" U/ X
  1738. LDY <Music_Item_Cur" G& ^: B, H2 \
  1739. LDA Sound_Start_Port,Y1 p$ ~1 |4 k) z
  1740. RTS
    + |' Z6 }% T9 m% h/ k9 ?; B

  1741. 7 S, z9 U9 U  @) j8 ]: K
  1742. Set_Sound_Init_Port
    & V- A% f8 _) r* K. w/ E" [
  1743. PHA" }0 `. \# {* T# ~
  1744. LDA #$209 R' o2 p* {; l+ m( |
  1745. STA <JSR_Addr_Op
      u: K$ M0 g; \
  1746. LDA <Music_Item_Cur
      {" X. m) G6 K9 i% u
  1747. ASL A! _' A/ t+ J1 I  I
  1748. TAY
    ! L2 V. G0 [* o, q" R
  1749. LDA Sound_Init_Port,Y
    * p  Y& j/ Q' t0 G" t, w
  1750. STA <JSR_Addr_L' E5 b5 v4 a3 P7 ]2 x4 M& j
  1751. INY
    + B# t. ^* ~! ~/ u7 Y
  1752. LDA Sound_Init_Port,Y
    ( @9 w" m- k# ?
  1753. STA <JSR_Addr_H
    8 B. F" k' C# p7 n/ H+ p9 D
  1754. LDA #$60
    2 F  Y! g+ R1 D  [- z  V
  1755. STA <JSR_Addr_Rts5 `: ~7 s4 A6 ^* W$ |
  1756. PLA1 q& }! ^% l; c8 S* t3 _1 U
  1757. RTS5 u6 R( n" Y+ {( ], A4 s: N

  1758. % m4 E% }+ \# M1 w
  1759. Set_Sound_Play_Port
    $ a. d8 r* F4 e. T" N# h
  1760. PHA
    ; S+ d6 E5 M4 [
  1761. LDA #$20# O0 b9 t5 r. F  s! N
  1762. STA <JSR_Addr_Op4 H0 R; J) X  t; B
  1763. LDA <Music_Item_Cur
    0 R. h# F( W9 n0 D
  1764. ASL A9 s1 k/ [2 x- ]) }- ]6 {8 U( @
  1765. TAY
    , R8 F6 @. @+ _3 b  L( p0 D
  1766. LDA Sound_Play_Port,Y! g- [2 Y, y) m, ?# c! z
  1767. STA <JSR_Addr_L1 m& h) V& q" Y) e  `1 P# [
  1768. INY1 ~' O. f3 @6 Q/ |8 L
  1769. LDA Sound_Play_Port,Y( l+ d$ ^) x) _8 H
  1770. STA <JSR_Addr_H
    8 h1 G: E- I) y& X
  1771. LDA #$60. p7 I: r! M& \0 L. n0 E1 X" H8 u
  1772. STA <JSR_Addr_Rts
    : G9 r4 E- M) w0 S( N
  1773. PLA1 v3 U; U! K4 W
  1774. RTS; ]* i$ G0 w; ?- C# S4 n

  1775. 6 l: ]1 U) z5 k$ Q# n
  1776. Set_Sound_Reset_Port) `, B" ?8 z, h  \6 x
  1777. PHA
    # w% c0 q9 J5 g0 f8 c3 q
  1778. LDA #$20. e/ f6 [7 a' R* B
  1779. STA <JSR_Addr_Op2 J" n6 u8 Q* R
  1780. LDA <Music_Item_Cur
      Q0 ?4 d0 r6 F! Q
  1781. ASL A$ `& f1 K) A, K
  1782. TAY
    , F0 \4 M7 Y% A! L" a4 f  K
  1783. LDA Sound_Reset_Port,Y
    - G1 z+ M7 I$ w6 p2 e! v  |
  1784. STA <JSR_Addr_L% {; V2 {4 X% _; A. g6 `
  1785. INY7 }3 A) f  y" S
  1786. LDA Sound_Reset_Port,Y
    ' {1 k' g, e( b& c$ c
  1787. STA <JSR_Addr_H) G% B" y  o' @1 o' s: z
  1788. LDA #$605 [- ]% [' X0 C3 @5 {- K
  1789. STA <JSR_Addr_Rts5 ?' `' }5 H, g7 n
  1790. PLA* l( X) H4 R7 B! f0 [3 Z
  1791. RTS
    8 ~/ `$ a% j3 s4 k

  1792. # p6 V( g2 u( e! u
  1793. ;初始化音乐bank
    : j- p" r# f! U# \3 d- X( |
  1794. Init_Sound_Bank
    " o7 Y. P. b! k# d
  1795. LDY <Music_Item_Cur
    + E8 H( m0 Q2 |& l. m
  1796. LDA Sound_Bank_8000,Y5 P: g, `9 o$ y( U& {% u! V0 W
  1797. STA <Music_Bank_80005 E' J. V( [3 F  _7 f6 \. O( T+ H
  1798. LDY <Music_Item_Cur' J1 J9 J' d/ p4 x
  1799. LDA Sound_Bank_A000,Y6 m% o& A% ]9 a
  1800. STA <Music_Bank_A000
    * [2 v4 t7 T( E3 M# f0 v
  1801. RTS* k2 h! G3 h! r- s9 R% f
  1802. $ [$ V- g- d& i  K' V/ Z+ R
  1803. ;==================================================
    9 T( o( }$ h* _2 S
  1804. Sound_State_Reset;音乐状态重置- S- S! }4 A( L  K' G7 Y* W8 s
  1805. JSR Music_Bar_ReSet        ;重置音乐条* u9 W5 o& m" u7 L; V: _
  1806. JSR Time_ReSet             ;重置播放时间
    8 k+ Y- S) y* t0 ?3 b, I
  1807. 9 N0 |$ K9 Q% Y* m
  1808. LDA #$00
    3 O5 @) v1 Z- I( `& E6 i; z
  1809. STA <Music_Stop_State( L2 b- Z: r4 {/ a; a  Y: V/ ~- H
  1810. JSR Music_State_Show       ;显示播放状态
    / i/ u+ D& b( }& V. s

  1811. 4 B$ G' C* G: I$ d8 l. c3 P5 L/ @
  1812. .IF Track_Name_Pos
    ; c1 z) C8 |9 O$ N6 u1 c
  1813. JSR Show_Track_Info        ;音乐曲目名显示% H7 Z* `+ \  |/ M( P
  1814. .ENDIF
      \% @+ L+ y) q3 l% E

  1815. # K& X* D+ e6 I2 s
  1816. RTS) t5 h8 O3 l3 z; k/ A

  1817. / S" c& ~* L, ~2 l: Y/ N6 S( i
  1818. ;==================================================
    3 n% i5 B0 Z) Z( ~+ A: W0 e# I
  1819. Sound_Init_Proc;音乐初始化处理6 ?- y  |) C# I$ z: X1 F
  1820. PHA
    ( f  A7 q6 y6 q/ |1 Y
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址
    & s: C: G+ B3 H* E
  1822. LDA #$00( u6 o4 n7 B- `. v4 N
  1823. STA <Scroll_H               ;重设水平滚动$ o+ D% c6 c3 w3 i* Z" K
  1824. LDA #$0F
    # u7 b: b6 h; J  z9 q3 E6 N
  1825. STA APU_STATUS
    2 ^3 O" o7 g" ]# R3 s
  1826. PLA
    & z5 v0 f, F9 j$ F8 Z: \
  1827. JSR Sound_Init             ;音乐初始化
    # C* s- C6 E  b% ?- a/ I
  1828. JSR Sound_State_Reset      ;重置音乐播放状态( ?( N. L: ^/ L* I3 U
  1829. RTS
    $ ^' @' p  w& Y9 x: o$ K
  1830. & {. i" F/ G  t; O2 F& a( z: `
  1831. ;==================================================) B) t% y/ J% @# D
  1832. Sound_Play_Proc;音乐播放处理
    7 t- O0 q9 I- H+ S9 L
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址
    : w8 x! T# l' B
  1834. JSR Sound_Play             ;音乐播放
    , y2 e1 G% [/ U( y% _# v" W
  1835. RTS2 L6 f0 w# C1 Q% a4 U- O: Q

  1836. 1 i! M5 o" h! l
  1837. ;==================================================
    1 G7 j: D/ Q' Q# _/ Q- C% u& F
  1838. Sound_Reset_Proc;音乐重置处理5 |0 z8 n/ w9 R6 ?8 T2 T% P8 I
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址3 `+ P; h: S" k
  1840. LDA <JSR_Addr_L
    + K2 T3 `6 x$ u( B- }- {3 ^- i, J. F
  1841. ORA <JSR_Addr_H; o8 e5 Y" s) s' C* P2 s
  1842. BEQ Sound_Reset_Proc_Default: M  {) X/ E. s0 `- q
  1843. JSR Sound_Reset            ;执行音乐重置
    " k& W0 G! O" z, [# ?" w: b- m
  1844. JMP Sound_Reset_Proc_Init_Sound, P7 V, ]5 S& C" `$ Q2 B1 J* L1 q

  1845. - k( }; f$ z- A% J' l+ N& N
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理  l) j) ^* G" [8 q' d
  1847. & J0 X, K: e3 T5 s/ Q2 m$ t
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断
    - X2 W  H3 U& y8 V# q. ], p; Z
  1849. LDA #$002 ^: c& e& j9 e& x' K  N
  1850. STA PPU_CTRL9 Q. V, _& o9 P3 ^( Z

  1851. 9 I. S  H8 ~8 L$ [
  1852. JSR Sound_Data_Clear
    & V  o4 d& {( c) J: q0 O, @

  1853. 4 [1 ?" C+ u( u1 m) m
  1854. Sound_Reset_Proc_Default_Wait- H) R+ n& Y7 h/ u& I* W6 I& i
  1855. LDA PPU_STATUS
    5 R9 j) p! W! f7 F
  1856. BPL Sound_Reset_Proc_Default_Wait0 m/ x$ Z# O9 o- C$ k4 J
  1857. & R% _% y; ^1 ^+ \9 A' Z, n
  1858. LDA #$00
    $ }* k% B" p2 s
  1859. STA PPU_ADDRESS* v6 V! N$ s& @& @) m, o
  1860. STA PPU_ADDRESS+ F; ~, o8 c) {
  1861. STA PPU_SCROLL
    ! t5 e0 Q- y; m' [! r
  1862. STA PPU_SCROLL" C5 c0 U1 i9 ^7 d) ?( [/ Q3 b" s/ I
  1863. + G* D# J- q, Z! i* d
  1864. ;恢复PPU控制
    : j* f& x9 L7 o+ e  k
  1865. LDA Screen_Ctrl1 Z$ }( Q6 d: @+ B8 U: N
  1866. STA PPU_CTRL' F0 o; f' h8 a- K$ g+ B. u9 E
  1867. 7 h# h  m' R9 ]! G5 _* _% ]+ p
  1868. Sound_Reset_Proc_Init_Sound
    ' y- i1 g+ ]# `4 d% s
  1869. LDA <Music_Stop_State# g$ t! d/ ~* T
  1870. BNE Sound_Reset_Proc_End) T2 U  H' w0 F9 K
  1871. LDX <Music_Item_Cur  o0 h( m; b8 W! d: c8 t( y" G
  1872. LDA <Music_Cur,X7 Z0 H9 e' {  N2 f4 r" d! b# L5 Y
  1873. JSR Sound_Init_Proc
    * S) s; Z9 Q) I# x
  1874. Sound_Reset_Proc_End) E% Q& R5 v- f" X2 R# r8 G, T
  1875. RTS1 \7 g: R4 \" j( v$ |
  1876. 6 ^- W$ e; S' A# O  k3 ~1 B7 F
  1877. ;==================================================) b& A! H* N  G* K6 H
  1878. Clear_Item_Text;清除页项目
    ; G$ X+ R8 j, i1 Q( k" D( q
  1879. LDX PPU_Cur3 a. \& ?7 \; @
  1880. LDA #PPU_MODE_CNT_CLEAR
    & w, p& Q' P$ G" q5 f3 e% L" P
  1881. STA PPU_Addr,X& N; z! G* i; k: C( x" S3 v
  1882. INX
    9 d5 M) m# ^; j! n
  1883. 1 ^2 @+ ?9 E* s. M. W2 C3 _6 J
  1884. LDA <Page_Last+ n6 N3 H9 Q6 T! I6 L" c4 m" Y" @
  1885. SEC4 S2 h" C' i, A' \0 T
  1886. SBC <Page_Last_Index
    : W- ^! Z3 a1 \3 p- |
  1887. ASL A5 K$ t; S4 q5 a  g2 b
  1888. 2 U! G. @" H/ [, [, r" @2 y. e
  1889. TAY
    4 b; |" b: E8 |( Z5 Y
  1890. LDA Item_Pos_Data,Y8 {5 n6 L! e& ]% H
  1891. PHA* G! M. e- T- X3 {  J) ]/ B! U+ e! F
  1892. INY- J2 ?* g. D0 ^' s& ^- R% r! |! H
  1893. LDA Item_Pos_Data,Y+ B8 A( X/ c9 K0 Q
  1894. STA PPU_Addr,X
      W- s+ F; U  z2 `0 i/ P3 b% W1 n
  1895. INX, z& e+ c; W$ k+ |
  1896. PLA% A+ H6 F# e5 D# }; z
  1897. STA PPU_Addr,X
    " j- c4 C7 u2 v; T% S0 Y
  1898. INX6 z0 Q5 ?6 G" j

  1899. 6 S' m( e6 S9 W( l# i. y
  1900. LDA <Page_Last& z( r, i) I( n* x$ f
  1901. ASL A1 s/ l4 o0 C! i& B( J( z; [# o
  1902. TAY( U$ A; F: V3 H- L& J: L1 e' Y
  1903. LDA Music_Collection_Name,Y8 P9 P& c2 v  N9 Z, Y& |4 s% P
  1904. STA <Data_L
    . `/ l' v( J) m( @; ]) O9 f5 s- P
  1905. INY
    5 D7 p. I8 ?3 n/ U8 F2 p/ ^
  1906. LDA Music_Collection_Name,Y
    ) g4 V) ~/ W& n$ H8 E
  1907. STA <Data_H
    * @1 j, m% h. ~7 s. H" X% P
  1908. + _& }) R+ S) H: ?1 Z$ g
  1909. LDY #$009 q8 O6 c1 {2 ]. q4 [; V
  1910. LDA [Data_L],Y
    8 V3 ]% ~" K1 ?4 y9 P2 F
  1911. STA PPU_Addr,X, \7 H  F) ]9 O& q; ^3 H
  1912. INX
      V) E% D% u4 {2 k: ?
  1913. Clear_Item_Text_End
    % Q6 `; q* v# u; [" J
  1914. STX PPU_Cur
    # i9 \) D* z& r2 v% b! i
  1915. RTS+ p. j) V8 R$ |

  1916. * c) k: E& j+ y
  1917. ;==================================================1 K/ {# J5 f1 q) S. T% H
  1918. Show_Item_Text;显示页项目
    ; @7 S" z0 M1 J0 m
  1919. LDX PPU_Cur8 C/ x# n/ C6 d; q
  1920. LDA #PPU_MODE_CNT_LINE; _( _7 ]3 m/ V( U% A) S
  1921. STA PPU_Addr,X9 t* D* {) C8 {& M# @- ]  C: K
  1922. INX; g% F6 m) E* a- Q* z' \
  1923. LDA Page_Cur2 G/ S. O! [/ K# Z
  1924. SEC
    ' t" V( ]3 l* m# I2 \" H: Q1 ^
  1925. SBC <Page_Cur_Index
    # \8 b% P/ }/ M- E
  1926. ASL A
    * B: T% B  A% g- V" @$ o* t7 v
  1927. TAY6 `& b6 ?6 J! V$ [' T( j( q4 B' w
  1928. LDA Item_Pos_Data,Y" R: j4 W3 ~# _  L
  1929. PHA
    ! J8 X. R* z. q& n/ T
  1930. INY
    % R. A1 O6 o/ R$ v; D" [$ |2 X
  1931. LDA Item_Pos_Data,Y
    , a1 F. h4 [! v+ ]; q
  1932. STA PPU_Addr,X" Y5 @5 a$ m% L, A8 P
  1933. INX( x6 ?7 E) G4 k/ d' l( ^9 y
  1934. PLA5 O5 Y9 l+ P6 n& J; U2 W1 P3 j; X
  1935. STA PPU_Addr,X
    % e$ c& D) O) ]" Y2 o, ]
  1936. INX) a; M, V% o! L8 E; M
  1937. - _% `0 x* j/ ]8 I% M
  1938. LDA Page_Cur9 M0 Y4 J6 |; R& O- q
  1939. ASL A; K) b3 O7 d  C  N
  1940. TAY: \! N5 A, J0 D6 ~
  1941. LDA Music_Collection_Name,Y
    0 f0 h  t: D6 h8 _7 H: u
  1942. STA <Data_L
    ( @: [& g4 l) I' [. a
  1943. INY! Z- H& ~4 `# p! A1 }
  1944. LDA Music_Collection_Name,Y) w( d! v; E5 W' S1 l5 C- {4 _
  1945. STA <Data_H7 S7 Z1 }( o( w6 P. z( A. P
  1946. " ^/ H6 ~, ?8 m; R
  1947. LDY #$00! c* i9 {! K# g. A
  1948. LDA [Data_L],Y& e6 p" l# }- \# u
  1949. STA PPU_Addr,X$ j' t6 S1 d( c- ^
  1950. STA Data_Cnt* O8 h$ G- q+ Y2 h1 g
  1951. INX
    2 Y9 G( r2 ~: |/ T4 T1 x
  1952. ! j( @: t* l- L  Y2 `) u2 {. X
  1953. INY# F' Z* U' D3 k$ s* Q
  1954. Show_Item_Text_Write) h" V+ w, z% m5 y- h  h/ p$ |
  1955. LDA [Data_L],Y
    % h/ `) U5 f1 N
  1956. STA PPU_Addr,X6 ^4 k  f7 d- z1 C, ?+ [
  1957. INY6 m* V+ D/ _, \! i! [: [2 K: l
  1958. INX
    ' [. r1 {+ M. w; @
  1959. DEC Data_Cnt
    $ n5 Q4 \" ~) I3 m3 k8 o7 O- w
  1960. BNE Show_Item_Text_Write: V; G4 |5 O0 x+ _0 _( M$ Q: I  M# u
  1961.   Y: y9 v+ L7 A0 V0 m
  1962. Show_Item_Text_End
    6 j0 Q( d5 K( ?1 C
  1963. STX PPU_Cur
    6 T- G6 |. W% K% W" p: v# i
  1964. RTS; P% y; J1 ^: L7 l

  1965. ) R( E1 E- x4 y+ b
  1966. ;==================================================  _% F) |# o( n3 Y
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量
    7 r0 t5 v+ g+ n1 X5 s6 q
  1968. STA <Data_Buf& z4 S) {0 p7 f
  1969. LDA #$00
    8 R9 N3 G. p3 C  p: B* g) x
  1970. Get_Page_Index_Calc# `, k# h. @, b" O1 K
  1971. CLC/ d; c- g6 h2 N$ ~
  1972. ADC #PAGE_SIZE+ u- L( K6 r% c+ C
  1973. CMP <Data_Buf
    , K" V: k% D4 G' A7 i5 y6 I
  1974. BCC Get_Page_Index_Calc
    . j" e+ ^" B# ?
  1975. BEQ Get_Page_Index_Calc_End
    7 |+ y- D' o4 H4 s& T
  1976. SEC- H% @. y+ h: ^: i! N# w* v
  1977. SBC #PAGE_SIZE
    + P0 }: F$ p4 W/ c% t6 {1 M
  1978. Get_Page_Index_Calc_End
    7 j( ~* q7 s! b6 A7 f, o8 s
  1979. STA <Data_Buf1 Q# X) l( c9 ~, k7 y
  1980. Get_Page_Index_Cnt0 N/ Q- l7 \. G& Y2 E2 d
  1981. LDA #PAGE_SIZE* _& I+ d3 N( H2 F8 T" d. _) l
  1982. STA Data_Cnt
    : _# I6 r' m* I
  1983. 6 o/ r& p) {5 a5 L6 g; y" T+ Z
  1984. LDA <Data_Buf
    3 z/ G2 [- R  f# `3 L( \, b7 D
  1985. CLC
    ( p8 k' ^/ t0 w( n
  1986. ADC #PAGE_SIZE. T4 ~' }+ [# `& u
  1987. CMP #ITEM_MAX_SIZE
    7 V* W, Z6 d* o7 p6 @$ |
  1988. BCC Get_Page_Index_Cnt_End
    4 A6 |2 f1 S) N( [
  1989. % J  K/ ~4 m4 c% V- w- {
  1990. LDA #ITEM_MAX_SIZE
    + u& R' ~+ q0 @/ P1 Z- M' M
  1991. SEC
    # q6 a2 i! d  u
  1992. SBC <Data_Buf% v# _- q- s+ r7 H2 b# V
  1993. STA <Data_Cnt
    7 e7 O% R" Y5 ]0 Q3 r" {; s

  1994. 1 a9 U, }" B& V1 L' n4 a0 }
  1995. Get_Page_Index_Cnt_End
    , [) L% c. W% B4 T! W
  1996. RTS9 ?8 d, |* n* l+ \$ T4 @1 s# o
  1997. 8 e, z/ _5 l$ n. Y- H# D* a/ d
  1998. ;==================================================" [; A9 @  r2 V" Y3 R2 X
  1999. Get_Last_Page_Start_Index
    6 J0 `! b$ y4 t' K
  2000. LDA <Music_Item_Last3 n! x' @& A4 {2 d8 p: B% F
  2001. JSR Get_Page_Start_Index( p( @& d& s, {+ m
  2002. LDA Data_Buf
      _: d$ W! t7 Y
  2003. STA Page_Last
    8 e! u) o3 K* l" @- x& j
  2004. STA Page_Last_Index/ P. w; j* x# k7 N
  2005. LDA Data_Cnt" _! M0 y/ W# w3 t+ G: U
  2006. STA Page_Last_Cnt
      G8 C) N5 [# I: v7 R2 U
  2007. RTS
    ! w$ U! i2 h! d- s* u- k

  2008. . _& b0 p: L9 o8 ^8 W
  2009. ;==================================================" w. N0 M1 K7 e% c$ u
  2010. Get_Cur_Page_Start_Index
    , \/ I2 ~1 R# B, \/ @& M& [) i1 p
  2011. LDA <Music_Item_Cur* C$ f2 E9 f% J
  2012. JSR Get_Page_Start_Index
    $ L( d0 r! J* B% H$ q6 r4 T0 |$ C" v: |
  2013. LDA Data_Buf
    , K3 ?& B" }: g
  2014. STA Page_Cur
    4 ~7 R4 |- b# s2 F4 z2 `
  2015. STA Page_Cur_Index' G2 f' s- i, Q4 F, s
  2016. LDA Data_Cnt
    ) y1 {+ W7 a, j
  2017. STA Page_Cur_Cnt
    5 ?2 J$ M( T/ I# `  E
  2018. RTS
    % U3 d& C# i) C9 `. @

  2019. # L3 k+ w# z0 v4 ?/ h' t  @
  2020. ;==================================================
    : B) l4 l8 M. j
  2021. Show_Page_Text;显示页文本" X( I$ e) X. V# ~' W
  2022. LDA <Text_Disable_Flag6 X$ C6 c2 D& m, f- N4 H
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM
    6 l0 B) [2 q: @
  2024. STA <Text_Disable_Flag
    + L" K3 Y0 n" V' Q' ^' H& b' B

  2025. ' t& T' h2 s/ ~: |2 E  d% W+ s0 o
  2026. JSR Get_Last_Page_Start_Index
    # G( z" e  O: L0 ~
  2027. JSR Get_Cur_Page_Start_Index- ?4 e" \, h2 x& B1 ~
  2028. 9 H( N# }/ |+ p$ x& y0 j
  2029. Show_Page_Text_Set
    & @) \& d' s! k, r3 K  e/ y$ K; {

  2030. 3 q, p" `+ \/ `* G* w6 t
  2031. Clear_Page_Last_Item;清理上一页9 n6 P( _! R! Z9 c: ?
  2032. LDA Page_Last_Cnt6 z1 e7 \- G8 R2 O0 a
  2033. BEQ Clear_Page_Last_Item_End/ _, J: A. x% p2 q/ g+ J
  2034. JSR Clear_Item_Text9 I* I" o% n# E: K
  2035. INC Page_Last
    8 v9 D8 j" P! O1 E5 y4 M4 q
  2036. DEC Page_Last_Cnt$ F4 N# g. \' _7 E- O0 s
  2037. Clear_Page_Last_Item_End
      ]) _5 {8 a9 C, k
  2038. # Y2 H' U: \( w+ a- ]; L2 {
  2039. Show_Page_Cur_Item;显示当前页
    2 z  U% D' ]  V5 d( _
  2040. LDA Page_Cur_Cnt
    ' ?6 w# [  [% b0 I, K
  2041. BEQ Show_Page_Cur_Item_End1 N( i2 }$ S  n+ _
  2042. JSR Show_Item_Text' I8 C) G1 U; l
  2043. INC Page_Cur$ H1 y/ o/ i% g
  2044. DEC Page_Cur_Cnt
    + [) i1 C" D6 [7 e. u/ s
  2045. Show_Page_Cur_Item_End
    ( B7 U! l1 d$ n- {5 Q. `' E+ r' T3 I
  2046. ' ]( N: h( e& o% [5 r9 J
  2047. INC <Time_Wait_Cnt+ b/ F4 a& X+ n; A& v
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作0 g; [  \  q' m. \
  2049. LDA <Time_Wait_Cnt
      E$ f! ~1 l7 P5 n# E
  2050. BNE Show_Page_Text_Set_Wait0 ?, P  L5 o" l: d8 l" _( d

  2051. , ?+ R4 l7 z1 l0 N( W% q
  2052. LDA Page_Last_Cnt* v" R0 C. k5 ?& b5 o4 s' u4 ~
  2053. ORA Page_Cur_Cnt
    1 G% a* h" r9 k$ @' r! M
  2054. BNE Show_Page_Text_Set
    / k2 Z& T! Q) A, Z
  2055. LDA <Text_Disable_Flag
    * Y  p* W4 E/ a- {
  2056. AND #TEXT_DISABLE_ITEM ^ $FF- a3 ~; Q  t6 W: {
  2057. STA <Text_Disable_Flag& r$ T' O4 l0 ]6 v
  2058. RTS( l7 o3 J9 ]4 I9 W* x1 z

  2059. 7 |' E' y* a) T+ J0 `& F6 |5 a. _
  2060. ;==================================================
    ' i2 ?" V* c) C7 [: B4 h
  2061. Last_Item;上一项9 I: q& j8 _( n
  2062. JSR Clear_Last_Track_Name1 V, O7 n8 ~: D7 w' Q4 X$ j% g
  2063. JSR Disable_Text_Draw
    * O- k6 N# Y7 A3 a

  2064. ( N7 g" L; B6 q& G+ m2 g$ I2 O0 @
  2065. LDA <Music_Item_Cur5 T; |" ~: ]" k1 s- M* c/ ?( b; M
  2066. STA <Music_Item_Last
    ; E! I& u, M# S+ N
  2067. % e& l6 {5 L0 f* y. h6 J
  2068. JSR Get_Last_Page_Start_Index
    2 j7 k* X& r& m. a9 u! C" G

  2069. 5 F" q4 ^& o4 `
  2070. LDA #$00) ^1 R+ C  U+ [( {* I% o9 N
  2071. STA Data_Buf% n% b' [0 m8 C. v" \
  2072. % [( z/ y/ @0 U0 l( ?9 X
  2073. LDA <Page_Last
    6 f: m, K1 n$ ?( I
  2074. CMP <Music_Item_Cur
    ! f7 j, ?. B( f3 e- G/ g( b
  2075. BNE Last_Item_Begin
    . j; t4 `% _+ E* y8 z, N
  2076. + ^$ T( k+ t" {! _; D" V8 `$ N
  2077. LDA #$01
    9 ^& k, M( `+ ]! v- E
  2078. STA Data_Buf. R7 J1 V7 w/ w' J% _6 _
  2079. Last_Item_Begin. ?% {: E& s, Z2 J' k
  2080. LDA <Music_Item_Cur
    $ v- M, D/ O2 X! l4 t
  2081. BNE Last_Item_Set- J/ ~' D  I) h: S3 y
  2082. LDA #ITEM_MAX_INDEX + 1
    0 p6 f6 _4 Q2 O/ A, J
  2083. STA <Music_Item_Cur
    # @- q, U9 m4 \$ {
  2084. . h# ^0 U3 T3 A8 H* b
  2085. Last_Item_Set, ]: k9 q+ e7 c4 B$ W
  2086. DEC <Music_Item_Cur
    3 |5 j  {8 K; l
  2087. LDA <Music_Item_Cur
    ' K5 I! h8 l( F# j4 H
  2088. JSR Reset_Current_Music
    , W( D* T$ _4 ~' b$ G

  2089. 1 ^* e/ ~; N6 C
  2090. Last_Item_Play1 H, y. W: \, U5 [/ g! i
  2091. LDA Data_Buf- l9 C* K# c5 @- ?) T1 `
  2092. BEQ Last_Item_End' ~! Z4 k0 n' y
  2093. JSR Show_Page_Text
      i- e8 R% j0 m1 y: A1 K9 d$ J6 p
  2094. Last_Item_End8 |- z, U3 X$ L! I
  2095. RTS
    ; n8 I0 ?$ N4 Y4 O7 q" l
  2096. 4 {7 B$ w/ b2 \3 q
  2097. ;==================================================( L  f6 {! h9 n8 z5 T6 w
  2098. Next_Item;下一项( ]8 q6 X; L: C4 I1 h$ L: I
  2099. JSR Clear_Last_Track_Name
    . r( i: i1 l$ n2 I
  2100. JSR Disable_Text_Draw9 e# ^% V/ Z6 a3 m8 U- @. |( E
  2101. # |9 r- v2 G: q+ X% Y& b8 U8 C, s
  2102. LDA <Music_Item_Cur
    $ T0 q0 {4 `0 D
  2103. STA <Music_Item_Last. A# T: b! v, I
  2104. $ J1 K5 y0 B2 F1 E
  2105. JSR Get_Last_Page_Start_Index5 n; j$ O( Q5 S' u1 V1 |
  2106. * r/ _; @  J1 G8 s, X7 P5 g
  2107. LDA #$00* A1 J# Y/ S7 n6 [" l- g1 v8 z
  2108. STA Data_Buf) [5 p) m; u0 q: y
  2109. ! c) m4 ?, @7 d4 @, f1 @" [0 T
  2110. LDA <Page_Last
    3 B: B. B5 h* ]1 F- y
  2111. CLC
    & j6 D+ c6 t9 C/ `9 n3 p, Z& K* m
  2112. ADC <Page_Last_Cnt
    8 e3 x) P5 e$ {2 _/ D# v
  2113. SEC* z- I7 R4 R% x7 Q, z
  2114. SBC #$01# L5 x; Q2 k0 t, \
  2115. CMP <Music_Item_Cur  n& @+ y2 ?3 p0 m
  2116. BNE Next_Item_Begin
    / a+ f! t: b5 r' H- V% A
  2117. ! g* J5 Z5 e0 l, i
  2118. LDA #$01
    & m' {; ?4 S, y
  2119. STA Data_Buf$ ^, F1 n" z# u6 b* j
  2120. Next_Item_Begin; C. x* \9 ~, E' B
  2121. LDA <Music_Item_Cur
    * `( W7 {9 T4 h" l4 B5 g
  2122. CMP #ITEM_MAX_INDEX
    3 B" l0 y/ b& F
  2123. BCC Next_Item_Set
    # F. s6 G; u- o( P* w
  2124. LDA #$FF
    & f% _; t0 `2 y/ |" M
  2125. STA <Music_Item_Cur
    * M  i8 W/ i2 d# ~
  2126. Next_Item_Set
    5 N& D6 A& [& M+ L2 F- J: C
  2127. INC <Music_Item_Cur
    9 X* P5 r6 q" L: x* k1 h9 O/ H* Q
  2128. LDA <Music_Item_Cur6 }8 X+ o. b( S4 ~* ]6 i& z2 ^
  2129. LDA <Music_Item_Cur
    - e! g8 N/ H, V1 a" ]7 s
  2130. JSR Reset_Current_Music: v/ n* H) H0 K" O9 Q" }, b* L
  2131. Next_Item_Play- H( p# O. O8 [2 \' C0 ^4 c
  2132. LDA Data_Buf
    & Z5 L; t, V( u, F4 G8 |
  2133. BEQ Next_Item_End
    % V$ O7 P+ H4 K  k7 ?
  2134. JSR Show_Page_Text
    $ Y1 n. U* C0 ~* e
  2135. Next_Item_End
    : F! i$ B8 I1 H1 {
  2136. RTS2 W: p" V# {2 l/ b. \

  2137. " r& W+ g/ t6 A8 q
  2138. ;==================================================- [7 T! m' O4 I. n& _# G
  2139. Last_Page;上一页. |: R  ^& p% J: T! P
  2140. RTS
    - l/ [+ W0 a; [

  2141. 5 J: b6 c! `' \7 P8 r% J
  2142. ;==================================================
    4 P* c/ h, t: L% q
  2143. Next_Page;下一页' [- e  t3 m  O, X0 L  R! h
  2144. LDA #PAGE_MAX_INDEX& v- T. P3 p, A. b' u
  2145. CMP #$017 R  f1 f5 R( B3 h
  2146. BEQ Next_Page_End
    / k/ V+ N6 e1 o" a4 l! A+ X5 t2 s
  2147. , }, {9 t6 b7 {& s9 O
  2148. LDA <Music_Item_Cur+ P4 k8 Y, A' Q- w
  2149. STA <Music_Item_Last1 U) z  S/ G3 t/ v; l) \0 }+ W
  2150. : w& Q( D( Q" F! R* C
  2151. JSR Get_Last_Page_Start_Index- x- ?, g4 {. ?; d; X  E
  2152. 2 S, w/ w7 k. C4 P
  2153. LDA <Page_Last_Index
    ! U& _8 K, H& Z/ ^$ S9 W9 ~& ]! C; D
  2154. CMP #PAGE_MAX_INDEX, i1 ?& m  C+ p5 J: [& z
  2155. BCS Next_Page_In_End_Page
    % H( B. z6 a- D# f

  2156. ( v. t) b0 V0 Q  @! H9 H: p1 P8 H
  2157. Next_Page_Not_End_Page;不是在最后一页5 \5 }) c9 [, R  n( }
  2158. LDA <Music_Item_Cur% b4 p9 J5 L+ V! D- c$ }0 _9 f
  2159. CLC
    : e* i* n/ D" }$ [* Y
  2160. ADC #PAGE_SIZE
    6 w& b: w0 c) h% Z$ R, |
  2161. CMP #ITEM_MAX_SIZE/ _3 i% S4 G2 e
  2162. BCC Next_Page_Not_End_Page_Less: \' M8 a' l9 ^; _& S! P
  2163. LDA <Music_Item_Cur
    . ]) x% t$ ^% [+ f3 X) C7 [
  2164. SEC
    " a2 U( M' x4 Z
  2165. SBC <Page_Last_Index
    1 p" Z0 X1 c7 i2 [( c! ?8 f& [
  2166. CLC
    / w$ a6 `! b) @1 v! \( w
  2167. ADC #PAGE_MAX_INDEX1 I  l% g" Q; Q/ H! l# _! j( h
  2168. CMP #ITEM_MAX_SIZE
    / H* n5 [7 N0 |6 Z/ i$ r, W
  2169. BCC Next_Page_Not_End_Page_Less3 P0 i: T9 ]2 a7 _+ i
  2170. LDA #ITEM_MAX_INDEX
    , f$ j" v$ N9 b- ~2 l6 w9 v, N9 x
  2171. Next_Page_Not_End_Page_Less: _; w9 P7 t2 t/ ^3 N2 Y
  2172. STA <Music_Item_Cur
    - b: I5 o& ~8 Y4 A% m
  2173. JMP Next_Page_Reset0 s6 n, ~, ~0 a/ o/ x4 s9 @
  2174. $ N' Q+ j" T- |7 W
  2175. Next_Page_In_End_Page;在最后一页
    1 i' U% j1 |' C8 F3 N1 x
  2176. LDA <Music_Item_Cur
    ( B4 W* B9 y" l; M2 P& ]) N% k
  2177. SEC
    ' G8 G1 g' G3 i% u! a
  2178. SBC <Page_Last_Index
    ) f: D4 U0 ]! ]" b/ h6 s
  2179. STA <Music_Item_Cur$ W# T. }9 p* a1 V; Y7 Z

  2180. ; F9 {0 U; K; r8 g5 e4 |
  2181. Next_Page_Reset5 P+ N; x, `2 m+ C7 I
  2182. LDA <Music_Item_Cur
    + l& Y7 n( {. j2 ~# K/ y7 M( T8 e* [
  2183. JSR Reset_Current_Music6 p% \+ L; K8 x
  2184. JSR Show_Page_Text" h, K# b. d" e5 M2 H* [
  2185. Next_Page_End
    ' Y! z( ]# P- z# ]; z& H6 ^
  2186. RTS2 S. _0 S5 O2 u

  2187. 0 x  ^( d& B$ {  ^" E2 R7 ]
  2188. ;==================================================
    . {6 Z* a6 V" Y2 G9 \0 c. P+ {# m
  2189. Disable_Text_Draw;禁用音乐条刷新
    4 i/ b* Q" s8 M2 S
  2190. LDA <Text_Disable_Flag
    ( s" \- U% W3 V+ ]4 G6 p6 n
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME7 y/ T2 D! g6 t9 q5 A
  2192. STA <Text_Disable_Flag
    1 w! _. r( g- o0 s/ q* x# p4 o
  2193. RTS
    ) N8 n* D4 a* n8 A: r5 \  K. ~

  2194. 5 [4 Q7 \0 u# ~9 F
  2195. ;==================================================+ Q; g2 ]7 E1 P8 `$ y0 Y
  2196. Clear_Last_Track_Name;清除上次曲目名
    + f2 ]7 ^0 c% }
  2197. LDX <Music_Item_Cur& {$ N8 j& i% i
  2198. LDA <Music_Cur,X
    ' Y! M7 P, S) k3 Q& P  z
  2199. .IF Track_Name_Pos9 O8 R" r% k* x+ E+ j
  2200. JSR Clear_Track_Info% R! |  N+ N) P7 h9 u3 m
  2201. .ENDIF7 C, a" H: B& X+ A  G* C
  2202. RTS# G  H9 |- q+ r# Q6 G$ T( y- F0 I) ]
  2203. 7 I# `# t% ]! X# H" B
  2204. ;==================================================7 f5 {) j( \, w8 r$ m7 U
  2205. Reset_Current_Music;重设当前曲目
    4 Q# i- P8 V8 k! U0 k' ?4 Q7 {

  2206. 5 J0 u. |8 Z5 W0 l2 }) v/ X. u
  2207. ;写入当前总曲目4 T' j9 p) ?6 r2 o& G
  2208. JSR Set_Sound_Total3 y0 F6 n6 _% i9 H2 J4 m$ r
  2209. LDX <Music_Item_Cur
    # A& D. d% D; ?. o, j( S2 \
  2210. . u* j9 w) T3 [: X
  2211. LDA #$00. y. P( v2 c! G, n5 S
  2212. STA <Music_Last0 i" Q6 E5 ]' D: x. M' e
  2213. . r: e: E) {8 \3 e% B
  2214. JSR Sound_Reset_Proc0 S0 H# ?' G1 R( c0 @% |
  2215. JSR Music_Show
    # i0 v$ s  E4 n) D9 s3 b0 ~
  2216. RTS
    / E8 u  o& O& L, ~. x! z7 N
  2217. ! H3 E/ u  ]# Y0 t, L! [: n" G
  2218. ;==================================================
    ! |  w' H! y9 T; L
  2219. Music_Song_Stop;音乐停止# L. c6 `; }* {* V$ K" v- o) m
  2220. LDA #$01# `* P) h0 f( K4 `( H5 ~! J
  2221. STA <Music_Stop_State! ~. t* }, X( K: A" H- Z3 N- _
  2222. JSR Music_Bar_ReSet
    / |" q: S- Q) O" E
  2223. JSR Time_ReSet
    * p3 q( V8 ^" m
  2224. JSR Sound_Data_Clear
    1 @! @+ `6 u# ^$ t5 c
  2225. JSR Music_State_Show  {9 N3 m# C% |/ G+ _6 X
  2226. RTS0 Q9 X9 c, r1 |: P( `

  2227.   e( G9 F  U! s$ A7 y$ a4 X" F
  2228. ;==================================================
    0 @" w" l$ n1 a7 I: H( E  x$ F6 p
  2229. Music_Song_Play;音乐播放* {3 U7 s7 V5 X
  2230. LDA #$00% T( l5 J( I2 J
  2231. STA <Music_Stop_State
    - @4 N  `+ S3 R  y* l4 C& j* ~
  2232. LDX <Music_Item_Cur6 ]% ?# U, B" D9 {
  2233. LDA <Music_Cur,X
    7 y* n; |: F/ D6 T4 _2 ^
  2234. JSR Sound_Init_Proc
    ! ]+ `. n; m& R1 g* B
  2235. RTS- R8 f( e1 m: A* w2 {. s! X4 N

  2236. ' u$ B4 U. n3 }$ T
  2237. ;==================================================
    ! {& E. A" i( x( c& H( S+ |
  2238. Music_Song_Last_10;上10曲- V1 N' W! n$ O" ?6 h
  2239. JSR Clear_Last_Track_Name
    9 p7 w; A7 T$ C( i8 m. W' d
  2240. JSR Disable_Text_Draw
    1 y# F; C  Z- M/ b1 `; k
  2241. LDX <Music_Item_Cur% G1 @! [, m5 [! p7 Y( p. T  T- C
  2242. JSR Set_Sound_Total
    ; Y, c* S; B3 G; e# B( L$ Q
  2243. LDA <Music_Cur,X% D3 w1 {! z8 @0 _, W
  2244. SEC
    / L9 ^5 T& M' ~" n/ U' A$ Y
  2245. SBC #10" n+ I1 l8 c! u# f2 K. l. {
  2246. BCS Music_Song_Last_10_Set7 K! N$ o6 G6 b: i+ |
  2247. LDA #$00
    3 `3 K9 l# R* v/ ^$ Z" d
  2248. Music_Song_Last_10_Set& \3 x. x4 x$ D, L5 f: s+ B
  2249. STA <Music_Cur,X! h4 C" M6 X) }+ p% R
  2250. JSR Sound_Reset_Proc
    " B: z3 s0 Z# Q$ T( q
  2251. JSR Music_Show
    % V4 ^/ i* i3 T! T
  2252. Music_Song_Last_10_End
    $ }  V5 k- b, h4 o
  2253. RTS0 Q1 K% f' G6 L' G- {3 G" ^
  2254. ! |1 o4 ~4 ]0 C* F# c# `& u/ L
  2255. ;==================================================0 d, |2 o6 W1 L3 E* T5 L( P9 e
  2256. Music_Song_Next_10;下10曲
    # ]  I3 Z4 `8 q/ ?, x' p
  2257. JSR Clear_Last_Track_Name
    7 V+ s( l9 r0 W4 h6 i& s% |5 T
  2258. JSR Disable_Text_Draw
    3 _1 R+ M, i0 A1 ?: w. e
  2259. LDX <Music_Item_Cur
    . B! Y% S  w, c+ P) D
  2260. JSR Set_Sound_Total/ _" s) H5 P$ Q' q7 ?) Z, o
  2261. LDA <Music_Cur,X2 y1 i% C- V; \# G! k
  2262. CLC7 a7 G/ c! x7 |; x" a
  2263. ADC #10' Q. v6 H) ~1 J% ~- o' w9 d/ ?
  2264. CMP Music_Total) @: D2 C2 A/ R8 S; g5 s. _0 S2 g( R, Z
  2265. BCC Music_Song_Next_10_Set* ?5 U! O: C/ D0 t+ r0 j/ N
  2266. LDA Music_Total; k6 V$ P0 L; I5 Z. {
  2267. Music_Song_Next_10_Set
    - n/ R+ p1 y. H' p  b4 G2 E+ Z
  2268. STA <Music_Cur,X
    , {6 k* R/ X+ k" C3 d1 H: c
  2269. JSR Sound_Reset_Proc- y( Q: Y1 V/ t3 Y
  2270. JSR Music_Show; S# `4 C' R, Y. G
  2271. Music_Song_Next_10_End% E/ f/ A" W8 z4 P
  2272. RTS
    6 r6 J$ o% [+ u& e( T( _& _- i# Z! k
  2273. % \' d( W" V- ]8 F% a  T" K: U
  2274. ;==================================================
    5 s( B7 ~% V7 I6 Y" g6 B; E
  2275. Music_Song_Last;上一曲9 o# e5 J! O2 o8 E& k' _7 M, h
  2276. JSR Clear_Last_Track_Name$ W3 d/ |  C, L! J# U; f! k+ l
  2277. JSR Disable_Text_Draw
    / l( R( w, r' m4 w) T9 ]
  2278. LDX <Music_Item_Cur1 P/ P' G# {$ W' t. l- s
  2279. JSR Set_Sound_Total
    9 P9 l3 i- u+ z' U* U0 `0 c
  2280. LDA <Music_Cur,X
    - j) w- i. L+ z! X6 P9 O, Q
  2281. BEQ Music_Song_Last_Set# g: }/ ^  b, L6 o% H7 d' W
  2282. DEC <Music_Cur,X4 _7 u3 A5 M2 g2 N
  2283. Music_Song_Last_Set" K+ Y6 t$ X$ A; ~" q
  2284. JSR Sound_Reset_Proc: L7 z; o+ H  O) E
  2285. JSR Music_Show
    7 @* [# E  w  {! c2 @( g
  2286. Music_Song_Last_End8 Z8 r) Q8 p- h
  2287. RTS
    4 H, R& F) C* R" @; a) W$ }
  2288.   w& ]4 l6 v" J0 j7 P9 n
  2289. ;==================================================; _- L2 j# [( a" f; g! d' V
  2290. Music_Song_Next;下一曲
    - G9 a% v) Y' a0 G% k
  2291. JSR Clear_Last_Track_Name
    9 l6 g: e# \, e) ?( [
  2292. JSR Disable_Text_Draw# H- g. Q& Z# _. X
  2293. LDX <Music_Item_Cur2 C( Y; Z: F  H9 X2 U1 A
  2294. JSR Set_Sound_Total
    4 E! \, Q, k; m7 j. ~4 y! E
  2295. LDA <Music_Cur,X
    & H9 w+ M; d' \& {$ \0 U* I; c
  2296. CMP Music_Total! P4 J+ ], K, r6 T
  2297. BCS Music_Song_Next_Set& f- m3 A* u& \0 Z/ x
  2298. INC <Music_Cur,X
    ' }" ~9 p& ?( K, |/ D
  2299. Music_Song_Next_Set
      I* l( f4 i0 M0 V! D% w1 K
  2300. JSR Sound_Reset_Proc+ Q7 W- g* y2 y6 |& z1 J
  2301. JSR Music_Show
    * s) _) {5 S( t- Y  M
  2302. Music_Song_Next_End
    / ?& p3 ~7 O) y2 ]) A3 }4 y
  2303. RTS
    # _7 e0 X8 S" s+ ^0 U, F- r  t

  2304. + [  c3 F0 r- u5 a. ~( V- Q
  2305. ;==================================================- s- o" j0 g+ E5 K) K
  2306. Change_Select_Item;改变当前选择项" l# k) `' l, O7 `" ~" q
  2307. ;--------------------------------------------------
    + c$ d# \& y) }: e7 ^
  2308. Change_Select_Stop_Play_Item;停止/播放) r' U& g0 I" \5 _
  2309. LDA <Key_Once* r) r: ?9 k' C  W7 w
  2310. CMP #$10
    7 p# y  B+ U4 M7 |7 T
  2311. BNE Change_Select_Last_Item5 c1 @  b1 ]: H% K, {
  2312. LDA <Music_Stop_State
    ( A+ ^- z$ G4 ^
  2313. BNE Change_Select_Play# O! o% m2 X, |' J* s" P+ c
  2314. JSR Music_Song_Stop
    ( P$ k4 D+ ]# P6 p* k9 E
  2315. LDA <Music_Stop_State4 N$ U/ v. k. |4 r  X+ r! z3 ~1 k+ `
  2316. RTS
    - V+ m* G$ Y$ t3 t( G4 P
  2317. , r# f) k; H% m$ p
  2318. Change_Select_Play; N% J8 F- e9 p$ H7 e8 R8 ~0 R
  2319. JSR Music_Song_Play
    8 T, f  F% Z! F
  2320. RTS3 {# f) F  I) g

  2321. 5 B! h* j; u" W! t8 U0 E4 Q
  2322. ;--------------------------------------------------) Q9 b' Q3 v* C' s% B! c
  2323. Change_Select_Last_Item;上一个专辑1 m0 N' [5 d+ F
  2324. LDA <Text_Disable_Flag
    6 U5 N  E% }6 y6 [# C3 e% n
  2325. AND #TEXT_DISABLE_ITEM2 [  o& j7 U' T- i; {' K
  2326. BNE Change_Select_Item_End. f- K2 k: W1 W
  2327. LDA <Key_Once
    5 T  ^/ T/ f4 C; q1 M
  2328. CMP #$08) G/ U: W% w; P1 q% w3 z7 ?
  2329. BNE Change_Select_Next_Item0 ~- I- N( w% U/ h; n. z, }+ o0 R
  2330. JSR Last_Item: E% b$ B* t/ v/ r& h
  2331. ;--------------------------------------------------
    0 L$ e/ `' u! h
  2332. Change_Select_Next_Item;下一个专辑3 o. k$ c. D6 n$ X
  2333. LDA <Key_Once8 y" _$ x5 G& ?8 k
  2334. CMP #$04
    ) I1 j4 c; |: z# N& x8 P0 v, m
  2335. BNE Change_Select_Last_10! s, [( @2 J8 e
  2336. JSR Next_Item
    5 ]7 t/ a/ H9 t  V- v
  2337. LDA <Music_Item_Cur
    . _* \3 L5 ?% L; X. Z' J
  2338. JSR Get_Page_Start_Index* v) B- E$ p& b: p" D* o; A
  2339. ;--------------------------------------------------4 s9 _; d/ Q9 w, _$ r
  2340. Change_Select_Last_10;前10曲
    4 O: D7 b! r( n2 e
  2341. LDA <Key_Once3 g) z" s9 z1 A1 h! ~3 H/ N
  2342. CMP #$40
    8 \. E3 H: R* A
  2343. BNE Change_Select_Next_106 F* o& E8 L* o2 u
  2344. JSR Music_Song_Last_10
    6 R3 z7 p9 f, y* @: K; x# C
  2345. ;--------------------------------------------------
    . Q, l" T: ^& `+ G' \4 Q
  2346. Change_Select_Next_10;后10曲9 l- x' R7 `1 d( L
  2347. LDA <Key_Once
    * k, h, b- _- k% p/ N8 D: _
  2348. CMP #$80
    6 Q/ h2 P; ^. a5 S
  2349. BNE Change_Select_Last. u2 Y6 F( Z$ ]4 Y( [5 B! V
  2350. JSR Music_Song_Next_101 {2 |5 E0 e2 D
  2351. ;--------------------------------------------------
    - L0 K% G! g/ y6 n4 T: Z
  2352. Change_Select_Last;上一曲
    8 j2 W2 {  i) _' b' y
  2353. LDA <Key_Once
    7 _% Y" b" B4 J
  2354. CMP #$02% Z( ^. i+ @; D9 R0 q
  2355. BNE Change_Select_Next: g% M: r7 F, m3 V
  2356. JSR Music_Song_Last) p/ z( d- [7 |8 ]% m
  2357. ;--------------------------------------------------
    ! i9 [. [2 p8 [
  2358. Change_Select_Next;下一曲
    * `& g6 p0 \$ k5 @2 s/ r3 c; e
  2359. LDA <Key_Once3 |8 I: \4 {5 U( e5 T& K- i
  2360. CMP #$01
    / X* e* [8 F; ~8 E$ b- V
  2361. BNE Change_Page_Next) W  s2 [  F3 \* I# k
  2362. JSR Music_Song_Next) x( O6 x; H. q% B/ L
  2363. ;--------------------------------------------------
    0 p: O" F& P- F
  2364. Change_Page_Next;下一页1 {0 b# B4 h% l
  2365. LDA <Key_Once; j9 Z; H3 @# G. G
  2366. CMP #$20
    2 G9 G1 _! K8 d( z7 l% b
  2367. BNE Change_Select_Item_End
    - u% A0 A/ s/ c) A8 Q
  2368. JSR Next_Page
    $ T, W0 ?( _2 j4 x$ ~* o. w
  2369. ;--------------------------------------------------
    - E3 t; T% I  k! A- O
  2370. Change_Select_Item_End' u3 ]5 ^$ l6 w
  2371. RTS
      C" C4 a& r* g
  2372. - p6 N: {9 l0 \$ o2 Y: _
  2373. ;==================================================- V" K! m/ H( A7 t: W7 h% l" p% _% `
  2374. Show_Arrow;显示箭头光标* `; p  Y$ D# u# b' W* x: x4 i
  2375. LDA <Music_Item_Cur3 M8 D& y) p- u2 G% ~  {& F
  2376. JSR Get_Page_Start_Index
    ) w8 M) T% x4 o" x* q- q
  2377. LDA #$00) W" J3 ?% j; i2 x6 F% R2 T- @
  2378. STA PPU_OAM_ADDR
    5 i/ o% Y& m& Q( I" m5 l9 y) q
  2379. LDA <Music_Item_Cur
    ! J1 r2 g/ C. y( g  |# J/ v
  2380. SEC% d' r  a7 S) }9 Q. s$ q- b
  2381. SBC <Data_Buf# Y2 o6 A/ d- @! c
  2382. ASL A
    ! p' D" }& w( z8 o0 T" G: W1 m0 o
  2383. ASL A/ h# y% \; _4 ?# C% P, ^2 O5 {
  2384. ASL A- y$ d/ G& b* ?* N5 s% c- ]
  2385. ASL A* O8 `  K, c) E/ v4 b
  2386. CLC
    8 z0 y  ^& z+ O( g' Q
  2387. ADC #ARROW_Y_OFFSET
    $ [! }  v* h8 A1 j# j* k$ a& D8 \/ N! X
  2388. STA OAM_TEMP_ADDR + $00) I, u2 x9 }! Q, M" C9 k0 v
  2389. ;STA PPU_OAM_DATA9 l) [/ X, O* t9 d
  2390. LDA #$1F
    0 M% N# w" D! \# w6 Q
  2391. STA OAM_TEMP_ADDR + $01
    7 x- ~0 D5 z0 e- U+ i( v6 H4 q
  2392. ;STA PPU_OAM_DATA
    6 P/ T5 w8 ?' ]- w9 d9 J$ M+ ]
  2393. LDA #$00" v& d( x7 [! _
  2394. STA OAM_TEMP_ADDR + $02
    , d. ^$ ~+ p( `$ g! d$ a
  2395. ;STA PPU_OAM_DATA
    $ k* R! b4 R* ]9 A$ `2 x
  2396. LDA #ARROW_X_OFFSET' @  P+ h6 P7 Z% x
  2397. STA OAM_TEMP_ADDR + $03+ L' J2 l5 L  R
  2398. ;STA PPU_OAM_DATA' e# w2 p7 ?+ K8 v& b5 _
  2399. RTS% T1 S' V% c& R; s7 n, D

  2400. - Q6 s* p" c/ F0 @) z
  2401. ;--------------------------------------------------
    : s. R0 w+ k! Q7 J8 d: }: A
  2402. ;命名表数据
    & l: f2 E; T! {) i
  2403. Palette_Attributes& t5 p+ `( K& u. s+ r, |8 k" @
  2404. .IF SOUND_BAR_SHOW_ENABLE
    ' u7 f4 n# b8 S: Y) B" e# K
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55* I8 y- F5 p& [0 d7 q( L" p
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    ! J$ t, P/ N0 P' ?9 D
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    7 N# b( o6 K  l- i( ?9 s$ s
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA! a8 E, h; u* p+ V: b
  2409. .ELSE* C4 Z, u% h5 z5 N5 z1 k- B/ _
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55+ o8 K$ [0 H5 U. w3 \+ ~& S
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    + y. B: I5 x, I0 ^3 p9 c2 ?8 `
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75. \/ @6 W  o6 d3 l
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
    - h. ]6 \' G/ `  i7 {* B  C% ]6 u
  2414. .ENDIF4 m! h; {) z( i7 V, Q
  2415. 5 V: }& V0 z/ a5 F6 h# D
  2416. ;--------------------------------------------------8 i) R  D3 O; c
  2417. ;调色板数据
    $ N! v! ]/ N* T1 ~; H
  2418. Palette_Data
    0 `$ A$ p4 W; o
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F
    / |- T; F" O4 q5 d0 ?8 Y4 X3 ^
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F& D9 x7 P8 ?! i3 W
  2421. " o. `; D6 o% i
  2422. ;--------------------------------------------------
    / l; S5 n, {8 m1 g+ e5 {
  2423. Static_Text_Data+ O6 S) ]) \; @) m: y6 b& e
  2424. .WORD Static_Text_Caption_Data8 ]+ ]( ~2 ~8 _, L: L% l; |6 j9 `
  2425. .WORD Static_Text_Author_Data! m+ W: }+ Z! i& F0 [
  2426. .WORD Static_Text_Date_Data3 I+ B. m* w2 W$ m. ]: ~: \
  2427. Static_Text_Data_End
    ' z1 U$ N: A+ g
  2428. ' }0 G& w* n# W$ Y: s1 Z
  2429. ;--------------------------------------------------
    . T7 B* V$ U3 l0 W7 d" v, K( `
  2430. Static_Text_Pos  R( q. r1 I8 D$ g% \9 P9 d
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)
    " L0 J) i1 @" `. ^! h1 \
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos), Q) I! r  N) w
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos)
    7 O% \* S/ o5 o  x# S
  2434. Static_Text_Pos_End# A% F) t, Q! ^) T0 g& z8 L
  2435. * V6 N% }  t/ }* c8 Q6 w
  2436. ;--------------------------------------------------8 n' u) T) r4 D" k2 @) K) H
  2437. Music_State_Stop$ w' v2 ?' \: k$ E
  2438. .IF SOUND_BAR_SHOW_ENABLE
    / V6 s7 e; ^2 Q( W& l/ E/ {5 A8 g; s
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    & P% b, H! k) x) i3 ?  f2 h
  2440. ELSE1 |3 H. I) N% ^: e- |: J: k$ T4 c
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00
    4 ]) n; J4 t( p" \
  2442. .ENDIF
      s3 |- m$ p( p/ M5 P' o, q. @6 P+ ~
  2443. Music_State_Play
    6 |. P- ^- Q4 y8 {( V% t  O
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$00/ T1 S0 ~0 I% k2 [
  2445. ( r; Y' w& |( }+ b3 c& f
  2446. ;--------------------------------------------------  l1 r, r1 M# w" `& k" v6 z
  2447. Sound_Bar_Text_Data;声音类型文本
    ' R' F4 b( B! c& z1 c
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-"
    5 _  F' u" s- N8 M$ ?/ U  c
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-"9 u/ c2 A& V! Q; I
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-"* f9 b" ^) G7 _$ i) x5 N
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"
    + N$ U- ^' f& R5 Y/ w1 Q: z
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00
    1 [) s5 ~! R  \* K. z7 ?
  2453. ; J; Y, F6 o* }" Z' z2 S
  2454. .IF Track_Name_Pos; b% c. I: G4 }+ H) `& I8 x8 N& |* b

  2455. - Y( V  o* z* B% a1 H
  2456. ;--------------------------------------------------1 X& m2 Q8 K, q, y: `# C) ~
  2457. Track_Name_Addr_00;曲目名地址索引
    6 p: B2 i8 l8 i& E) K3 b- F
  2458. .WORD Trackr_00_01* A$ c/ m3 Y" W# q9 ^
  2459. / z. c2 @( ~, V: N1 P2 M: i
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"
    9 e6 M* b1 K: @. [/ T) z4 u' k
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"- f6 i6 _( s: S
  2462. ! J' z" ]$ s  T
  2463. ;--------------------------------------------------
    - l- A+ j9 x' {" _
  2464. Track_Name_Addr_01;曲目名地址索引
    2 c8 F. O, e3 R" y% ?$ u
  2465. .WORD Trackr_01_01  K" T0 h) J: d

  2466. ! @: [+ K; N4 i5 Y# g7 W8 ?
  2467. ;==================================================
    & @+ G, u- b! X7 h
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1"
    , {( o' o8 P1 F
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2", `. n% g8 ~, b* g4 R3 `

  2470. % ^: U: t# F5 ]( V9 p% v/ W
  2471. ;==================================================* e! p6 r9 f1 w! o2 f( p. U
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引' _9 k; I8 o1 K9 C6 B
  2473. .WORD Track_Name_Addr_00# f9 P7 V; ~! n( a
  2474. .WORD Track_Name_Addr_01
    % M- a+ Z$ n$ Z7 V
  2475. .WORD Track_Name_Addr_01
    3 g& {3 _- N$ G2 _3 ?

  2476. 1 k3 ]- ~, P8 |- P
  2477. .ENDIF
    1 V( z/ u9 n0 ~9 p

  2478. + E7 t) Y% m6 W- l
  2479. ;--------------------------------------------------! t1 s) T: I( U8 D8 a
  2480. Static_Text_Caption_Data;静态文本数据4 {0 P0 r! [  [, t+ t) |
  2481. .DB 16% b0 E* E# h0 R  y2 t8 a5 A
  2482. .DB "FC MUSIC 12 IN 1"- ?9 z/ C1 ?8 Z7 O
  2483. Static_Text_Author_Data
    ! x+ v6 u4 v2 j0 G7 \0 w
  2484. .DB 255 ~/ ~4 `! _- C. u2 O2 R3 `
  2485. .DB "EXTRACTED BY FLAMECYCLONE"
    / A9 p( v) H8 J: A1 |
  2486. Static_Text_Date_Data
    # n: N4 X8 Q4 `5 @, G' \
  2487. .DB 10! u2 p: U) o0 B1 z
  2488. .DB "2023.07.23"
    9 u9 d% C0 M  A$ u
  2489. # [5 ~" d- V# O$ \) M
  2490. ;==================================================
    - T& k1 E) S6 G% Q' P
  2491. Music_Collection_Name               ;专辑名间接索引
      R! W% B. u6 f% h8 p% \0 Q3 R( M
  2492. .DW Music_Collection_Name_00
    # d4 b5 ?% i* |$ G1 X
  2493. .DW Music_Collection_Name_01
    ( e2 \& x' B( d
  2494. .DW Music_Collection_Name_02
    ) F8 L- l/ ^2 t1 S9 ~/ k
  2495. .DW Music_Collection_Name_03" S9 q/ U* r% n
  2496. .DW Music_Collection_Name_04
    ' Z& F2 m% Y1 ~2 q/ e3 \5 M$ k
  2497. .DW Music_Collection_Name_05$ C+ B! l9 O/ q' l# E/ e; {
  2498. .DW Music_Collection_Name_062 S6 `- m2 ^; g: X7 l6 x5 l+ I( ]
  2499. .DW Music_Collection_Name_074 B; C4 e' ?# p3 |
  2500. .DW Music_Collection_Name_08. e2 ]; k8 A' g4 s! {4 {
  2501. .DW Music_Collection_Name_09
    ( t: L8 d& [5 E
  2502. .DW Music_Collection_Name_10' b% `2 p7 S/ \! `; h) k0 v
  2503. .DW Music_Collection_Name_11
    6 i& x( n& K6 r0 e$ q2 y( R

  2504. # Y: I% w% c- {. ], z
  2505. ;==================================================
    8 G: ^1 k- |- x; G+ K
  2506. Music_Collection_Name_00            ;专辑名文本数据
    ! p/ B) Z) T- s0 ]6 _
  2507. .DB 11,"1.RAF WORLD"
    ) T! q- x8 b2 {' {& ^. J
  2508. Music_Collection_Name_01
    : T# z7 U: [8 U7 [2 j" R. T
  2509. .DB 15,"2.FINAL MISSION"+ q* a2 g  T& m. x" n
  2510. Music_Collection_Name_026 m) Z! u$ y$ Q1 E! z$ C% t( a
  2511. .DB 06,"3.KAGE"
    . I# f! I: r3 e7 B; }$ D% N( X
  2512. Music_Collection_Name_030 A( E7 z! I0 g* B' H% P6 N3 B
  2513. .DB 16,"4.DOUBLE DRAGON"
    ) G9 V0 W/ P& _( T( a* m2 {8 E8 C
  2514. Music_Collection_Name_04$ @6 J$ p+ r1 u1 m+ _- j
  2515. .DB 17,"5.DOUBLE DRAGON 2") p8 X& K6 p6 h. g
  2516. Music_Collection_Name_05
    # g% y) @0 r: M9 G+ I. J" G
  2517. .DB 17,"6.DOUBLE DRAGON 3", M$ B* q" s/ I. b
  2518. Music_Collection_Name_06
    ! o$ f* I  m4 R$ Q
  2519. .DB 09,"7.ROCKMAN": F. X% f  ^3 Z( L
  2520. Music_Collection_Name_07
    # E, X' R3 d% [( P; X9 n' g* K
  2521. .DB 12,"8.ROCKMAN 2"( H9 L! i9 r9 p0 j
  2522. Music_Collection_Name_08
    # u1 `9 b' z9 f3 a, G! m
  2523. .DB 12,"9.ROCKMAN 3"  p  ?9 l) R* w. s( O$ L' D
  2524. Music_Collection_Name_099 J0 a  o4 s. K
  2525. .DB 12,"10.ROCKMAN 4"
    3 _9 Z6 Z& Y8 [
  2526. Music_Collection_Name_10
    9 _; w/ o$ l5 ~6 b
  2527. .DB 12,"11.ROCKMAN 5"
    0 w4 g$ ?% {- @* l: @4 B' j5 {
  2528. Music_Collection_Name_11
    , c8 g$ |; P0 Y' j
  2529. .DB 12,"12.ROCKMAN 6"
    " L3 e8 R3 U4 v$ W( z

  2530. , _4 }! u# I1 v$ e
  2531. ;==================================================
    # r. S# e7 R  Z4 r# j
  2532. Track_Name_Addr_Flag                ;显示曲目名标记. @( E# V* }( V5 I- K' n4 W  _% ?+ k1 p
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,0
    / `$ o% y9 V4 X6 E. y# K* M: C

  2534. ' c' A  X/ K0 K/ |' T
  2535. ;==================================================! o: c( m' t  m1 h
  2536. Item_Pos_Data                         ;光标箭头位置
    4 S' M" R9 ?& F+ u* A
  2537. .WORD ITEM_SHOW_POS
    " Y8 Y' e+ ^9 a" {, I# B
  2538. .WORD ITEM_SHOW_POS + $0040
    * a* Q& u0 g: o
  2539. .WORD ITEM_SHOW_POS + $0080
    & ]+ S' l- ^. {( Q& B5 T! |( D
  2540. .WORD ITEM_SHOW_POS + $00C0
    + U& _6 N$ N' }, ?1 g3 P
  2541. .WORD ITEM_SHOW_POS + $0100# y% ]1 p$ K8 a' J9 T# W8 n
  2542. .WORD ITEM_SHOW_POS + $0140
      C8 n+ t" I2 X% I& I6 _1 |1 g  `! @
  2543. ! K: v' t! `% k! m; N
  2544. ;==================================================
    : x2 p+ L* `; u) I1 }; s
  2545. Sound_Init_Port                 ;音乐初始化入口地址
    ( d6 a# g% V& A4 q
  2546. .DW $BFC8. y! _: g  T: Q
  2547. .DW $D7F0
    / }; V1 a7 K2 Q, |3 g
  2548. .DW $9FC0
    5 a4 _4 w* b, T. T" U/ K% w
  2549. .DW $BF70" y: c/ M# L9 t, q( }- O1 A; m
  2550. .DW $8003
    4 D$ ?( F* j% O5 _1 x
  2551. .DW $BF307 p) F. c* y: [3 ?
  2552. .DW $9003
    % H2 J( ^+ e: ]2 A* ^" `# V3 {
  2553. .DW $8003
    ( y2 z9 r( s! [% {/ D" d
  2554. .DW $8003
    7 ?2 h- H- r) z! M% i( z2 T
  2555. .DW $8003
    3 L% A2 K( Q' B
  2556. .DW $8003) R+ d$ Q. j7 A) N; l  `8 N+ f
  2557. .DW $8003" C9 o" Y: s9 L

  2558. ' Q7 U4 m, D% j- k1 ?- [1 A
  2559. ;==================================================
    ( S* I" n8 [. o4 b9 n& W
  2560. Sound_Play_Port                   ;音乐播放入口地址( \' t4 C) B4 o$ u7 p% b
  2561. .DW $8000
    : X0 H' [4 f3 N( v
  2562. .DW $80016 w- @( \6 N2 c4 x# b0 ^7 [
  2563. .DW $A000# b1 K6 p9 G1 E: q
  2564. .DW $8003- \9 n- a+ k) O5 F' y* z1 j- d, F
  2565. .DW $8000
    9 x8 [4 }$ O% V" X1 Z- s: b
  2566. .DW $8003! X9 Q" ^5 q( j' B; t& Q5 `% K
  2567. .DW $9000; t2 C/ q8 ~, ]
  2568. .DW $8000( M/ J! b5 T* c. E
  2569. .DW $80004 l8 {- U, x( e' s
  2570. .DW $8000' q) ^' P7 _$ S
  2571. .DW $80001 d3 b( l) Q; Z2 R0 f8 Z
  2572. .DW $8000
    ! s, r) A; j7 c
  2573. % Z. [; C6 M$ F3 o( x
  2574. ;==================================================
    * z7 c' i7 L3 ~1 u* ~& Y
  2575. Sound_Reset_Port                  ;音乐重置入口地址
    : H4 w/ E( A. A2 m
  2576. .DW $0000
    1 W1 k# M" w6 e: o; s: ^9 w
  2577. .DW $00007 A: b/ |  }5 I; g5 S1 S
  2578. .DW $0000
    , ?# S5 t# I% C
  2579. .DW $0000- l& h5 F+ \& U! L, v
  2580. .DW $0000. l' |! q1 J: x" `
  2581. .DW $0000
    4 n& j+ e8 A1 E% i5 W) I/ i: z
  2582. .DW $0000
    8 A( q* f2 `, j) h8 |/ v$ Z
  2583. .DW $0000
    ; w6 e+ l( S% I& z+ {: z9 W/ t; E
  2584. .DW $0000! A% g" g8 R/ I" T8 c
  2585. .DW $0000! W4 u+ `/ x' V' Z
  2586. .DW $0000
    0 s# W/ @9 U: v# d: L* O$ q4 ]
  2587. .DW $0000
    8 d9 J& d* v7 G9 @+ T) z, d

  2588. 0 U7 }& D5 w6 `1 {6 L% P1 h, q
  2589. ;==================================================
    9 F* h; c# H: {$ ^
  2590. Sound_Total_Port                          ;曲目总数
    * S- i4 s5 ~0 u! m, U1 V( o
  2591. .DB 38
    " b# U$ j4 q5 V/ S: X; e+ q
  2592. .DB 33
    , H# h8 ~! r. e- D
  2593. .DB 49  V) E4 A/ q! L5 w3 L  q
  2594. .DB 41
    ( g' G: T8 G0 `/ l! G( n: J0 j
  2595. .DB 83
    + b3 W1 m+ i; Q) S! X' Q2 ~; J: R
  2596. .DB 70
      |: ~/ b* l% R4 N9 ^
  2597. .DB 50/ b0 m/ o0 z: z
  2598. .DB 675 K3 [4 \: p( \  W. v& y1 S! p
  2599. .DB 57+ @4 B8 F; T. ]
  2600. .DB 71
      K! t" u7 h4 A- e7 m
  2601. .DB 76* H" B* Q! E7 t+ ], s
  2602. .DB 102$ R; L; V) l% n0 l  m6 K( {
  2603. + f, K( d6 M* ^) c7 U7 B& n
  2604. ;==================================================  z# t8 q3 Z1 i  w' @+ a
  2605. Sound_Start_Port                      ;起始播放曲目
    " d* P2 L: X* n/ w: ~2 G+ j
  2606. .DB 007 w$ j: m! i8 d- n+ Y
  2607. .DB 00
    ' P9 U4 }3 a4 T. V0 U: f0 v
  2608. .DB 000 y1 `1 F7 t( F: p5 P) b
  2609. .DB 00
    ! Y" D4 m& O0 Q$ i3 `
  2610. .DB 007 F# S" `. b5 G3 R; O; G
  2611. .DB 00
    4 s: b+ _" Q; k
  2612. .DB 00& u: S. J% E* F6 _( N
  2613. .DB 00
    " J( R/ V2 O/ u# N0 a; x# ^/ N
  2614. .DB 00
    7 T- T- q( i3 z+ S: a( v  G
  2615. .DB 00
    $ H4 C6 V$ \' p
  2616. .DB 001 |: g+ h# K% L1 {
  2617. .DB 00' }( u: f3 `+ w( ]# k' b- K
  2618. : A( p6 @) E% D) f4 n
  2619. ;==================================================# o* ^) }- L4 a, C% R
  2620. Sound_Bank_8000                      ;专辑bank_8000
    ' [1 O6 m! i: [+ P
  2621. .DB $102 }1 u0 L# f/ P8 J$ |- @
  2622. .DB $12
    5 |! S4 P3 n; G/ ^" g( R, ]
  2623. .DB $14+ Q6 r2 A1 m0 f! S0 N% R
  2624. .DB $165 d6 F2 P2 U7 ~
  2625. .DB $18. H3 n! |: E- b; {$ r+ l% {, e
  2626. .DB $1A8 W9 V' B+ l9 d

  2627. - s& \; |& a! ~/ Q* f
  2628. .DB $00
    - _# `! d& V7 ~9 u# c
  2629. .DB $02; `# d9 k- g  B' w  }, X! Y4 k
  2630. .DB $0D
    $ B$ K4 O+ }/ p+ T$ ]( a8 ?
  2631. .DB $04
    - Q+ _( ^, u* r' }0 s/ y( O2 ]
  2632. .DB $079 I9 D1 E* y/ B! S4 U1 F4 P
  2633. .DB $0A
    - P# R* O* P; W* x8 Y- v
  2634. : L: w7 L$ O1 R9 Z

  2635. 9 d5 P8 Q! z8 R# n
  2636. ;==================================================8 f: }1 `, K! {( B, \+ m
  2637. Sound_Bank_A000                      ;专辑bank_A000, r0 I& g/ W8 B% X9 L6 I- w
  2638. .DB $11
    7 y& G  v4 |/ F3 p
  2639. .DB $13
    * R( R9 L  ~. B, E3 q$ R# g
  2640. .DB $15
    / M9 ]  s8 ?9 O& K
  2641. .DB $17
    ( s: F5 A: t# ^6 _" S- o! |
  2642. .DB $19
    2 \2 S+ c7 |9 F. G& l
  2643. .DB $1B; {4 ]0 F$ c+ X2 }

  2644. 7 ?- D9 v  L% W* ~2 l0 ]  `
  2645. .DB $01
    1 ^/ r0 x2 y; y8 X& |
  2646. .DB $03
    % ?2 D, G$ G+ M. k! W% L* ^8 \
  2647. .DB $0E( Y6 o* }" V+ {+ _7 g/ ]( C
  2648. .DB $05
    ; e/ O/ j7 M4 E5 m7 D
  2649. .DB $08* d' {) `- T/ {* q) A) O  t4 k
  2650. .DB $0B
    ! `, S; C& m' ]' ?' X

  2651. $ t& }1 [7 l. T; W; Q) w

  2652. 5 z7 q; J" h& `' n1 V1 D! G
  2653. ;==================================================; v4 ]+ o# p) ?* I  ^. t
  2654. .BANK RESET_BANK & BANK_DATA_MASK
    * F$ Q& D; ?" B, a4 \; z
  2655. .ORG RESET_ADDR0 ~$ F) f# L4 T# c

  2656. $ c( r2 N1 x# f2 A
  2657. ;==================================================
      Y; ?; i* W2 q0 P; F
  2658. Switch_Bank_8000;切换bank到8000-9FFF' n3 O# m! f. k& F
  2659. PHA# s. Y  G/ [( j4 c; h% G& o+ e
  2660. LDA #$06
    3 S( S* h6 Y; J4 X4 U
  2661. STA MMC3_BANK_CTRL
    0 b! s/ `- v1 J/ A, ~. M
  2662. PLA' u% ~; |- A* R$ c( o3 V$ U. G
  2663. STA MMC3_BANK_DATA
    . e9 g8 X/ M$ d, V# B
  2664. RTS0 Y- r" i1 j3 Z. [1 I1 \8 {/ v( Q

  2665. % }( P0 b9 M/ k/ f
  2666. ;==================================================4 O0 b& e( }# \0 s( E, r* |+ s7 T
  2667. Switch_Bank_A000;切换bank到A000-BFFF) b! p4 T) ^/ b9 R" T1 @
  2668. PHA" Q5 ]; q6 v$ }
  2669. LDA #$07
    ) L$ U5 A8 ?  b  r
  2670. STA MMC3_BANK_CTRL3 o$ e- O1 r: E3 j4 q
  2671. PLA! v; g8 o1 o, I9 {1 t8 b. k
  2672. STA MMC3_BANK_DATA% S. [- A2 a# W
  2673. RTS
    5 B( j8 H. ^, n: Z: L# p' N) i
  2674. ( u1 z9 k3 _; l1 N% g
  2675. ;==================================================
    9 F& ~$ I- q3 Q1 x  C# k
  2676. Switch_Main_Bank;切到主程序bank7 B; H2 {6 w9 B1 J' }4 I
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK) s- M  U5 m0 g' j4 ^5 `: E1 q0 }  R
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank
    9 n$ M. ]! A) X# @3 g5 D1 D$ W; o! S2 Q
  2679. RTS0 t) G/ `; M" D( F$ I/ }/ p

  2680. 3 d) S1 ~! q7 k0 j# R  G9 x
  2681. ;==================================================
    : z2 M1 T! ?. e$ y9 `1 E, n
  2682. Sound_Reset;音乐重设(如果有的话)6 l. a, k6 \+ V4 {' e
  2683. JSR Switch_Music_Bank  ;切换到音乐bank
    ! w* @# S5 m3 I/ H% G4 a
  2684. JSR JSR_Addr_Op        ;执行音乐重置
      G1 q5 {9 A5 K
  2685. JSR Switch_Main_Bank   ;切回主程序* ~5 O% b9 ?) |( ~* V: U* g
  2686. RTS
    9 C, d, h8 c! o' B# _9 m
  2687. & Q( H9 G9 y1 D: ]  n9 c% `* N4 G: t# E  G
  2688. ;==================================================* ^3 C) C0 x& j6 l
  2689. Switch_Music_Bank;切换音乐bank% |& M7 w- K. b8 s2 f/ V
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号1 V- L0 ^- S9 |
  2691. LDA <Music_Bank_80002 u, {5 O: Q, }# Y- j9 \0 [) t; Z* M
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank% L2 \1 \# O, J* }: M9 w' N
  2693. LDA <Music_Bank_A000
    : u4 B- t' v; ~, G" m! N
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank; ~4 d  \3 g4 l
  2695. RTS/ P. ~* c$ {& b* z
  2696. ) s2 D5 R0 ~. F, x/ u
  2697. ;==================================================1 n  c) i. p; v  Q
  2698. Sound_Init;音乐初始化6 ~: P- e% E, u* d: O/ Y
  2699. PHA
    $ ~% Z0 [4 c. r
  2700. JSR Switch_Music_Bank  ;切换到音乐bank
    ! P: a# d" h! ^4 Q  f0 A9 X
  2701. PLA4 |/ n8 w, m2 G$ L
  2702. JSR JSR_Addr_Op        ;执行音乐初始化1 q6 X7 O5 v; _' G+ o% x: t" D  e
  2703. JSR Switch_Main_Bank   ;切回主程序+ x9 E8 @* g" n( l0 s& s5 x
  2704. RTS( L+ e% Q. Q2 J/ s
  2705. % A  c% F3 ^4 A5 b9 H
  2706. ;==================================================$ ]8 l7 E9 I6 l& h' p' l% y  ]+ `
  2707. Sound_Play;音乐播放
    : t6 N9 H, G4 L% B) m( D5 U
  2708. JSR Switch_Music_Bank  ;切换到音乐bank
    7 e  p' y/ {1 z+ m$ c; T9 [
  2709. JSR JSR_Addr_Op        ;执行音乐播放6 c* a; @/ E6 L3 r
  2710. JSR Switch_Main_Bank   ;切回主程序
    / E+ A6 E; i, b1 Q  \5 V9 L" D
  2711. RTS  K6 R; V8 [! Y' w
  2712. * \: h4 I0 h  h! q" q' ?
  2713. ;==================================================
    9 \8 Z3 m. O9 S$ W+ z1 S6 d
  2714. MainLoop;死循环% Z+ g$ N$ T9 i& e0 G  ?
  2715. JMP MainLoop% s2 E8 K( W* v4 r) y- y

  2716. % X5 W) U# q3 ]
  2717. IRQ_SUBPROCESS_JMP = 0' w. s" A7 y3 Y# A$ i( u. u
  2718. 3 M! ~9 D- E1 c3 }* {
  2719. .IF IRQ_SUBPROCESS_JMP
    + X3 n; t0 w6 {
  2720. ;==================================================' {( R) @  s# q( e3 S1 u' }
  2721. IRQ_Process_0;IRQ处理过程00 A; W+ I1 U7 M' D) v! ^* s" \

  2722. 1 h4 l$ J: S+ f3 _3 e  P" p) L. _
  2723. ;15条扫描线后触发IRQ
    . O+ k0 @6 A0 m- q
  2724. LDA #155 C3 H/ Q' v8 K
  2725. STA MMC3_IRQ_LATCH) k+ S7 R" @8 }1 m$ o/ o

  2726. , j+ N+ U9 A& ?2 T- x5 }
  2727. ;设置屏幕滚动" O) |8 M8 R0 }
  2728. LDA <Scroll_H
    % O2 ?# @6 g4 ?0 z, t& A
  2729. STA PPU_SCROLL
    ' T1 j3 G  N+ o: `
  2730. STA PPU_SCROLL6 O' Q' T" W# v$ e
  2731. 6 Y1 F: z3 M" @0 Y- W1 [  B  O
  2732. IRQ_Process_0_End$ s: v/ D+ e1 Y
  2733. INC <IRQ_Process_Index
    & ^5 P9 N6 L) I* h
  2734. JMP IrqProgramEnd' c2 R' F/ ]2 c: b" }

  2735. $ o" v# e* X3 D
  2736. ;==================================================) t' N3 i+ ?" F/ A3 c: z2 t4 w
  2737. IRQ_Process_1;IRQ处理过程14 q& a' a# k# F6 ~3 ~
  2738. , ]" z3 X7 B0 D" X% X2 ?# U8 B" r( ?3 Q
  2739. LDA #55
    4 n1 y% I% S' o. k; [
  2740. STA MMC3_IRQ_LATCH
    , `; I3 _' @) ]$ ]! M6 t

  2741. - D4 l% E9 m3 N* X5 J+ E  f
  2742. ;设置屏幕滚动
    1 T" V7 K+ b3 n* @2 m7 A
  2743. LDA #$00& ?$ [4 i+ v9 l2 Z
  2744. STA PPU_SCROLL. y1 i7 q( \7 c
  2745. STA PPU_SCROLL0 o0 X8 i$ K! _( k$ a5 W
  2746. / g% l3 M2 H" Z* l9 `$ c
  2747. INC <IRQ_Process_Index# k1 M  D7 n9 h6 C8 i" q2 Q: p
  2748. JMP IrqProgramEnd) V+ n- N4 p9 |+ x) Z  Z! r
  2749. 0 d% V; ^# j0 f+ i5 Y2 F; n
  2750. ;==================================================( v  W* v9 Z. N) U
  2751. IRQ_Process_2;IRQ处理过程2
      {) @# E2 K. I1 j

  2752. ; P; d$ \9 Y  E' _+ D
  2753. LDA #15
    7 E' L3 h3 ?. a0 J
  2754. STA MMC3_IRQ_LATCH
    , i" O5 c1 s$ i9 W$ v1 c
  2755. ( T3 ]: C! a) y# S4 ?
  2756. ;设置屏幕滚动
    % j! t* |; z% f) E6 d
  2757. LDA #$00. R8 B  m' P, S: O& t1 c9 ~
  2758. SEC* j) w1 S3 O$ v4 P6 k4 D, @
  2759. SBC <Scroll_H. F$ G, X2 W  l
  2760. STA PPU_SCROLL
    ( H  E( n) n/ D* _9 I8 Q( R; b& [
  2761. STA PPU_SCROLL
    $ K8 }3 N+ @* E4 d( M6 l! X# q7 S- `. p! e
  2762. / t0 U/ Y9 a+ A5 A8 _9 Y/ Z
  2763. INC <IRQ_Process_Index1 p. P9 @3 ]1 d9 l* \7 Y
  2764. JMP IrqProgramEnd
    * D  |/ [2 _, {; }% L3 T/ B
  2765. 6 U$ ^6 T2 f7 I% |1 Y+ t) `: w
  2766. ;==================================================
    ! e6 ~) R+ S  `5 n0 W
  2767. IRQ_Process_3;IRQ处理过程32 s: ~6 B# C% |
  2768. . A4 r/ O. J+ |' T0 H5 Y
  2769. ;设置屏幕滚动7 Y7 ^6 C5 L# ~! f5 t2 E) b7 F
  2770. LDA <Scroll_H$ t6 P3 R5 R' I4 _$ |  O
  2771. STA PPU_SCROLL
    # A- P2 C8 d; I: r8 `
  2772. STA PPU_SCROLL, F: P4 z% x' [# t: K5 i! U

  2773. 6 ]: x, b! v8 c! I8 r2 `
  2774. ;禁用IRQ4 q' c1 N6 Z7 W. `$ }: @
  2775. STA MMC3_IRQ_DISABLE
    1 w$ Z. |, ~: R, s
  2776. JMP IrqProgramEnd& d+ W' S) E5 q0 D- \
  2777. , r1 w/ L9 D( @2 u7 L
  2778. IrqProcessAddr, e$ y% \! t* C' Q# b. m
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_3# s* Y: ^- Q1 q. B1 n( ?
  2780. # l, U8 I* f4 V  ^) F
  2781. .ENDIF9 ]& M, Y( p0 r3 y0 y
  2782. , a' ~* N6 X( H  m# b: A, D9 _
  2783. ;==================================================2 A4 w$ q2 g; t( O( t
  2784. ;IRQ滚动模式常量
    & Q: A( b3 h# X* P
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动6 ]7 X  y/ t4 y% H
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动
    9 s& r4 I9 O7 T( L
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动
    * N7 H. q3 B, }

  2788. + f& U; a: Q1 y# ^. k  M9 r) Y, b
  2789. ;IRQ扫描线数据
    6 ?/ L3 E; L! O. L/ k
  2790. IRQ_Scanline_Data
    7 ~0 J; t, G0 N) z5 [4 u% B
  2791. .DB 8/ u2 O( f6 m& y! p# J7 m! T- K
  2792. .DB 545 G- k( w8 i* ~. ]7 e2 G2 _
  2793. .DB 85 @' B0 v  I. \
  2794. .DB 00 ;关闭IRQ6 d2 u4 E& D$ u* Z/ l0 |9 W

  2795. ) p) k; O( M6 X* X8 ~9 r9 x
  2796. ;IRQ滚动控制模式
    ( L' D/ w8 ?) {! u
  2797. IRQ_Scanline_Mode
    ; ^. @7 O; x6 b0 t
  2798. .DB IRQ_SCROLL_MODE_ZERO3 C5 O% E4 w8 e  l
  2799. .DB IRQ_SCROLL_MODE_ZERO' V. B; C9 E' O
  2800. .DB IRQ_SCROLL_MODE_RIGHT
    2 ]; Q: p. _9 b3 }- L
  2801. .DB IRQ_SCROLL_MODE_LEFT
    ' f1 C# {2 L* Q- s

  2802. / Z# A# ~- ~" I; f2 C6 i
  2803. ;==================================================
    ; }9 f' l; o, e( |- V1 T/ U% [
  2804. ;IRQ处理" T0 w$ E; N/ d5 b
  2805. IRQ_Process
    + z8 |0 g( ]. `9 a
  2806. LDX <IRQ_Process_Index4 w) Q% e/ Z5 j) V1 h: L; [
  2807. LDA IRQ_Scanline_Data,X
    2 E4 K9 B' w# b9 s! X
  2808. BNE IRQ_Process_Latch; L: a+ F8 }* p) K; ?0 l: B
  2809. IRQ_Process_Disable;禁用IRQ8 ~) d& o1 Q- F+ e) G8 |
  2810. STA MMC3_IRQ_DISABLE
    / @7 E8 f6 q4 }* E2 P
  2811. STA IRQ_Process_Index
    ! ]4 ~+ D: r9 C4 Z2 t0 y
  2812. BEQ IRQ_Process_Scroll% D, @( t2 v7 o8 b+ |- @, }
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线
    7 p7 k% c" l% d( K
  2814. STA MMC3_IRQ_LATCH3 @* Q8 W7 y* E; ?0 p9 x  x
  2815. INC <IRQ_Process_Index6 w) ^. c8 h! k: V" O
  2816. IRQ_Process_Scroll;IRQ滚动控制1 n6 [7 S' @* \$ t! r$ t7 L/ `
  2817. LDA IRQ_Scanline_Mode,X$ X1 G. C. I- @. l
  2818. CMP #IRQ_SCROLL_MODE_LEFT/ {+ I- T  W' d
  2819. BEQ IRQ_Process_Scroll_Left
    % r+ n; V8 v) N  |
  2820. CMP #IRQ_SCROLL_MODE_RIGHT# `" _/ H+ }  }* r
  2821. BEQ IRQ_Process_Scroll_Right4 o' f  N4 f5 \! i* l; B) y, m
  2822. IRQ_Process_Scroll_Zero;不滚动
    " f# g0 X  T3 a9 J# H2 S% a, x
  2823. LDA #$00# b6 G* s. C; M: s6 R
  2824. STA PPU_SCROLL
    $ g8 _. f+ ~! y1 Q+ i  _  _/ l
  2825. STA PPU_SCROLL  u3 Y8 V: \  m
  2826. RTS
    - }% H/ ?* c* w0 C/ b
  2827. IRQ_Process_Scroll_Left;向左滚动
    ' T  Z' n7 {5 r( ?. f
  2828. LDA <Scroll_H6 |8 W0 {' F4 C0 l: o) ]- P
  2829. STA PPU_SCROLL9 M" k" u, ~# v; F  f8 _; \9 w0 z
  2830. STA PPU_SCROLL
    # w3 Z0 k! @" W0 z" j
  2831. RTS
    ; S/ p- O9 d' w5 a
  2832. IRQ_Process_Scroll_Right;向右滚动
    7 p: j$ Y" f+ |: V1 c: b+ {. l1 D
  2833. LDA #$00" n! j  b, C' `+ i' T) [: T
  2834. SEC% ^" r& t% h3 R8 w1 {
  2835. SBC <Scroll_H
    ; {; P1 j: h$ D! r, b
  2836. STA PPU_SCROLL" c* H1 ], Q) Z6 ^
  2837. STA PPU_SCROLL% T" d6 J3 |: {- g7 z
  2838. RTS) ~  x! c" e. {  J4 ^9 T
  2839. ( ?* [; `. {+ r! f; B% c
  2840. ;==================================================, ^- c9 ?& x/ v1 y/ t
  2841. NmiProgram;Nmi中断处理& l2 h/ i/ y0 O9 ^" C
  2842. PHA
    2 [# f; s& Y1 M- }+ R8 N
  2843. TXA
    2 f6 h. Z7 }* x+ B" W5 P+ X
  2844. PHA; c! T1 n' ]7 n; G
  2845. TYA& ]5 Y# x  V$ i! [  p0 V3 z5 z4 ]
  2846. PHA& k% {3 L5 p# _4 E, p

  2847. , s- X' T! l" L, a
  2848. ;读取清除Vblank标志, 防止重复进入! E2 d1 B4 n, B7 B9 e# K# D" N
  2849. BIT PPU_STATUS
    4 O% \9 B' R9 ~
  2850. 8 b1 \9 ~) p* P$ t$ Y4 L, Q
  2851. ;切换主程序bank
    * s& w6 L) ~4 o; A! Q# E9 L& P
  2852. JSR Switch_Main_Bank
    ; Z3 `- t6 A" U8 a+ D2 L
  2853. + V/ t9 j1 q3 Q2 q: w0 G* B" K
  2854. ;Nmi处理
    ' A; x9 J2 o- ?8 a& |1 O$ D
  2855. JSR NmiProcess
    & X) u8 J2 R- d

  2856. ' w3 Z) c' P# a3 h& f6 i3 R" c
  2857. Nmi_Proc_End
    6 g+ H# U9 N8 q" ?1 h
  2858. PLA
    - G9 l- S2 F3 Y) i! w0 [: `! Z
  2859. TAY5 f) D8 |+ A9 H
  2860. PLA
    . u- ?) A* k" R; p# }: E
  2861. TAX
    6 ^( D) [9 C; z, E- S# R- b4 o; Z" W4 m' R
  2862. PLA
    . X0 ~" C3 u3 T2 [( p9 G' N
  2863. RTI
    7 f  l0 w0 U* h7 Y5 i
  2864. + `* V# |" [7 v( G# e- ?+ U
  2865. ;==================================================
    ( d/ P" L  P. g& n/ T& {5 @4 Q
  2866. ResetProgram;重置中断处理+ _3 I4 }: o# I$ |
  2867. SEI
    : i; M1 |. N. T2 R; h6 f) B$ {# ~6 p
  2868. CLD- F, y3 G, a# F  V! a4 F& q8 s8 T+ y" L/ C( b
  2869. LDA #$009 q/ s6 G. T0 J; {2 }! F& c9 W
  2870. STA PPU_CTRL
    5 C8 s0 A3 a3 _6 J  N+ Z9 i
  2871. STA PPU_MASK
    8 U; z9 r2 X! F- ~2 `, ~
  2872. 9 g" `; `) n4 |  W
  2873. ;切换主程序bank
    0 _) W# P5 `7 f$ U- B9 n
  2874. JSR Switch_Main_Bank$ G7 w8 {2 x* |$ a+ j! L- h! h
  2875. . U8 e. y) X9 K: K' G4 }
  2876. ;程序处理开始$ ^5 W% D$ Q/ F# ^4 z
  2877. JMP ProgramBegin
    7 \0 ~. P; v( n0 K- [9 |7 F

  2878. 8 d& r* I8 Z6 `  Y) r' w* e
  2879. ;==================================================! j! N8 x/ ?. ^2 o  F- W
  2880. IrqProgram;Irq中断处理% s! E# n% v5 J
  2881. PHA4 `; b  z" U' |7 M
  2882. TXA0 \' D' }( {% N9 j
  2883. PHA
    0 b1 {/ |  g9 e3 e! [2 s
  2884. TYA) F$ n$ t. o8 v( j
  2885. PHA" F. ]3 E" `( d& _$ Y: i8 O
  2886. , E) G& Z' U4 T$ `4 |( J
  2887. ;关闭IRQ
    4 P. q; N! G% ~' U
  2888. STA MMC3_IRQ_DISABLE$ G# I( V) H, F: l, r2 |0 d- M

  2889. ! D1 T9 H, F0 {* z$ a- @
  2890. ;允许下个IRQ触发8 ^2 q2 i4 J$ _6 z; F6 v6 r5 q
  2891. STA MMC3_IRQ_ENABLE: v  m/ i6 o3 S. H  D
  2892. 4 R& d6 F1 e' X( P. X
  2893. .IF IRQ_SUBPROCESS_JMP6 X+ i' x& q  V$ a

  2894. - s7 m2 R  h4 e/ t2 c, z8 ^* C9 L  Y
  2895. ;执行IRQ过程
    # y7 A, {: M% h: _( {
  2896. LDA <Data_L
    4 Q) R; L* }! G* O* ]
  2897. PHA
    ; d# X. O; i, U1 W
  2898. LDA <Data_H7 g" D$ N7 l# E& u$ U
  2899. PHA& p) f) P; Y% V
  2900. LDA <IRQ_Process_Index; @3 ]) N; t& y; P7 B
  2901. ASL A: ?3 A% `9 |8 U# f4 K1 y: b
  2902. TAY) C" ~0 V; _/ [$ u
  2903. LDA IrqProcessAddr,Y
    0 U# ^# K- r+ ^4 v
  2904. STA <Data_L4 ~& ]8 Z1 R/ r7 h9 v
  2905. INY
    , n$ n6 m7 J7 U, D
  2906. LDA IrqProcessAddr,Y. L" ], o3 ?) O: d( k: o9 n0 ?1 r, x
  2907. STA <Data_H0 j  s* L8 R' ?$ O+ |
  2908. JMP [Data_L]
    % F" V0 E- M' {& I' [

  2909. . j7 [) ?( n1 s" f6 b5 X1 C2 F& ?
  2910. .ELSE
    * L4 Q8 B( o2 O4 {
  2911. ; I8 H! X0 l% T2 j% B2 Q
  2912. JSR IRQ_Process
    & q, {, k4 H( g1 {. w' H) W
  2913. 9 N$ G6 K( I% I6 |3 r9 q4 A- m- q
  2914. .ENDIF1 m9 B) N% y, H- M& k/ C

  2915. + z, e# q* v2 I1 Y8 @
  2916. IrqProgramEnd
    % z- B2 w2 G6 K6 |& I2 H) I
  2917. .IF IRQ_SUBPROCESS_JMP
    1 l- D* Z+ X0 _) [0 M
  2918. PLA( c6 s  n1 ?  f6 F( d
  2919. STA <Data_H
    ) I3 n6 K; s2 `! E! m7 H
  2920. PLA& q% Z6 q, W1 x1 B, F3 F5 ?3 B
  2921. STA <Data_L
    + O2 J. N; c  Y8 M9 o4 l5 D9 ^2 u
  2922. .ENDIF6 m1 E# }& }1 k( ^9 w5 I, C
  2923. PLA
    : A+ ~; J9 P6 k5 _5 a3 H
  2924. TAY- X5 Z) Z! m# {& d  y# X8 ]0 H5 d
  2925. PLA! W8 [1 h4 \* x$ Y0 c$ }+ Z8 W1 ]1 H
  2926. TAX
    , Q! d% E  i, F7 R" P+ [: [
  2927. PLA3 s& P9 c5 f) r2 t- a* }7 @
  2928. RTI
    - s/ M) `8 e- E6 a* \6 L# S

  2929.   Q/ N1 {; ^2 Q) w! w; J( h
  2930. .ORG $FFFA
    " K0 }$ @, d1 H* H$ d' b) u- l
  2931. .WORD NmiProgram1 f/ ~' ]+ r2 D7 S7 ^: S, y) y
  2932. .WORD ResetProgram
    0 ?7 w& L4 l" \4 F0 P: n7 P6 J6 L
  2933. .WORD IrqProgram
    ) c1 Q: ^9 {! c' O1 a% P0 g/ P% `

  2934. - z) s/ q4 |; n5 d" m
  2935. .BANK RESET_BANK & BANK_DATA_MASK
    , i: b" ?) f) u& ^2 X" d( I
  2936. .IF SOUND_BAR_SHOW_ENABLE/ d9 Z$ z' F& L+ ]4 R4 y
  2937. / d# O3 X: Z" w! Y, `( H8 m
  2938. .ORG $FE00
    , a4 c2 k2 L0 y; H2 a: N
  2939. PHA
    # |* T( e& I, O
  2940. STY $07BA
    ( x3 G9 z( P# H5 o1 V- I
  2941. LDA #$8D
    $ z" _+ a( u1 `: H& Q* P1 [" L* i
  2942. STA $07BC
    6 p1 O+ X3 j$ A- s  j7 M. V
  2943. TYA/ W3 I2 g& E0 [1 `
  2944. CLC
    ) @5 ~" W! u# e& W
  2945. ADC #LOW(Sound_Bar)
    2 b1 [6 P! @% i$ n
  2946. STA $07BD% M7 J$ V5 ], t- S1 t; H% v2 n
  2947. LDA #HIGH(Sound_Bar)# B' b8 J$ ~, c3 N% q+ M) R& `
  2948. STA $07BE
    ( i3 W. M6 U* O) f/ _" }/ ^
  2949. LDA #$60& Z( P& }% j! t7 H5 L5 n
  2950. STA $07BF9 ~" k: N, s' e/ F( {3 H' q
  2951. PLA( k8 V4 l) _( K$ w* J
  2952. RTS
    " |" b) Q$ ?7 Y6 @! U

  2953.   W+ q4 G+ ]* @
  2954. .ORG $FE203 O1 J4 T5 t% I5 c
  2955. STA $07BA
    5 P# E( p; u7 ?& V
  2956. CLC
    . V' U! q: b/ A% _2 f. Q
  2957. ADC #LOW(Sound_Bar)
    , @3 A; W) V: H! P) u: K8 Y
  2958. STA $07BD5 l' w" e3 i% X' [
  2959. LDA #$8D7 C/ X/ z  ~) N- A1 ?% k0 n" J
  2960. STA $07BC
    . \$ I( {9 n9 q/ Q9 Q0 Q7 {8 l& d
  2961. LDA #HIGH(Sound_Bar)2 T* a9 v2 r  m' K2 F5 k. [
  2962. STA $07BE
    # `  X2 C: [" F' k
  2963. LDA #$607 B: M8 r5 A1 ~
  2964. STA $07BF" e0 P0 J9 O3 g( ?: |4 G
  2965. RTS
    : E6 M9 y3 v1 S# P  K
  2966. ' h* O" D8 O  ]
  2967. .ORG $FE402 C2 H8 l" J+ @6 M! E- O1 N
  2968. PHA! _' `; s  d6 a" A: |% e
  2969. STY $07F1
    ) g9 X8 a0 x- j% b: e, P5 M6 D
  2970. LDA #$8D
    1 H/ M. D% w# J% L
  2971. STA $07F3$ y/ C. w0 ~7 k
  2972. TYA
    & U; g6 [6 R- \7 |6 w+ _5 j
  2973. CLC
    2 N( k9 [& K' B6 t; o4 h
  2974. ADC #LOW(Sound_Bar)
    ; u+ q- s* z& n) B* |: J
  2975. STA $07F4
    ; H+ Y8 O3 N, x+ B, N0 m! d# z. c+ e. T
  2976. LDA #HIGH(Sound_Bar)4 a0 _: D$ c# K+ I6 ]- Q
  2977. STA $07F5
    ( R7 g: u8 M6 l0 h  E
  2978. LDA #$60- K( v3 t9 L1 H6 e% z
  2979. STA $07F6
    / w1 S4 h2 U% F( P( r5 J
  2980. PLA
      s' `, b$ H; s3 }
  2981. RTS8 ?1 W2 w- ~& E( p8 T' S+ E+ a

  2982. # a# c  Y& |/ O% L9 p
  2983. .ORG $FE60
    $ S& `5 L7 ]& z1 }
  2984. STA $07F17 D! y4 b4 @" J7 ^, O. X$ T+ D, A
  2985. CLC
    " }3 _. K6 b6 [2 R! T
  2986. ADC #LOW(Sound_Bar)+ K" f1 S5 K1 e; `* f7 k) s
  2987. STA $07F4
    / k5 }8 u' Q; I5 C! p
  2988. LDA #$8D2 b5 @8 Y& B5 `6 s4 R" Z  `4 M
  2989. STA $07F3
    9 D% {, ], I, O$ v8 n4 M8 Q
  2990. LDA #HIGH(Sound_Bar)
    , H- ]) H# O4 ?$ |/ O
  2991. STA $07F5( Y6 o9 }2 F' G" L
  2992. LDA #$60
    9 @' A; l, }- f: B
  2993. STA $07F6( d( f8 n" r, S0 y; H6 D
  2994. RTS
    & b9 `# e. H/ i. F+ {
  2995. $ }5 P% e, w; \) q, W
  2996. .ORG $FF40
    % m. e' `5 ]1 f( ]: s
  2997. STA $4000  z& c% b. ?" I5 o4 B) D0 b% w
  2998. STA Sound_Bar + $00
    , K; U2 p; M% [: Z; B
  2999. RTS1 k4 f1 p- u6 w( }+ D& i

  3000. " ]: L  }. ^) d! `
  3001. .ORG $FF48, u2 X! |& v) W0 C! Q, Z
  3002. STA $4004
    ) h/ A% V* Q8 p( s& c
  3003. STA Sound_Bar + $04* q6 c% n. I9 @. ~. J
  3004. RTS
    " k5 s7 y* z: r3 l) R$ F; M" H" ]

  3005. ) h5 u* i! B9 T
  3006. .ORG $FF50
    3 e$ P# ]2 Y$ v$ a- e
  3007. STA $4008% V0 r' m) L/ E! y  v: Z
  3008. STA Sound_Bar + $08% u8 P. v& V% F0 _0 _: b, w5 w0 z+ p, y
  3009. RTS
    0 [3 B8 E4 z8 a9 q6 V- I: C0 R

  3010. 2 _. e5 |4 I' V& p
  3011. .ORG $FF58
    # s( G7 g" s, R1 f
  3012. STA $400C4 o* S0 O( H8 A$ l- t, K; Q% C/ E
  3013. STA Sound_Bar + $0C6 n( [" u4 b" r6 {
  3014. RTS
    # O2 f, Z( n& S: W2 F4 F/ q# A
  3015. 4 V: f$ U6 c  J; z8 _
  3016. .ORG $FF60
    - E) W; M) F5 T8 w9 I7 c
  3017. STX $4000
    0 w# L& a# m# h$ ?6 x" Z, T
  3018. STX Sound_Bar + $007 v( ^9 J/ m8 b4 K: e9 E
  3019. RTS2 V  y5 v8 p' H8 c, D9 c

  3020. 3 B; C/ y% \6 Q4 `; `
  3021. .ORG $FF68
    # @- L; O% R& B4 ^) o. B9 A
  3022. STX $4004
    / e6 o0 z, t/ z, E
  3023. STX Sound_Bar + $04
    3 S0 V( _: X3 ^$ n+ q
  3024. RTS
      M, U2 P3 r  @) {( [/ C

  3025. - d3 ]7 ~8 z- b, W
  3026. .ORG $FF70' j! j! E+ S0 m8 A) k4 u! z% ~
  3027. STX $4008
    % f4 ]! w4 G  H/ f1 U
  3028. STX Sound_Bar + $08$ i0 {5 K2 J" O& R
  3029. RTS7 [  ~  j+ O# T( d
  3030. 5 B6 o8 A$ P; Z+ E, U8 H2 V
  3031. .ORG $FF78
    6 Y7 d% H8 D! z: T  [5 h
  3032. STX $400C+ `. n; M0 y+ I7 Y4 M  z4 h
  3033. STX Sound_Bar + $0C  M- N8 k  }9 E5 k8 W
  3034. RTS
    2 R- D6 C; d/ h2 |: t

  3035. - [3 U/ u6 L3 w. }3 l. i
  3036. .ORG $FF808 Z0 t( T+ D5 M$ k
  3037. STY $4000- ]8 i% m2 [8 V; F, b% Q0 a, F
  3038. STY Sound_Bar + $00
    : l# G4 c) I$ D0 Z4 Z* G- r0 p( Q, s
  3039. RTS. I  E( P2 A$ A( t- Y
  3040. 7 o  i. R3 k3 q# B$ w
  3041. .ORG $FF881 o3 l8 q, C2 u% C$ L4 \
  3042. STY $4004( M' q! B. r% N& p& R8 }- E
  3043. STY Sound_Bar + $04/ L% p% o. n% |6 g; K( y! z
  3044. RTS
    9 |2 a1 W4 P3 p9 T# `* ^
  3045. 3 v, @) \+ q4 J6 P) A: ]" h/ \
  3046. .ORG $FF90' O7 t, D9 ]6 i1 b
  3047. STY $4008; Y( @, a& y  k2 _2 Q
  3048. STY Sound_Bar + $08
    $ \8 K! @, F3 U) |5 o0 a) }
  3049. RTS
    6 v6 Z0 S% V$ l! p) A5 P: @

  3050. 8 q4 B: b. ^+ ?6 R, E! |* t
  3051. .ORG $FF987 f4 F% I: M8 ]5 h' Y  r4 @
  3052. STY $400C/ M% N& s4 B& W% |3 L8 X
  3053. STY Sound_Bar + $0C" j- J$ w# s/ l. K% O6 D
  3054. RTS% s) q' m( l; a5 R; U4 C
  3055. * z6 e% v) M- |0 a( p" ~( Q0 q- i6 N$ ]
  3056. .ORG $FFA0/ r: l: i- N" x: e
  3057. STA $4000,X
    7 w6 U' c9 Q. ~5 d+ N8 V/ H1 V: ^
  3058. STA Sound_Bar + $00,X
    5 p3 `" S. h% B
  3059. RTS
    0 ], |- C7 _/ m- E  \/ @
  3060. " Y  b/ k5 o) \9 j3 @
  3061. .ORG $FFA8
    4 a) k$ _# q4 i! w3 \
  3062. STA $4000,Y
    / Y) g  J; w! l: |
  3063. STA Sound_Bar + $00,Y1 e) Q$ u8 @; ^/ t
  3064. RTS( g. k8 o8 A; O

  3065. $ o8 |5 d8 I4 `+ g7 D3 H2 D7 ^
  3066. .ORG $FFB0
    . A  E  [) J( P* u  h6 ]
  3067. STA $4004,X
    , u: w* v2 O1 x/ {% |
  3068. STA Sound_Bar + $04,X
    % T) B# l. l& J2 w3 [" v
  3069. RTS) L- S' I; a; O+ x' L4 W
  3070. $ ?5 l; ]4 N$ P% ^/ K
  3071. .ORG $FFB8
    : {; l/ P" w: S: h, v
  3072. STA $4004,Y/ N" S, m/ L1 l; [" t1 [/ y5 o% I
  3073. STA Sound_Bar + $04,Y
      D: S$ O- X2 z) Y2 j- S
  3074. RTS
    ; B' H, X8 `% L* ]6 ]
  3075. 7 |7 S6 v1 y5 k8 U0 C5 @* m# W7 U
  3076. .ORG $FFC0
    ( H2 t2 e- e) G! s9 _$ N- ]
  3077. STA $4008,X
    $ b! a/ p: T$ T) R
  3078. STA Sound_Bar + $08,X
    % h. ?6 ^  f' u
  3079. RTS& I9 Y& }7 t9 }! q

  3080. / t* {# a% o+ k( Z* D
  3081. .ORG $FFC8
    ; [2 H# i, @& N( y8 M
  3082. STA $4008,Y
    3 M' ]) t2 ~# p( J; X8 ~( |! c4 I
  3083. STA Sound_Bar + $08,Y
    7 }( c& ~$ f* N
  3084. RTS+ P& ^7 k, u, v5 Z& w. |

  3085. 4 _! ]- U  ~$ \4 t0 r+ r7 D$ f
  3086. .ORG $FFD0
    ; {1 m: g5 Q8 j' n; z- H- I7 K
  3087. STA $400C,X
    $ V) Q2 k; ?* ]" b# ^
  3088. STA Sound_Bar + $0C,X
    ' W: M" Y7 F; ?1 K, f" X- A* Z
  3089. RTS
    ; A. G. m( o0 M" j$ W: b& A* ]7 S

  3090. ( L3 S) V3 Y2 A. e7 W
  3091. .ORG $FFD8
    0 a' x. I7 T4 a2 [% r# I1 K( E) ^4 d
  3092. STA $400C,Y
    ' y' K$ K- B/ O$ V/ {
  3093. STA Sound_Bar + $0C,Y
    6 D' f: Z7 H3 a5 [* p! O/ I
  3094. RTS2 O9 x- Y) ?& Y' r2 r$ n2 |
  3095. 4 _6 d- {2 F6 G. I
  3096. .ENDIF
    3 r* R$ [8 w( {7 Q* p
复制代码

, s$ `/ \1 l& h- ?# @. N
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

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

签到天数: 3055 天

[LV.Master]伴坛终老

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-19 15:48 , Processed in 1.080078 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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