EMU618社区

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

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

[复制链接]

签到天数: 39 天

[LV.5]常住居民I

发表于 2023-7-23 20:06:50 | 显示全部楼层 |阅读模式
本帖最后由 yandagui 于 2023-7-23 22:29 编辑
# U. Q1 `+ c. N& L& b! U9 H
, z5 h% \: ?  J# p[FC][音乐12 IN 1]
$ o3 I& u0 i) K时间: 2023.07.23
8 |! N; ~: X, K5 o; V% S) S作者: FlameCyclone
' D6 @# t2 b5 j% K
! ]" p2 G  p9 C6 V5 u收录音乐内容:
" m! c+ j4 G: l" `' |8 G: N1.Raf世界/ P) r# K0 s& u# U. n
2.最终任务
! r: H" |  w- V' l2 G! m3.赤影战士& n9 d- ~/ J# U& X* g) j! o
4.双截龙0 J( H" K2 ]+ }7 [; v3 ~
5.双截龙2% Y( G9 S4 O) i0 c
6.双截龙31 e% Y3 {2 O; D  D6 ~
7.洛克人7 q9 @5 j! L; X1 W: v5 N
8.洛克人2
* k: ]( K# R' f- \9.洛克人3
. W( b% m4 I& v" ]% v1 g10.洛克人4
: @7 \$ W, S. P- H11.洛克人5
* w5 e8 B" M2 [/ n) [12.洛克人6+ l7 Y$ m6 o: q* r" J$ K( k  s, y

" n1 N7 @% M: S; S( v$ ?* f$ G: {5 ^$ n操作:
- Z- ~, A- Z9 T# w" v, s7 P5 [( M上键:         上一个专辑$ M. }' t# q; M( ~* q7 P
下键:         下一个专辑
6 r) T9 S. c" G左键:         上一曲
% R7 x2 i- t9 \) ~! _右键:         下一曲
$ D& g; K! y, S5 a, m9 Q/ KB/A键:        前10曲/后10曲- t2 |# e- V! B  K# p1 C& b( F
选择键:       下一页; Q( V# t1 x& S/ s
开始键:       停止/播放+ `0 z; q8 B1 j1 n- t& q# l. R

$ r# K- N2 z) E8 ~6 @4 H! h! Chttp://flamecyclone.ysepan.com/
5 W' {6 n- t4 a$ ~7 t  G" S- X, H  O! ~8 ]1 }8 d' \, _

/ \! w5 O$ L4 t+ E2 w  E& O# l/ S1 X9 j' C  ^$ W! P6 `; }
0 a' A5 M) K5 n5 ^1 e3 T* I
  1. ;[FC音乐][播放器模板]# v5 \9 s- b3 _: E4 i
  2. ;FlameCyclone 20230710
    ! q- c; w! L: ^9 n

  3. 9 _0 H1 ~& h: J4 }; E6 Q7 U
  4. ;文件头
    ' A) l0 t& r' ]! ~/ U6 @4 S. T
  5. ;======================================================================
    9 [0 W0 t% k: c2 {
  6. .INESPRG 16                                             ;16KB PRG 数量
    1 Y( a  ^* p9 O) B( s; K
  7. .INESCHR 1                                               ;8KB CHR 数量
    0 ^7 ?0 L7 z3 {: V% S
  8. .INESMAP 4                                                   ;mapper 4
    1 E/ B$ O9 |8 K: Y/ O$ ^9 K
  9. .INESMIR 1                                   ;命名表镜像 0水平 1垂直" N5 k- c) L5 |9 x' t" p

  10. 7 d- v+ s, y+ |0 g
  11. ;==================================================
    # g4 {' Z# N; p" z1 B) F
  12. SOUND_BAR_SHOW_ENABLE       = 1  V- {# I& W/ d/ w: I1 ~
  13. ;==================================================
    0 x( P; X: C$ q
  14. BANK_DATA_MASK              = $1F
    ) W; C% N! T5 [2 l; W/ \
  15. CHR_RAM_ENABLE              = 0
    8 e2 O& h8 w" z
  16. IRQ_SCANLINE                = 136, E2 _) V8 B6 |5 [1 M& x
  17. ;==================================================
    / @$ ]; c+ P& t5 ?. Q) g
  18. SOUND_DATA_BANK_00          = $00
    , }3 ?( q+ L; z1 B# R+ C
  19. SOUND_DATA_BANK_01          = $01
    , k# H2 a0 Y: P+ x6 @
  20. SOUND_DATA_BANK_02          = $02; [; s4 c, b3 Y- U0 X1 f' F
  21. SOUND_DATA_BANK_03          = $03
    & z, K  N2 z$ |3 n$ \6 H
  22. SOUND_DATA_BANK_04          = $04
    3 A$ o# |  {9 ^% O  n0 c6 V
  23. SOUND_DATA_BANK_05          = $05- B0 s3 u* n9 h$ R& Y: g. O
  24. SOUND_DATA_BANK_06          = $06/ o; _) a" Z9 I# `: ?
  25. SOUND_DATA_BANK_07          = $07
    : @0 }" ^2 C6 s( D9 T: r- m
  26. SOUND_DATA_BANK_08          = $087 u0 O% J/ Y5 z
  27. SOUND_DATA_BANK_09          = $09
    ! x$ n1 a  v8 z9 s
  28. SOUND_DATA_BANK_0A          = $0A
    # m; ?1 _- E8 `! T6 y' U1 ~: g
  29. SOUND_DATA_BANK_0B          = $0B
    1 x* Q( x3 S; z3 D. b2 Z
  30. SOUND_DATA_BANK_0C          = $0C
      {0 K* A3 H& ~  {/ F
  31. SOUND_DATA_BANK_0D          = $0D7 a; @( A0 w8 v7 b4 j
  32. SOUND_DATA_BANK_0E          = $0E
    7 J0 S* g8 u1 E1 r! m: U0 K8 M
  33. SOUND_DATA_BANK_0F          = $0F
    ( y" R$ ^1 M# o9 ?7 h

  34. ! _$ l9 E+ Y8 X! X
  35. SOUND_DATA_BANK_10          = $106 W6 A' ]. W4 H+ J( N4 Q
  36. SOUND_DATA_BANK_11          = $111 v6 ~8 `; U7 [  \" L  I( g
  37. SOUND_DATA_BANK_12          = $12- }$ ]4 q+ S% r# Y$ ~$ }
  38. SOUND_DATA_BANK_13          = $135 H3 {+ l# s! H+ k2 f  R$ I* B
  39. SOUND_DATA_BANK_14          = $14
    0 }, L5 c/ u# `, s% Y# s( _
  40. SOUND_DATA_BANK_15          = $15' ~# b/ i$ t1 n7 k
  41. SOUND_DATA_BANK_16          = $16
    3 L) {/ O- \3 V/ ]
  42. SOUND_DATA_BANK_17          = $17; k5 C1 ~4 x' e% p# e8 i0 p
  43. SOUND_DATA_BANK_18          = $18
    + h$ \$ @  P5 k2 \( X/ l* S& c: d8 X
  44. SOUND_DATA_BANK_19          = $193 S; Y" ^- r- p
  45. SOUND_DATA_BANK_1A          = $1A9 ~; M$ M) s. J2 t
  46. SOUND_DATA_BANK_1B          = $1B
    " x/ h" T# \9 U& Z$ g
  47. SOUND_DATA_BANK_1C          = $1C
    ' X: f2 T! ^0 g
  48. SOUND_DATA_BANK_1D          = $1D
    9 _- H& ^8 S* E2 [
  49. . y: F+ T* H- a: X+ a4 S& C
  50. SOUND_DATA_BANK_C000        = $1E
    $ q3 m- b# k  p/ c& T# B
  51. SOUND_DATA_BANK_E000        = $1F: R. f& b  ]4 f# k+ j
  52. ;-------------------------------------------------. v% X+ |1 _! r3 M6 W; {, |
  53. CHR_DATA_BANK               = $203 K7 @3 |% K* q+ P
  54. CHR_DATA_ADDR               = $A000% h- l/ F6 Q; ~7 I
  55. ;-------------------------------------------------
    - j' x  _) T9 j. n! Z3 f( P
  56. PROGRAM_BANK                = $00
    # W( c- s8 J! y. ~
  57. PROGRAM_ADDR                = $8000
    + }, R$ t: A8 S/ |# k) U3 C
  58. ;-------------------------------------------------
    1 v7 t" [) v9 c# a4 H7 ]- K/ w
  59. RESET_BANK                  = $1F) B2 M- G& }$ f( k& ?
  60. RESET_ADDR                  = $FD00
    7 i4 @" P3 x$ B$ ?

  61. ' A$ f9 B! k2 v! H* G, \) i
  62. ;==================================================% r. A# |5 A6 {0 ^8 w: c
  63. ITEM_MAX_SIZE       = 12                     ;最大节目数
    1 \+ Q2 o  D$ s) F
  64. ITEM_MAX_INDEX      =  ITEM_MAX_SIZE - 1    ;最大节目索引4 l0 E  Y7 K$ |  G7 {
  65. PAGE_SIZE           = 5                     ;每页节目数# m5 i& u  H# _# a9 I

  66. ! E, s3 D# b: V- j
  67. ;==================================================
    # D1 f9 z- V4 C9 Q2 {: c
  68. .IF ITEM_MAX_SIZE % PAGE_SIZE  ;不能整除
    . w, g7 A6 j4 D+ S3 f
  69. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE + 1   ;页码总数' }; u0 S$ N0 a2 L: |% a1 R( _1 q: W( l
  70. .ELSE
    6 o& v% O1 [& |
  71. PAGE_TOTAL_SIZE  = ITEM_MAX_SIZE/PAGE_SIZE       ;页码总数8 T( }+ w2 N7 D5 v+ n/ D  y7 G
  72. .ENDIF5 h: I0 l% o& x5 s3 J4 [' Y8 j- R

  73. / W1 a* k0 G6 ^0 T  a
  74. PAGE_MAX_INDEX  = (PAGE_TOTAL_SIZE - 1) * PAGE_SIZE;最大页索引
    , A% W, R' ?1 s7 T3 r

  75. ' }( n7 D4 e, |- L7 A
  76. ;==================================================+ X3 Y9 w" ?9 u3 ?% B4 n; n
  77. ITEM_SHOW_POS       = $20A8         ;节目名位置  c- p0 x- v) D' d+ F0 G+ L
  78. ARROW_X_OFFSET      = (((ITEM_SHOW_POS & $1F) - 1) << 3) - 2& b) I1 g. {9 t
  79. ARROW_Y_OFFSET      = (((ITEM_SHOW_POS & $03FF) >> 5) << 3) - 1;
    2 o1 C0 V! {0 X( Y0 x
  80. ;==================================================) {# U7 Z* S/ A
  81. Caption_Text_Pos    = $204D ;标题文本位置/ |3 S8 e1 v0 H: L( D9 L# L
  82. Author_Text_Pos     = $2324 ;作者文本位置/ A& t" m! h+ e  K; y3 }
  83. Date_Text_Pos       = $236B ;日期文本位置
    6 f- T* j5 X, L) y* r
  84. ;------------------------------
    . O* s. [. U; ], w; x. m7 g$ x9 P
  85. ;------------------------------0 \* ~* p0 _# Q5 T: u0 C" I+ X7 h
  86. .IF SOUND_BAR_SHOW_ENABLE
    ' d1 [# H5 @9 z2 F

  87. & @7 L' Y6 R/ M  {) d
  88. Play_Index_Pos      = $2273 ;当前曲目位置1 F8 F0 v. `) Y8 ?, Q+ ^4 `% X! `- a
  89. Play_Time_Pos       = $22B3 ;播放时间位置2 t8 Q) E2 d; f+ e3 @4 w
  90. Play_State_Pos      = $22F3 ;播放状态位置
    ! R0 C: i2 O* |

  91. - _4 o- F' E, O0 q$ j; ~
  92. .ELSE4 u! V2 S* Y0 Y$ R1 r. Q
  93. : O0 ~0 l7 {+ A) s& q. j
  94. Play_Index_Pos      = $226C ;当前曲目位置! ^' \3 R1 \" Y( _/ [
  95. Play_Time_Pos       = $22AC ;播放时间位置$ A! L& o* b, O0 W5 q9 u- c
  96. Play_State_Pos      = $22EC ;播放状态位置
    % q  ^9 x  l4 ~. M# n: n; M9 W
  97. % w/ e5 w; q7 {% O
  98. .ENDIF
    % Y% ]/ c- Y6 ]: K  y4 U
  99. ;------------------------------. q9 c$ W5 O4 `# O
  100. Track_Name_Pos      = $222B ;曲目文本位置/ W$ V, R5 |  |; A/ R; _* \
  101. ;Track_Name_Pos      = $00 ;曲目文本位置
    , z5 v. C# q) P9 s, o8 v) p7 M
  102. Sound_Track_Pos     = $2265 ;声道文本位置
    * r* l: Q# m- C, T, K, o9 x
  103. Sound_Bar_Pos       = $2269 ;音乐条位置
    ! X4 I' q  i7 {( z' M, \
  104. ;==================================================
    9 i% d& y0 }) A" Q
  105. Scroll_X = $00# W8 D7 D3 n$ S1 U5 a; D
  106. Scroll_Y = $00
    ) ]3 i' W: R' A( D
  107. ;==================================================
    ( E# j. ]$ L/ p2 V& m/ ?- _& |
  108. Sound_Ram_Addr_1       = $0100
    ; M% g5 r$ W! C, I# q8 d+ U
  109. Sound_Ram_Addr_1_Size  = $80
    6 \2 {, N2 o3 c. Q6 V2 F! B+ h
  110. Sound_Ram_Addr_2       = $0090% B/ u& m( r- ]4 l
  111. Sound_Ram_Addr_2_Size  = $70
    ' ^* i$ z: f3 O4 \
  112. Sound_Ram_Addr_3       = $0700
    ; m! F) Y; B! \0 |) a7 p9 A5 `- v8 O- o
  113. Sound_Ram_Addr_3_Size  = $007 u/ u- R( t! X) d1 y
  114. Sound_Ram_Addr_4       = $0400
    $ i% g/ \: I) p; f; t$ G4 U7 R3 H
  115. Sound_Ram_Addr_4_Size  = $00
    8 y! }9 J! N  n
  116. Sound_Ram_Addr_5       = $0500
    9 F. t4 Z; c* j' y# w% c' ~) Z5 ~
  117. Sound_Ram_Addr_5_Size  = $40
    , N, P+ U% F7 s6 O: y

  118. / z  a6 d& o; V" Y/ R1 h8 g
  119. OAM_TEMP_ADDR   = $0300
    , z5 D) o7 S, j( i# f0 @" J

  120. 9 A; S. o/ |: M
  121. ;==================================================& ~# p" v2 @. z8 U' @$ a) q
  122. PPU_CTRL                =   $2000   ;PPU控制寄存器) k; V) O( t0 f: @
  123. PPU_MASK                =   $2001   ;PPU掩码寄存器
    6 ?6 h7 G' W% ^: _
  124. PPU_STATUS              =   $2002   ;PPU状态寄存器:读取后PPU_SCROLL和PPU_ADDRESS被复位,下一个写到PPU_SCROLL的数据是水平的,写到PPU_ADDRESS的数据是高位$ h# d- l5 |  X: B$ ^. _  n$ G
  125. PPU_OAM_ADDR            =   $2003   ;精灵RAM地址:用来设置通过PPU_OAM_DATA访问的256字节精灵RAM地址。每次访问PPU_OAM_DATA后该地址增加12 O  l; g' v( E4 O, [7 L2 h' V
  126. PPU_OAM_DATA            =   $2004   ;精灵RAM数据:用来读/写精灵内存。地址通过PPU_OAM_ADDR来设置,每次访问后地址增加1" _2 }+ X) Y6 @' ?% J0 n. r
  127. PPU_SCROLL              =   $2005   ;屏幕滚动偏移:第一个写的值会进入垂直滚动寄存器(若>239,被忽略)。第二个值出现在水平滚动寄存器 : J6 @2 Y/ o8 F; t
  128. PPU_ADDRESS             =   $2006   ;VRAM地址:设置PPU_DATA访问的VRAM地址。第一个写地址的高6位。第二个写低8位。每次访问PPU_DATA后地址增加% c# S) M; x; B6 j) w1 ]  W
  129. PPU_DATA                =   $2007   ;VRAM数据:用来访问VRAM数据,通过PPU_ADDRESS设置的地址在每次访问之后会增加1或32 2 g% t2 D# I2 l1 T4 D9 Y9 j
  130. OAM_DMA                 =   $4014   ;DMA访问精灵RAM:通过写一个值xx到这个端口,引起CPU内存地址为$xx00-$xxFF的区域传送到精灵内存. B) K  H& `2 g( j3 G
  131. APU_STATUS              =   $4015   ;声音通道切换$ `% k% U0 ]* {! J: }
  132. JOY1_FRAME              =   $4016   ;手柄1 + 选通* z# t$ \% n  D  ]
  133. JOY2_FRAME              =   $4017   ;手柄2 + 选通% o4 E$ F  c  S* l& x
  134. ;==================================================
    1 o0 a2 u/ r$ c( }
  135. MMC3_BANK_CTRL          =   $8000
    # ~- t# v) H: O8 @1 U0 d4 l
  136. MMC3_BANK_DATA          =   $8001- g; P0 v4 P9 C5 B, w) |) [  Z* R
  137. MMC3_MIRRORING          =   $A0005 o1 \. x+ a" `: K
  138. MMC3_PRG_RAM_PROTECT    =   $A001  D3 W  a, T5 L# `. y
  139. MMC3_IRQ_LATCH          =   $C0001 W! W: S6 z* N+ S9 @6 G; A
  140. MMC3_IRQ_RELOAD         =   $C001" A: I/ ~$ o6 X+ _. d: W
  141. MMC3_IRQ_DISABLE        =   $E000" b+ [; T# k: F4 W/ ]
  142. MMC3_IRQ_ENABLE         =   $E0013 S1 n. }; r+ h% V3 ^

  143. 9 e2 a% L0 {% p$ C  L9 a
  144. ;==================================================
    % Z, r1 K5 A% C3 m' k1 q/ t
  145. PPU_Addr        = $0200
    0 B) d: s9 D, O' g% M: K" J
  146. Palette_Addr    = $02C04 P- P% @5 D) z( }$ q% K
  147. Sound_Bar       = PPU_Addr+$E0
    7 i1 ~3 c# l: o) M, j7 ?
  148. ;==================================================
    + k1 I- S  w0 r3 w' H
  149. Bkg_Palette_Update_Addr     = Palette_Addr+$0D8 l1 @. I2 N9 [' e" M) i
  150. Sprite_Palette_Update_Addr  = Palette_Addr+$11: \" q! m; c9 b7 G) G
  151. PALETTE_UPDATE_MAX      = $2C9 u! J" F! A+ a" R+ Q3 k
  152. PALETTE_UPDATE_MIN      = $21
    : o3 f6 ~1 C+ i; x3 C
  153. PALETTE_UPDATE_INTERVAL = 60
    ( c$ u# ~% \0 M. I$ v0 `
  154. ;==================================================0 X, y$ s' N2 [
  155. Sound_Bar_Cnt       = PPU_Addr+$F0
    - d( {' a  @" N, s% U7 v
  156. PPU_Cur             = Sound_Bar_Cnt+$02
    ; a* G$ e; ~+ J4 V! _8 K
  157. PPU_Addr_H          = PPU_Cur+$03
    , z1 C4 z; Q" K8 K2 ?( u! C7 C* _
  158. PPU_Addr_L          = PPU_Addr_H+$04
    6 `: l5 W" V: D; j
  159. Screen_Ctrl         = PPU_Addr_L+$019 M7 R8 z) ^# o" t- c
  160. Screen_State        = Screen_Ctrl+$01
    - [9 c/ U$ h$ w* E+ W
  161. ;==================================================+ T, x, V8 J. z7 N
  162. Use_Ram_Begin       = $50
    0 n6 v, [+ }8 ]* e
  163. ;==================================================2 m1 h7 c0 }8 m$ U/ F$ P
  164. JSR_Addr_Op         = Use_Ram_Begin
    + j0 S) ^( c6 W
  165. JSR_Addr_L          = JSR_Addr_Op + $01
    7 n% }4 `3 N+ N
  166. JSR_Addr_H          = JSR_Addr_L + $01- c& [: @/ x, G: G" c
  167. JSR_Addr_Rts        = JSR_Addr_H + $01
    ( K5 P, m" b- X
  168. Data_L              = JSR_Addr_Rts + $01
    ! P6 _! H: |; f( V* S1 U" y
  169. Data_H              = Data_L + $01  ^$ Z1 T& _: H
  170. Data_Cnt            = Data_H + $019 m0 u4 V7 n1 l, P# A9 w+ Q
  171. Data_Buf            = Data_Cnt + $01: S3 @! [( T. W+ G% q' R8 _
  172. Nmi_Time_Count      = Data_Buf + $01% h- i4 F0 w3 `+ J6 c. y
  173. Time_Wait_Cnt       = Nmi_Time_Count + $01; k( [0 a4 W# Z, o) y3 r8 O
  174. Palette_Wait_Cnt    = Time_Wait_Cnt + $01/ f" ]& _# m9 h. X/ y" X1 v+ t

  175. ! }( a; _( ]0 N) a! ]
  176. ;调色板刷新标志7 s7 B$ L/ K3 K# A3 V5 @
  177. Palette_Update_Flag = Palette_Wait_Cnt + $019 [; W4 O8 m5 I! Q

  178. % t% ]5 [3 I: c# Y% _; m
  179. ;当前帧文本写入禁用标志! ?/ ^3 r  G, k' Y
  180. Text_Disable_Flag   = Palette_Update_Flag + $01
    ' b  n6 h1 {9 z

  181. ! J" _; h6 H7 n5 T, N- M2 t
  182. ;==================================================
    9 i0 l' L) `6 v& ?( W! i1 y) C2 ^
  183. ;当前帧文本写入禁用标志, 防止缓冲过大导致画面跳动" I' D: a+ l2 g+ K; R- Z
  184. TEXT_DISABLE_BAR    = %00000001         ;音乐条
    7 O, m& C1 T' t' z2 w- {2 Y
  185. TEXT_DISABLE_TIME   = %00000010         ;播放时间# d3 b3 m3 \9 C6 C/ }6 s$ {
  186. TEXT_DISABLE_ITEM   = %00000100         ;播放时间
    " ?! @" e6 K  a& s. O* f
  187. TEXT_DISABLE_RAM    = %00001000         ;播放时间
    ( M) G( ?* Z6 {- W
  188. ;==================================================
    0 F% b1 f" W; E! f. ]
  189. Key_Keep            = Text_Disable_Flag + 1
    . q; p4 N3 V4 r5 O6 I# O* p8 \
  190. Key_Once            = Key_Keep + $01, h9 P$ ]7 ?; C0 a
  191. Key_Kemp            = Key_Once + $01$ L, U6 b0 K3 L% [, Z& O9 ?9 \
  192. Key_Temp            = Key_Kemp + $01$ h: u% g: i( q
  193. Key_Getv            = Key_Temp + $01
    . Z( u, a5 m9 E. _
  194. ;==================================================! F% C) w) W% B+ E+ j
  195. Music_Item_Cur      = Key_Getv + $01          ;当前音乐集9 e2 h' w4 o* F5 J+ V9 M
  196. Music_Item_Last     = Music_Item_Cur + $01
    6 o8 N! i+ V" w9 J5 S' D  r) d4 Z
  197. Music_Total         = Music_Item_Last + $01          ;当前音乐集
    & Z1 u& j  Q5 j- z  _) o5 R0 |
  198. Music_Cur           = Music_Total + $01  ;当前曲目0 e8 ]& y7 `  \" \( M8 r
  199. Music_Last          = Music_Cur + ITEM_MAX_SIZE         ;上一个曲目# n0 K4 n) R! A/ J$ _, A9 T
  200. Music_Stop_State    = Music_Last + $01         ;播放停止状态% Q3 i3 r: \! S+ a1 p6 q) X
  201. ;==================================================
    + o) }" ~1 Y+ U& h% d+ R
  202. HEX_Data            = Music_Stop_State + $01+ A4 [6 [  @# }- j% [6 x
  203. DEC_H               = HEX_Data + $01
    % @0 l' r. p, W* _0 B( D8 T
  204. DEC_T               = DEC_H + $01) n; G* ^: G: @% C0 J* F5 A
  205. DEC_L               = DEC_T + $01: B- m2 N/ z( e2 B
  206. ;==================================================
    & E; {" a8 U  k" y* w
  207. Time_S              = DEC_L + $01
    # o3 r0 U, K6 g6 K7 w4 f
  208. Time_M              = Time_S + $01
    # t& z1 L* H$ `  B( d9 p( E  F
  209. Time_H              = Time_M + $02
    ' ~) V. s  f3 \/ l& M& X5 @
  210. Time_Cnt            = Time_H + $037 Q1 w$ x- _' K! g! k

  211. 8 ]; @8 z( @7 Z# Z4 r+ ]  _, S
  212. ;==================================================
    3 n# H$ N' t, \$ ]/ H
  213. Music_Bank_8000     = Time_Cnt + 1! F1 R. t$ p1 O. o( R
  214. Music_Bank_A000     = Music_Bank_8000 + 1
    # M5 P* \3 Z* F" b+ v' Y* e/ e. B
  215. ;==================================================
    + u; t. x6 _7 U4 q% X8 T
  216. Scroll_H            = Music_Bank_A000 + 1
    & I5 f3 g; b7 P  ]6 W% d. R
  217. Scroll_V            = Scroll_H + 1
    ) a; {/ W: |, I3 @. \
  218. IRQ_Process_Index   = Scroll_V + 1
    2 b' I' j( r  ^  }' V
  219. ;--------------------------------------------------
      l# j% u" T1 ?; ^! q+ K0 n. ?
  220. Page_Cur            = IRQ_Process_Index + $01
    + H: g2 w  y& A/ l: i( s9 Y
  221. Page_Cur_Index      = Page_Cur + $01
    7 l7 ?5 e1 |! C# s0 B/ M- D
  222. Page_Cur_Cnt        = Page_Cur_Index + $01
    . G3 A9 S+ R$ r0 z
  223. Page_Last           = Page_Cur_Cnt + $01  a. G9 \( K% V! O1 ~
  224. Page_Last_Index     = Page_Last + $01
    & W% J5 ]8 g. I7 T* r
  225. Page_Last_Cnt       = Page_Last_Index + $011 H1 J3 ~! L: U" h4 Y
  226. Use_Ram_End         = Page_Last_Cnt + $01& z9 P" |& d& U7 N3 O, @
  227. ;======================================================================, r# [# F* F3 b5 X- l
  228. ;音乐数据块# d: _- U( Q, @. p% S& ~: g

  229. ; b6 z, @' [* c" R" k; b
  230. .IF SOUND_BAR_SHOW_ENABLE
    % K" V' o9 j5 f8 t$ ^/ K3 J1 b4 W* I
  231. 5 [5 _! A  Y! J6 _0 {
  232. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK
    9 ?% m5 M7 O3 \2 Q- F' J
  233. .ORG $9000& w, O/ j7 C7 f* o
  234. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0_bar.bank"7 y7 S  X& {; F$ \
  235. , Y6 ^4 L9 J9 A
  236. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK5 L1 C- S/ O3 U/ N" g
  237. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"5 S% r" K/ f7 N" K' x
  238. . X( A) e: M; r4 V( i: P
  239. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK  g! Q1 N5 \# }) G: \5 V
  240. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0_bar.bank"
    7 M; C/ s: o, ~) R
  241. 4 A2 G; ~% D' o# V- R9 c0 e
  242. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    * W' Q- B  r0 O
  243. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"6 [5 i9 i, Q  ]- d
  244. 2 u: q; E" h+ [( ^3 n: O  L; v
  245. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK
    ' f0 s; L. D4 g* b5 M  v% I
  246. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0_bar.bank"1 L0 J! A2 H* H& `; |- j) b: s/ @
  247. 0 c1 F' ~9 G1 Q! |; G
  248. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    ) g4 C5 t+ B" u
  249. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"$ d9 t4 L$ h! H2 D$ O4 C3 B

  250. 3 V; C( v" c: r/ Z8 }3 ?2 N
  251. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK9 \8 w4 R) Y! U! e6 R8 p0 R& G* ^7 c' O
  252. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"+ p$ f- N4 C' ^5 [% a

  253. 6 ^( f4 g  m3 P# i8 a
  254. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    ( A; F; E' Y6 C; z( W0 b; p  M
  255. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0_bar.bank": Q4 F/ ?* q; l+ Q" C/ q
  256. " [! T" N/ ~; D' ^: }
  257. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK* h3 E0 Q5 X& g: x/ w% R
  258. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"2 s3 v/ a9 b: b' P0 M" w0 L
  259. " `6 j2 d' M$ O6 _
  260. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK! h& H# A5 V# f$ }% E
  261. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank"5 x% G1 m) I! ^$ W2 s

  262. 1 f8 c; ~2 M3 J
  263. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK
    * M' o5 H$ m" o
  264. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0_bar.bank"
    ) s1 b  c1 `3 `5 U2 a3 J* `# _
  265. 5 H! |6 j' G* P0 w" p) k4 U
  266. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK8 Y1 P7 v3 s# z2 J- V- ^8 M
  267. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    & M( w$ N; w" U, d' n
  268. ) H7 E9 n( G( w" c  `
  269. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK( n' K% N9 H/ a2 r
  270. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    % {5 p5 c# R/ N. z& i- Y, D& h; G
  271. % y) Z$ g' @/ x' c' E2 ~
  272. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK6 {5 F# X0 D/ ~1 d5 ^1 L* ]' n
  273. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0_bar.bank"* |  q2 J; ^7 O, I4 e& c" g# m4 m

  274. ' v& D( i3 _  m8 Y" X2 L+ ~
  275. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK
    $ j& u: o3 M% {" Z2 ?& t
  276. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"1 f6 c* r& J, ]9 t0 v
  277. 9 M; S1 @( T0 O& {! |
  278. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    2 `: K$ [; v2 M/ t7 u7 n; I! ^* |$ r
  279. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    3 W6 v5 Q& O% ^) Z

  280. ! h0 ?8 ~! b9 Z! `
  281. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK, \- p/ t, K3 ~. E7 \
  282. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000_bar.bank"* N$ o; a7 G1 N# C( n+ D  I
  283. " l3 {3 t! J" C' \' A
  284. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK5 Q& ^  k% E8 o+ N+ f: N  g% }
  285. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"6 v+ q) J) m5 m& u  Q
  286.   B3 Y; ~/ Y, h# {. Q9 N( R
  287. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    . i& d. c, J1 h" R+ C
  288. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000_bar.bank"
    5 X7 w$ j- @7 v5 Q4 D, P

  289. ) A& q# P4 w- ^" p
  290. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK1 u, N3 V7 Y" E6 U( x0 @
  291. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"* ]$ C: V+ b2 b5 E+ f
  292. - o+ a. p! F% z/ @8 ^  [6 N3 g. y# m5 g
  293. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    ( z' `, p- {3 r+ o+ C
  294. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"
    ! o& D! R- a3 O% o0 s" u6 k. R
  295. 9 S/ w& K& U0 p
  296. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK
      s) f2 i+ S8 I$ r
  297. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000_bar.bank"
    , O) \* |1 R6 t) s) ^% J$ z
  298. $ n8 O. V+ O7 V1 H
  299. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    9 y6 b: V/ _8 E* ~7 B& f
  300. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0_bar.bank": Q8 W, }$ h: r! W
  301. 3 E1 q# B: C, |! ?
  302. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK
    % J. d5 G* h: `- a' z4 [. X: p
  303. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    + I: g% P4 A# g1 z1 Y

  304. 7 r5 \! a, q% T
  305. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    ' w; Q4 x+ G. K7 X
  306. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0_bar.bank", O  U4 S; p  h+ C

  307. 5 g& F; p$ g$ V
  308. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    ) v8 u) N, {$ j( `0 l
  309. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"
    # l8 ^; x* i3 L6 ?2 r, ~# @
  310. 4 p! `' M) U& o5 l; m% Z1 P/ o
  311. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK
    2 Y: P0 |3 K# X' }
  312. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0_bar.bank"2 [5 M* j# L% S1 @" W
  313. * y4 F; ?: b: s) `
  314. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK5 z. J. q' n0 `% Q' S8 G) M
  315. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"
    7 o% R) r& N' p- b' m3 a" _8 I
  316. 3 Z; h# l  ~: U" ~
  317. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK+ a1 W0 H8 C$ E# f
  318. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"& {, C2 A) w0 E. r
  319. 0 s( p3 ^) A$ ]! y, Q$ J1 z
  320. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    * Z8 q+ e7 r; ^8 x
  321. .ORG $D4007 g, {+ k9 w/ n  h# r! n6 l
  322. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    5 `# }2 l' `+ V: h6 \
  323. * M" h' g# M1 @; w4 ^# |; i6 V* a. e
  324. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    0 m8 f3 ~" ]" ]+ ]( N; r+ i# h
  325. .ORG $D800" L0 o7 v. t4 Q; ~, |; X2 A
  326. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"/ V5 L) H. N! R
  327. : b$ U0 o8 ~! }5 E3 `) }3 K) \
  328. 1 u. J7 u0 L% u( W
  329. .ELSE( _4 Y8 F- i: O0 h4 D
  330. 9 B# Y" `8 n# p' p5 _3 r
  331. .BANK SOUND_DATA_BANK_00 & BANK_DATA_MASK$ d& h9 R0 l7 x& @
  332. .ORG $9000
    0 v! N. x$ w/ Z5 R  k8 V
  333. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_0.bank"
    2 D, K- g* a0 f! N+ R

  334. 6 O% a4 b0 a) P1 K1 S
  335. .BANK SOUND_DATA_BANK_01 & BANK_DATA_MASK
    ; Z) U/ y7 D  P  p. r0 o$ R  B
  336. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_1_music_data_1.bank"7 Q2 {) |) D& _6 `4 C2 j
  337. . N: n( Z; o5 O4 W4 D; T# Y8 A
  338. .BANK SOUND_DATA_BANK_02 & BANK_DATA_MASK
    7 j6 W5 ?5 _( x/ w7 Q% }) P+ u
  339. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_0.bank"
    0 c& r' {; x- G! h6 l! p& M0 q
  340. 8 T. S# o0 H$ @( U; I
  341. .BANK SOUND_DATA_BANK_03 & BANK_DATA_MASK
    % g) k; ]8 P) l1 P' B: r2 B6 e
  342. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_2_music_data_1.bank"
    9 H7 I- R, O9 x/ r, R
  343. 9 g# J3 z. {" {9 \4 b5 T
  344. .BANK SOUND_DATA_BANK_04 & BANK_DATA_MASK" Y$ n+ j( \( ?+ F  B
  345. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_0.bank"% {4 {$ Y4 B! n' e/ m5 K. L

  346. 2 O* ~  w7 }- @8 b2 T1 y
  347. .BANK SOUND_DATA_BANK_05 & BANK_DATA_MASK
    ' P2 o1 ~/ U7 }% k- U0 N; z
  348. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_1.bank"
    $ c  F1 I6 n5 Y! ~
  349. $ k* B0 C( c$ g5 y$ J4 m3 V
  350. .BANK SOUND_DATA_BANK_06 & BANK_DATA_MASK
    6 T7 }- t" p/ m# {# W4 M
  351. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_4_music_data_2.bank"
    " I. {2 |( k# x: M8 ]6 w$ Z4 O

  352. - h5 ~% W; A" J9 ~  n# d
  353. .BANK SOUND_DATA_BANK_07 & BANK_DATA_MASK
    3 r- P' O3 e, ?+ y+ P! Q3 S
  354. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_0.bank"
    9 u; b2 @* |! _/ L: v0 Z" s, \3 I

  355. ) l: y2 w% I2 n1 b1 B! z# H; x9 w6 ]
  356. .BANK SOUND_DATA_BANK_08 & BANK_DATA_MASK
    $ B6 p2 |& [0 k# t; ]" v2 S
  357. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_1.bank"
    ' P5 w7 L7 k! v, b" G( X9 U& j

  358. 2 C* E  j! z! @" c7 X- R# `
  359. .BANK SOUND_DATA_BANK_09 & BANK_DATA_MASK
    6 s& Q* S$ D7 I% R8 O7 U% u
  360. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_5_music_data_2.bank") S8 h2 ^* O+ x- d
  361. 1 j3 t7 Y4 i2 B& K, r, i" t
  362. .BANK SOUND_DATA_BANK_0A & BANK_DATA_MASK2 m( o' M4 v1 a2 w
  363. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_0.bank"+ {' V8 J9 b" l" ?6 j  b3 B

  364. * `+ E( _$ b  a3 d7 x2 U1 E# s
  365. .BANK SOUND_DATA_BANK_0B & BANK_DATA_MASK
    ) J6 A1 {( L8 v. \( Y
  366. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_1.bank"
    2 B; Q! ~0 z! s7 r
  367. 5 d* x6 g* p$ N3 ?' u1 s
  368. .BANK SOUND_DATA_BANK_0C & BANK_DATA_MASK
    7 j; L! b1 @5 R) w* w, e5 M
  369. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_6_music_data_2.bank"
    0 e" Q9 ^% J  P0 `

  370. 5 w$ R. y! ?4 {, e: M
  371. .BANK SOUND_DATA_BANK_0D & BANK_DATA_MASK
    $ a1 F, C) G  _" N" Q$ P
  372. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_0.bank"
    9 T) x' b# l2 w' H
  373. # J. u, p3 X  C; Y' L8 E
  374. .BANK SOUND_DATA_BANK_0E & BANK_DATA_MASK3 m+ r7 \. T; u# V
  375. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_1.bank"5 D- V1 I- \/ P2 ^& T

  376. 9 i" ?8 H4 z/ i
  377. .BANK SOUND_DATA_BANK_0F & BANK_DATA_MASK
    3 Z; j2 _6 ^8 O( ~2 N) n
  378. .INCBIN "sound_bank/fc music(mapper 4)/rockman/rockman_3_music_data_2.bank"
    * _  D3 G/ c3 }0 J
  379. / M' m, u8 Q0 r# c
  380. .BANK SOUND_DATA_BANK_10 & BANK_DATA_MASK  Q; g$ @/ Z/ S5 d
  381. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_8000.bank"
    6 E( x4 @* C! l! Z& l4 ~

  382. 8 G0 K5 q) M3 i
  383. .BANK SOUND_DATA_BANK_11 & BANK_DATA_MASK
    ( L: h$ N* u7 x: n+ E! l% g* ?
  384. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_A000.bank"5 w% a4 R) c# u. I' z7 y6 i5 [* I
  385. 3 A5 Y- Y" x1 F" c9 \4 i: z* \# x
  386. .BANK SOUND_DATA_BANK_12 & BANK_DATA_MASK
    4 m/ p7 E1 n  [8 |' R3 K' Q* c
  387. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_8000.bank"' ^; c+ x6 H& Q3 K  r4 J! C
  388. 7 m1 j5 `: ]# a. d: U
  389. .BANK SOUND_DATA_BANK_13 & BANK_DATA_MASK$ m( I& ?) Y' `$ ^/ y( l1 x
  390. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_A000.bank"
    3 c3 v9 \1 q" F; }! X/ R
  391. 2 ^& b+ [5 j' R' O/ ~6 b
  392. .BANK SOUND_DATA_BANK_14 & BANK_DATA_MASK
    3 n% }$ J& b4 g8 v- ?7 Y. h: Z& u
  393. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_8000.bank"/ i7 {$ P# l& |& X$ G
  394. 3 j  K+ g' z; \8 M# Q
  395. .BANK SOUND_DATA_BANK_15 & BANK_DATA_MASK" M& r! l6 I( }! T  O  s1 q
  396. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_A000.bank"
    4 E8 q/ k( v' k0 |$ l* q
  397. 0 J- Z8 V; \$ g- \
  398. .BANK SOUND_DATA_BANK_16 & BANK_DATA_MASK
    " q  m) R/ _$ ~; t8 R3 c
  399. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_0.bank"
    5 |) `7 t( I. p4 I- V1 @
  400. 5 ]  P2 }0 c' f
  401. .BANK SOUND_DATA_BANK_17 & BANK_DATA_MASK5 Z+ h) o0 x4 c+ ~6 L  z
  402. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd1_music_data_1.bank"
    6 M! e( J4 _  D% y' B
  403. ( u3 C0 L; k6 g8 E0 s( @
  404. .BANK SOUND_DATA_BANK_18 & BANK_DATA_MASK
    3 s+ Z$ S* n; \& o' e9 A! ]) S
  405. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_0.bank"7 L) f) E5 R6 o! o! @

  406. % D) g" f- u, D- G: _
  407. .BANK SOUND_DATA_BANK_19 & BANK_DATA_MASK
    8 R  F8 U9 j# E- T- f0 w
  408. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd2_music_data_1.bank"
    8 W7 B% j( R' R$ `8 h7 U, `
  409. 8 L$ |  `9 F; B4 Q' f
  410. .BANK SOUND_DATA_BANK_1A & BANK_DATA_MASK, N8 y# V" Y0 ^8 e- v$ v
  411. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_0.bank"
    # _1 V/ C. b* g& u4 [5 ]& G
  412. & b% }$ V. ]5 j4 v, g2 a" o) b
  413. .BANK SOUND_DATA_BANK_1B & BANK_DATA_MASK- z" E  [, }+ ?# x
  414. .INCBIN "sound_bank/fc music(mapper 4)/double dragon/dd3_music_data_1.bank"& R, Y2 Z; g, m' U2 K/ Q& l1 b4 N
  415. + ?. }8 S, K5 a6 r0 T' o! g
  416. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK6 o8 d1 j! W! ]' K* m5 [
  417. .INCBIN "sound_bank/fc music(mapper 4)/raf world/raf_music_data_C000_dmc.bank"
    : }9 r/ }/ u4 b% H6 n

  418. 5 c/ V8 i8 f8 y% M+ i6 s
  419. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK
    ) H- P; A2 n' r# j9 J! v& D3 S* {. @+ k
  420. .ORG $D400
    $ g' z5 f! K7 |/ Q
  421. .INCBIN "sound_bank/fc music(mapper 4)/final mission/final_mission_music_data_C000_dmc.bank"
    8 \; h6 k2 h' v/ ?/ x" h' l. ?

  422. 7 s% H" D( ]- T3 g& V  X
  423. .BANK SOUND_DATA_BANK_C000 & BANK_DATA_MASK1 U, O4 S" d) \* i3 d. X
  424. .ORG $D800* S, E3 q! l+ v- s9 N  e6 D8 v  z
  425. .INCBIN "sound_bank/fc music(mapper 4)/kage/kage_music_data_E000_dmc.bank"
    6 |/ Q2 a/ v( q* g+ x9 E8 d
  426. , s3 T0 h& ]4 h( k" G; I) O8 u% z
  427. .ENDIF: @1 ~  v5 N# x1 `. L

  428. # ?. o9 }- T) }+ x2 p* o$ B
  429. ;CHR图形数据7 A4 V5 u, |6 L* u$ x
  430. ;======================================================================( h9 V8 G- l/ O4 Y6 ~. }/ a/ v5 H
  431. .BANK CHR_DATA_BANK
    5 c1 l3 t$ G6 `
  432. .INCBIN "chr_bank/chr_data.chr"4 y3 D5 I- A2 z9 `7 n# s! L
  433. # T4 ^6 Q. q" T: P6 o& {$ n
  434. ;======================================================================
    ; ^" D9 m3 i4 z* m. D$ h9 K
  435. .BANK PROGRAM_BANK & BANK_DATA_MASK- f6 }9 }$ O9 y! `& K, H
  436. .ORG PROGRAM_ADDR
    ( P& A1 X: g1 i. |

  437. ' P* p' e' F1 X5 z* w  |( t$ o+ ^( j
  438. ;==================================================2 W' ~1 G" R: K
  439. NmiProcess$ Q. r  [+ `& S$ c2 n  `, {6 Y
  440. * i. e. H4 Z/ T6 t/ l
  441. ;关闭屏幕控制8 {; w3 m6 O0 z! p9 a* b! U
  442. LDA #$00
    + n$ T3 E" i' [' o0 I; ]0 t+ P
  443. STA PPU_CTRL1 j$ ]& T% r+ V+ b% }# @0 T
  444. & ?% c" f' v3 E6 h& X  k  b! d
  445. ;没播放音乐就不需要触发IRQ
    : j3 j9 }- `9 b" j) e% T) y8 W
  446. LDA <Music_Stop_State
    . k# K' U* [) F: ~2 |
  447. BNE NmiNormal+ V/ P& S9 ?. T2 I; l5 \  f8 I

  448. 0 ~! S, ?( F# O3 A  ^
  449. ;重置IRQ索引7 u& ]4 T! `* B
  450. LDA #$00
    4 o, S& ^1 y9 ~6 E4 Z
  451. STA <IRQ_Process_Index& H+ p5 R$ ~; K* V- ^" Q

  452. 2 S) @1 X1 g) q* w% Z% D
  453. ;时间秒数为空则跳过( i8 z# n& E) `8 {- C! `
  454. LDA <Time_H
    2 c* d" R  ^7 r
  455. ORA <Time_M" C. H5 a# I, m( v" Q) W- D' ^
  456. ORA <Time_S+ G( C* g# N  |
  457. BEQ EnableFirstIrq
    + D9 y5 \; x$ X# p; y1 @+ J

  458. ( K# F+ d( C# L) S
  459. INC <Scroll_H
    , h8 U- C2 N" S' w4 Z6 ^% b
  460. 7 C% t  d- Y& ~! h
  461. EnableFirstIrq
    , m) r; B- o0 W, ^# j
  462. ;80条扫描线后触发IRQ0 E$ Y4 c- V" v
  463. LDA #IRQ_SCANLINE6 a2 f& Y0 o* N# y0 f! J
  464. STA MMC3_IRQ_LATCH4 |# W; l8 v4 A7 ^$ h
  465. STA MMC3_IRQ_RELOAD
    * ~( }& g* Z! Q' k! `
  466. STA MMC3_IRQ_ENABLE" K/ C$ b9 E9 y8 J
  467. CLI
      g8 v# B- a% j2 E* t, J
  468. . C' ]" N) z& a3 U' [! l+ }2 E
  469. NmiNormal
    . y% L, K' }# q, C* L
  470. - K+ G* b- E' y
  471. ;处理PPU图像
    1 J$ f' n5 D* L  _  _
  472. JSR PPU_Proc! _' @+ |8 w/ Y4 p

  473. 0 Y+ B" O2 w( u' }6 {
  474. ;写入精灵, 会占用516个CPU周期, 约4.53扫描线, 写入会导致1像素抖动(PPU处理徐优化)6 `! ^' d. R5 L1 @( y  z7 m0 [* Q7 W6 x
  475. LDA PPU_STATUS* L8 O4 n7 |5 f& t4 k# K% G' G; I% }
  476. ;LDA #$00) L6 ^" b; `* R/ W5 n& C3 Q! T
  477. ;STA PPU_OAM_ADDR
    + F" |; S; J' L( z% {! G4 A
  478. LDA #OAM_TEMP_ADDR / $01005 G0 L& H0 N# S* K5 Y$ D
  479. STA OAM_DMA! A, }, P/ t, v, |/ _

  480. % m% K! m: q& ^' W
  481. ;启用NMI中断
    8 D" N$ L  Y# P2 J
  482. LDA Screen_Ctrl
    " S$ Q8 w# z4 q0 t$ x0 f% X
  483. STA PPU_CTRL$ f  {( h6 y$ f1 g

  484. 3 R  n2 ~+ n( {4 n5 z/ K
  485. LDA <Text_Disable_Flag/ B5 G* f+ z4 a. G" Z  [! z
  486. AND #TEXT_DISABLE_RAM
    & d$ `& s& t) O  X9 }% T! n
  487. BNE Nmi_Sound_Play. S7 f5 H2 ^' d1 M6 G0 i9 k1 O8 g6 O4 P
  488. / \! c6 ]: \$ n& _& \* P5 T0 p- C
  489. ;处理手柄输入- P3 O( Q# \  c6 O
  490. JSR Key_Proc5 @1 |7 m, F- n, A+ m! X; l
  491. 4 u7 L# y* n& E5 \+ k5 R+ M
  492. ;切换音乐(手柄触发); ^/ ^/ z3 [  x! b# ]1 B" f! y( G
  493. LDA <Time_Wait_Cnt
    $ M6 g5 r. [# L7 h8 I) a( N2 S" Y
  494. BNE Nmi_Cursor_Arrow8 E7 L9 B' ]0 X1 ?' x
  495. JSR Change_Select_Item6 u8 z) t" e) l& T

  496. 7 a( X% W; y9 d1 K' U
  497. Nmi_Cursor_Arrow
    3 q( A% j+ l& f' ?! n# [( Z7 O
  498. : S9 O5 v7 T! S! `
  499. ;处理光标箭头
    8 f& y$ H* q! {5 G6 n( }
  500. JSR Show_Arrow
    ; ]# F; k$ g. |/ _, K

  501. - l9 ^+ h3 m- f
  502. ;更新调色板
    5 O& E. R. l, _  y2 z8 M
  503. JSR Update_Palette_Data
    2 `. o5 U* B* ]
  504. 2 p! o" a5 Z1 z+ {6 m5 M
  505. ;显示时间(缓冲)3 E  B. j0 F7 V1 t' x
  506. JSR Time_Show, p4 ~. j5 k! w$ L- |( k. @
  507. ' g5 V) X3 e: |" ?- j: K
  508. ;音乐显示(缓冲)
    $ K/ K4 f: A+ u
  509. .IF SOUND_BAR_SHOW_ENABLE7 }9 u* r6 z+ ]3 b+ }
  510. JSR Music_Vision8 V. F: V/ W4 N6 U. {
  511. .ENDIF2 }3 [' Y. o& I! y6 d

  512. ) D. v/ u8 Z$ p) ?
  513. Nmi_Sound_Play4 g3 P: P) G* E3 J$ @
  514. ;播放声音3 c1 G- ?& F& t: n0 @& L3 U( B
  515. LDA <Music_Stop_State
    / F+ k/ R5 N8 r* j3 T# ~" d* j8 M# y
  516. BNE Nmi_Time_Wait_Set
    . Y8 O! {: Q* }8 d/ X6 }/ \7 S
  517. JSR Sound_Play_Proc
    ' |! |4 C/ `% G9 N, L

  518. , [% T3 M  _1 Q  r* v4 H: [' h
  519. ;播放计时  \% W, @1 w6 o
  520. JSR Time_Count* U% ~8 o: S' s3 h+ @

  521. 8 p; D- _+ Z$ n; X+ T( C
  522. Nmi_Time_Wait_Set" K. v6 _3 H2 E9 M1 h! _! k+ k
  523. LDA <Time_Wait_Cnt
    3 X  ]8 Z  l; ~* |7 p
  524. BEQ NmiNormalProcessEnd
      j# X, D/ ?  ~
  525. DEC <Time_Wait_Cnt  r& ~' q3 h$ [4 H2 E, _+ B( |
  526. NmiNormalProcessEnd
    & n: g7 n* o& M$ `0 \; H
  527. 7 \. Y' V& h) w) p5 C" D( Z
  528. INC <Nmi_Time_Count8 v# a. q( ^8 A- q5 D" M

  529. ' y" x( V6 q  z) \
  530. RTS9 D0 s5 e% U) N% B! i
  531. 2 ]- V3 u- R* e* S: q8 X* b% }. D
  532. ;==================================================
    % ]$ ~" E7 U& I/ v  T8 ?! I
  533. Init_MMC3
    : T3 ]' l5 l5 B" D) v. S; a4 N; v
  534. ;==============================
    4 F0 u8 ~" R3 y9 {* t
  535. ;禁用IRQ' Q* B! l5 \- M9 H
  536. STA MMC3_IRQ_DISABLE
    + v7 |& w  @% U: X, g
  537. 6 t- @# D6 p. p; Y6 |
  538. ;水平镜像% N1 d9 _2 b; u- i0 G  U1 m
  539. LDA #$01
    0 t+ T) J5 e! j5 n
  540. STA MMC3_MIRRORING5 Z% [2 L% ~/ z& }0 G3 ~, U. L
  541. 4 s. m, g; c) l1 F" z' [+ Z
  542. ;初始化图形bank# S/ \; t0 ]- d
  543. JSR Init_MMC3_Chr_Bank$ e: J0 y& A4 l9 c4 n# l% C

  544. 1 d! g4 H9 @: W, `. S& u
  545. RTS
    5 Z: \$ N. n  _+ M" d! b8 g
  546. ;==================================================8 g( s5 k2 ?4 P* f; r8 t& V
  547. ProgramBegin;主程序
    2 ]) t6 Y' }6 S/ L# r; `# s& [
  548. LDA #$00# j' q1 `3 M/ g9 x9 r7 ]# c) i7 P
  549. STA PPU_CTRL
    6 p* Y" r" W) C8 X( X0 u
  550. LDA #$00# {7 i5 N+ X  p  r8 r/ f+ ?/ f
  551. STA PPU_STATUS
    0 H# U- y- ]$ G; Y8 R% V0 @/ z
  552. STA PPU_MASK. b( |* v9 G- S/ ]) s& U4 h
  553. STA JOY2_FRAME1 K5 u6 A. ^( g
  554. ( Q: k) N5 l0 G/ q6 q2 R) b
  555. STA PPU_SCROLL
    2 H" o9 |6 h3 s
  556. STA PPU_SCROLL
    ) @, i( l. o# ~# s
  557. * S- Q4 x* j3 f3 J3 ]6 _
  558. ;==================================================
    ! Q0 P$ @, V7 _& H
  559. LDX #$FF
    ( F: t5 w" W3 B/ {3 P; L
  560. TXS
    ' T9 v. q  J: x: N( a4 r$ u
  561. 3 K" K2 K3 d2 Y0 q8 d+ t2 B
  562. JSR Init_MMC3
    & [$ i( i" {$ d6 L8 T  r3 J" \% e
  563. 9 J- g9 N5 X* h! P1 u0 \
  564. LDX #$02& r* _3 [, Z3 ~- t8 G5 [
  565. Check1
    , s2 O4 z1 D# x- U" w% J2 h8 s- z
  566. BIT PPU_STATUS. ^% e( L1 M5 x0 q" M; M
  567. BPL Check1! A$ a& F0 d* @% [+ o, _1 j
  568. Check2
    5 X6 f# u0 U" ?, l& d
  569. BIT PPU_STATUS
    6 P4 p& O% K( E9 @' K  g
  570. BMI Check2
    6 h) ?' ]1 B' E; I
  571. 8 k# x' O" S, N9 X
  572. LDA #$0F6 p- i2 U7 ]( p4 P! z
  573. STA APU_STATUS
    8 F  r8 f1 n7 a! c9 p
  574. LDA #$C0) m# E" V; w2 u7 N# L" g+ s
  575. STA JOY2_FRAME- r! Q1 z8 ~( p0 l

  576. ! x) z% x. W2 L* k2 t& A
  577. LDA PPU_STATUS5 U3 m. ^$ Y  A/ G6 e0 w8 i# f6 T/ p
  578. LDA #$10
    1 I# \$ G- W# j! G1 o
  579. TAX# I9 e4 j6 A) D
  580. Check3  P' T" X! `  b- p0 e% J
  581. STA PPU_ADDRESS9 I0 l) l! V& ^7 D( A& V( a* e( y
  582. STA PPU_ADDRESS) Y/ p* O) I( N* v6 X8 q
  583. EOR #$000 k( }' j- V. x( `! f' r
  584. DEX
    8 [) S' v+ [6 ^0 f
  585. BNE Check3* S+ {. I' C) d& L/ C$ J4 P) g
  586. ;==============================8 E8 O4 Z8 D, ?  x2 E# Y
  587. ;调色板清空4 v- O$ b6 U& Q& L8 `
  588. LDA PPU_STATUS
      I7 i- u- _8 g: H1 \  N
  589. LDA #$3F  F5 f- o- ~) E" c: J
  590. STA PPU_ADDRESS% c5 u4 N( W/ i
  591. LDA #$000 [, l% f( W! r+ ]& `( B& {
  592. STA PPU_ADDRESS! d" J& y/ y8 r. A) `$ N' I5 A
  593. LDA #$0F
    % M; W+ k" |7 v/ Y
  594. Palette_Clear" Y8 H- T- ~. D8 M0 [
  595. STA PPU_DATA
    ! f. s* d4 M8 P5 W! r$ B
  596. INX$ Q$ q, a/ L1 \9 O: ?+ p7 F
  597. CPX #$206 Y' `: l  H/ W; d' U+ W0 i. Z
  598. BCC Palette_Clear+ p& S% A: k3 \& P( o6 y- o0 Z
  599. LDA #$00
    - V! w  ]( D; s
  600. STA APU_STATUS
    2 r2 x9 C6 _9 H1 Y
  601. $ i/ ^, t8 O+ O% M( U
  602. ;==============================
    2 g: w  u5 z: @  f
  603. ;RAM初始化
    3 y4 I0 n9 u7 J0 H
  604. RAM_Clear_All. {8 i9 I" A/ v- ?" Q3 x
  605. LDY #$00
    0 `9 l- y2 o" Q0 ^
  606. LDX #$08
    7 f$ E& h' K! ^9 F
  607. LDA #$00
    8 B2 k' g, u* Q$ b
  608. STA <$00
    - x# C+ U  f2 s
  609. STA <$017 ^! Q* U. @0 ?
  610. RAM_Clear_All_Start3 S. F4 e0 ^) f5 O5 T) v
  611. STA [$00],Y1 t. T- m9 B+ k
  612. INY
    0 J  o+ U# I3 s8 ^. ]
  613. BNE RAM_Clear_All_Start+ g; U* M: X) r6 d
  614. INC <$01; b8 m% S1 B  @7 l
  615. DEX
    ! J& V& c6 t' n  {
  616. BNE RAM_Clear_All_Start- b. Z" W4 }' N
  617. ! {6 t5 k$ V2 n/ T4 L
  618. JSR VramClear
    8 i# \3 s% ^) H
  619. JSR VramInit! U5 D: ~0 i7 A) s1 V! E* Q  s
  620. JSR OAM_Ram_Init! s/ G, P/ _; `. ~7 W+ v: l
  621. JSR Init_Palette_Addr
    " z. {( W7 {, Z( P3 L* P, }
  622. $ @' i5 b+ ^* n8 O1 d
  623. LDA #$FF% Q0 h1 V$ ?4 j8 _( Q  }
  624. STA Use_Ram_End( m0 o, l# i; d' X4 U0 ^# w
  625. ;==============================
    # |8 r% P; G4 o9 d
  626. ;初始化背景调色板$ M) T$ w6 f. J  ~
  627. JSR Set_Palette_Color
    0 H+ G- L" S; W' D
  628. JSR Set_NameTable_Attributes+ ]; i5 p- g; q# g$ `+ x

  629. 5 d. Q3 a2 V3 E$ h& h# V8 {: I
  630. LDA #$00: z+ A# ~! z" Z& Y
  631. STA PPU_OAM_ADDR
    + L8 p) X4 d* q+ ]. I/ P+ W$ D" {8 Q
  632. LDA #OAM_TEMP_ADDR / $0100* o2 s, i/ Y4 ]4 `
  633. STA OAM_DMA$ @5 C# Z! u! i& \" p$ R7 I  K4 y
  634. 4 v0 y6 h. i, u; L' n4 w2 ~+ H3 S" F! D
  635. JSR Sound_Reset_Proc
    ' ~2 S* I. u% a8 U
  636. JSR Set_Sound_Total( ]( [5 t( |0 L

  637. 3 Q( b; N! e& f6 O# ~: m
  638. Init_Start_Music
    9 m, p9 k# [+ M  n+ B) m
  639. LDX #$007 _% p3 T" U/ D& d/ N
  640. Init_Start_Music_Write
    : a! U/ C  |" Z: B2 f& t; C
  641. LDA Sound_Start_Port,X
    ; A2 t; Q3 Z; h' i# x& p
  642. STA <Music_Cur,X+ I0 M7 h0 m/ }
  643. INX  U/ g' a; B" n0 N2 ?4 @
  644. CPX #ITEM_MAX_SIZE& |+ q4 Z: O  z2 H
  645. BCC Init_Start_Music_Write8 ?6 v5 r( F1 R

  646. 8 h3 M' x7 ]/ B3 D3 @
  647. JSR Show_Music_Text* H' I, E4 j) b* b

  648. : {% Y, [! Q5 A) g' i9 l3 p$ t
  649. .IF SOUND_BAR_SHOW_ENABLE
    5 E9 `' \! @# d/ ^# }5 m
  650. JSR Sound_Bar_Text_Set4 b* E! v  ]. D( t
  651. .ENDIF
    0 n5 ~! C) w  }8 U/ ?: w

  652. * v1 n  n- U6 T& I& [1 ^) q! z, u
  653. .IF Track_Name_Pos
    - v1 H' P# I; u9 b% [! I
  654. JSR Show_Track_Info7 U* _5 y6 z8 B0 S
  655. .ENDIF/ V) C* p2 P" D6 \: S! E2 R. D
  656. 8 Z( |* y% F4 X  x
  657. JSR PPU_Proc
    6 [0 c! U% p0 i) g  }

  658. * J& }* i+ b. F8 Z1 |* D- I7 h
  659. ;==================================================3 L+ A# X9 f" n$ k7 M) N" u
  660. ;音乐bank初始化
    # I0 c# U0 |) {' a9 e$ z. C
  661. JSR Init_Sound_Bank
    4 N# I& a8 @4 @% Q# D6 R  A9 Y

  662. $ g7 M9 w7 w) D! f
  663. JSR Music_Show
    4 O. B7 n0 u% I0 R  b
  664. JSR Time_Show
    4 U  l9 p8 W& V6 u/ a. R
  665. JSR Music_State_Show7 k3 }! L) b6 X/ R% [! V# [
  666. JSR Time_Delay
    - Y0 g5 X) w) t( T
  667. ) p) T' p9 c; @+ _; r( @
  668. LDA #$014 t7 {% B0 S/ v  p  N2 c/ q, ^
  669. STA <Music_Stop_State
    6 C2 i( A* e8 Z# Z

  670. ' I' \/ }0 B$ ]) i8 s# R& [3 q5 G
  671. LDA #$88
    1 g4 ?4 B' p) t% N* h+ X( y
  672. STA Screen_Ctrl- Z$ r. l/ M0 B  b
  673. STA PPU_CTRL
    - _$ Q7 M. N/ r1 ]$ K& T

  674. ' Z9 _" @1 l, v
  675. JSR Show_Page_Text
    5 \% {3 C% n& R2 P% b1 x# [
  676. 9 a( V8 J* N4 D$ K; T1 g2 j0 J
  677. LDA #$10
    ( R3 _5 W% e/ e8 s0 z) _
  678. STA <Time_Wait_Cnt) x6 N& H% i. Y& E9 z8 f

  679. 5 k* N$ x2 N! G  V3 i7 o
  680. Wait_Time_Over
    ' B% N/ e) G! w& t0 j, t. @
  681. LDA <Time_Wait_Cnt
    - o9 J8 u5 @  t; B8 _7 C5 N  }
  682. BNE Wait_Time_Over
    2 @4 k+ a4 D$ A6 r0 W, z# S
  683. 7 Z2 I& {5 c8 Y7 u/ y; b2 t
  684. JSR Show_Arrow
    . j2 F2 v* ~# C  s
  685. LDA #OAM_TEMP_ADDR / $01002 E. p1 d! l* Z9 I$ b3 r
  686. STA OAM_DMA
    * E9 I! b( R, F2 P
  687. , T1 s% h, v: P/ j
  688. LDA #$1E
    0 o5 R- K' \/ f( @" A. @% `# b5 v
  689. STA Screen_State
    ' m4 Q! n2 c+ }. G9 b- s$ h
  690. ) k( c3 B( y. j" n- f
  691. LDX <Music_Item_Cur# P, E3 j" l! l! b5 r1 L( H) R
  692. LDA <Music_Cur,X
    , F9 m! t, |; L1 U# q
  693. JSR Sound_Init_Proc3 m9 I! w/ ~! `% @
  694. & d! H6 p% {/ w
  695. CLI
    8 P8 ~5 a; _$ X( L! t5 u
  696. JMP MainLoop& {! r% k# ]. {0 l: @( o3 r

  697.   d; c  j# g) V$ o7 N9 t) w1 n
  698. ;==============================
    " \: s8 m; Q7 b0 x4 N( s4 ]/ N  Y
  699. Time_Delay;延时等待3 R# i2 f4 R  o
  700. LDA PPU_STATUS, t9 ]- ?% r: r1 p' K4 p
  701. BPL Time_Delay
    ' _4 b7 t/ D9 D% a9 E
  702. RTS
    % L2 s. P% N8 O. F) h+ w5 F6 U

  703. 7 ?$ h, ^3 X' a3 Z+ e
  704. ;==============================9 |5 W2 f( u! x* Z: m0 \
  705. OAM_Ram_Init;初始化精灵内存( T5 ^. b1 j; z4 N7 a
  706. LDX #$009 K. r5 K9 F3 N* F
  707. OAM_Ram_Init_Write0 ~8 L# O- z. G6 E: a
  708. LDA #$F8
    % ?; W5 D# c- k. y' G
  709. STA OAM_TEMP_ADDR,X0 {# |2 @* ~! q/ ?7 r
  710. INX
    : ]* D7 J1 K5 e% Y; R3 \
  711. LDA #$F8
    3 A" |; r  y8 o8 F
  712. STA OAM_TEMP_ADDR,X" I- \4 w! }/ p0 w4 \7 u
  713. INX2 R- N& e% N6 U. n  V
  714. LDA #$00" m- H# a1 F. R4 x
  715. STA OAM_TEMP_ADDR,X7 @' R9 D' s& X
  716. INX
    & W: U" ~# k1 c  Z: V: u, G: a# m* A
  717. LDA #$F8
    & v$ V- N* {- |% Y3 }& G0 m' Z4 M
  718. STA OAM_TEMP_ADDR,X( t  Z: p8 [9 f! K  i/ n, s# |
  719. INX
    , N7 B; j9 n0 X7 f& _' L
  720. BNE OAM_Ram_Init_Write9 C" p$ y1 I# r! G& J/ U5 p  m
  721. RTS+ a1 }: m3 G/ x; j; C9 Y: ~
  722. ! y: d% ^& w3 ]5 L7 a* j
  723. ;==============================
    0 \% r' M. h% F+ Z/ v& R
  724. VramClear;初始化图形内存8 f" j2 h+ Z' i: s; z$ u! `' M$ t
  725. LDA #$20
    $ [  M& N1 m) N4 X% t
  726. STA PPU_ADDRESS5 A' B9 ?3 M. \
  727. LDA #$00) f8 l; D$ H$ ^* u# K# P
  728. STA PPU_ADDRESS. J6 I- j' o  q
  729. LDA #$00
    . g, L; m! Z0 c% |; o
  730. LDY #$000 E# }  f7 _9 i! W6 J9 l* C  R! S
  731. LDX #$10, n: ]/ L/ Z* a) D
  732. VramClearWrite9 _2 S- z  }5 f! O- r
  733. STA PPU_DATA
    $ H7 L4 E4 N* Y- \4 y% N
  734. INY, {: m5 |& L# T4 [
  735. BNE VramClearWrite
    ; M  V3 ~5 W7 I0 l8 ~* W/ T/ d7 X
  736. DEX) k1 _5 |, A0 C' D8 D3 C
  737. BNE VramClearWrite
    3 ?" r: M+ V! F0 X
  738. RTS
    2 L, t/ o, P( W1 z' Z
  739. ) z+ |0 r0 y# X, o* Y5 {% }
  740. ;==================================================& Z" A. a) ~8 Y5 x
  741. ;设置MMC3图像bank1 h9 a, [& G$ v; I
  742. Init_MMC3_Chr_Bank
    " l1 ~% ~$ t" N
  743. LDX #$057 d8 A, S1 a+ y
  744. Init_MMC3_Chr_Bank_Write
    6 S, c) ]5 _+ K  i
  745. STX MMC3_BANK_CTRL& a2 h' H- ^$ z% r( \: x- D
  746. LDA MMC3_Chr_Bank_Data,X
    1 q5 ?8 T7 {1 _, D7 ^  w
  747. STA MMC3_BANK_DATA7 ?; j/ e3 b& G: y
  748. DEX
    4 ?% C1 H5 _# O: ?" g& _6 Q
  749. BPL Init_MMC3_Chr_Bank_Write! A0 Q3 B1 ^7 v! Y7 a% p  c4 i
  750. RTS
    ; O- X1 v& H( r: S8 e
  751. ;--------------------------------------------------
    + x7 m0 s, O: y5 j% V* M7 X
  752. MMC3_Chr_Bank_Data+ @3 @1 B  t, X) Q
  753. .DB $00,$02,$04,$05,$06,$07
    8 ]" f7 n$ z# }

  754. / D" t1 X, Q0 n9 e
  755. ;==============================; q" j* b7 g+ c/ H: s) d
  756. VramInit;初始化图形内存& S6 C( S* m0 _% C
  757. .IF CHR_RAM_ENABLE
    , G; }1 c+ s' V, g
  758. LDA #CHR_DATA_BANK
    3 d1 Z! m+ ]# a6 Y
  759. JSR Switch_Bank_A000- ~; J5 r  [9 c0 D8 I8 l
  760. LDA #LOW(CHR_DATA_ADDR)4 Q& [! [8 Q: z1 [8 `
  761. STA <Data_L9 N2 g0 P4 S" `$ r2 o. t
  762. LDA #HIGH(CHR_DATA_ADDR): d( m$ _; q+ V# H: A
  763. STA <Data_H
    8 c3 c4 w9 m( ~1 N7 c. Z, V
  764. LDY #$00
    2 T9 Z0 a( J4 T# U
  765. LDX #$20
    " d% d) }9 I" W0 q8 P
  766. LDA #$00
    8 a" o+ @% v* E% h9 Y* r* Z+ Q( C
  767. STA PPU_ADDRESS/ j# K( q+ x3 m  ~$ r& ]
  768. STA PPU_ADDRESS3 n  |* \! o5 K8 ^# w$ r6 A
  769. VramInitWrite
    ! R! d2 Y" a' V, Y; F
  770. LDA [Data_L],Y
    ( E. o- z! @. t! f" F! E! B
  771. STA PPU_DATA; n$ ^' C7 `1 ^
  772. INY
    2 o, m3 i( j+ v  g' g+ r
  773. BNE VramInitWrite6 Y; R& t2 F* m; v
  774. INC <Data_H
    * p" P' D5 A: n
  775. DEX+ k* k* O. V0 M! m: b- x! R
  776. BNE VramInitWrite$ v2 |8 q/ W; Z9 t$ J8 j, Y6 B' B
  777. .ENDIF" z: \2 b  m* r' R# {
  778. RTS0 l/ ~. @. }) _* j5 c$ o$ z% b
  779. : _( ^- I1 M/ `% Y
  780. ;==============================
    , ?/ j" @/ @: b" X
  781. ;音乐切换3 A. M0 O& @" c. V+ h+ C1 ~
  782. Music_Play_Change
    7 a$ u) s0 a2 x4 |
  783. LDA <Key_Once
    4 {5 M. G  M1 ^( d; M$ _! I+ K
  784. AND #$FF" S, P7 C6 S  ^6 p4 e
  785. BEQ Music_Play_Change_Check) o- G9 u  J5 A) @& [

  786. + t, L, O( |. V1 C1 t
  787. ;禁用音乐条刷新( h2 \4 K( _/ m' T2 t* G% l3 ~
  788. LDA <Text_Disable_Flag5 Z: @% d: t2 u% l" u2 M2 ^( I- A7 X
  789. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME
    9 j5 d8 a9 `* [6 N6 x/ U  n+ H
  790. STA <Text_Disable_Flag
    2 w) o$ D# }" y+ c5 X1 ]- v

  791. ! C5 W; ?4 g  p
  792. Music_Play_Change_Check
    % i( k( Z+ [& o9 I7 U5 G" B1 O
  793. Music_arrow
    " o' n- _4 y$ r7 r+ T- {2 N
  794. LDA <Key_Once. `8 ?2 R% }9 R& H- q
  795. AND #$0F
    , P7 ]! k0 Q; p. {" c' F
  796. BEQ Music_Play_Change_End
    ! _/ V( S2 e- L; N. }3 _0 n
  797. JSR Music_Track_Change% S( L2 O, V2 o( a% E" Z
  798. JSR Sound_Reset_Proc
    8 u7 g# c8 ?) H
  799. JSR Music_Show
    . O5 H* m3 q! b, `8 u
  800. Music_Play_Change_End
    0 F. K- @4 F* \, ]# m
  801. RTS
    " \; C6 ~. m1 ?+ A2 o4 v* g

  802. " E+ B/ i* G) ~/ ?. e! @
  803. ;==============================
    6 y' ^2 y9 }0 X) h4 G3 v5 Y
  804. ;音乐曲目切换
    , |/ B: L* n7 B7 A/ I
  805. Music_Track_Change* P, p/ M! D9 T7 G$ h9 a- e
  806. LDX <Music_Item_Cur7 @6 ?% V8 I4 I
  807. LDA <Music_Cur,X" Q* b2 P: V& S/ l( T
  808. STA <Music_Last
    $ y  L+ v, C# O$ }7 K# u
  809. Music_Decrease
    - W9 a( b  X+ u7 i* z$ G: `+ ^) Y
  810. LDA <Key_Once
    * T6 K  |' G% c  b" _+ U
  811. AND #$421 N4 \  j6 ^: u9 Y
  812. BEQ Music_Increase  p$ ^" O5 H5 d" W
  813. LDA <Music_Cur,X% _7 _, A+ Z: o  y) Z/ G: J) g
  814. BEQ Music_Increase( v; U% ?9 M" M: h! b
  815. DEC <Music_Cur,X
    ; F' M1 C% {4 x% u! l
  816. Music_Increase
    : X+ j% S5 e- ~* ~8 ^1 ?
  817. LDA <Key_Once7 w; l) K/ p; W* F
  818. AND #$81
    & I. ^4 p, Z/ i7 o1 A$ d
  819. BEQ Music_Decrease_10/ U! o5 Z. B& c: G
  820. JSR Set_Sound_Total
    , p+ ?* g0 G0 U. i! C9 ^. J: J
  821. LDA <Music_Cur,X
    1 I+ q0 U, Q, q0 [: [
  822. CMP Music_Total. C0 a! v0 Q2 H# g
  823. BCS * + 4
    3 ]/ O* N1 v# `2 |
  824. INC <Music_Cur,X
    " K( e: j: Y5 Q  g! ?/ G6 W# r
  825. Music_Decrease_10. [" t; q3 J- L4 }" _, I- h5 I
  826. LDA <Key_Once
    & o. f% L5 o4 `' r9 c2 G
  827. CMP #$04
    - `2 z* Q6 o% ^
  828. BNE Music_Increase_10
    8 {6 B- F% K8 D3 W" Z
  829. LDA <Music_Cur,X% K3 o3 m  y( Q5 ^1 K
  830. CMP #10& h6 r8 `! j6 V. M' T. i0 f
  831. BCC Music_Start_Song_Min
    - J- v% |0 V4 ?! ~1 y
  832. LDA <Music_Cur,X
    9 I( }4 i; d# a$ p& ~2 {
  833. SEC1 [( j6 d' Y/ m2 a6 |- ]; K, A' T
  834. SBC #10
    . y8 ~4 p7 ~+ \5 @' p  T- ?
  835. STA <Music_Cur,X) G9 v# h" A* Q2 z. d
  836. LDA #$00- |6 Z' `" Y9 n9 N$ _. h. `3 U4 F
  837. BEQ Music_Increase_103 S3 J9 h0 O9 z, X' ?. D
  838. Music_Start_Song_Min" m% d/ S" I% |- X5 b. X, u  Y
  839. LDA #$00
    + B2 c. i% ]9 U
  840. STA <Music_Cur,X
    8 f% G# n$ ?( Y2 Y) E/ l
  841. Music_Increase_10
    ) j3 j. s7 u; ]9 O
  842. LDA <Key_Once4 f. p' |( A$ Q$ a$ ^  P
  843. CMP #$08/ \! o% ]7 t: _
  844. BNE Music_Track_Change_End
    & t8 H. z2 H0 q; b
  845. LDA <Music_Cur,X
    " x8 {. r: j; r8 R7 B+ y+ ^& {' R
  846. CLC
    $ n: n+ B5 G( X1 b& V* [' c/ [
  847. ADC #10& T) Z2 e# P' t3 u% a' i+ t
  848. CMP Music_Total( a$ J# h# C7 u
  849. BCS Music_Start_Song_Max
    # `2 P0 P6 I0 D9 b5 R4 t* M
  850. STA <Music_Cur,X
    6 A- g+ b' R9 i9 E. f1 ^
  851. LDA #00
    9 X- z8 r2 l) y: y' L
  852. BEQ Music_Track_Change_End) c& o. Q9 ]. h& A  `
  853. Music_Start_Song_Max; B' N0 f# a$ k6 f* G  h
  854. LDA Music_Total2 D7 K( q7 c& V) k; U: f
  855. STA <Music_Cur,X7 M, j  a; d% }; L2 A( B  r( q. u
  856. Music_Track_Change_End9 ]% T- v6 ~* Y, C
  857. RTS
    - y& m9 u7 O7 c- L

  858. + A1 |! I8 \+ x+ i7 w& D( \- D
  859. ;==============================( C7 r7 D1 F  F6 v8 @! y( r& s
  860. ;按键处理* z+ u" d" d6 L& E
  861. Key_Proc
    4 J. [6 O, n/ r
  862. JSR Key_Scan
    , U! ]. R3 M  V2 f& D2 o
  863. LDA <Key_Keep
    . B1 L* {, i) _: `5 W
  864. STA <Key_Temp
    4 b* ~0 q. G: K( }3 h* F
  865. JSR Key_Scan
    1 ]4 @4 p. k+ t0 w" Y8 v
  866. LDA <Key_Keep
    8 ?* D; Q, T7 W
  867. CMP <Key_Temp
    ' p, o9 `: r( p  B% U/ h
  868. BEQ Key_Get_Once
    % v+ x  q/ a7 D% v1 l* Q1 \9 T( ?$ U
  869. LDA <Key_Kemp+ r1 {& `+ R# C' I9 U
  870. STA <Key_Keep) `+ Y+ U' |; R& v: G
  871. Key_Get_Once
    * I* F9 Q" h2 _6 Z1 h
  872. TAY3 t" H' ~; P1 w* C
  873. EOR Key_Kemp
    ; Z  r! Q1 m8 s% d6 G$ K4 u
  874. AND <Key_Keep
    3 N9 R  Z% J7 [/ x6 B
  875. STA <Key_Once, q2 j* e- b6 M; C8 o* Z
  876. STY <Key_Kemp
    ; n3 R7 m, Z' x, p9 G3 m$ m) U7 `
  877. RTS
    ; n% U! [. N' A7 o& R0 x
  878. ;------------------------------
    ( Z$ C, h  d/ t
  879. ;按键扫描
    $ Q( K/ i6 k- v% G2 W! w
  880. Key_Scan
    & y% k1 f; Z$ c. y
  881. LDX #$01
    7 V1 R2 @8 ?/ K
  882. STX JOY1_FRAME
    . c1 _( X* v0 B
  883. DEX
    . t3 Q# v8 L/ M; u
  884. STX JOY1_FRAME
    ; Y1 G# w, z1 G+ l. p$ R& A
  885. LDX #$08
    7 t& @2 \2 c9 C8 \* W2 z$ t
  886. Key_Value* Z- _( k8 P1 |7 C6 d
  887. LDA JOY1_FRAME
    . h" c. [% J8 J! |( H; v
  888. STA <Key_Getv2 u$ c) w$ c2 I1 V6 V
  889. LSR A1 T/ `' L" [# B# K8 L8 t  t0 @
  890. ORA <Key_Getv7 S  e/ M! x& b1 o2 E. G- U
  891. LSR A
    3 W* C! e, F' s1 |2 r% o
  892. ROL <Key_Keep# E& M; x' j2 w! D% E
  893. DEX- J& \1 ^# s' X2 q$ u0 \. K9 A' K
  894. BNE Key_Value
    ! w! d& `* f, J1 |% v
  895. RTS
    + ]) R/ g) `7 @" K& A6 a( d
  896. 8 O  M4 k5 {. q+ K
  897. ;==============================  r, ~- P8 g; ]. B
  898. .IF SOUND_BAR_SHOW_ENABLE3 k; |3 L: s! i& {4 b5 R3 I' N
  899. ;音乐条显示
    & t3 @- @2 R4 ^$ b0 A1 j0 F/ Y
  900. Music_Vision# B" z( V$ R0 P7 q
  901. LDA <Text_Disable_Flag
    5 s, L5 _% N8 }# O4 O
  902. AND #TEXT_DISABLE_ITEM/ h- v; P! ~6 }% W; t
  903. BNE Music_Vision_End9 _% x+ W+ x5 ?! z4 ~+ Q. r
  904. AND #TEXT_DISABLE_BAR
    & u& o; S$ Y5 m% W, U+ G! @+ _; K2 K
  905. BNE Music_Vision_Set
    1 [* s) o6 K' b# X3 @
  906. LDX PPU_Cur8 Z* r8 c) c/ N8 Q. T2 D
  907. JSR Music_Animation- u# N1 M2 _5 ]
  908. STX PPU_Cur
    0 \- Z& {- ^2 m+ @! ?! W2 `
  909. Music_Vision_Set+ g; o+ L* o1 P- s
  910. LDA <Text_Disable_Flag7 V/ |0 P: O) D
  911. AND #TEXT_DISABLE_BAR ^ $FF: k+ ^3 J8 \! w3 E: g9 Q+ j8 B6 [
  912. STA <Text_Disable_Flag# J; d2 \1 L; A0 u
  913. Music_Vision_End7 K- S! ^6 E" L
  914. RTS( a$ A2 ^) W0 w% G5 _' H: |
  915. ;------------------------------* d! T. L' B- {0 ?2 `
  916. ;音乐条显示处理
    2 l) u$ ^% Z4 n; ?) v2 K
  917. Music_Animation
      e; Z/ l5 m5 Q4 O  N% e8 }6 \
  918. LDA #PPU_MODE_CNT_LINE' k8 [; h  Z- G9 |6 W
  919. STA PPU_Addr,X. l% P- Q/ ~. h* ^; J3 o5 r0 ]' L
  920. INX' P) R; P9 H7 o! L, N
  921. LDA #HIGH(Sound_Bar_Pos)
      C" b, |' e# R/ c
  922. STA PPU_Addr,X# o: R0 m( X+ T
  923. INX
    3 b3 m" X& Q1 e0 A  X9 a
  924. LDA #LOW(Sound_Bar_Pos)
    0 D/ D/ o6 ^2 r. @: e$ Z
  925. STA PPU_Addr,X7 P) o+ n$ N% u( h# X
  926. INX. |8 ?# r0 }& w+ I1 _0 k8 w7 h
  927. LDA #$08
    # Y$ @. m) F4 u9 \9 ^. `
  928. STA PPU_Addr,X
    9 f1 u. i  Q/ ~0 I6 E
  929. INX8 m5 m3 W! w( ?* d! ^2 ?
  930. LDA Sound_Bar
    & K5 e8 b, S4 Z9 P
  931. JSR Volume_Convert# Z* Q' ~: I7 ^* G
  932. + j" N% Z+ m' F! N
  933. JSR Volume_Set_Cnt
    3 L  {  W. @. ~, Y
  934. LDA Sound_Bar+$4
    / z7 ?$ t, C: Q. q, D, K4 U
  935. JSR Volume_Convert7 i$ l1 F8 d( [

  936. / |7 Z6 q# w" ~6 l) N$ e2 b9 E, b
  937. JSR Volume_Set_Cnt
    : @8 M2 h+ h3 ~3 H* U+ y8 s/ R, x
  938. LDA Sound_Bar+$8$ i* b. Y7 W, [- Z3 \( i8 x" ]
  939. JSR Volume_Convert
    8 ^1 D: u7 U! w

  940. : D/ Q/ A+ a) ~
  941. JSR Volume_Set_Cnt# D9 G6 E/ Q% L9 n1 y  n
  942. LDA Sound_Bar+$C
    . r0 Q( u* w: u: [: x
  943. JSR Volume_Convert
    . t* x; A9 _+ _( }$ N8 [0 o% Z

  944. $ l% v0 _, X( b4 j1 Y4 x4 g
  945. JSR Volume_Set_Cnt
    , A$ l6 [1 d1 r1 l' k& V; d" i$ N
  946.   i$ t$ Y. P! l6 }& {3 ?6 Q7 D6 p1 Z3 ?
  947. LDY #$10* X6 w" c9 e$ A0 N3 d5 u7 E& `
  948. LDA APU_STATUS
    9 A0 X6 I8 ^5 @& j; \
  949. AND #$108 R! i3 Z" \* c7 U# _- |& h
  950. BNE Volume_Count
    ' q8 g; R/ v0 x9 w* H
  951. LDY #$00
    * i/ R% ]) V3 ]/ C- _2 F1 l7 u
  952. BEQ Volume_Count9 a& [1 t7 h; Q+ r' P, y

  953. 6 X, a7 m1 D- B# a1 L* `/ r$ |- y; O) {
  954. ;------------------------------( n1 C5 T+ q, H: A! X! r1 G' H
  955. ;音乐条处理1 @( t5 G. `) g: E9 c
  956. Volume_Convert4 P0 ], e& |. E4 v& p& {6 S
  957. AND #$0F
    $ L7 H% C' C) A2 R
  958. TAY+ _7 i/ w  @, u: i
  959. Volume_Count" H* z2 B- q; F6 @
  960. LDA #$08
    8 c; Q" q( h4 C2 P+ u2 w! v" ]; Y
  961. STA Sound_Bar_Cnt
    + \+ E8 i/ P* Z
  962. Volume_FILL
    9 T! d9 Y4 l/ E. D; ]5 |) j+ Q7 J
  963. DEY
    ! M4 Z4 L" R* z& s& o
  964. BEQ Volume_Half. r8 S$ y) a$ f; ]' P5 ~. I5 ^- [
  965. BMI Volume_Empty
    4 F5 ?$ H- g4 s2 a  z5 [1 a1 l
  966. DEY5 d2 z) T# G) j, c( \  A
  967. Volume_Full
    0 p. Q* W0 ^( [7 ~7 @+ {" [
  968. LDA #$16
    3 E9 [( s9 C2 H7 h7 F4 W/ ]
  969. BNE Volume_PPU7 O- U/ i9 O3 K+ |, K
  970. Volume_Half
    0 N3 k5 k; I" B7 n* x+ v3 c
  971. LDA #$15
    / m2 n6 ]3 C$ {6 D" t
  972. BNE Volume_PPU
    . x5 A( m  {/ n
  973. Volume_Empty
    4 ^! x7 N3 R7 d2 I, Y) ]+ C
  974. LDA #$14
    9 [$ J; z1 n2 ?5 {( d. [
  975. Volume_PPU
      Y. _! {2 f- i7 s. ^: ^; o
  976. STA PPU_Addr,X
    $ _; I9 B' S8 h4 O
  977. INX; J! P& t& y/ q" o3 e
  978. DEC Sound_Bar_Cnt
    " `' N' w1 M1 q7 k
  979. BNE Volume_FILL& O9 d9 Y. ~% h0 n# `
  980. RTS
    ; }2 {( O  X* ?- v, g; V

  981. ( T+ r6 e7 C3 S& a% I* g
  982. Volume_Set_Cnt
    + z$ r8 |( [+ ]( a
  983. LDA #PPU_MODE_CNT_LINE_NEXT9 w3 e) Y6 \; @1 x& m. t
  984. STA PPU_Addr,X
    , q7 `- S3 h& p: {& B9 g% W
  985. INX+ v7 y5 ]) t* [8 @( Q
  986. LDA #$08
    % d3 L2 A! O3 X6 v& j4 E& r+ m  |) R
  987. STA PPU_Addr,X: a2 V8 g, ^5 n3 f. T' z+ q! k
  988. INX- p9 x. z' F5 O
  989. RTS0 C/ @5 v4 K! B% c  Z
  990. ! i- G5 o) \3 c- E  O% P  ^$ E
  991. .ENDIF
    ) ?% ]+ r  d8 I" w
  992.   P+ y1 t( ?( \8 ]9 L
  993. ;==============================
    0 h8 ~  `+ ]8 {6 }
  994. PPU_MODE_CNT_LINE         = $FA    ;行计数写入3 {' _: l9 Q. V; h8 f% I
  995. PPU_MODE_CNT_LINE_NEXT    = $FB    ;转下行计数模式" O6 {% x4 @% z: [9 ^
  996. PPU_MODE_CNT_CLEAR        = $FC    ;行计数清除& V: j5 e% p/ F" p- P
  997. ;------------------------------
    $ u& T5 w6 m  V
  998. ;PPU处理; z7 r; V! I& M5 y. g+ J
  999. PPU_Proc
    / X6 O% {/ X/ D, |
  1000. LDX PPU_Cur2 \0 Q2 {7 v# f1 C- e4 D
  1001. LDA #$00
    % Q7 b: O. p# ~; R- t# q! d- ~; t
  1002. STA PPU_Cur
    2 H0 Y, A2 N& Q/ ]
  1003. STA PPU_Addr,X
    4 d! i; J5 h* ^
  1004. LDA PPU_Addr8 r6 p0 J* R! u9 k
  1005. BNE PPU_Proc_Beg" U, `0 D: w$ t6 n$ o# [9 Z, l$ I
  1006. PPU_Proc_Ret4 u1 t- b  C: b7 O8 T9 Z
  1007. RTS9 P) u: [& V. R- _

  1008. + C2 n) t8 E5 p/ `6 i7 Z" V
  1009. ;------------------------------
    : I. p9 U) d& y6 b* @( A6 D# G7 z
  1010. PPU_Mode_Return_Cnt  ;转下行模式
    " w. \: d9 R$ V# W: }
  1011. INX
    # r% [/ L9 C! G4 P( d/ i
  1012. LDA PPU_Addr_L
    ! }; v) |. A. H4 ?/ t
  1013. CLC
    ! y+ p5 k* @1 K
  1014. ADC #$20
      ]7 o( [: i% @; l. ]& q. y
  1015. STA PPU_Addr_L2 _( E3 F% U+ O) ^+ O8 i( [$ v/ @# a
  1016. BCC PPU_Mode_Return_Cnt_End
    3 x) e) h- q1 Y6 m' V6 A
  1017. INC PPU_Addr_H7 w' a% X7 r/ q- F' O* {8 R
  1018. PPU_Mode_Return_Cnt_End
    % H7 e' O9 P& U' l
  1019. LDA PPU_Addr_H
    # {- E9 d$ c) [2 u, b" p
  1020. STA PPU_ADDRESS
    . p5 N0 z3 f# T' I7 A5 C/ u
  1021. LDA PPU_Addr_L
    & r  G% ?( e7 j+ J& Z
  1022. STA PPU_ADDRESS8 u2 J& W7 E) q) v
  1023. LDA PPU_Addr,X
    * `" w0 m+ j' h3 z
  1024. TAY
      t* T6 V" G' Y0 f. B( P, \
  1025. PPU_Mode_Return_Cnt_Write4 E- ^& k  ~! p, \; z
  1026. INX
    : ^$ Q2 {' P8 s/ u+ o' [
  1027. LDA PPU_Addr,X+ A8 P( C  L1 X9 }) y  L
  1028. STA PPU_DATA
    7 p  R8 I! R4 e: J
  1029. DEY
    9 j& s/ s3 g. ~( E+ n! ^+ H! f2 p1 }
  1030. BNE PPU_Mode_Return_Cnt_Write
    8 ?+ [/ k' S% P% D4 |* b+ t
  1031. JMP PPU_Proc_End
    & \% D( |9 C+ W9 O2 Y% ]9 v

  1032. " ^# x3 e& ~5 I& }
  1033. ;------------------------------6 O+ W+ g% X$ Y' L
  1034. PPU_Proc_Beg  ;处理开始+ Y5 }/ d+ w5 w
  1035. LDX #$00  Q/ b& {9 s) M3 @; A! @- C
  1036. STX PPU_MASK
    4 n8 s, a7 K/ Q/ I; o
  1037. ;------------------------------! P6 q, A% @8 G1 a. Y  ~5 h0 f
  1038. PPU_Mode_Select  ;模式选择4 }2 Z& M% i! `$ o8 @+ M4 _
  1039. LDA PPU_Addr,X
    " I( a- I6 B9 j
  1040. CMP #PPU_MODE_CNT_CLEAR( p. r+ I% X% U- u# L
  1041. BEQ PPU_Proc_Clear1 R  Q; o. b' E4 ~5 d
  1042. CMP #PPU_MODE_CNT_LINE
    : n5 ?0 O9 |4 ~( ~: Z2 y* C
  1043. BEQ PPU_Proc_Cnt_Line' F% N  T0 h7 q0 u* r0 I
  1044. CMP #PPU_MODE_CNT_LINE_NEXT
    , I7 m) B# f  }6 Q5 t2 n
  1045. BEQ PPU_Mode_Return_Cnt5 f  I( P6 e/ J2 o! N# J
  1046. JMP PPU_Proc_End_Write1 g6 u( r! e6 [$ A' R. q
  1047. ;------------------------------3 x& V4 W( B1 s0 b6 K# q: `
  1048. PPU_Proc_End  ;单行写入结束
    3 w1 N; z( \5 x7 ?+ L* `( c! ^& a2 H
  1049. INX
    " d2 H( k/ O  c6 \
  1050. LDA PPU_Addr,X
    ( U0 n1 x+ ?& P2 T6 |2 v
  1051. BNE PPU_Mode_Select& X4 ~2 `7 L8 f$ L
  1052. STA PPU_Addr
    ! g9 Y. J/ ^+ |2 E" w$ Q
  1053. JSR Update_Palette_Color5 R3 `0 {; V* \0 e

  1054. . k$ y9 V+ j# r, }  g8 ~- T
  1055. PPU_Proc_End_Write
    ) y" r8 G- C9 p- j! A  U/ n8 p
  1056. LDA #$00
    * ]! b; ?9 o" a7 i
  1057. STA PPU_ADDRESS' ~6 n2 N' _. K2 }' {
  1058. STA PPU_ADDRESS3 c0 Y# m' h1 \( w( z  O( z
  1059. LDA <Text_Disable_Flag
    ' z$ L* [$ H2 b' I# P9 m
  1060. AND #(TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_RAM) ^ $FF
    4 [9 f. ~7 s. G" X- R9 v1 b4 L
  1061. STA <Text_Disable_Flag' Q4 r( J. r! G5 w6 F/ `* N
  1062. LDA #Scroll_X7 ?8 G3 b0 r, d. O( \
  1063. STA PPU_SCROLL
    / ~/ S4 e, F5 m! v4 J( H
  1064. LDA #Scroll_Y# z- s' B" v& p  R# L+ r' z
  1065. STA PPU_SCROLL
    8 t# |9 H' T! C' e
  1066. LDA Screen_State1 [) i1 a9 D4 J3 Z2 D
  1067. STA PPU_MASK1 g% U' `# x: @. Y
  1068. RTS
    ) p7 a. X" y2 V& [
  1069. 1 P& l" w1 w3 U8 v; v
  1070. PPU_Proc_Clear1 `2 z6 W$ J8 x6 {, a
  1071. INX
    4 P3 h" R/ h& h
  1072. LDA PPU_Addr,X6 z$ o5 r4 I& Z5 U, Y
  1073. STA PPU_ADDRESS
    ( |! u* I6 P$ l. T% m1 w. ~
  1074. INX6 X# ?8 o' M) T/ S/ E0 J
  1075. LDA PPU_Addr,X
    2 ~# }2 @4 ?. }) V; o9 f
  1076. STA PPU_ADDRESS
    $ F: j) T8 d+ E" ~+ l+ W' e7 E
  1077. INX
    ; {1 B" g5 i/ W1 ]3 s6 f- J/ t
  1078. LDY PPU_Addr,X; J& j) v3 c8 b! I1 P+ ^4 I3 ]  w
  1079. LDA #$00* \4 M9 Q. Z. }$ ]
  1080. PPU_Proc_Clear_Write
    ) Z1 P; G/ B) _1 z$ O$ o  [% B9 W7 Y
  1081. STA PPU_DATA8 Y: B3 q  A  ?( o6 M* |
  1082. DEY
    ! @8 ^% A5 G% k! {! I/ @# O
  1083. BNE PPU_Proc_Clear_Write
    & |0 {/ Q, q0 Q8 \: |7 t. {7 _5 h
  1084. JMP PPU_Proc_End
    , r% x. ^: y/ k7 {- b4 g2 Y, A
  1085. 1 s! _! [5 b" P! Q( \+ o
  1086. PPU_Proc_Cnt_Line+ e0 G' m7 u' F: O
  1087. INX4 \9 P( e2 T6 W- O' R, l* N$ Z
  1088. LDA PPU_Addr,X
    9 k4 a7 }5 v! H
  1089. STA PPU_Addr_H/ d& q5 [3 q  R- v5 u" n/ W! ]( ^% v
  1090. STA PPU_ADDRESS- y5 @* A/ Z7 @2 }0 S8 u
  1091. INX6 A; C# ~+ n2 M# g$ ^4 m3 }0 l
  1092. LDA PPU_Addr,X
    9 `3 M6 b# d9 {# R: s
  1093. STA PPU_Addr_L1 U" c, g2 E9 m; U8 X; u, X8 S9 p
  1094. STA PPU_ADDRESS
    7 F2 ]+ V: ?+ d6 b. ]  n0 }4 T) Q
  1095. INX# N4 ?" k7 |, y( F- x
  1096. LDY PPU_Addr,X
    ; K' e2 g. @% N( C: I
  1097. PPU_Proc_Cnt_Line_Write
    / v( a, q6 r' g4 a; i6 z$ E" a
  1098. INX# @, k5 a  e2 n+ K8 [" s$ u
  1099. LDA PPU_Addr,X
    0 J8 _& a5 h' h
  1100. STA PPU_DATA
      n7 Y& d" Z& P+ S5 }
  1101. DEY9 e+ i  m; @( e. L. \9 M
  1102. BNE PPU_Proc_Cnt_Line_Write
    % U6 Q# h4 W6 ?5 Y( j
  1103. JMP PPU_Proc_End
    / F" h1 i9 b3 a  @' K9 k5 d

  1104. 3 U1 x9 t! w) {! t5 l
  1105. ;==============================" [3 G6 q2 P9 C) v* L
  1106. HEX_To_Dec;十六进制转十进制1 r6 h- C2 M/ r
  1107. STA <HEX_Data& S+ l  ~, V) a$ g* y
  1108. PHA' Q) O+ B0 O# f$ L
  1109. TXA
    + m6 G5 k; M- M& F& Y
  1110. PHA/ C* \; h( \  ]& G2 m# O, J
  1111. LDX #$00
    ! k# v" F! ^# U' r, e1 U
  1112. LDA #$00
    2 h% z; {  L7 V/ E0 C* ~  U6 K
  1113. HEX_Cln1 R! Q; _9 o" }* R$ q+ b! v
  1114. STA <DEC_H,X
    ' C, t' C4 v! T+ T7 A1 C
  1115. INX
    0 N) T8 x: a$ ~: p  k
  1116. CPX #$03
    7 {" A" f1 j# u. f! u; ^$ L* L
  1117. BCC HEX_Cln
    1 z/ _# ?- F3 u, H& j
  1118. LDA <HEX_Data
    . ?* ?4 q/ }9 }: G# A
  1119. ;------------------------------" }. b2 @; w  u, X. ~
  1120. HEX_100( f0 H4 }( {: S# g9 ^$ H
  1121. CMP #100$ f7 N5 }& U* D) m# s( Z
  1122. BCC HEX_105 w: L  M0 K. M$ P3 J  X
  1123. SEC4 @$ F! r4 |: o
  1124. SBC #100) k) h1 ?, u* R+ p# y! L! L
  1125. INC <DEC_H
    6 x/ X/ B0 `5 ~0 k/ ^
  1126. BNE HEX_100: ^5 k/ ]2 P* ^! I7 T; J* ^
  1127. ;------------------------------
    ; c$ W) G, @$ n5 ^% C. K* n" i# B
  1128. HEX_105 u# y2 \/ c9 _9 u
  1129. CMP #10
    + F( U/ m- R" `2 T: k2 V/ I
  1130. BCC HEX_1
    8 t$ t6 `* e9 }
  1131. SEC. A9 p& ]" \% G6 i( X$ g
  1132. SBC #104 d- h' {% ~, {& |
  1133. INC <DEC_T* ]7 h7 B: \* o6 r
  1134. BNE HEX_10
    ) |; I9 g$ y! e9 q* c0 G
  1135. ;------------------------------4 |; F. O( @' _: C% Q
  1136. HEX_1, J6 }% s/ c" _$ E4 W! D# ~
  1137. STA <DEC_L
    " S8 G4 @7 U- {6 @8 F& O
  1138. PLA
    8 C2 ^( i% d/ \. G, ?
  1139. TAX
    + O/ k4 u3 ~, ?4 i4 V8 @" k% F- P
  1140. PLA
    5 ~/ v( J& L/ R. P# [( {
  1141. RTS* q' J% i+ L7 g( |$ y7 Y

  1142. & k; _$ f7 {2 `1 M
  1143. ;==============================6 e5 J9 X+ {/ \0 `+ O: N
  1144. ;音乐曲目显示
    7 r% E# A& d. @5 s
  1145. Music_Show
      p8 {. y8 u" a/ `% r5 ^/ B# Z: }
  1146. LDX <Music_Item_Cur
    ) X1 k; V/ j" H, G" v! W
  1147. LDA <Music_Cur,X
    3 w/ t3 r* T$ M) p4 o
  1148. CLC. a8 I* K  O! K# G" l( k: Z. e
  1149. ADC #$018 Q/ U$ l/ b; n
  1150. JSR HEX_To_Dec
    ( R- o( Y/ s! t' e6 Y5 l& l1 q
  1151. LDX PPU_Cur, p1 n, T( f  q) J+ u+ q/ ^
  1152. LDA #PPU_MODE_CNT_LINE4 ?& O4 Y2 c  I5 Y9 B3 ~. ~
  1153. STA PPU_Addr,X
    % C8 V" ~+ U! ?4 {* J
  1154. INX
    3 M% D$ A4 x) j1 e9 U; s) p6 S
  1155. LDA #HIGH(Play_Index_Pos)3 g. P) T& p* A1 i0 P7 `
  1156. STA PPU_Addr,X
    ) O$ \! }  C  v. q+ W
  1157. INX$ Q% y6 e7 P7 Q, g' ~( p
  1158. LDA #LOW(Play_Index_Pos)
    0 ^- @& y3 r! @+ w* R
  1159. STA PPU_Addr,X
    3 T% X9 U/ w0 |
  1160. INX
    & F2 J& A" e4 f! j; B
  1161. - j- u4 {; q' \- _6 Z! V6 D9 U! D
  1162. LDA #$07
    7 I4 F6 f5 r' f8 W
  1163. BNE Music_Show_Length
    ! I  r$ [/ {8 J6 T8 I  g, ^% P
  1164. 7 k+ Y/ W: L6 `$ |) w; h
  1165. Music_Show_Length
    " ]' ~' V: M2 b0 m& _5 o# f" n  K
  1166. STA PPU_Addr,X
    : a% Z5 A- [" z8 k$ o. m
  1167. INX) ^" h% M9 ^8 W+ k0 N" K

  1168. - c5 Z( N/ R; C+ i" o" ]  x
  1169. LDA <DEC_H2 v1 V8 Q& `+ b5 Y  D. s3 G
  1170. ORA #'0'
    * Y+ {$ f, ]- S
  1171. STA PPU_Addr,X7 J- n3 x  J0 c& [
  1172. INX" [6 c6 u" i/ ~7 r5 K: M  X' ^
  1173.   E; Q  J: \7 U6 \9 P  P# Y
  1174. LDA <DEC_T
    & E& `, ~; P+ R5 [; p; N) @0 _
  1175. ORA #'0'
    % ^/ n  v$ h- [. L8 I3 P* S
  1176. STA PPU_Addr,X6 Z1 k2 g! `: V+ w  s5 G
  1177. INX% C8 {5 F$ M& D" G
  1178. / x7 x# |, |" @; A7 U
  1179. LDA <DEC_L7 O  A* f2 E( h
  1180. ORA #'0'0 j! t2 s0 a* @* M- a( h+ k1 y
  1181. STA PPU_Addr,X
    1 P( ^- w( c4 a8 g9 Q' y
  1182. INX0 l2 e$ h2 y  J3 L$ U$ M
  1183.   `+ Q7 ]4 m  f$ Y# X: n  ]6 ]: ]- B+ K
  1184. LDA #'/'
    ) F9 S) a/ A1 U; _  e
  1185. STA PPU_Addr,X
    3 g, U9 L" y  k. M* I$ `
  1186. INX) u/ _; ?5 D/ P8 M
  1187. Music_Show_Total8 \- W7 v* S2 S" ~
  1188. LDA Music_Total
    , J& I$ d; K6 G; P3 W, |9 l) w
  1189. CLC8 D2 |! |3 K- R
  1190. ADC #$01
    ( R3 s) D, S8 Q% U5 b4 F6 D
  1191. JSR HEX_To_Dec
      f2 ^( E4 s6 a' y

  1192. 9 y+ q( G. S. b7 s
  1193. LDA <DEC_H
    ' V+ z9 G! K- j
  1194. ORA #'0'
    & L. {8 W% x- B/ i
  1195. STA PPU_Addr,X' u3 c, U. U) |$ I( |' S* ?- O' y
  1196. INX) m* J  c1 q, M5 \
  1197. 1 B7 M( c* k' c- w3 K* H
  1198. LDA <DEC_T
    ! t3 N) h/ L1 u5 |
  1199. ORA #'0'' w  P$ i% O9 o% O; U% n. v
  1200. STA PPU_Addr,X
    ; x4 n1 C1 W- C
  1201. INX0 Z! n  D* k. S8 ^0 q- m

  1202. ' x& }- q. X3 A4 O5 s+ o
  1203. LDA <DEC_L
    1 w; I8 t, l. y$ p4 s; s
  1204. ORA #'0'
    ! p; r" J% K8 Q, n; A9 x0 ]
  1205. STA PPU_Addr,X
    * Q' z6 L% g8 v2 }' y8 d3 k
  1206. INX
    ! g8 h+ {* v6 ^% s) f9 ?- y
  1207. " {1 e$ T& R+ E/ e6 F8 ~* v9 H
  1208. STX PPU_Cur
    * S6 b) y7 n0 T, n, R& I) _5 m  M- t
  1209. Music_Show_End0 q* N( g: G( [6 ^( D/ ~
  1210. RTS3 P# S% }. ]+ s9 E9 r
  1211. 6 y# `* r$ o7 }/ d2 x
  1212. ;==============================( G/ a1 K2 m6 l4 {! c
  1213. Time_Show;播放时间显示
    ( H5 K8 ]" |% R1 k6 C! b
  1214. LDA <Text_Disable_Flag0 a' E7 `0 C( m  k* ?; g
  1215. AND #TEXT_DISABLE_ITEM  r2 J. `; |/ d
  1216. BNE Time_Show_End
    7 L. ^3 \1 ~8 g
  1217. AND #TEXT_DISABLE_TIME
    * j+ I8 c7 \* C
  1218. BNE Time_Show_Enable
    ) h1 ~% m: Y6 E6 ]0 b, ^' t
  1219. 4 a- _" [$ L/ _6 }
  1220. LDX PPU_Cur2 j9 q8 n0 V) j# V- i/ v3 {
  1221. LDA #PPU_MODE_CNT_LINE
    0 h+ ^, w9 p2 m) E2 i: J9 x- D
  1222. STA PPU_Addr,X6 q2 p6 C% P! ~
  1223. INX
    ! s) |6 v- P& x% G* v  ]
  1224. LDA #HIGH(Play_Time_Pos)
    3 x+ l/ H, {% x
  1225. STA PPU_Addr,X
    , W  M/ D! U# x! o% _8 o
  1226. INX
    3 X3 J: d( [/ ?3 D
  1227. LDA #LOW(Play_Time_Pos)4 B3 D) W, Z( a9 v2 h$ [% o
  1228. STA PPU_Addr,X- S; G, [$ j* U  Y, s
  1229. INX
    ! [4 r) r. ~$ \, W! u" f1 ]' x
  1230. LDA #$08
    ! a  R3 P5 {  ]) {) r7 J2 |# N
  1231. STA PPU_Addr,X
    ) |/ s2 L; L# r9 l5 A
  1232. INX4 A% M$ `  F: k0 `
  1233. Time_Show_H1 ?: _' P; p" T: p4 I" W1 P9 ^
  1234. LDA <Time_H6 C) ]; s9 N$ \7 J3 |& r6 }
  1235. JSR HEX_To_Dec
    $ ~0 y; b+ I  n: ^, s4 K
  1236. JSR Time_Digit7 {- ~8 m$ h# [# {3 p- g) ]
  1237. LDA #':'
    ) D2 w( [, n. o. ]
  1238. STA PPU_Addr,X1 v6 Y) g1 X& G3 {# j. D) w1 H
  1239. INX4 l- C- s5 p  q: r9 M/ j6 x# C
  1240. Time_Show_M
    % I% n3 V/ c7 `
  1241. LDA <Time_M9 w, c( ?% q; m
  1242. JSR HEX_To_Dec
    : w* m1 T5 x" ~! C. }: @
  1243. JSR Time_Digit$ i% L- G1 G. x3 |% N
  1244. LDA #':'
    2 c, W. V" P/ g' B
  1245. STA PPU_Addr,X  }* V' G/ D7 ?4 X7 Z( K
  1246. INX
    2 d- L# N+ h3 l  f
  1247. Time_Show_S  @1 u& R. a  R" g% N9 R9 L
  1248. LDA <Time_S, X+ |- w1 L- i2 m* }5 L$ Z
  1249. JSR HEX_To_Dec
    3 }6 R+ [7 R! l  C4 f. Y* C6 ~
  1250. JSR Time_Digit
    9 x7 T) r& ]- |3 P$ I. Y$ H
  1251. STX PPU_Cur) W( ~' V: \. I& Q9 D" q
  1252. Time_Show_Enable; C1 O: h0 L! d6 q1 Q( C/ H9 X
  1253. LDA <Text_Disable_Flag+ P6 N# s: U6 Z/ z
  1254. AND #TEXT_DISABLE_TIME ^ $FF& I6 g0 K6 A' S, \, R
  1255. STA <Text_Disable_Flag! K- B- ?, R) w; C
  1256. Time_Show_End
    9 z0 W; `; X) ^( |, f$ O/ P! H0 w
  1257. RTS
    & H# g7 ~9 N1 i& H7 R/ D
  1258. , |7 d5 y2 o. g- A$ i; f
  1259. Time_Digit! v, M# b+ C! V2 r
  1260. LDA <DEC_T# M% X1 ]2 w4 Q8 n- A
  1261. ORA #'0'
    " D* B6 Z& Z- B6 p9 ~% `- h% K- z/ i
  1262. STA PPU_Addr,X
    3 ?' F# X& l5 w/ s1 ^9 i: \
  1263. INX
    5 N+ D/ @" c- \; T* k6 X
  1264. LDA <DEC_L) B) K0 b. m4 S% D0 U: [
  1265. ORA #'0'- G& d! o2 c& K3 W, d) q' h
  1266. STA PPU_Addr,X" |* x! s. a7 L8 I5 \
  1267. INX$ q. c( y% j# s) r. {
  1268. RTS
    ! z0 R( ~4 D% v

  1269.   s' D* a+ [7 R" c7 n3 @
  1270. ;==============================
    ) t8 E7 u2 ^0 p9 b9 y, b& ^) c
  1271. Time_Count;计时
    * G, i1 O! \8 j) L: G$ V
  1272. LDA <Music_Stop_State
      o/ V: e( B) o: m: j; G# c' Z8 s
  1273. ORA <Time_Wait_Cnt, `( z0 p' b3 {  G& T: C5 r
  1274. BNE Time_Count_End! k! e  t$ u2 k3 ?* ~1 H$ ~
  1275. INC <Time_Cnt
    , D2 d. h' D) N' s6 S
  1276. LDA <Time_Cnt
    8 E# a3 I2 g" h& _( g
  1277. CMP #60
    ; S8 S0 G0 V. n( a/ ]' T1 f$ V
  1278. BCC Time_Count_End
    ! T% X4 Y( m$ P4 w$ |) o% ^
  1279. LDA #005 n+ E% R0 o6 e9 d$ \
  1280. STA <Time_Cnt+ \1 @$ N/ j# k" `% x8 ^/ u
  1281. INC <Time_S1 K% Z7 d9 v$ g* u( d
  1282. 2 W: f; O4 t$ x# s8 S9 y
  1283. Time_S_Cnt
    ( d3 ^- T9 s! |! s. K# `- T& e
  1284. LDA <Time_S7 n. l4 Q+ |  y, P; N- `4 R
  1285. CMP #60
    / n$ |6 f. g# T8 i) m# I. H
  1286. BCC Time_Count_End
    . o9 C9 Q& U( x' A8 r4 p) Y
  1287. LDA #00
    % V# C9 A; U5 M* {- Q) |1 o
  1288. STA <Time_S
    6 [7 A' @2 o$ e( s; K$ M8 |/ l
  1289. INC <Time_M1 l; m1 K8 G  m7 i' u0 A

  1290. ( p6 Q9 ]8 ~0 F# ]. M5 q9 V
  1291. Time_M_Cnt
    . u9 D" M* v/ A/ Y) S) C0 ~
  1292. LDA <Time_M
    * x( i9 o. Y5 ]# E: T+ K
  1293. CMP #60& i/ P8 ?1 }. h
  1294. BCC Time_Count_End
    6 `* `, M$ h5 w9 N
  1295. LDA #009 v0 O" o% Z6 g1 h
  1296. STA <Time_M
    - m) h" z9 ?" h: J" c- J6 N
  1297. INC <Time_H2 d5 F5 Y1 w) d: P0 r

  1298. # z; D+ ]( u! ], D! ]
  1299. Time_H_Cnt
    ) L# s; R8 Y7 l( R0 [, E( q
  1300. LDA <Time_H. o( e# s2 h( o# ]
  1301. CMP #246 N2 V2 p7 e- F, X
  1302. BCC Time_Count_End
    6 O4 |8 E) p4 r. v: q( D
  1303. LDA #00( c2 q6 c. }2 g# t9 @
  1304. STA <Time_H
    7 X; z/ ]( Q* i# J: G8 S+ j; D

  1305. * d* i; z; a% u' R
  1306. Time_Count_End2 |( [, n- W! `8 H  T
  1307. RTS/ l4 A( A! Y1 N% K0 N  m
  1308. 8 m. R/ z* V1 e  q
  1309. ;==============================& W; f# U4 E  L9 ], h
  1310. Time_ReSet;播放时间重置
    # }* l5 F' _9 D- |
  1311. LDA #$00
    4 F6 G2 y2 r& _- e6 v6 \5 E9 m8 F
  1312. STA <Time_S
    9 q& c! z) u, V2 j
  1313. STA <Time_M
    ! W& O' x5 `8 @4 i- r. N
  1314. STA <Time_H4 m0 ?9 D& N7 ?" k
  1315. STA <Time_Cnt) X; ?+ |% R" G1 H0 [' \
  1316. RTS
    0 Y- `% [& q& x7 @, g
  1317. 6 ~/ q& o. I$ B( Z# d
  1318. ;==============================
    / X; I. a: c3 s8 ^+ V# u
  1319. Music_Bar_ReSet;音乐条重置2 Q0 x: D; T& C7 p
  1320. LDA #$00
    3 P) H4 A; C$ O. W6 V' J
  1321. LDX #$00- D7 Z/ E- w. j' A5 I* q0 N
  1322. Music_Bar_ReSet_Set, k( f# N+ O- [9 a
  1323. STA Sound_Bar,X# c& Q$ N$ i1 g6 ?5 T
  1324. INX$ d: @, r3 S" i6 h
  1325. CPX #$10
    % h2 U8 M+ a  O2 e6 K
  1326. BCC Music_Bar_ReSet_Set% u6 `& |, ~* J" h7 z/ y9 a3 ^
  1327. RTS. W# {5 S: [3 d+ ]! m+ b

  1328. ) @8 P% [1 D; ~& e1 E5 |2 l9 y. F8 A8 k
  1329. ;==============================2 H+ K% K) d" A& M# Z
  1330. PPU_Data;PPU数据写入* R8 G0 v4 T8 }7 O/ Q7 \3 q
  1331. STY <Data_L
    ) \4 V" ~; n- R3 x" [6 Z
  1332. STX <Data_H, _; ^- o+ h, k% o$ Y* O$ S
  1333. LDY #$FF9 q+ J5 X6 V, N* Y7 W
  1334. LDX PPU_Cur
    + G! K7 u8 v, |' k' S. W
  1335. DEX* E& k. T0 F( L+ q' ]
  1336. PPU_Data_Beg8 X; x, i2 [0 @
  1337. INX$ _/ Y8 V/ T  k$ C8 `+ f  _
  1338. INY$ j+ N9 J" S) Q0 }
  1339. LDA [Data_L],Y; G+ b: _* h; x" F+ c. s
  1340. STA PPU_Addr,X7 k" p; `% e9 G
  1341. BNE PPU_Data_Beg
    % P- L+ d5 V6 m7 M
  1342. STX PPU_Cur
    8 X2 D& [1 {4 a+ z
  1343. PPU_Data_End, a' [$ ?& ~; G* p) p# F
  1344. RTS
    4 M2 x8 n6 O3 P

  1345. ) M( ?( L9 {$ ?! _
  1346. ;==============================- M, _8 u) E$ ~9 m5 S; U( k
  1347. Music_State_Show;播放状态显示
    3 a# O: R& N% u4 {9 ?5 Z, V
  1348. LDA <Music_Stop_State
    5 u+ r) K1 x( v$ ?# j+ {
  1349. BEQ Music_State_Show_Play
    % m% V+ d; I& t8 r8 d! R
  1350. Music_State_Show_Stop
    / Z# A! q% X# ^5 P3 e/ J$ S
  1351. LDY #LOW(Music_State_Stop)# t  D! z4 Q9 L& q% C9 g9 G) G
  1352. LDX #HIGH(Music_State_Stop)
    4 C5 _. k5 w& {( |5 {, W! K
  1353. JSR PPU_Data! h/ t! W9 y6 X$ Y: g9 \$ H# I
  1354. RTS
    3 Y# Z7 g) X. r8 T
  1355. Music_State_Show_Play) V1 i- A3 b  Q( P& P+ A
  1356. LDY #LOW(Music_State_Play)5 V) H' F8 h  k/ |8 j) _
  1357. LDX #HIGH(Music_State_Play)
    ; O" V% s! ^( }6 a, W
  1358. JSR PPU_Data
    6 b; `. u! u1 J4 c
  1359. RTS
    : V  F2 n. ~8 O9 C2 \, k+ F
  1360.   V5 p' {% }4 P  g3 J: }
  1361. .IF SOUND_BAR_SHOW_ENABLE+ L' g, E- X  F5 K* J' f& Z
  1362. ;==============================0 m) D* a0 i3 b0 t) r/ f4 ?
  1363. Sound_Bar_Text_Set;标题与音乐条初始化& J7 x6 ^/ r. g* {7 x) C6 L' b
  1364. LDY #LOW(Sound_Bar_Text_Data)
    ' Y1 s; g0 s: Z3 H+ P5 R1 B+ E# S
  1365. LDX #HIGH(Sound_Bar_Text_Data); T$ R- I# r* o- L
  1366. JSR PPU_Data
    ( B5 E) M" ]. ~7 J
  1367. RTS) o3 s5 p0 u, n( O

  1368. 7 f; x& C6 N5 Q/ k( Z$ C
  1369. .ENDIF* B. s' n: H$ S
  1370. / M$ Q( O  X8 {( g' H) Y
  1371. ;==============================) k7 g+ v: j+ U/ e* C
  1372. Set_NameTable_Attributes;设置命名表属性" R% c" u# o/ z& l$ T( S& h: `
  1373. BIT PPU_STATUS
    5 b8 @! Y9 [  u2 g
  1374. LDA #$237 V7 J: L* _  c! P- l& g/ O
  1375. STA PPU_ADDRESS
    $ \$ k7 P, x' P/ S7 x) u
  1376. LDA #$C0
    9 S9 o: q  d4 p( ]! J; N8 x! I2 ]/ X
  1377. STA PPU_ADDRESS* J1 ^7 L- f/ b! K
  1378. LDX #$00
    . l+ x4 P2 ^# X" q9 g& r# P
  1379. Set_NameTable_Attributes_Write
    6 s+ p: g* h! X' o
  1380. LDA Palette_Attributes,X, Q0 I1 [, h1 H$ x1 j
  1381. STA PPU_DATA
    + L. t4 g8 S1 A. F) V" `$ K
  1382. INX) D$ p# [. P8 j0 \+ G  Q
  1383. CPX #$40
    : f# |2 W- i! K- `+ p5 g4 ^
  1384. BCC Set_NameTable_Attributes_Write1 Q. _( S4 f$ ?; p8 R! z
  1385. RTS6 U8 E- |" @* P  S2 ]( g( [1 I

  1386. 4 x5 d2 X4 L8 }7 V
  1387. ;==============================
    $ z! f0 B1 `3 W  }, v
  1388. Set_Palette_Color;设置调色板数据
    : a* J& A: ?; b
  1389. BIT PPU_STATUS" l- K7 s  ~1 v6 v1 s4 Y0 l8 @
  1390. LDA #$3F
    6 [, T# n9 Z4 U5 ?
  1391. STA PPU_ADDRESS
    0 Y7 u  \. X8 [- G) P
  1392. LDA #$00
    . e; ]1 ~" i" P5 C) K
  1393. STA PPU_ADDRESS
    * M9 U6 C% |: o) }: L6 R; c) R
  1394. LDX #$00
    # N* ^% B# e" L) T; `
  1395. Set_Palette_Color_Write
    / u3 y& J0 I. W/ F
  1396. LDA Palette_Data,X
    1 H' T: Y) C* h8 x- z
  1397. STA PPU_DATA. U% p7 S5 I; q5 o' G5 i4 O
  1398. INX7 l7 @* o% g/ u
  1399. CPX #$20  z8 b- Y1 A8 i: e$ Q
  1400. BCC Set_Palette_Color_Write
    : O, \( h$ j1 Z2 Y. @
  1401. RTS
    / M( }+ \6 x( Y% @2 j/ C0 g: ^& o
  1402. , q" q* t8 o; D3 o" m
  1403. ;==============================
    : {0 V- A/ k) @" @8 i* }, \  t
  1404. Init_Palette_Addr;初始化调色板数据
    7 {" w2 B: [7 k: W  Q
  1405. LDX #$005 ~" z+ O3 Y4 y! x
  1406. Init_Palette_Addr_Write+ b6 o  w0 D9 u2 {3 a
  1407. LDA Palette_Data,X
    6 N6 _6 P2 Q4 L  |7 I. c
  1408. STA Palette_Addr,X+ f' b) w' o& |" [# Y1 Y
  1409. INX" ^( Z! N% L+ Y
  1410. CPX #$203 H8 d, R7 P# r6 D. n$ s$ ?1 p
  1411. BCC Init_Palette_Addr_Write
    : Y: q5 s3 D1 V  u( j. R8 S5 }: i) G
  1412. RTS
    - w& F, T/ V" r  a* ]

  1413.   a' b, r2 {$ w2 |. ?
  1414. ;==============================/ W) Y- K, L; d
  1415. Update_Palette_Color;更新调色板颜色' }4 I4 H4 R! |
  1416. LDA <Palette_Update_Flag
    7 i: R7 y1 J6 b$ i! f& F7 e
  1417. BEQ Update_Palette_Color_End
      Y/ r. w8 F$ c
  1418. LDA #$3F% ~/ k' O+ V$ p9 M  ~; q* U
  1419. STA PPU_ADDRESS( h6 O! |' m( Z: H! I! H# s" L- `8 j8 {
  1420. LDA #$0C0 Y+ |& ~* s5 M
  1421. STA PPU_ADDRESS; f: F) L* f+ I: a/ B0 _& q
  1422. LDX #$0C. W. S! Y. [" j1 j+ M
  1423. Update_Palette_Color_Write
    - b4 b  Y/ N3 \0 r3 ]
  1424. LDA Palette_Addr,X
    & H3 Q+ \. {: e% C# |2 L. `
  1425. STA PPU_DATA
    0 Y1 Y+ m8 v$ }* [7 z' o5 ?
  1426. INX( t! }5 B: G# A" n# Z! x  P$ c" z
  1427. CPX #$14; [- y, k. I, W* ]& |
  1428. BCC Update_Palette_Color_Write
    & v0 w9 d5 E% i% B9 j+ r7 A2 H
  1429. LDA #$00
    # p: F& e8 x0 I) w4 L% e. Y# `$ I) M
  1430. STA <Palette_Update_Flag/ c  b$ B  F1 R8 S
  1431. Update_Palette_Color_End; K# _4 g% Q" ?* z6 b0 z( i
  1432. RTS3 Q! V5 x8 U5 e3 L( o1 i
  1433. ) l6 u' g3 e$ l! Y; G& F9 R
  1434. & h, k$ m! w, ?) j. ]
  1435. Update_Sprite_Palette_Data
    9 [. a& i$ V1 r$ M6 t9 Q- G
  1436. .DB $21; W" U1 C1 A' q/ v2 t2 r- D
  1437. .DB $21- ^7 }) G! O. E& e+ h+ X+ }
  1438. .DB $11
    5 Z7 c' D+ \) m3 x
  1439. .DB $01
    1 G% Y: o5 {% t2 F) m  c
  1440. .DB $017 r# a5 h! d) w7 F; |
  1441. .DB $11
    " a, @  \* N% Z) i' Q( d# R
  1442. .DB $21! U1 I0 u5 e. y* G+ k- B+ L
  1443. .DB $21
    ) X; M& E8 }3 Y$ n, ~! n
  1444. .DB $11
    4 D% H' N: m; R3 X% ?
  1445. .DB $01
    0 b- W* f9 F) U) B) ~! {# S0 ^
  1446. .DB $11& _6 I: [5 {0 {4 _: d% M$ ~
  1447. .DB $21
    $ z% r/ {9 ?/ ^( F8 }
  1448. .DB $21" {/ J9 W- c/ g  f3 ]  i: D' V
  1449. .DB $118 F0 V' A# i6 f
  1450. .DB $01( d" E( ]# F6 }- x
  1451. .DB $119 l9 n* r. M# Q# x0 Q
  1452. ;==============================
    / G- l2 O2 c$ n
  1453. Update_Palette_Data;更新调色板数据
    / ~: v; E2 R) o5 j2 W" e
  1454. LDA Nmi_Time_Count: I+ Y1 h3 y4 J/ L8 Z' E
  1455. AND #$08
    ! H% w% @; j5 D/ N2 [7 l
  1456. CMP #$08
    1 O4 H; Z. {7 ~3 \) z
  1457. BNE Update_Bkg_Palette_Data4 Q& l/ W  B% h' ]

  1458. + Y9 m) k* ~8 W" V/ d2 o* ]( A
  1459. Update_Sprite_Palette_Data_Set( H: v8 x- h4 x9 c  Q; b+ f4 A
  1460. LDA Nmi_Time_Count+ M8 {4 i1 A+ O" {8 V8 w, M, M
  1461. LSR A- \6 p  `3 B! |4 v( I1 y" E
  1462. LSR A
    ! M7 K% @8 W# w* n
  1463. LSR A
    " |  z4 G: P, V4 b/ R
  1464. LSR A
    / F  |" y2 h- _* m  C
  1465. AND #$0F+ I' r* m: a( s: y& u/ D& H: I
  1466. TAX5 x. b6 z5 H5 U( w" R
  1467. LDA Update_Sprite_Palette_Data,X
    2 r  e& p# t' C! \
  1468. STA Sprite_Palette_Update_Addr% o' x  V& b. ~6 m: H, u; ^% s$ V- o
  1469. LDA #$01
    " b- g0 }7 N0 s- U& e9 F/ n
  1470. STA <Palette_Update_Flag' ~/ _5 t- ]1 }/ M' \. B

  1471. 7 n) t) u+ M5 ~9 j! O
  1472. Update_Bkg_Palette_Data9 w3 ?5 t. p! v# N$ K
  1473. LDA <Text_Disable_Flag
    . }; Y. ^0 ?" l3 @! B3 F* _! m$ n1 C
  1474. AND #TEXT_DISABLE_RAM
    5 X8 y0 `" U- N/ x
  1475. BNE Update_Palette_Data_End
    : J. {9 b( k5 |' m; G# d) ?
  1476. LDA <Music_Stop_State
    - G5 n4 }( ?2 C
  1477. BNE Update_Palette_Data_End
    ! @3 c9 U1 u$ r1 n) u

  1478. - y/ H3 i4 N9 _2 g4 x9 Q
  1479. Update_Palette_Data_Check- ^2 ?0 v2 K" f( f7 a
  1480. LDA Palette_Wait_Cnt8 I# e1 T7 {1 [4 X8 M
  1481. BPL Update_Palette_Data_Check_Over! t. r; ?0 T2 Q- ~/ V9 l
  1482. LDA #PALETTE_UPDATE_INTERVAL
    ! e. H1 @% `$ ?7 _, }
  1483. STA Palette_Wait_Cnt
    ( N1 p; j; O2 m$ G  Z/ U( |
  1484. Update_Palette_Data_Check_Over
    8 q/ y! a9 g9 ~- i, |5 f1 H
  1485. DEC Palette_Wait_Cnt" Z- j5 M8 n6 J
  1486. BNE Update_Palette_Data_End
    4 k3 o- n6 e" {6 {# b" A) o
  1487. ; U# b. D% q4 _* e/ k
  1488. LDA <Text_Disable_Flag" v& B" u; I% \# A% z3 W, ]
  1489. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME: a& j3 i( `/ z4 m+ e  |8 J$ [: B
  1490. STA Text_Disable_Flag
    + |$ F7 A2 h3 c* }1 t' L( F3 d/ T
  1491. INC Palette_Update_Flag3 Y7 ~7 e7 @: v8 o) K2 p
  1492. 1 j3 u) G6 ^: O- X  t5 Z
  1493. LDA #PALETTE_UPDATE_INTERVAL
    ! H6 R( ^  x7 E9 H1 t$ U! I
  1494. STA Palette_Wait_Cnt
      W$ h3 o3 R% z# H$ J0 v
  1495. * K+ i  A5 x/ p. e
  1496. LDA Bkg_Palette_Update_Addr3 @& O5 ^6 t! b( D' O1 l# k) e
  1497. CMP #PALETTE_UPDATE_MAX/ J5 h% R$ @: q
  1498. BNE Update_Bkg_Palette_Data_Set
    : N) P1 K' t: U3 W  n, C* z
  1499. LDA #PALETTE_UPDATE_MIN - 1
    3 b+ V7 L) l, \; ^8 y* Q
  1500. STA Bkg_Palette_Update_Addr) `3 o" d3 v1 y1 y: m9 q$ L
  1501. Update_Bkg_Palette_Data_Set
    3 E) o2 m4 h7 K, X4 S% _
  1502. INC Bkg_Palette_Update_Addr9 k  ?! z8 }" t

  1503. $ z3 \) I: p4 R$ Y4 L9 \& r* T
  1504. Update_Palette_Data_End
    & r: l3 Y# e! M0 |% I, l, D6 J: N
  1505. RTS' G  @9 [$ ^3 r& A1 Z
  1506. 0 G/ C5 X7 @  A! i
  1507. ;==============================
    8 u" e3 V/ w' A5 G0 X8 d
  1508. Show_Music_Text;显示静态文本% ]% S" I" |. g
  1509. LDX #$00
    # {* u0 b: W% r/ }9 E
  1510. Show_Music_Text_Set
    7 t) F- g& u4 q) @1 S2 [
  1511. LDA Static_Text_Data,X' @  n3 O3 z. U: u" P( p! X
  1512. STA <Data_L
    . z6 R6 a  [2 R
  1513. INX
    5 D4 H2 Q! l% p. A& J# _, N
  1514. LDA Static_Text_Data,X$ C! {+ p% R+ y2 D8 Q0 d) K$ Q
  1515. STA <Data_H
    : h" T: J# C4 A/ l8 [) y1 v
  1516. INX
    " t! X: j" G* j9 ^3 ]8 f! [
  1517. LDY #$00
    " n) p0 E9 Y* Z' R! D  _  q
  1518. LDA [Data_L],Y
    * e, Z2 c9 J: w, _! b* w+ h
  1519. STA <Data_Cnt
    7 W. C/ q7 w. @( P0 k, R
  1520. DEX# y$ f1 _3 P8 J5 ~
  1521. DEX5 R7 P7 M! t" B1 ^1 R% v
  1522. LDA Static_Text_Pos,X8 V: r7 O) O7 c& W7 @
  1523. STA PPU_ADDRESS
    / q8 k( k) F; {5 [- h. T4 e: h3 Q
  1524. INX
    7 _  X1 b0 C: K$ [
  1525. LDA #$20
    " V. S+ z& t5 `0 w' R1 @
  1526. SEC
      ?/ e( I; O* Y* z  O  o3 d
  1527. SBC <Data_Cnt7 J; q8 n5 D2 b! X9 Y* G. F
  1528. LSR A2 y) b6 u/ i2 u) C4 x" P) r/ H
  1529. STA <Data_Buf0 M6 P/ `4 C- J: G, \% x% q2 b5 C
  1530. LDA Static_Text_Pos,X
    % q, B2 m( b7 w6 `2 Q4 m$ M
  1531. AND #$E0) [; f' d7 E2 |2 D
  1532. CLC
    # U& |/ _  f8 F+ B7 W
  1533. ADC <Data_Buf- q. ]% B8 X" V; M+ V+ y8 E
  1534. STA PPU_ADDRESS! T( |  \$ d9 }
  1535. INX( l2 R1 n; o6 d9 d
  1536. Show_Music_Text_Set_Write" l3 k4 v( G5 s( e+ a/ g
  1537. INY
    ; L/ Y3 |7 ~" n( \
  1538. LDA [Data_L],Y
    * K3 d6 U, O! A
  1539. STA PPU_DATA& R: Y* [# q- [, r" _% M
  1540. DEC <Data_Cnt
    ! E! {  L# C8 T: q
  1541. BNE Show_Music_Text_Set_Write
    1 M) Q! w- h" h! c# K
  1542. CPX #Static_Text_Pos_End - Static_Text_Pos
    ) B' b: n' W6 A, A% @9 u/ K0 k. ?
  1543. BCC Show_Music_Text_Set
    & Q" K9 Q/ E, X( N/ P% x  p! B; B. x+ H
  1544. RTS6 T; j, Z# }: j- w) G

  1545. 0 r$ t; ?5 |) C6 i& s7 K/ J1 k) f
  1546. ;==============================3 w5 k" H2 Q# ?8 B3 F$ l& l
  1547. .IF Track_Name_Pos;显示曲目信息
    6 N/ l( N; x' N/ C

  1548. : |7 j: ]# d1 t' X
  1549. Clear_Track_Info. _0 Q" h+ S3 [
  1550. PHA
    + _) T' Z, w% T" L7 M& l
  1551. LDX <Music_Item_Cur8 V9 ^( G( N3 R3 o$ D. @
  1552. LDA Track_Name_Addr_Flag,X
    0 s$ j& D3 Y$ T) y
  1553. BEQ Clear_Track_Info_End_Ex
    ! ]5 e: L: y, V; A: ]; E4 Q3 b
  1554. PLA* w" a! z9 _  W" {
  1555. ( O7 q6 l* s9 {* P2 \% c; W" g
  1556. LDX PPU_Cur
    5 L) n5 C* A- T0 V
  1557. PHA
    " G  L, y- N% z& z# `" b
  1558. LDA #PPU_MODE_CNT_CLEAR3 g6 A* S7 K0 B' g# k% g% m
  1559. STA PPU_Addr,X/ u* k2 f) S" B, n. n
  1560. INX
    6 M) N$ h  c3 |3 n: M& B! Q
  1561. PLA3 c5 s9 {( p/ @9 M& H
  1562. JSR Show_Get_Track_Name_Center_Pos0 R5 E; ]1 b/ j% r6 q9 L/ _
  1563. STX PPU_Cur) \" g+ [; O  J4 c  \) d" N
  1564. Clear_Track_Info_End+ I. k7 S/ a; y. I. m1 v
  1565. RTS9 `7 ]& a2 Y0 }, b2 S0 o! @. [
  1566. Clear_Track_Info_End_Ex
    $ j" W6 s% h: w, S3 e( [
  1567. PLA
    : [7 w" {, T0 O
  1568. RTS: Y- t  E! t3 _) O; n
  1569. 1 ^' i# z( l+ s4 E* o4 y
  1570. Write_Track_Info
    * t: }6 H  o1 M: x" `9 Q9 E0 W
  1571. PHA: G8 Z/ I7 z' }6 _
  1572. LDX <Music_Item_Cur* n" s5 O: b& @3 j  S) {4 a$ i
  1573. LDA Track_Name_Addr_Flag,X
    3 @# s! j0 r' K5 F- X9 n0 h
  1574. BEQ Write_Track_Info_End_Ex
    4 Z  Z# `! w1 ^
  1575. PLA
    " k  [& n8 s7 S, j/ ?  ~
  1576. . [/ k+ z3 N- X! u* p2 o
  1577. PHA
    * ^6 z$ K- s+ m+ u
  1578. LDX PPU_Cur7 |# _' w3 a9 S+ D: ~
  1579. LDA #PPU_MODE_CNT_LINE
      t! S, D! k: Z) g( I  b, X, I
  1580. STA PPU_Addr,X2 T1 v1 y* }3 F. m1 f% |
  1581. INX
    # m! v8 l$ U, f. _
  1582. PLA$ z9 K+ |1 U. N3 x: u8 c
  1583. JSR Show_Get_Track_Name_Center_Pos/ m+ y2 G" `. ]
  1584. Write_Track_Info_Data6 k1 G: Q( b2 x4 t0 @* i
  1585. INY  e# O! ~4 R" T4 f. {6 p% j4 ?
  1586. LDA [Data_L],Y; U' I" e: O, M- a/ I6 A9 V
  1587. STA PPU_Addr,X3 s' O6 M: }9 M8 d% w$ j
  1588. INX
    5 T3 S4 L2 G* ~! H7 q7 q& @
  1589. DEC <Data_Cnt3 s/ q8 F/ f* X+ b: f. |9 `
  1590. BNE Write_Track_Info_Data6 a# X+ O6 ^# E# B5 M
  1591. STX PPU_Cur% P: ~8 b4 v, P+ T2 ]$ h
  1592. Write_Track_Info_End
    1 s2 `6 T4 v1 {! U7 G5 Z+ p8 }7 n) R2 }( v
  1593. RTS  g1 O/ l' L- p% v( ?: A
  1594. Write_Track_Info_End_Ex
    # M8 \+ A8 a' W. ~4 g
  1595. PLA( ]; D5 ~: e' A
  1596. RTS
    * P: h. s  g6 ^0 B

  1597. " n4 l4 ]9 e* ]4 H) ]
  1598. Show_Track_Info
    9 o7 A& J( T* ]8 a* a& M, N, ?
  1599. Show_Track_Info_Clear! O8 B# \5 M0 @. p) ]1 N- j3 m
  1600. LDA <Music_Last  q; T6 n$ N; G4 K+ D' D, t- |
  1601. 2 B/ R8 f* E3 W' Y# Y6 K( P
  1602. JSR Clear_Track_Info
    , U# }) f, X& S0 v7 Z

  1603. 9 y8 L+ l! d8 ^3 U, ?) K& b
  1604. LDX <Music_Item_Cur
    , a6 c/ ]: u" f; `- P
  1605. LDA <Music_Cur,X
    / {2 m% x1 h" n7 |0 Z* G
  1606. JSR Write_Track_Info
    " A+ g7 j- s8 b
  1607. RTS! S7 K' V5 v2 X

  1608. 2 p$ @! W. k0 u
  1609. ;==============================  o; V% N- n- b9 n7 v) N
  1610. Show_Get_Track_Name_Center_Pos;获取中间位置8 J# Q. I- J6 b  m) H
  1611. 6 A, T' E6 J: a0 T) B. _
  1612. ;取出集合名索引* D2 T6 f9 {4 k: v3 H- L& b
  1613. PHA! v9 s! {; m" p) R  c
  1614. & P: e1 r* h9 M$ A
  1615. LDA <Music_Item_Cur& ~3 e3 p: ?. G' ]+ k7 n: p4 v+ d
  1616. ASL A
    9 t# }6 w. ?8 w& Q
  1617. TAY
    7 }+ o! C9 S, M2 ?  X5 h' W
  1618. LDA Track_Name_Addr_Port,Y
      u! I! s8 t0 b8 E: D: i9 I1 J
  1619. PHA
    6 \! T+ C; v! G6 C/ s6 x# e
  1620. INY
    + J. ~3 J) D* ?8 H
  1621. LDA Track_Name_Addr_Port,Y
    ! }7 Y5 j, f- f* d
  1622. STA <Data_H8 v8 q: H# p/ m8 O
  1623. PLA$ N3 ~# E  t2 S1 M1 L8 G/ @
  1624. STA <Data_L
    4 s( t8 K. L: m7 u
  1625. # z; {$ r, g# I% K% F6 M+ `) {
  1626. PLA, Y9 @! G: W/ c+ G- o7 ]& d

  1627. 1 X" y& N, h( V# x# {5 w9 g4 c7 ~. p
  1628. ASL A2 E  P! c+ b, F/ {- }7 W# H
  1629. TAY
    4 Y# D1 {0 E$ }* m+ m* ~
  1630. LDA [Data_L],Y
    ( u  i' U+ N+ F. X6 s
  1631. PHA. |6 U+ c1 }1 }/ N5 y
  1632. INY/ R  I( H4 `) c- |
  1633. LDA [Data_L],Y0 A; d, `7 T7 V: s$ A( W! K
  1634. STA Data_H
    # T& G7 x% a! H6 ^: S% K# e
  1635. PLA
    ' F' Y# T4 V! k! l( p; O1 K
  1636. STA Data_L3 x$ k; I- g! `& m. p$ C
  1637. % I& B+ i4 Z8 P3 u; N, X8 A
  1638. LDY #$00. w! p& l, J' A
  1639. LDA [Data_L],Y
    ) K4 ~' P7 S# U! g
  1640. STA <Data_Cnt
    2 g5 t7 t2 l' W/ i
  1641. LDA #$20
    4 V3 ^  D/ g# n; r
  1642. SEC
    - R0 R! W+ ~1 }7 Z' S1 U/ G
  1643. SBC <Data_Cnt+ S+ W# [2 E5 }5 f
  1644. LSR A
    / t* F0 D4 \7 p1 i! T5 p
  1645. STA <Data_Buf
    ) a% C& o- K7 O
  1646. LDA #HIGH(Track_Name_Pos)+ B* J5 t3 P5 `, O
  1647. STA PPU_Addr,X7 Z$ r7 b5 s8 t+ k5 D' E
  1648. INX
    * w2 F; u9 O5 c. q1 u
  1649. LDA #LOW(Track_Name_Pos)+ |0 x* C2 C5 r; q6 ^3 D
  1650. AND #$E0" l7 K) F% {2 x8 a2 X# H* y) P
  1651. CLC
    9 d' b9 ~5 m  Q, ]: F
  1652. ADC <Data_Buf
    ' j; T" H0 a) ?
  1653. STA PPU_Addr,X# Q# B: [! c+ l
  1654. INX; _; p2 x7 i! z
  1655. LDA <Data_Cnt
    : k; v+ d+ b3 C
  1656. STA PPU_Addr,X8 n3 Z9 x: P% z5 _# u
  1657. INX
    $ G+ ^; _0 Z6 q; m/ s! l- S2 r
  1658. Show_Get_Pos_Center_End
    " c0 _  W6 e. F' ~
  1659. RTS
    % W+ q, D2 S7 x. c
  1660. .ENDIF* n+ Q7 H2 i: P& [7 m. D1 E, C5 m
  1661. 3 J, S: T6 C; X6 {( u6 c
  1662. ;==============================; B1 _% ]# @0 G; t2 [% q2 o+ A
  1663. ;音乐端口清除2 O% [+ I" {  k
  1664. Sound_Data_Clear7 j( |/ _+ ]1 X! V) R& ~
  1665. JSR Sound_Port_Clear
    & `; {0 R$ e4 r
  1666. JSR Sound_Ram_Clear$ S9 \" a1 Z4 C- S0 O0 ~: i3 g
  1667. RTS
    ; ^. t1 Y9 u  w+ z. G6 M, }
  1668. . _: V' s  G3 K) y2 [
  1669. ;==============================
    * h8 L( r( K% ^# k6 [: ?
  1670. ;音乐端口清除
    ' k! x: R$ }3 U1 x
  1671. Sound_Port_Clear, p) }  Y2 u- Y9 A0 V! X
  1672. LDA #$004 F% s( m6 h% Y4 ]' z5 T
  1673. STA APU_STATUS
    1 a# M; E' V; H
  1674. LDX #$00
    : p6 s% a; `6 C
  1675. Sound_Port_Clear_Write$ N  _4 v7 ^$ V  S, G, d5 s
  1676. STA $4000,X
    ( t( h9 e, I7 M* D8 c1 U
  1677. INX! m7 u# l+ U$ D# ^' v
  1678. CPX #$148 f" o1 k: L6 y3 n7 x6 I/ P
  1679. BCC Sound_Port_Clear_Write9 [5 P6 E) k+ @- h  v8 k
  1680. RTS& c. \; j/ @, ?+ G( X/ q: K4 e3 V
  1681. ) H: r5 b  V, S" B& u5 ~; [
  1682. ;==============================
    ' o4 I# ^' O5 D7 I
  1683. Sound_Ram_Clear;RAM清除! V* z. i+ V6 [# X4 k. t+ l! W
  1684. LDX #$006 B9 o8 X+ W, N
  1685. LDA #$00
    / C( a1 a5 p+ d1 u
  1686. Sound_Ram_Clear_1
    - K6 r/ k) [. g+ r
  1687. STA Sound_Ram_Addr_1,X) V% L' K7 y0 U2 Q, z& |
  1688. INX' B* |3 p& z' R! g! f6 w7 V& A
  1689. CPX #Sound_Ram_Addr_1_Size" G+ O5 @2 `7 V7 |. {) L
  1690. BNE Sound_Ram_Clear_1$ {( W# y0 z3 `! _1 R% b, L2 F
  1691. LDX #$00& \+ J7 b0 _) [5 c& X" N1 N8 g
  1692. Sound_Ram_Clear_2. s- j$ W  Y, F6 Y
  1693. STA Sound_Ram_Addr_2,X
    2 y  F) F0 O4 U* Z! p- p" I5 j5 R+ K% k
  1694. INX8 a2 i9 U7 }8 N
  1695. CPX #Sound_Ram_Addr_2_Size
    ) t- E% n* p- m7 p
  1696. BNE Sound_Ram_Clear_2
    6 S2 _8 A1 t2 b% b* @; s* T8 ?% _) H
  1697. LDX #$00
    6 `. b; P$ q& G5 E$ g
  1698. Sound_Ram_Clear_3  S9 f5 K; v) J' ?
  1699. STA Sound_Ram_Addr_3,X* L" Y1 U7 G' a5 r4 q* p
  1700. INX
    & r" Y0 e/ @' h/ @
  1701. CPX #Sound_Ram_Addr_3_Size/ ], l: p6 h* c0 c  o
  1702. BNE Sound_Ram_Clear_3' X% h& e3 e0 z* ^& x$ v
  1703. LDX #$005 F1 |0 l, w- T; b, T
  1704. Sound_Ram_Clear_4/ q+ p) l5 J9 o' S5 r4 y; Z4 f, l
  1705. STA Sound_Ram_Addr_4,X$ ]& U5 e6 q9 i
  1706. INX3 X5 j5 m0 Q# I. o6 w4 P3 G( q2 k
  1707. CPX #Sound_Ram_Addr_4_Size
    , f& d# U  a8 s4 p! O6 g
  1708. BNE Sound_Ram_Clear_4
    % C! U1 Q+ o  e4 t& G5 f. E
  1709. Sound_Ram_Clear_5
    # q0 t9 a! |' W4 i- G; d/ Y
  1710. STA Sound_Ram_Addr_5,X5 E8 H; s) P0 K2 [0 w
  1711. INX
    3 v7 W% r! E5 k/ U, G8 a
  1712. CPX #Sound_Ram_Addr_5_Size
    7 k! B! l9 y- O( n8 H" `* I
  1713. BNE Sound_Ram_Clear_57 k" R) {% ?  f3 p3 q
  1714. RTS
    ! D4 z# T2 g5 B" `  `
  1715. " Y' _0 z; {' Y2 n  u' x3 F# W
  1716. Get_Music_Collection_Name0 X$ ]5 |$ f7 X" r0 z# B
  1717. PHA/ q. m# P7 {2 j+ j* T
  1718. LDA <Music_Item_Cur
    2 w* ~* L% U, K1 ~' w
  1719. ASL A
    8 B1 I8 A6 F! w$ t. s! |, \$ H
  1720. TAY
    $ i' Q, t7 O$ o8 O* O: D" [# H
  1721. LDA Music_Collection_Name,Y
    1 O# y! H. z2 H9 u! D" C
  1722. STA <Data_L0 _/ z$ i+ i& ^% \4 I" g- L
  1723. INY$ H& |. ~" P: B0 l
  1724. LDA Music_Collection_Name,Y
    3 P% e8 o  W& h# [9 A2 Z# j
  1725. STA <Data_H  Z* k  K  L4 q* o  G
  1726. PLA
    2 I* F& _/ F  Y( i
  1727. RTS
      c' E. S; {3 \

  1728. 7 Z: p; p" M& d* W9 i( ?
  1729. Set_Sound_Total
    8 k$ _: Q- p! W9 X- q( b
  1730. LDY <Music_Item_Cur
    ( X/ n5 W2 s5 ~
  1731. LDA Sound_Total_Port,Y
    " p- m4 J; Y& A3 x1 a+ Y
  1732. SEC
    1 j1 F" R+ l/ l1 F  n; f8 T! V, b9 N  f
  1733. SBC #$01
    : x! v) P4 `0 p5 v
  1734. STA <Music_Total6 F3 I$ W5 k1 l
  1735. RTS
    . {$ H8 ]' Q1 |+ }4 [. j$ C
  1736. # h) `* k  q5 j; D) r; g
  1737. Get_Sound_Start
    / P* m9 I' c( p% W. b
  1738. LDY <Music_Item_Cur
    6 G3 y! Y8 \5 ~, }: [
  1739. LDA Sound_Start_Port,Y  @& \, M& S- G! a: n( f
  1740. RTS2 [, S- F. J- C5 U! S9 \: S
  1741.   Y) W+ c1 x( a" J
  1742. Set_Sound_Init_Port% z5 I. P8 o4 \* M- J1 Y) L
  1743. PHA
    5 v2 I; ^2 s, p$ Q) }4 h! g
  1744. LDA #$20
    - F+ v5 ^) h0 d3 i5 H6 J4 \
  1745. STA <JSR_Addr_Op% o# v! a0 {- g8 H  U) A0 O& [  K
  1746. LDA <Music_Item_Cur
    6 T& [' e/ a0 l; [: U; l
  1747. ASL A' a6 c: V/ S) B
  1748. TAY% \, ]; |2 F& _- Q! L6 B; H- n0 v
  1749. LDA Sound_Init_Port,Y
    7 _( K9 b# v; v6 G3 Z
  1750. STA <JSR_Addr_L2 N& \0 F* I- \% ?
  1751. INY
    4 h0 i; q; o8 A
  1752. LDA Sound_Init_Port,Y  L2 y! @* r+ }! o! |, J
  1753. STA <JSR_Addr_H
    7 P* p- C  l& P8 O7 _% |. @
  1754. LDA #$60
    8 v1 G; t" Q8 K% l/ H
  1755. STA <JSR_Addr_Rts
    ) J" ^& ~( g8 h4 _% N# U
  1756. PLA
    0 N# T: m0 n6 `% e
  1757. RTS6 L- M( i. d& u# W& U# Q7 C2 n

  1758. 7 ?5 h7 H1 @/ j9 g1 p" _6 T5 ^
  1759. Set_Sound_Play_Port
    8 n! X# a* J! S+ P  k
  1760. PHA
    7 U- P7 p9 B; W# m: m
  1761. LDA #$20
    ! ?7 s5 P5 J" q$ J2 r; F
  1762. STA <JSR_Addr_Op
    " B$ m( p3 e" B* N# a$ D' a. @
  1763. LDA <Music_Item_Cur
    ! F' e: e3 P7 C' ~. f8 k
  1764. ASL A
    " D! H* [( C9 _/ B
  1765. TAY, |7 e1 Y  l0 @5 u$ z! [
  1766. LDA Sound_Play_Port,Y8 p; g$ D9 @6 D; {% T
  1767. STA <JSR_Addr_L
    ) g: t" M! J/ W# H2 w
  1768. INY
    7 u6 d) l  U2 B; `+ `" A1 }4 N
  1769. LDA Sound_Play_Port,Y8 ~7 z/ q9 [  w4 L" S
  1770. STA <JSR_Addr_H  [% a7 I. D. O
  1771. LDA #$609 C5 I6 p! ?% e, z0 t% E
  1772. STA <JSR_Addr_Rts
    0 n% \' e& |* N0 b8 N( _5 f
  1773. PLA
    4 H9 B* G% t, }! l  u
  1774. RTS
    1 [% u  E) S8 `0 T  M

  1775.   n6 G) H8 m2 v2 E6 }$ l
  1776. Set_Sound_Reset_Port4 A2 [9 U2 m0 p' ~- h- N# k) ]8 E4 I
  1777. PHA
    4 M; }6 g" q0 {- w% U! w0 I
  1778. LDA #$20
    - h2 L8 f2 o/ |) \
  1779. STA <JSR_Addr_Op3 N$ `: \/ e8 ^/ q1 s# z9 m
  1780. LDA <Music_Item_Cur6 D5 d, t! b9 w8 O; k: g
  1781. ASL A
    & |2 R. E0 p$ p  Y* @
  1782. TAY
    . ^; z6 r( I. z+ u
  1783. LDA Sound_Reset_Port,Y- |# |7 A$ o( m- L
  1784. STA <JSR_Addr_L
    1 R$ t' A, F6 N( ~
  1785. INY' P5 ~- V( c* g
  1786. LDA Sound_Reset_Port,Y
    5 K5 h1 t; }. E: B! O
  1787. STA <JSR_Addr_H5 ]# Q$ u. e$ i/ t# [4 l
  1788. LDA #$60
    . w- q. G$ _' u' _  \9 R6 M
  1789. STA <JSR_Addr_Rts
    8 t5 o2 ^( W) X
  1790. PLA
    0 \/ W3 a' `, D
  1791. RTS. q( Y$ C% w- _9 \0 [

  1792.   B) H. f4 A6 I" m& ~
  1793. ;初始化音乐bank, J! c, Y: q; a$ F+ o1 |! @$ D+ S
  1794. Init_Sound_Bank! n: s& s- ?: W4 r* \6 o7 C. n
  1795. LDY <Music_Item_Cur% Q6 L. D5 x$ t2 Z% Q. S" u/ A$ D
  1796. LDA Sound_Bank_8000,Y2 T5 ?0 e$ P3 ?3 P* p" Z
  1797. STA <Music_Bank_80003 G' J1 b$ j8 ^& ?3 U3 |
  1798. LDY <Music_Item_Cur
    - @  U! T1 v/ b' f( X
  1799. LDA Sound_Bank_A000,Y
    ( F( q8 T2 l0 P" y
  1800. STA <Music_Bank_A000  M/ l5 A: i4 e9 s! @
  1801. RTS
    4 V. z/ u( s( E( e. {' U
  1802. 9 G: `8 u: d$ `6 D. [+ s
  1803. ;==================================================/ Z9 f: I2 o5 c
  1804. Sound_State_Reset;音乐状态重置
    3 I8 X6 y7 R  R' L, }  J
  1805. JSR Music_Bar_ReSet        ;重置音乐条9 k/ L0 J  q: Y: p5 o6 [$ e
  1806. JSR Time_ReSet             ;重置播放时间
    ( `( l: F; z& ^* \
  1807. " ]' N  S) g. p0 u4 N5 D
  1808. LDA #$00! I( w. q( N5 u* o; G/ q
  1809. STA <Music_Stop_State
    5 q1 p  D3 @7 c) I8 B
  1810. JSR Music_State_Show       ;显示播放状态$ O  p! A* r3 S/ U% w  [
  1811. % Q% D, d7 ]* Z, k# n% j
  1812. .IF Track_Name_Pos! c" }+ H$ u2 G9 |
  1813. JSR Show_Track_Info        ;音乐曲目名显示. M! p' V% W0 ~( ?# w
  1814. .ENDIF. {6 C3 [( I- U+ _, D8 v

  1815. / d" r$ L9 \  k4 r' e  d( Z
  1816. RTS, |+ f  F3 @' p3 E  A

  1817. % R; B5 ^+ I9 z0 }3 N
  1818. ;==================================================
    5 q& r3 X/ l' M+ s5 r
  1819. Sound_Init_Proc;音乐初始化处理
    ( u$ t6 C% Y0 D
  1820. PHA
    4 {  w; n, D% e# M. h' M
  1821. JSR Set_Sound_Init_Port    ;设置音乐初始化地址; B$ {. Z# w" [, ]" O6 @! U
  1822. LDA #$00% g! H( G% B+ J% ?6 A; o
  1823. STA <Scroll_H               ;重设水平滚动, D8 @  }' \' J6 k. z
  1824. LDA #$0F
    4 ?4 R% a- x+ h4 D
  1825. STA APU_STATUS
    - c/ i, ]/ ]) e9 g+ |% r$ s
  1826. PLA
    - \8 i0 I1 z; |5 p9 Q- {, o! ]
  1827. JSR Sound_Init             ;音乐初始化
    7 ]" v/ T/ G% w/ i  A7 ?
  1828. JSR Sound_State_Reset      ;重置音乐播放状态
    : V7 o4 o: h& u
  1829. RTS
    # o  t( r' E! P

  1830.   O% Y& H- s/ K3 o
  1831. ;==================================================6 c; t- D) w- a
  1832. Sound_Play_Proc;音乐播放处理  J, y. [0 b" q2 u$ V+ g
  1833. JSR Set_Sound_Play_Port    ;设置音乐播放地址) G/ K" t5 R, g- P; v1 z  B6 F; A
  1834. JSR Sound_Play             ;音乐播放# A$ b" U8 q5 D2 t" D
  1835. RTS
    & W0 h) [3 B9 [: x# `9 @! S

  1836. & o  h% B4 s/ ^1 @5 N
  1837. ;==================================================
    ( U, \2 H2 H* W9 L$ e
  1838. Sound_Reset_Proc;音乐重置处理- q' W7 [; @( R9 U, x! _
  1839. JSR Set_Sound_Reset_Port   ;设置音乐重置地址9 V' k5 a2 i) S" w
  1840. LDA <JSR_Addr_L
    - r& r7 @: B3 B3 B- v8 s! T! c0 o3 p
  1841. ORA <JSR_Addr_H
    + a8 ?* P, g4 _; W1 l
  1842. BEQ Sound_Reset_Proc_Default8 e8 t, B0 s( x" c5 ?
  1843. JSR Sound_Reset            ;执行音乐重置$ M/ F* u( m9 Y, _6 q5 S: G9 W
  1844. JMP Sound_Reset_Proc_Init_Sound4 `  }% L. k. ^( T8 _

  1845. , B  k+ p  Y0 |" F" ^; z
  1846. Sound_Reset_Proc_Default    ;默认音乐重置处理
    $ ]6 t" f3 l# n# a' ]. [

  1847. ) x. I, j" U/ t
  1848. ;清理内存很耗费cpu周期, 这里禁用一下NMI中断
    $ A3 f/ z+ H2 e! b6 m/ y; u+ O1 r  e
  1849. LDA #$00
    % W% o& u& g, O. Z
  1850. STA PPU_CTRL9 X0 @& Q0 m6 W3 j
  1851. - O8 O  W5 s- d) t" X
  1852. JSR Sound_Data_Clear# D, `$ v2 a9 ?* P2 \0 z

  1853. 1 E9 N3 C! }. H9 J! |" K. U
  1854. Sound_Reset_Proc_Default_Wait) o, g5 C1 N+ Y' s" V* [
  1855. LDA PPU_STATUS
    0 S/ C$ h' g% z$ T. r+ y8 q- r0 ^
  1856. BPL Sound_Reset_Proc_Default_Wait" }+ E) D; a# l* C, \
  1857. ' e6 N* N2 @! C: O4 C
  1858. LDA #$00
    * g, N' L: A" }3 T9 N, `5 n( J' i3 u
  1859. STA PPU_ADDRESS; ]* j0 t! }8 N, d* z5 t8 q
  1860. STA PPU_ADDRESS
    ' S, F; r4 o/ b$ i+ s/ k
  1861. STA PPU_SCROLL9 T% r  K; V' V8 q9 K; Q- n
  1862. STA PPU_SCROLL
    & r6 i1 n6 U. K, {7 X* L
  1863. + E7 }4 W3 r1 [
  1864. ;恢复PPU控制8 A1 P; ?- l" O; P7 k: H2 F
  1865. LDA Screen_Ctrl4 F' g% X7 H6 m! N* C+ Z
  1866. STA PPU_CTRL- C6 E& A) y" ?+ k# Y- q/ v

  1867. & a" {3 X" v& U3 ]8 l% C; _
  1868. Sound_Reset_Proc_Init_Sound2 f/ L% ^1 }- m: f$ b7 R( O
  1869. LDA <Music_Stop_State+ z* N. h8 v# u0 }; O2 P
  1870. BNE Sound_Reset_Proc_End; @% @. E+ Q9 Z/ k" m$ Z
  1871. LDX <Music_Item_Cur1 f7 v. H6 S+ h$ Q9 _
  1872. LDA <Music_Cur,X* _5 R- l+ D7 w) q6 [; J
  1873. JSR Sound_Init_Proc
    # y- A. e4 N' q
  1874. Sound_Reset_Proc_End
    1 l5 g: E" q3 ]' J2 X7 X
  1875. RTS# B' C& K( N; j  T5 ~: u8 s# N
  1876. 1 W" n; q4 A' X5 B+ c
  1877. ;==================================================
    3 A1 {& `4 M% D! d! R- D
  1878. Clear_Item_Text;清除页项目
    9 }. ?8 r1 }- j3 v, t* d! X
  1879. LDX PPU_Cur
    / ]. r8 j1 [3 ?7 b
  1880. LDA #PPU_MODE_CNT_CLEAR1 ?* _9 s; ~' H. h; m1 C
  1881. STA PPU_Addr,X
    8 E9 P1 j/ A4 B! S! k7 F; p! Z4 p
  1882. INX
    3 p0 R2 G' ]- M* a( j2 d* k- T- v$ A  g
  1883. $ q; k& D, a) ?8 l, R
  1884. LDA <Page_Last
    2 f7 a$ _8 z9 r9 c1 P
  1885. SEC
    - t( S9 V$ k4 h( G- b0 D
  1886. SBC <Page_Last_Index
    # ~  d$ y8 k; B4 O
  1887. ASL A% {, K: X# u7 F6 ~3 c/ t

  1888. + s0 ]6 B1 [& [8 [& a3 m
  1889. TAY
    6 b7 f; i' v  T8 d3 f8 F
  1890. LDA Item_Pos_Data,Y: L) R* _  N3 d- d- ?2 p7 V4 P
  1891. PHA
    ( X' u' g4 r) Y5 b' L$ {
  1892. INY
    % O/ I" w* l6 s: c+ K
  1893. LDA Item_Pos_Data,Y
    + p3 u5 F! L, l, m
  1894. STA PPU_Addr,X
    * J( C( A' S* G# u
  1895. INX$ b+ x" N3 ~) u, E& ~' a6 r! R# @
  1896. PLA5 p1 }, X/ z! m3 b
  1897. STA PPU_Addr,X
    / K2 E) n& c; z, F; I; @1 H& M
  1898. INX
    + ^' \$ Q5 W8 m) P

  1899. 1 q* `! g( w3 }
  1900. LDA <Page_Last
    9 k  P/ u' _, h7 K1 M: g0 R
  1901. ASL A
    2 X% D2 j' e+ t& v
  1902. TAY
    ' o9 a4 @5 O8 o3 j
  1903. LDA Music_Collection_Name,Y! D) O( j2 g9 ^: R1 e
  1904. STA <Data_L
    3 Y; r9 |4 f3 I$ i" x
  1905. INY1 `! h' q2 ^  b; T' \
  1906. LDA Music_Collection_Name,Y" C4 `' a, @8 B; \- c% e
  1907. STA <Data_H
      N) R  k% `9 h1 ]- O1 j2 z" ]

  1908. " f3 C8 \# ^' n9 }
  1909. LDY #$00( b/ K" B0 j4 l
  1910. LDA [Data_L],Y
    ; \- v8 P* p( F% K/ f* i
  1911. STA PPU_Addr,X
    # E% K9 r; o& S0 V4 X* I( d3 b
  1912. INX
    , K0 L& \# {  Q9 r, R+ N4 w
  1913. Clear_Item_Text_End
    & O* W1 Z6 E, z& S2 f
  1914. STX PPU_Cur
    ; `5 @( F' ~: C/ x( @- q: }
  1915. RTS5 c. B! M! H1 e5 g0 v; d

  1916. 3 [. a( J3 Q( F9 _5 I* C
  1917. ;==================================================2 g, f7 C7 r/ l: G. G# I8 f
  1918. Show_Item_Text;显示页项目
    ' T; M" k- r" J+ C0 m$ b6 R- [% ^
  1919. LDX PPU_Cur
    : c: \% L4 j' a6 K' Z& f, k7 L
  1920. LDA #PPU_MODE_CNT_LINE- l6 F3 P) f0 }$ ~6 w6 {' c" W
  1921. STA PPU_Addr,X# O* m$ j! i6 x% Q9 `. e5 s# u
  1922. INX; H, X) o% @' O- W& R  v; G1 {* P6 x
  1923. LDA Page_Cur, i" ~, e  D2 Y! l& `8 c8 F
  1924. SEC
    $ ~# K) Z& U- P& p8 i3 r1 m* F
  1925. SBC <Page_Cur_Index
    - ~0 }* g  o1 n# {4 O
  1926. ASL A
    ( M; n; b$ V8 M4 [8 N1 i6 i
  1927. TAY: w3 n1 q# o3 h& s- y* ~
  1928. LDA Item_Pos_Data,Y
    ! P% r6 e& @1 V' o4 E( w) h9 z' \4 o
  1929. PHA
    9 p% t# H3 u( C/ ~. O
  1930. INY
    $ j* S, F, [! N1 W' r* Q! v( N; C$ u
  1931. LDA Item_Pos_Data,Y5 `6 t6 X6 y, Q% H; j# c
  1932. STA PPU_Addr,X+ U5 i& b' @+ @6 F) D2 |$ y! a& x
  1933. INX7 D/ S: G& E; ?
  1934. PLA
    ! q, G" a( g; @( G' v* V- H
  1935. STA PPU_Addr,X1 t( _& @1 L# C: y6 T- s( t+ G8 E
  1936. INX
    3 P- m' X1 G- a  r' J( R8 j3 ~; g
  1937. ' X: |: L5 A" G4 ^8 m: w
  1938. LDA Page_Cur8 _) H6 N: w8 @* ^
  1939. ASL A
      \1 `8 A& {" l4 w( O. ?# \! z/ j% C
  1940. TAY
    2 J7 A3 d* F6 c" v/ e
  1941. LDA Music_Collection_Name,Y
    , @7 O7 T. O$ ^, v9 C! |5 q
  1942. STA <Data_L
    8 j3 p7 x" Z: |5 q
  1943. INY! G& N3 p  O; J
  1944. LDA Music_Collection_Name,Y
    5 y1 z8 [; B+ ~( U
  1945. STA <Data_H. ]7 z1 }8 D, [2 }9 B
  1946. ; j- W3 E) R# l2 l: V9 ~' J$ T: N
  1947. LDY #$00; `) S. s  v; b
  1948. LDA [Data_L],Y
    + V- L! ]4 a2 J, [
  1949. STA PPU_Addr,X' N! P! b! Q' {/ @
  1950. STA Data_Cnt
    2 t0 V) K8 S& z
  1951. INX; J2 r' s, h3 ~3 j; c. r  L
  1952. & V( l+ V2 J% C
  1953. INY  _; m: `' f: |7 t
  1954. Show_Item_Text_Write
    8 S  }) }/ t# Y" U4 D( R4 u
  1955. LDA [Data_L],Y+ u& w% C& @0 D2 ]  Y* ^& o  D5 I% U
  1956. STA PPU_Addr,X9 ]9 j$ W( v" I/ D
  1957. INY6 S3 P3 u  ^4 ~  p
  1958. INX
    4 C3 q, `0 i: c: E0 r
  1959. DEC Data_Cnt
    5 u4 S. g  X. \( `$ C) t' y
  1960. BNE Show_Item_Text_Write/ z: G+ q* O2 r, s

  1961. - a  k* O  g4 D5 R
  1962. Show_Item_Text_End
    4 W8 |, Y. l9 p: f% C6 ^5 `
  1963. STX PPU_Cur& M$ Z- q2 s( E) F
  1964. RTS9 ]1 o: x5 z& S1 \) ^

  1965. 6 \9 v9 S# b! ]# k: K' ?) _8 f
  1966. ;==================================================' b$ y% O! N* f9 m; b
  1967. Get_Page_Start_Index;获取当前页号起始与条目数量5 j4 l4 t5 X3 {# t
  1968. STA <Data_Buf
    4 l& N4 ]$ T2 o9 @: ]. l2 `2 T. j
  1969. LDA #$008 i/ F3 ]4 B. N( A+ D
  1970. Get_Page_Index_Calc. {1 U7 c& x! ~+ z8 D
  1971. CLC$ e# u' x& U, u# `5 d; U
  1972. ADC #PAGE_SIZE# T; U* F/ U3 P8 o/ L% d; m3 C. K
  1973. CMP <Data_Buf) J& @* |: m% M$ v# B; t
  1974. BCC Get_Page_Index_Calc5 _" S( C4 _; t9 @( L$ L
  1975. BEQ Get_Page_Index_Calc_End
    ! o' P/ j; @. k2 j6 R+ G; l
  1976. SEC* |* _9 ^) d+ n
  1977. SBC #PAGE_SIZE
    , q: {8 J8 ^6 P! |2 e1 d0 r
  1978. Get_Page_Index_Calc_End
    ( \: s) r, r9 k: _
  1979. STA <Data_Buf3 a6 T* `! }; z: L
  1980. Get_Page_Index_Cnt
    5 B0 U8 R% y1 O& r! G
  1981. LDA #PAGE_SIZE
    " f5 A9 T. h5 \/ [5 k( G
  1982. STA Data_Cnt
    . J$ H! c) ^2 v7 O2 t8 \
  1983. 0 J9 S9 O7 f0 [7 y2 t, A
  1984. LDA <Data_Buf
    # H0 v( H3 d/ A3 e6 V+ l" p- f6 ?/ h+ E
  1985. CLC# M) t7 Q5 e$ U) D
  1986. ADC #PAGE_SIZE! B0 `  B; q2 @# d6 ^- Y% M
  1987. CMP #ITEM_MAX_SIZE
    5 O7 @6 u# t* T5 A# h: E2 V
  1988. BCC Get_Page_Index_Cnt_End; J$ a. Y$ |2 {) j0 ^* Y5 m- o" @

  1989. 0 v' p- v. R  F6 W( w
  1990. LDA #ITEM_MAX_SIZE, d8 U4 [9 _% ]$ {% u
  1991. SEC
    0 }1 ~5 R! x( J3 F2 |
  1992. SBC <Data_Buf0 {" |* d3 \8 f8 s: T) ^
  1993. STA <Data_Cnt
    , j( v4 \5 o) [+ u

  1994. 5 Z: Y# ~8 c% Z' \, q
  1995. Get_Page_Index_Cnt_End; z9 V% y& D5 F/ ^( G
  1996. RTS9 E( I1 D4 q0 K! i# J
  1997. * y" v! H* N: a! t6 X, Q! {' F( w
  1998. ;==================================================/ a1 t' {3 M" S( B. @
  1999. Get_Last_Page_Start_Index
    * B/ \1 A. E6 D" j: [  i5 }+ y0 C, [
  2000. LDA <Music_Item_Last2 O. F* q5 N, a
  2001. JSR Get_Page_Start_Index
    7 B) e. D5 U' o! v1 S4 y9 [* C
  2002. LDA Data_Buf
    - E/ N/ K" `% ?. x
  2003. STA Page_Last( ?. B! F! y; K& R  I9 ^, E
  2004. STA Page_Last_Index
    8 D5 R- U" Q+ O4 V, g
  2005. LDA Data_Cnt$ `# Q- T: N# O' J% }
  2006. STA Page_Last_Cnt; G9 J  I: o+ E! G5 |& x) U- ?1 j
  2007. RTS. s( T, b2 H+ |( S, {
  2008. 8 P+ T, O: ^$ {& G4 w
  2009. ;==================================================: r+ _# c% X8 j; O" |
  2010. Get_Cur_Page_Start_Index; ]% d, A( k3 s
  2011. LDA <Music_Item_Cur: Z4 f, r( _  s3 c) l
  2012. JSR Get_Page_Start_Index
    0 q5 \( B8 X  i" }6 [
  2013. LDA Data_Buf
    * f' @* m) s2 F9 Q
  2014. STA Page_Cur3 i! @! s6 p  `% w. T) x
  2015. STA Page_Cur_Index
    5 O( M6 t+ M4 ^8 Q( P' Z9 D
  2016. LDA Data_Cnt
    / `# D' s2 X+ e& d" n6 M/ t! N
  2017. STA Page_Cur_Cnt1 M. s8 }  b4 v% K, |6 v; g- Z
  2018. RTS
    . z. ]+ k6 @: d! `% r! A1 V

  2019. 1 j8 R, k( S4 \. c
  2020. ;==================================================
    0 B+ p& L) T0 i. a, d
  2021. Show_Page_Text;显示页文本% y0 t% h' L- W
  2022. LDA <Text_Disable_Flag
    7 E) k1 c8 A( Z5 k# b: N% P9 I
  2023. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME | TEXT_DISABLE_ITEM
    5 Y! C, N/ i- j6 s
  2024. STA <Text_Disable_Flag* [* g" Z: D8 x

  2025. ) S' {2 J* x- X' }6 s. z# D7 T
  2026. JSR Get_Last_Page_Start_Index
    " l0 L+ P+ ?9 u) O  m! G
  2027. JSR Get_Cur_Page_Start_Index  m# O3 B# `# ~" t, [

  2028. 8 @9 w7 b8 S- }/ b
  2029. Show_Page_Text_Set$ Y  ^! Y- K$ }

  2030. - @0 B, Y0 o( E. L  A& }2 v
  2031. Clear_Page_Last_Item;清理上一页, x! h& m6 ?! r4 x& {. S" n
  2032. LDA Page_Last_Cnt3 v" K7 O: e) E* f
  2033. BEQ Clear_Page_Last_Item_End
    ' j% G2 u6 E9 ?5 s
  2034. JSR Clear_Item_Text
    5 b5 A6 a3 ?# k- \4 {* [5 S
  2035. INC Page_Last
    0 @) z7 p* E0 O! |" z1 P
  2036. DEC Page_Last_Cnt
    5 n6 P: f& Z( Q- q
  2037. Clear_Page_Last_Item_End- ^$ [  X3 s5 I* l/ s
  2038. , B9 V; A5 v: u4 _1 \
  2039. Show_Page_Cur_Item;显示当前页
    / d: r0 I; _0 j. p4 ^) T
  2040. LDA Page_Cur_Cnt
    % {* r- X& X! `% z' G" F0 c% e
  2041. BEQ Show_Page_Cur_Item_End8 J+ ~: c7 Q$ B& e( T' y1 a: G- m
  2042. JSR Show_Item_Text: A+ H* S7 x* `% v2 W+ B0 s
  2043. INC Page_Cur
    5 D8 `6 _1 _3 I0 C. k" r" R
  2044. DEC Page_Cur_Cnt
    , ~2 g5 _5 E/ z7 e
  2045. Show_Page_Cur_Item_End
    1 _: x; ^! y: O/ c9 o4 \, }: E$ J
  2046. 4 M% w' Q/ Z/ i
  2047. INC <Time_Wait_Cnt  H! ^  }- i5 D* M
  2048. Show_Page_Text_Set_Wait;等待NMI完成PPU操作+ _; L' O: t$ K
  2049. LDA <Time_Wait_Cnt
    * A; `$ n1 h/ b& S, G
  2050. BNE Show_Page_Text_Set_Wait9 \7 T1 @( F6 ?! P
  2051. 0 `) q6 |% F) W, F
  2052. LDA Page_Last_Cnt
    + c: h, o+ q( S
  2053. ORA Page_Cur_Cnt% }+ N; o/ e9 \+ o9 |
  2054. BNE Show_Page_Text_Set0 {7 x6 z) A+ f: {
  2055. LDA <Text_Disable_Flag- v1 t9 H( ^% [. ^$ a& P3 ?
  2056. AND #TEXT_DISABLE_ITEM ^ $FF
    , i' Z6 t: C. x1 |" n
  2057. STA <Text_Disable_Flag8 Z$ k' A7 q& @: F% e7 _
  2058. RTS
    6 ?" j# }8 i4 y( W3 }% ]7 U- p+ ?# I7 ^
  2059.   _& g, j# t5 G- E9 n- J) b
  2060. ;==================================================1 q  x: m1 w, F( i* J" G4 e! ]
  2061. Last_Item;上一项) j; V: d' ?2 _: S
  2062. JSR Clear_Last_Track_Name
    5 r3 ?* a; `7 E1 r2 E
  2063. JSR Disable_Text_Draw
    ; e" m, V4 ]9 A4 D

  2064. 0 {+ f4 C  d; O* M0 U9 k
  2065. LDA <Music_Item_Cur
    ; q3 d& m$ P& c1 @7 ^
  2066. STA <Music_Item_Last
    5 C- r% q, Z8 j8 F' N
  2067. ) z/ F& o' Q0 f- b" M0 S
  2068. JSR Get_Last_Page_Start_Index- U- b$ n# u$ x% ~" e7 `# }
  2069. ) X' L5 H5 S! [: N- V! Y
  2070. LDA #$00
    ( [5 r; A% y4 E6 u/ R2 u
  2071. STA Data_Buf
    + u" l5 w) z/ v- A
  2072. 7 Z6 B) T, m; Y5 `, V* ]
  2073. LDA <Page_Last0 M  O* e7 a( `9 ?- w
  2074. CMP <Music_Item_Cur4 \& ?! O( l7 n3 o" V" ?: D
  2075. BNE Last_Item_Begin
    $ s7 m1 U4 T- N- B7 K

  2076. ! S6 G, c, {/ ~" Q8 @, Q' f& ]7 d
  2077. LDA #$01
    ; C- T( y1 f- d2 U; C0 z* o
  2078. STA Data_Buf
    1 t1 J  q; `9 S4 C0 O3 `! `
  2079. Last_Item_Begin0 H9 s9 j+ n% M
  2080. LDA <Music_Item_Cur9 j7 u9 A' [! H  S1 X
  2081. BNE Last_Item_Set
    1 M8 V7 o) i/ s! V6 o# [  i
  2082. LDA #ITEM_MAX_INDEX + 1
    - d+ i4 \4 c8 Y9 D9 c
  2083. STA <Music_Item_Cur+ _9 O  ?8 ?8 _4 U9 i9 P

  2084. ) H. B& G1 N1 _
  2085. Last_Item_Set4 p/ u2 c( V: l/ e0 ]* H, W
  2086. DEC <Music_Item_Cur
    8 H0 n% d  Y; Q7 j8 {# d
  2087. LDA <Music_Item_Cur/ D0 M7 Q- [* K
  2088. JSR Reset_Current_Music
    / I" e# m" X. O6 ^$ ~% R- L
  2089. ' K4 h4 c, L$ }6 F. _! m7 _+ A; z
  2090. Last_Item_Play
    0 L1 t- Z" z. \# {% D0 I! s
  2091. LDA Data_Buf
    # w5 K$ z& d6 p* t
  2092. BEQ Last_Item_End
    4 x6 v' b1 h; ]: o0 q" y3 S3 W
  2093. JSR Show_Page_Text* h3 T5 `1 ~! w. \" E) X- A) R  w
  2094. Last_Item_End
    ( d% f7 M3 q% s& n% G
  2095. RTS
    . E- ~% R$ m; a( u& h9 a4 @9 w5 V
  2096. / p# d$ m4 {  u& G9 F
  2097. ;==================================================$ r( b1 K% {- r  Q9 x# K% k
  2098. Next_Item;下一项
    & r1 F8 }. P9 X, ~, V7 b2 h9 w9 v
  2099. JSR Clear_Last_Track_Name. x# s! @/ k# F+ M
  2100. JSR Disable_Text_Draw
    . L3 y. t1 t/ d  ]' ~& g/ a
  2101. 4 B! j% Q5 V, K: Y$ Y* v
  2102. LDA <Music_Item_Cur' H) p( W5 h+ G0 @/ A! ?
  2103. STA <Music_Item_Last9 A# h9 v5 q4 W& g0 j9 K  e  W1 W
  2104. - U# M( s7 s& v7 p& a1 O8 Z0 y4 W
  2105. JSR Get_Last_Page_Start_Index
    $ |7 a( S  |8 P  [+ E- {
  2106. & s0 d% j6 ]' N+ f" i  I) ?
  2107. LDA #$00
    . z5 q% F& u' V: O9 Q! x6 g  B
  2108. STA Data_Buf
    ! H+ g+ e3 {( P3 o* H+ M& {

  2109. * V* N5 M' n( k4 Z
  2110. LDA <Page_Last: w8 H" P1 _7 K% C' c$ k' R* x
  2111. CLC
    ; X" n4 r8 U6 h# b' ~+ _$ |0 _$ v& g
  2112. ADC <Page_Last_Cnt$ b3 K/ C# S$ I9 G. H& m, N1 b$ Z
  2113. SEC) i  Q6 V, w7 I6 G. b4 M1 O) h3 d
  2114. SBC #$014 l9 {0 N& f% A; n9 R* Z6 o6 U
  2115. CMP <Music_Item_Cur' f  T0 C$ H, A1 u" s
  2116. BNE Next_Item_Begin
    / d5 S) U: N$ \/ {) F
  2117. 3 R- U  j3 y0 I$ W
  2118. LDA #$01
    ; D, X3 a  s; T% U3 L% K; V0 A
  2119. STA Data_Buf4 Q/ Q4 L) h* |& W$ g% v$ R
  2120. Next_Item_Begin4 N# d0 V  k% h/ V1 _
  2121. LDA <Music_Item_Cur
    # Z) k: V3 F  Q% c9 `1 {/ `
  2122. CMP #ITEM_MAX_INDEX
    2 O6 M: }. x4 v: b& L
  2123. BCC Next_Item_Set" z4 Q- c- m4 K2 `" U
  2124. LDA #$FF; n. I6 X/ c* D8 K+ w
  2125. STA <Music_Item_Cur
    5 h: i% x8 X& b2 Y- R. n8 r% ]8 _
  2126. Next_Item_Set! P3 f* z; }9 U& Z3 V
  2127. INC <Music_Item_Cur
    ' E. r/ L' r  v7 _! R% b. t5 @, P
  2128. LDA <Music_Item_Cur; k4 [% q$ o1 c" m* a
  2129. LDA <Music_Item_Cur( r" i3 ^7 |3 f- R
  2130. JSR Reset_Current_Music
    2 C0 v6 z6 Z2 c
  2131. Next_Item_Play
    0 F  _7 Y# n! ^! M. {# w. I' ?! K2 q5 \
  2132. LDA Data_Buf& X6 _4 U6 Y2 k6 J# x7 G
  2133. BEQ Next_Item_End# A( X- ]/ q' b5 T' M
  2134. JSR Show_Page_Text3 r, k* d2 J* P5 ~1 L, y/ a3 d
  2135. Next_Item_End7 Q5 n: N: q( K0 [$ V
  2136. RTS
    ( a$ M! `8 S3 N- F+ A; Y
  2137. + R2 {7 Q5 L0 A1 R* _
  2138. ;==================================================
    6 K2 E" E' h1 I2 ~3 u. b
  2139. Last_Page;上一页
      u7 m6 k* ]- U
  2140. RTS; a$ J, r* [( H% S% }
  2141. 0 a& @/ ?& E1 \" U' X" t8 D1 _3 |
  2142. ;==================================================
    : p, _7 C& {% K6 ^+ E: s2 `
  2143. Next_Page;下一页
    ; `1 f$ d$ U, J& v5 w
  2144. LDA #PAGE_MAX_INDEX
    * @' o" g* }3 R/ ~4 E1 l* I' ^
  2145. CMP #$01! B. O( O7 a! R* a! M
  2146. BEQ Next_Page_End, G- Q& o) \: S( Y, z2 C
  2147. - E: T5 W" p% K8 e8 N& w; P
  2148. LDA <Music_Item_Cur9 m3 t9 B# q0 v
  2149. STA <Music_Item_Last
    ( c( u1 |7 K5 A; E9 S3 \5 T

  2150. " g% ^1 |# n9 E
  2151. JSR Get_Last_Page_Start_Index
    / t  Y# a8 O7 }: P$ p2 |8 U+ p

  2152. % D- U3 d, D- u; X2 E
  2153. LDA <Page_Last_Index1 `$ _6 [6 c6 E; C, e4 K
  2154. CMP #PAGE_MAX_INDEX
    ! L% G& }: W) f. m0 z) m+ u
  2155. BCS Next_Page_In_End_Page
    $ k7 m/ [' h4 M
  2156. 9 B  n  G# B6 r- a
  2157. Next_Page_Not_End_Page;不是在最后一页
    : Y# R' A. L  N
  2158. LDA <Music_Item_Cur7 I3 U- {- l  z( [7 p
  2159. CLC3 e! H* |5 \! t" g+ {$ a
  2160. ADC #PAGE_SIZE
    0 Z% U6 \  G# S3 I% r
  2161. CMP #ITEM_MAX_SIZE
    * ]/ H, i, s2 P/ H9 u
  2162. BCC Next_Page_Not_End_Page_Less
    7 U3 ]/ k2 u5 ~3 b
  2163. LDA <Music_Item_Cur! q7 X' b1 p+ W
  2164. SEC
    + B# n& k% S3 ~7 M" M/ l! Q
  2165. SBC <Page_Last_Index! S9 {" a) ]) v
  2166. CLC
    $ P* v3 l! k: n/ r! E
  2167. ADC #PAGE_MAX_INDEX
    ; g( h* H  \% N; Q
  2168. CMP #ITEM_MAX_SIZE- e& L8 X9 d/ X; S' {: j3 ?
  2169. BCC Next_Page_Not_End_Page_Less
    . V8 H$ v7 w3 J) p. k# t
  2170. LDA #ITEM_MAX_INDEX  Y8 N7 ]6 B/ h8 x4 e2 c
  2171. Next_Page_Not_End_Page_Less7 Y6 f# R$ Y2 i- O
  2172. STA <Music_Item_Cur, P& m* ?+ q# |* M5 W" b/ A0 `! z
  2173. JMP Next_Page_Reset! U9 b$ T; A* @( l

  2174. ' W4 d2 W: |3 N0 |
  2175. Next_Page_In_End_Page;在最后一页* m9 p) W: L7 Z. L
  2176. LDA <Music_Item_Cur5 Z0 w7 O5 r8 ?* o$ u% g
  2177. SEC
    & {5 r1 o7 u0 c) B
  2178. SBC <Page_Last_Index
    & u7 {' x" o3 f- Y
  2179. STA <Music_Item_Cur
    / @$ W& n- H9 O, s, S

  2180. ( [: G$ s7 N& ]! |& c( s' d: c4 R( Y
  2181. Next_Page_Reset0 q8 E/ A  m% t8 p
  2182. LDA <Music_Item_Cur
    , g  ~' w3 \2 n2 q7 N" u+ ]
  2183. JSR Reset_Current_Music
    3 |, J" r8 O9 ~( g4 g# W9 ~& |# g6 F- y
  2184. JSR Show_Page_Text
    % W9 U: k4 X% H% ~- K
  2185. Next_Page_End
    " n4 B7 j; F3 c; w/ b8 B/ W+ f7 I
  2186. RTS
    % q2 t2 l+ o7 H  q- S+ p

  2187. & w% c9 }9 I% ~8 T
  2188. ;==================================================
    & f- N" s" Y. i9 Y4 o$ L" p
  2189. Disable_Text_Draw;禁用音乐条刷新- M9 A4 J. B) W- o3 Q
  2190. LDA <Text_Disable_Flag
    + G! U1 T: u& E. `2 ?, G- V# c
  2191. ORA #TEXT_DISABLE_BAR | TEXT_DISABLE_TIME% O& U" H3 J( @& H) t+ y% S
  2192. STA <Text_Disable_Flag
    5 z5 R+ ~, x1 n: ~. x" R, A  k
  2193. RTS
    / q% X: H& N. E

  2194. 7 p. _: F$ r0 r( A2 `4 Q
  2195. ;==================================================
    # \5 X1 ~2 H; c7 z/ j0 s
  2196. Clear_Last_Track_Name;清除上次曲目名9 c/ ^2 g$ Q8 x7 q8 u
  2197. LDX <Music_Item_Cur
    , Z! b5 m" d0 s' T3 `, \% g
  2198. LDA <Music_Cur,X8 M; q2 k: ?" v7 u7 G
  2199. .IF Track_Name_Pos# [/ U6 \6 w. s) @
  2200. JSR Clear_Track_Info4 ~7 Q1 l. r  n- w0 s  f/ x
  2201. .ENDIF
    6 E, k6 C1 V* P; e' x4 E. N6 |6 B5 j
  2202. RTS) i5 M) n- O: m9 e4 ]# W
  2203. * Y4 {& i! P8 C% k  ]( e
  2204. ;==================================================
    . m6 a6 }; f3 a. I3 d! z6 M3 L' j
  2205. Reset_Current_Music;重设当前曲目
    ' y/ a8 S. f/ c4 V0 p! B5 k9 e7 M
  2206. $ z2 Q$ q* s9 b) ?* J/ w; P
  2207. ;写入当前总曲目
    & {, ~; J3 o# N( r3 A
  2208. JSR Set_Sound_Total
    6 g$ q8 W$ o' w1 O
  2209. LDX <Music_Item_Cur
    ! {0 f8 r; V/ D
  2210. ) ]; U# O2 u0 }3 O5 \& T
  2211. LDA #$00
    9 y' L, y$ Y) S. L8 p7 U5 D' Y- a
  2212. STA <Music_Last
      |+ }/ l+ E; H, S# ]4 v

  2213. 6 Q1 B) C% [3 Y& i- J: C: t
  2214. JSR Sound_Reset_Proc% s( q, W* }( n3 h$ d
  2215. JSR Music_Show
    8 U; T* Y: x8 V4 ^% ~3 c& C# \  H2 Z
  2216. RTS
    8 W' s  Z2 m8 j

  2217. 0 |, T( T" Q" r+ n& q+ `. S4 z" c
  2218. ;==================================================
    " T  Y% \3 e% V( a" c
  2219. Music_Song_Stop;音乐停止
    / r9 j+ s6 I: f7 }$ T3 ?
  2220. LDA #$01/ I; O1 q3 x/ `( s5 }
  2221. STA <Music_Stop_State
    7 Z& Y% @+ g" h' D8 I
  2222. JSR Music_Bar_ReSet- B" ^9 q, t2 M/ R
  2223. JSR Time_ReSet
    6 D6 C0 V0 Z0 G! q1 O% |
  2224. JSR Sound_Data_Clear
    # b6 r- A2 H. _- B/ P3 _( q, G
  2225. JSR Music_State_Show
    2 r: p: d& e9 I+ M
  2226. RTS
    - Z- ]/ [- B# ^

  2227. 2 B5 x; b$ ^8 O1 V0 a
  2228. ;==================================================8 ~6 t& R, V! \! Q. P5 T8 B( }& H5 J
  2229. Music_Song_Play;音乐播放  W- o2 m9 W2 J
  2230. LDA #$00
    # q$ z; R0 K# R& R6 b4 s3 x$ |: r! ]* k
  2231. STA <Music_Stop_State
    ; X: s1 q* |$ q" X: G0 `
  2232. LDX <Music_Item_Cur
    9 V9 E5 H3 I/ Z( m5 {9 K5 z
  2233. LDA <Music_Cur,X
    # I. g# h) a4 x# e3 I- Z5 Z3 u6 [
  2234. JSR Sound_Init_Proc+ U6 |: e+ H. W- K
  2235. RTS% Z2 i5 \" U- N4 M8 J0 @8 B; n
  2236. ! e& Q' {0 o5 a# _
  2237. ;==================================================
    . N) D! _& P0 ~& w& {0 J7 w* N
  2238. Music_Song_Last_10;上10曲
      G* F! L, z- I
  2239. JSR Clear_Last_Track_Name
    ; X7 E4 W& G" a, w, O- K
  2240. JSR Disable_Text_Draw: f* k7 m& u% ?: c8 Z
  2241. LDX <Music_Item_Cur' Q7 _3 K! s5 |7 P+ s
  2242. JSR Set_Sound_Total7 q2 h( v4 o4 d+ e- q/ N
  2243. LDA <Music_Cur,X
    / z0 i7 k1 E; K9 u# {
  2244. SEC
    / \. g; R2 N$ G$ w
  2245. SBC #10( b! s6 n, @, F) f: i/ G/ n
  2246. BCS Music_Song_Last_10_Set( [0 N1 S/ _6 d
  2247. LDA #$008 v! |1 r7 L$ @) [9 L) @/ d
  2248. Music_Song_Last_10_Set
    0 n4 i: T' ?1 O( s
  2249. STA <Music_Cur,X
      K4 ^8 g$ l6 I) F
  2250. JSR Sound_Reset_Proc
    : ?. S0 c( w: }* X8 ~1 z
  2251. JSR Music_Show) D/ \9 }; A+ O5 k! O
  2252. Music_Song_Last_10_End, {, i) ^" e2 t* I
  2253. RTS
    / g0 A" ]& }  z: y  ~2 G

  2254. - q3 ^0 ]) ~1 x9 @6 S+ ^1 H9 h
  2255. ;==================================================. z& Y4 Y9 `  N8 G5 p9 s7 d) H9 J
  2256. Music_Song_Next_10;下10曲
    0 W4 T* U9 r' z5 A- P; G
  2257. JSR Clear_Last_Track_Name5 D% _! J7 j- G  m* G
  2258. JSR Disable_Text_Draw
    8 r# m- `8 o* a
  2259. LDX <Music_Item_Cur
    5 a+ ]( K* g* O" W6 n  R/ o9 T  G
  2260. JSR Set_Sound_Total- W9 H" \0 w4 B7 n# _, ^
  2261. LDA <Music_Cur,X0 M. ~9 F" }& [2 p& h
  2262. CLC
    + t9 }" X0 s8 G( b
  2263. ADC #10" E! K# g7 G3 K
  2264. CMP Music_Total
    7 j$ s2 C' T" v: i5 G7 |$ A
  2265. BCC Music_Song_Next_10_Set- c' _, s" Y1 ^7 d$ c, F) C0 q2 \
  2266. LDA Music_Total; \* I) [1 O, E( r4 S* W; Z5 ?
  2267. Music_Song_Next_10_Set
    ( a+ E$ a7 {9 q( A$ }% }
  2268. STA <Music_Cur,X$ h2 T% @- E" o3 x. R, M% z; U- v
  2269. JSR Sound_Reset_Proc. E$ e! ^% j6 C6 d  w
  2270. JSR Music_Show
    5 Y9 s( D6 W/ I8 _" I
  2271. Music_Song_Next_10_End
    ) G  F9 i4 W+ q8 v) N; N: _. ]
  2272. RTS
    1 P2 [/ z) Y  P2 `/ _% O

  2273. 8 S& b/ m* H; e0 l  O
  2274. ;==================================================8 E% y" a. q* T; L
  2275. Music_Song_Last;上一曲
    8 [7 Y( A% O& c
  2276. JSR Clear_Last_Track_Name
    ! o) `& m: [" ?, f1 v
  2277. JSR Disable_Text_Draw
    2 R8 V( k! l! z0 [5 H7 `2 X
  2278. LDX <Music_Item_Cur
    + ]4 j* \6 K( Z! Z4 f* ]7 }
  2279. JSR Set_Sound_Total( h6 D' X0 W2 l( V' i
  2280. LDA <Music_Cur,X
    ; R; M& u$ ~" D0 U+ K+ c
  2281. BEQ Music_Song_Last_Set& H8 f5 G4 ~1 a( A
  2282. DEC <Music_Cur,X% @7 T6 M7 v( v7 `4 h  h
  2283. Music_Song_Last_Set
    : s% \- p0 }3 d! e5 v7 [
  2284. JSR Sound_Reset_Proc  O1 O% p- b) |0 u
  2285. JSR Music_Show
    2 q# d  ~4 w; r( U3 h- O  L
  2286. Music_Song_Last_End
    ) v$ e7 W% a- a4 I9 c& d8 a
  2287. RTS- T. L2 A' A' X# N0 o# d! I

  2288. + S9 I! X/ @" \4 C
  2289. ;==================================================/ W7 L7 ]8 u+ e; A
  2290. Music_Song_Next;下一曲9 I  A5 o+ j3 c" e. J% j4 h
  2291. JSR Clear_Last_Track_Name
    / z$ ~" G! F  ?# ]- M* n! g, [! N
  2292. JSR Disable_Text_Draw
    2 a3 j2 w3 Y* s
  2293. LDX <Music_Item_Cur; h, N8 ~' E0 s# Y) Z/ n
  2294. JSR Set_Sound_Total
    1 {( h% \1 D7 r7 a% l. N9 j
  2295. LDA <Music_Cur,X# M) e/ v+ r6 O6 f. f
  2296. CMP Music_Total
    , }; }) }  i0 _( M  L& q: O; b
  2297. BCS Music_Song_Next_Set# s8 V4 I. M8 c( w' }9 j# O
  2298. INC <Music_Cur,X
    " t8 T1 F+ z( p* Z& M0 l
  2299. Music_Song_Next_Set
    - t8 W2 x: v6 A4 H, i) f
  2300. JSR Sound_Reset_Proc
    / @) t3 [' W  P" k- w( _% m
  2301. JSR Music_Show# ?# V/ K# n# X  r
  2302. Music_Song_Next_End2 S) R' F* @; E
  2303. RTS. R5 o" z+ X/ d. y% f
  2304. % C  p% |; s. u, X, ~
  2305. ;==================================================% n# N) c* r: y- w; H
  2306. Change_Select_Item;改变当前选择项
    / F, J& h5 `  p/ E' m
  2307. ;--------------------------------------------------
    ' ~; p# j* w# r' f
  2308. Change_Select_Stop_Play_Item;停止/播放
    * P1 D: k* z6 y  O* L
  2309. LDA <Key_Once
    " r- v, b2 O4 ~, w# U" F; e
  2310. CMP #$10! t0 v. ~" m. `6 i
  2311. BNE Change_Select_Last_Item: R. m) G/ o( _' A4 i& y- ~% {
  2312. LDA <Music_Stop_State
    + g+ h# G# C* D: J1 E& \: F* O
  2313. BNE Change_Select_Play# a: i5 q6 U" z( O
  2314. JSR Music_Song_Stop& x/ J  Z  M+ A6 y. [3 i1 B, ?% W
  2315. LDA <Music_Stop_State, e6 E: c+ D* C7 f' L8 `) B5 h" o
  2316. RTS
    0 X6 D3 ~+ c2 g$ d0 v5 {

  2317. 5 n+ \" X% l, ]% A2 K( Z4 z: v+ a8 n
  2318. Change_Select_Play1 a7 c2 q& j( G/ C6 n& u
  2319. JSR Music_Song_Play2 ?2 q; Z( X0 _
  2320. RTS
    $ z. Q; T' z2 v

  2321. 4 E2 r/ @/ z4 V, r- A
  2322. ;--------------------------------------------------: S' s0 s' ]5 d6 P6 Z
  2323. Change_Select_Last_Item;上一个专辑, i% L8 C. T0 u6 `  s
  2324. LDA <Text_Disable_Flag$ B. `* M2 T- K2 N1 \* b
  2325. AND #TEXT_DISABLE_ITEM
      ^8 A4 ?4 L4 q# o. Y3 f* a5 o
  2326. BNE Change_Select_Item_End
    / I: B6 v4 m  v# D
  2327. LDA <Key_Once
    % x4 T+ M' j0 \# E
  2328. CMP #$08
    9 A: e$ u5 b2 s
  2329. BNE Change_Select_Next_Item
    ' Y$ M0 p8 R# |3 d
  2330. JSR Last_Item7 h; R/ A, m) F& {0 Q4 g; e
  2331. ;--------------------------------------------------
    5 S: B% X$ D8 m0 L- _' C1 ~8 Z
  2332. Change_Select_Next_Item;下一个专辑
    7 C1 @: D% L2 D( y' J' T
  2333. LDA <Key_Once
    ( G& v7 L" h: R" W
  2334. CMP #$04
    - V9 Y* G+ n- ]% W  t+ |$ D8 M; j
  2335. BNE Change_Select_Last_10% E- O0 h2 Q( M+ i- G! \
  2336. JSR Next_Item
    ) z' Z& j1 k4 ^* |0 u! c6 X
  2337. LDA <Music_Item_Cur0 V8 S% m* x7 D& Y; V# W, s
  2338. JSR Get_Page_Start_Index. _+ a. C  y- Z4 A$ O
  2339. ;--------------------------------------------------/ O% n! w3 n& x! x
  2340. Change_Select_Last_10;前10曲
    ! S; A  T4 i8 l' ?  j# p
  2341. LDA <Key_Once
    0 M, l( c2 v  ^% j0 Q
  2342. CMP #$406 f4 j3 b, H5 q$ @. |" @
  2343. BNE Change_Select_Next_10) v" o% w1 t& M/ W& e, a" q- j( q
  2344. JSR Music_Song_Last_10
    9 e* f3 G- t! J; w( h/ p, |
  2345. ;--------------------------------------------------( F0 Z- Z$ T+ j$ X5 X* h! l
  2346. Change_Select_Next_10;后10曲* Y% B/ R. D# K3 V" `9 A
  2347. LDA <Key_Once6 E8 `0 f  ^/ G. b7 r8 W
  2348. CMP #$80, e; D. l7 A5 M8 E
  2349. BNE Change_Select_Last
    . d2 x, W7 E: r% B9 p7 O$ X, f
  2350. JSR Music_Song_Next_10/ n* M3 I/ X5 J2 z0 C+ B7 b+ p
  2351. ;--------------------------------------------------7 R1 }: T6 R, r4 P$ H2 t, c
  2352. Change_Select_Last;上一曲5 v% h& e: C! p, V
  2353. LDA <Key_Once) D) d; H/ f0 o! }- M
  2354. CMP #$02
    7 }  F1 ?0 j* T% Z0 ?& w8 |
  2355. BNE Change_Select_Next' l6 I8 X8 l6 n+ ^
  2356. JSR Music_Song_Last2 h# M3 c3 r- V& \5 A) F6 c; C
  2357. ;--------------------------------------------------
    1 s% \' u0 Z; G4 d3 N# E" D" N9 A" r
  2358. Change_Select_Next;下一曲3 q2 Y$ _& k* b
  2359. LDA <Key_Once  @- ~1 w" ~8 P( c2 D, u
  2360. CMP #$01
    4 E1 g6 `- _& v! `& b+ o
  2361. BNE Change_Page_Next
    9 [/ x: F% b: X
  2362. JSR Music_Song_Next
    # ~; i& V- L) P& J+ K5 _' _5 z
  2363. ;--------------------------------------------------
    ; l2 l! }; f  O* a- c- Z8 \" }
  2364. Change_Page_Next;下一页( N- `0 A4 d1 ?7 p5 R' v
  2365. LDA <Key_Once4 t) M3 {: _# I( \8 N
  2366. CMP #$207 B6 k7 j  ?1 u1 d% L, v/ s
  2367. BNE Change_Select_Item_End
    ! \( c# S+ [- i# L, f" x# W* e
  2368. JSR Next_Page: k+ v! H, z* G. B) x) Y
  2369. ;--------------------------------------------------
    % V" F- I/ Q% D$ g: B- v9 H* b* c
  2370. Change_Select_Item_End
    ' F4 h5 R" P# ]7 I, g& O
  2371. RTS) @. T. o  P/ C3 J5 R

  2372. % O. o0 G, ^4 _2 y/ F8 p
  2373. ;==================================================
    - S7 [2 J' S% M: i& w5 [0 K4 S
  2374. Show_Arrow;显示箭头光标7 z# Y) a% e& h$ v2 `! C
  2375. LDA <Music_Item_Cur
    2 P# Q- |  a& h" e
  2376. JSR Get_Page_Start_Index$ Y/ q) e% _0 d5 t
  2377. LDA #$00( B+ [5 l0 _1 ^7 |  T  a
  2378. STA PPU_OAM_ADDR# k; M6 L) q- [+ g
  2379. LDA <Music_Item_Cur4 R$ Y7 t/ q7 W. R# ?# u
  2380. SEC
    5 w" f+ \' w8 k; |3 t* K
  2381. SBC <Data_Buf1 f# Q. x; H) d, J* y$ f4 o; s0 U
  2382. ASL A
    4 b3 ^( D; M, j# d/ P
  2383. ASL A
    ! l8 h0 g7 [% U2 ^; S4 d
  2384. ASL A- w5 f4 ^5 }5 x
  2385. ASL A
    5 ?" K, }  l' E2 J6 w! y- ?2 R
  2386. CLC
    ' p# W" U7 V2 ~) B& e. J
  2387. ADC #ARROW_Y_OFFSET4 x2 s0 D2 ^9 u3 l3 j
  2388. STA OAM_TEMP_ADDR + $003 |9 _* Z  T. ~4 `8 U& D
  2389. ;STA PPU_OAM_DATA2 M8 x& b$ t5 @5 g/ s0 N
  2390. LDA #$1F
    0 t0 d+ k( w/ L* y
  2391. STA OAM_TEMP_ADDR + $01) v6 g! p0 b' @* o% [; t) y
  2392. ;STA PPU_OAM_DATA
    , d4 `0 \* i, R/ I! ?( J0 f3 b
  2393. LDA #$00
    $ h9 o5 h, l* o7 o  @2 G/ f  D2 {
  2394. STA OAM_TEMP_ADDR + $023 P3 k" d. p; P! s
  2395. ;STA PPU_OAM_DATA5 G/ N9 F2 t1 f" o
  2396. LDA #ARROW_X_OFFSET0 U2 F( M+ }2 \; \0 c) I% |# K
  2397. STA OAM_TEMP_ADDR + $03$ v8 u  h  A2 n+ k8 m+ U, r
  2398. ;STA PPU_OAM_DATA1 T, e, e6 V8 p, W) D
  2399. RTS+ G5 _$ S# F4 R2 j" E) ?# b

  2400. 1 Z# I+ {% m* _
  2401. ;--------------------------------------------------. T$ t$ [' m) a$ C6 [
  2402. ;命名表数据  j( W% P0 D$ M5 h" h) }, j. u) D
  2403. Palette_Attributes
    2 ^& U' v/ ^. Z1 Y. _
  2404. .IF SOUND_BAR_SHOW_ENABLE
    ' z" T! O# P% H7 ]* r5 _
  2405. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    8 P7 H5 j! c; n& c+ \. M
  2406. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55" x$ `! u. G) i* a, ?: E' z9 X
  2407. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75
    8 l! C+ q0 _- t9 e  G4 H( m
  2408. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
    6 q8 g* S! j) l" R+ _
  2409. .ELSE
    0 v! t4 Q! E3 U7 _
  2410. .DB $00,$00,$00,$00,$00,$00,$00,$00,$55,$55,$55,$55,$55,$55,$55,$55
    8 X: ^- U7 ?+ _
  2411. .DB $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55
    8 X( Z. }4 g6 ], F& w$ h
  2412. .DB $55,$F5,$F5,$F5,$F5,$F5,$F5,$55,$55,$FF,$FF,$FF,$FF,$FF,$FF,$75! v" H& G# w$ U) j- k3 b" L
  2413. .DB $A5,$A5,$A5,$A5,$A5,$A5,$A5,$A5,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA7 Z. k! `' b) O! Y5 Y/ F6 h
  2414. .ENDIF
    9 V6 u! J' b% D+ E! t: L; o
  2415. . y/ B2 p; f) i0 E+ Y
  2416. ;--------------------------------------------------
    " V, t) n  `* R8 E% X3 o2 \4 Q& v
  2417. ;调色板数据
    6 f1 q! X4 J5 H4 a: e. d5 b( D
  2418. Palette_Data
    " z8 _; d' Y$ D$ \2 e
  2419. .DB $0F,$27,$20,$0F,$0F,$23,$20,$0F,$0F,$21,$20,$0F,$0F,$24,$20,$0F2 k8 ?# Q) u) Q9 E
  2420. .DB $0F,$21,$24,$25,$0F,$24,$20,$0F,$0F,$24,$20,$0F,$0F,$24,$20,$0F
    + ~6 Z, B" b- V/ }1 A
  2421. 3 ]$ V$ k0 X- G' i* Y
  2422. ;--------------------------------------------------) k2 W/ `8 ^8 q6 H- z
  2423. Static_Text_Data
    ; \' p% h9 d$ V' z8 g/ \
  2424. .WORD Static_Text_Caption_Data1 ]- J9 J3 @& R9 Z( r
  2425. .WORD Static_Text_Author_Data& w* F: ]+ G) p6 b  S
  2426. .WORD Static_Text_Date_Data/ I2 }2 A6 u5 ]
  2427. Static_Text_Data_End# f8 Z: Q* c" m$ S" J# C

  2428. * M# W- U' w5 k
  2429. ;--------------------------------------------------
    & v8 c8 ?$ r* o6 o
  2430. Static_Text_Pos% W6 K$ g8 d1 \
  2431. .DB HIGH(Caption_Text_Pos),LOW(Caption_Text_Pos)
    * L7 M0 z8 w2 I  F  W
  2432. .DB HIGH(Author_Text_Pos),LOW(Author_Text_Pos)
    8 R8 v* W- E6 u( Z5 o
  2433. .DB HIGH(Date_Text_Pos),LOW(Date_Text_Pos)$ P9 A8 Q7 ~" H, a9 C
  2434. Static_Text_Pos_End
      _; D4 A) a( }4 o; k+ P

  2435. , {  J& D! g6 j' t1 \# w+ W; s
  2436. ;--------------------------------------------------: |+ K; `' v- K
  2437. Music_State_Stop
    : K4 r% r; p, s/ D7 |
  2438. .IF SOUND_BAR_SHOW_ENABLE* t6 ]" V- P- _$ @
  2439. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$000 U. m6 O9 Z+ V
  2440. ELSE
    4 M9 v% l# a: @' |$ s' ~
  2441. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"STOPPED",$00* g+ X: v8 p6 z2 s$ `9 A+ O2 b/ \: n
  2442. .ENDIF! e) [9 t+ v, R
  2443. Music_State_Play
    1 Y  q4 Z' q8 x
  2444. .DB PPU_MODE_CNT_LINE,HIGH(Play_State_Pos),LOW(Play_State_Pos),$07,"PLAYING",$00
    8 Y5 t% h' j5 O) D

  2445. " U! X: S$ _- g+ B* }8 c
  2446. ;--------------------------------------------------
    8 Y' B3 z4 O) W& w  o. E* u
  2447. Sound_Bar_Text_Data;声音类型文本
    ! y7 B  ~( r$ ?" b: ^! {4 W
  2448. .DB PPU_MODE_CNT_LINE,HIGH(Sound_Track_Pos),LOW(Sound_Track_Pos),$04,"SQ1-". m+ {# @- Z# h- s  ]  v
  2449. .DB PPU_MODE_CNT_LINE_NEXT,$04,"SQ2-"
    8 b: M' P# c- W, [; j
  2450. .DB PPU_MODE_CNT_LINE_NEXT,$04,"TRI-", E: [# V) X! q) l  |
  2451. .DB PPU_MODE_CNT_LINE_NEXT,$04,"NOI-"! I5 e4 ]4 b, o9 E: B. N
  2452. .DB PPU_MODE_CNT_LINE_NEXT,$04,"DMC-",$00' B2 {+ u  w2 ^4 K
  2453. 5 ?" i4 w2 A% n/ A
  2454. .IF Track_Name_Pos% F: r+ u4 I) F. m" w; z+ N

  2455. : K5 ]7 H* `' c/ G8 }
  2456. ;--------------------------------------------------( A  V" K+ B6 i& Q
  2457. Track_Name_Addr_00;曲目名地址索引7 S( S0 _. n: c
  2458. .WORD Trackr_00_01
    ( p9 I" P8 i' }# t+ w. V

  2459. " n* F- R: p% ~' w& t- L
  2460. Trackr_00_01 .DB 15,"RAF WORLD BGM 1"2 @7 V# V4 a: g* K; c: ~
  2461. Trackr_00_02 .DB 15,"RAF WORLD BGM 2"9 t! m7 e4 t4 Z

  2462. 0 f3 o5 P* j9 P
  2463. ;--------------------------------------------------
    ' a; U0 E3 T( C" J
  2464. Track_Name_Addr_01;曲目名地址索引% G) E( r6 ?6 l# T$ S/ t
  2465. .WORD Trackr_01_01* \# d$ f# x. y0 S: ~! A: G, V6 |
  2466. 1 D8 V9 u) P1 L6 Y$ D' Q  o4 B+ F
  2467. ;==================================================
    2 @0 W/ p2 Y* z- B$ c& h
  2468. Trackr_01_01 .DB 19,"FINAL MISSION BGM 1"
    1 Z' j: {& b) U7 H0 ?
  2469. Trackr_01_02 .DB 19,"FINAL MISSION BGM 2"0 E- l/ }) Z: o8 n

  2470. " {! e: v! ?% h$ c# S: x
  2471. ;==================================================5 G6 c2 c: ]1 w$ F5 E: F" T0 v
  2472. Track_Name_Addr_Port            ;曲目名地址间接索引
    + n' Y1 g& ?6 _+ |, D
  2473. .WORD Track_Name_Addr_005 d' a  c  {9 A
  2474. .WORD Track_Name_Addr_01$ @) Y& q- S* s: Z1 o4 a. K3 x
  2475. .WORD Track_Name_Addr_01
    $ U: Y4 q$ r( ^9 W. p" f
  2476. ( i0 [1 N+ A# U3 @( w
  2477. .ENDIF  y, r4 I5 _2 H9 t: l" X5 O

  2478. 1 E8 I- i& g2 Y
  2479. ;--------------------------------------------------
    9 E; @3 R) x* T" i/ d
  2480. Static_Text_Caption_Data;静态文本数据
    ; f2 W9 {2 ^4 T, g0 D
  2481. .DB 16
    3 h/ `' n# b- O' P4 [
  2482. .DB "FC MUSIC 12 IN 1"
    2 p$ D( e4 C: f0 g
  2483. Static_Text_Author_Data7 T/ Y# x. c" @, }
  2484. .DB 252 c9 K# w6 X1 h7 {2 Z9 S2 v
  2485. .DB "EXTRACTED BY FLAMECYCLONE"; s( n0 ~# Y8 Z# G/ r3 A2 h  b" M
  2486. Static_Text_Date_Data
    5 M) h* n: E( p# B
  2487. .DB 10
    6 @# G- g: y; z7 C) @: Y
  2488. .DB "2023.07.23"
    , _# m; j2 Q( E

  2489. & q4 r3 M( \% V* x
  2490. ;==================================================$ y! w- s7 f1 e8 J. m3 _! c
  2491. Music_Collection_Name               ;专辑名间接索引7 D6 s4 H( g$ c: y3 K* U$ M
  2492. .DW Music_Collection_Name_00
    6 C, h  b( e% o8 u" @- d: {; q
  2493. .DW Music_Collection_Name_01
    " n0 D2 F- E$ s# J
  2494. .DW Music_Collection_Name_022 F  y1 u& e0 h) V
  2495. .DW Music_Collection_Name_03
    8 x/ H* D9 J2 B0 h+ U
  2496. .DW Music_Collection_Name_04
    0 d8 G! u  V" v
  2497. .DW Music_Collection_Name_05
    8 r" {( R! \/ l7 s; a5 U8 |
  2498. .DW Music_Collection_Name_06* I9 _! O* }$ A
  2499. .DW Music_Collection_Name_07
    # D6 U5 Z# {1 f/ f! R3 y9 F* h
  2500. .DW Music_Collection_Name_08
    7 Z9 x& w3 M6 G# Y/ i
  2501. .DW Music_Collection_Name_09
    ) Z$ C% Z/ L- [
  2502. .DW Music_Collection_Name_10
    # K2 B' `: J( ~
  2503. .DW Music_Collection_Name_11
    : `* W$ P4 S( L7 w9 s

  2504. " @" T$ W+ ?5 ~& T4 ], E* J
  2505. ;==================================================
    + |, _; P/ s4 }0 _# O) `7 F
  2506. Music_Collection_Name_00            ;专辑名文本数据
    ! m, P, t, a8 m: u; |) _
  2507. .DB 11,"1.RAF WORLD"
      ?1 Y" m6 E, \5 k( ]
  2508. Music_Collection_Name_01
    - {- `8 q( X+ v* b- I
  2509. .DB 15,"2.FINAL MISSION"  h, Q! T, {  G% n  R$ W% A5 i
  2510. Music_Collection_Name_02; S3 m# u# T' f
  2511. .DB 06,"3.KAGE"
    1 \7 ^4 `) u( Y  P4 W5 v; j0 U
  2512. Music_Collection_Name_030 {5 j) k2 T. j
  2513. .DB 16,"4.DOUBLE DRAGON"8 y$ N" M$ {4 F7 U- g
  2514. Music_Collection_Name_04
    ! Z4 k$ m/ q& r+ @1 b. z$ I
  2515. .DB 17,"5.DOUBLE DRAGON 2"
    + C- k/ u2 T/ N: ]8 `) o- L
  2516. Music_Collection_Name_05
    ( F6 W  A3 L& {) l% l# V% s3 u
  2517. .DB 17,"6.DOUBLE DRAGON 3"# ^! n( X! Q& w. K) J) j: L; Q
  2518. Music_Collection_Name_06
    9 Y3 w7 K6 A9 H
  2519. .DB 09,"7.ROCKMAN"1 x/ c; x6 ?6 J. c$ S% r# K
  2520. Music_Collection_Name_07
    / Y, K2 S1 G2 d& ^- d  f) @
  2521. .DB 12,"8.ROCKMAN 2"# L: H, W5 q" U: Y2 w4 @9 H" t
  2522. Music_Collection_Name_08. V( M0 C, g# n# r' v  f
  2523. .DB 12,"9.ROCKMAN 3"1 r% }+ T/ Z' `; X2 `  K
  2524. Music_Collection_Name_09& N. X7 h) S* k! J. |6 t9 i5 Q
  2525. .DB 12,"10.ROCKMAN 4"; i& K; A, n* u0 j/ ?  M- O: u
  2526. Music_Collection_Name_10: M6 V. C4 Y& A4 k* ~& j' [
  2527. .DB 12,"11.ROCKMAN 5", ^$ L7 h3 B$ d2 c
  2528. Music_Collection_Name_11
      M8 ^9 X& \8 x$ k9 l
  2529. .DB 12,"12.ROCKMAN 6"6 j2 |, i' u6 N
  2530. 1 e0 m6 A- b) M6 m6 q
  2531. ;==================================================
      A% O! f8 y) t2 ~8 i
  2532. Track_Name_Addr_Flag                ;显示曲目名标记4 {" }% a2 r' U' U5 k
  2533. .DB 0,0,0,0,0,0,0,0,0,0,0,07 N9 \) E& D6 y
  2534. * v0 F+ K# ^- @* g+ Q" h! `
  2535. ;==================================================  g1 P7 m) B, V. C" `
  2536. Item_Pos_Data                         ;光标箭头位置
    & y; ~3 r  t0 v% e' M7 u2 {$ R
  2537. .WORD ITEM_SHOW_POS7 O7 _) ]* g. E% F
  2538. .WORD ITEM_SHOW_POS + $0040
    6 B5 z. [$ s4 g4 o( _
  2539. .WORD ITEM_SHOW_POS + $0080
    # J! ?5 {$ S1 e
  2540. .WORD ITEM_SHOW_POS + $00C0+ G. p; k9 m, J6 O9 \" i' O
  2541. .WORD ITEM_SHOW_POS + $0100
    3 q9 I/ H: k' E! T1 b
  2542. .WORD ITEM_SHOW_POS + $0140
    9 M3 {4 ~; @3 T7 f) n

  2543. . y3 N4 ]/ g7 Z2 l
  2544. ;==================================================; ^* a4 f8 P6 h
  2545. Sound_Init_Port                 ;音乐初始化入口地址
    ) V* h0 B2 N9 h+ P# l# B
  2546. .DW $BFC8# S$ C9 c8 j5 O7 s3 r& }1 z  ^8 W8 u
  2547. .DW $D7F0
    + ~- F+ b6 }  s- H; n& o
  2548. .DW $9FC0
    9 L" c$ m' ]% q( g3 _6 r
  2549. .DW $BF703 c( J' R0 c6 k
  2550. .DW $8003  Q/ w6 z) e+ A- l
  2551. .DW $BF30
    9 R' @# ?3 j1 e, q; @
  2552. .DW $9003; F: d0 z( p  s& H+ T
  2553. .DW $8003
    ' w8 B. i0 x% g/ ]) X, g
  2554. .DW $8003* [/ k/ l9 z) v
  2555. .DW $8003
    " r# c' P0 `1 g5 G! [
  2556. .DW $8003
    : ^9 z& V2 m+ |5 a8 _8 j
  2557. .DW $8003, w1 S' e5 I9 T/ N
  2558. 0 F5 ^/ i5 S7 H- f9 z
  2559. ;==================================================" @3 A  X* Q# K
  2560. Sound_Play_Port                   ;音乐播放入口地址" P1 k( c% R9 l$ x; ]* F
  2561. .DW $8000
    ' R; ]  z: `+ e
  2562. .DW $8001  F# ], p7 v) m; x
  2563. .DW $A000" I( W9 J# _8 a9 n" f0 \+ M
  2564. .DW $80037 }7 Q! Y1 N' q
  2565. .DW $8000
    + ~  b% H. ]8 w0 D7 j" E
  2566. .DW $8003. r; X- N3 @, A) e* O6 I. ~
  2567. .DW $9000
    ' r3 C8 R9 }" |, p2 o
  2568. .DW $80004 `* `1 l/ B4 j, [# S: \9 I& _
  2569. .DW $8000
    , a7 @1 p' l# l! z9 Z8 K5 b
  2570. .DW $8000# ]" N. c" B8 U' k* U# n: x
  2571. .DW $8000
    2 J8 c& k! C, z: ?0 q8 `
  2572. .DW $80001 T9 l  y- f8 ?, G
  2573. , u) R) o) D1 f# H
  2574. ;==================================================: n6 v7 }% V4 |4 j5 @0 q5 @
  2575. Sound_Reset_Port                  ;音乐重置入口地址
    1 |# e  k: }0 T
  2576. .DW $0000* N/ }, d6 I  a; ~$ ?
  2577. .DW $00006 k1 ^; b2 @! U2 T% a' V: Y
  2578. .DW $0000% U- Y- [* B0 h4 ~% U6 _7 e+ q
  2579. .DW $00001 d/ A0 E! G  f/ |( S  h5 m
  2580. .DW $0000
    ( f! z4 u0 @$ [$ ^3 a- ^
  2581. .DW $0000* M) ]. {1 |4 R2 K
  2582. .DW $0000  P8 }* m' k& T/ O: K9 ~
  2583. .DW $0000
    : v1 J0 M+ f. m- f2 Q
  2584. .DW $0000
    + F: o+ y6 X1 X7 X7 v2 ?
  2585. .DW $0000
    " N0 d# s+ n' `; d( V% v
  2586. .DW $0000; u( g/ M, h3 a( {  `7 u
  2587. .DW $0000
    ) |3 s" e+ n& ]* H7 }5 ]- G7 @

  2588. 7 @: ?1 ~8 e1 w9 l" A6 H* k
  2589. ;==================================================
    1 b% M2 A0 T: W- T5 \
  2590. Sound_Total_Port                          ;曲目总数! r7 Y: V. x2 l% ^$ |( D
  2591. .DB 38
    " q1 l- l( x5 x# t( W
  2592. .DB 33
    1 x, g6 e- M2 ~% U( k* G9 {
  2593. .DB 49
    & g* d# [4 w. s5 L  X# h" J
  2594. .DB 41
    ) _6 ]! @3 e, C; [$ J: ?# |3 u5 r
  2595. .DB 837 B; G' H& [1 S) B$ f# f/ }
  2596. .DB 70/ F! D# e; a6 M# Y8 P! W
  2597. .DB 50+ p* f( T/ E+ E) p
  2598. .DB 67& O; n7 G4 g4 K) Q7 j
  2599. .DB 57
    . j' P5 m6 g- N! o
  2600. .DB 71
    0 w2 g6 `. v; e( z8 ?  f: e. N
  2601. .DB 76
    - ]/ v" a+ k1 v( Y! D0 U2 ?
  2602. .DB 102
    1 m" c; ^3 ]" Y: x9 e6 f. t

  2603. 1 y3 b+ g5 L0 Z+ k9 T; w" k
  2604. ;==================================================" L$ L! B( b+ H, p: V- P$ k8 ]3 w
  2605. Sound_Start_Port                      ;起始播放曲目7 K' ?4 {3 I$ _; v) z
  2606. .DB 00
    1 [+ a. d7 ?$ z# ?
  2607. .DB 00- Q/ X' J1 R- _* P( ?4 o
  2608. .DB 006 F7 p: ?$ S2 m: Z# N
  2609. .DB 00
    8 }7 ?( E' t* K
  2610. .DB 00
    % E  F* B, P3 M# c+ v
  2611. .DB 007 ^" q% M- t! X0 j
  2612. .DB 00
    & \  I0 ?! p* k1 }+ n
  2613. .DB 00
    3 p: g; z, f7 D- |1 {
  2614. .DB 008 x1 Z4 r6 l3 v+ o1 K
  2615. .DB 00- v# c4 f* t- X6 r& G+ Z
  2616. .DB 00
    2 r1 f  W( F' P3 B5 I
  2617. .DB 00; H2 o3 _/ b3 j8 \. b7 v

  2618. ! p0 Z0 m3 y# g) B2 k. q  ~
  2619. ;==================================================4 g5 Z% W: k7 z- D4 K/ B& g% F, H: x8 L
  2620. Sound_Bank_8000                      ;专辑bank_8000
    ( Y% p' F+ Y$ s% S3 l: p
  2621. .DB $10
    9 P! ~/ d& k6 ?1 o$ @9 V' \
  2622. .DB $12
    # a' q, j: G2 \. o, m
  2623. .DB $14
    $ P; x2 t2 m+ B7 n% w
  2624. .DB $16
    1 E5 f3 [* R- }; ^
  2625. .DB $18
      N# X/ l; N2 M6 b, r1 F! o
  2626. .DB $1A
    . m/ \/ i  Z' ^6 ]/ {/ |
  2627. / A: l( N8 i1 s$ d3 }4 Q
  2628. .DB $00
      M! H7 y( R. i+ [
  2629. .DB $029 k8 Z" \' ]7 m' k* j1 y
  2630. .DB $0D
    ! p7 F6 o! m( L: y& ?0 M4 w! g- e
  2631. .DB $047 s: w3 Q- b, b& _; ?+ e6 k
  2632. .DB $07
      P- y; ^8 [2 T9 d, ]
  2633. .DB $0A& E" C( V3 x$ `& P4 k
  2634. 0 y: R, n" i2 Y& a) W
  2635. ( x! C" g7 y0 @7 P
  2636. ;==================================================  T, o$ c8 r3 a, |& X; ]) N- X
  2637. Sound_Bank_A000                      ;专辑bank_A000
    0 P- z7 H( L6 ?* E% \
  2638. .DB $11
    8 |4 M5 p- D! ]
  2639. .DB $132 O2 ]) J  b: ?- K& \
  2640. .DB $15
    1 Z$ b3 Q: b0 }
  2641. .DB $17
    8 f. j0 _1 b$ q  s1 L/ o
  2642. .DB $19
    / i3 P1 X  c7 F" f# B; w% i) \
  2643. .DB $1B
    ' {3 Y- t& I2 u
  2644. ! C: t) j( m+ c
  2645. .DB $01
    1 `2 ?# F  x$ a, K+ C4 w
  2646. .DB $03
    ! E* G1 p, V5 T* i
  2647. .DB $0E
    2 f- P9 {8 U1 D/ ]$ v
  2648. .DB $05
    4 c! Z/ ]& o/ c, n2 Y
  2649. .DB $08+ A2 D0 k9 `8 w) E9 E, _' R; [
  2650. .DB $0B
    & Q) z3 S. h, }' [2 ]
  2651. 1 \$ y# {6 l& W  K

  2652. # W8 Z4 ]7 A9 R
  2653. ;==================================================: i! @7 m6 E8 y* H6 p; z; w
  2654. .BANK RESET_BANK & BANK_DATA_MASK  a9 L0 M1 x: m! U* o3 e0 F+ |
  2655. .ORG RESET_ADDR
    # v' W8 S* s% @$ P) A  a
  2656. ) y" p2 L4 |7 c
  2657. ;==================================================. |& q8 k4 Q3 w/ a: n& J" M
  2658. Switch_Bank_8000;切换bank到8000-9FFF' P, _$ y% ?) u  f! d% x1 J
  2659. PHA
    % f  O% E. T6 z  d) ^
  2660. LDA #$06
    : d  g/ |; g$ p' f
  2661. STA MMC3_BANK_CTRL3 E. F& _* Y5 ^, g
  2662. PLA
    8 a  k9 u9 R+ w
  2663. STA MMC3_BANK_DATA
    : y- I$ s# n- `, \
  2664. RTS. b( k! `* j* g* g
  2665. + j% l! S0 ^0 H# y- |; s0 d
  2666. ;==================================================) \4 h$ s" y6 A, [  Z
  2667. Switch_Bank_A000;切换bank到A000-BFFF
    & h: L5 |7 v/ b& i) w
  2668. PHA
    ) y3 w6 A0 f; v: H( H) b
  2669. LDA #$07
    ( ~* p. H" X& p4 k9 p8 |* K
  2670. STA MMC3_BANK_CTRL
    ; x6 m" a" A3 ]" K4 J$ T
  2671. PLA: o' J, X6 ]) O, h) m9 A2 Y- y
  2672. STA MMC3_BANK_DATA: h; V( ^% |7 `: a
  2673. RTS
    " U) h9 }) w! v6 n5 N9 D$ z: {% j
  2674. ' d" _% x4 l" M0 C/ Z
  2675. ;==================================================1 N& Y  V% S) b4 k( B; A, ~; o5 t
  2676. Switch_Main_Bank;切到主程序bank
    % l9 W7 O( `8 [7 ?; ?9 |7 G
  2677. LDA #PROGRAM_BANK & BANK_DATA_MASK3 n' I8 Y% v4 s1 y+ m0 c& g
  2678. JSR Switch_Bank_8000   ;设置$8000地址bank
    5 D3 {. H0 H  A
  2679. RTS" ~8 y' E; B: Q' F3 w
  2680. ; W! z- l& T" u; y& u1 t2 C5 B
  2681. ;==================================================3 O) _) ~+ Z7 x5 X4 M7 N) H
  2682. Sound_Reset;音乐重设(如果有的话)
    1 Q7 ^1 p7 d. R' S1 K& W
  2683. JSR Switch_Music_Bank  ;切换到音乐bank0 L7 v. K) j  J4 C( m8 F
  2684. JSR JSR_Addr_Op        ;执行音乐重置  B% d3 h" }  t' I
  2685. JSR Switch_Main_Bank   ;切回主程序
    6 v. h  L8 g) M& U3 C
  2686. RTS
    / A/ j+ b& K4 S7 |; p- p

  2687. ; e+ r. B( f7 \. g) D8 }, R
  2688. ;==================================================
    , `* H* [! T8 K1 Q
  2689. Switch_Music_Bank;切换音乐bank
    3 P0 G0 t( N' O1 w2 L
  2690. JSR Init_Sound_Bank    ;拿到音乐bank号
      y6 r$ w" P2 S' ?# Z" T0 |
  2691. LDA <Music_Bank_8000& k; @- q0 s0 o
  2692. JSR Switch_Bank_8000   ;设置$8000地址bank; V3 W: f# Z- f# [
  2693. LDA <Music_Bank_A000
    : e9 D$ U! ?( H* I' ]2 p6 s
  2694. JSR Switch_Bank_A000   ;设置$A000地址bank* L+ ~, o( O( K$ c8 X: K. v7 |
  2695. RTS
    " J6 h+ p- l+ l' i  ]
  2696. ; [# ]* o# p8 U/ i' \5 J; S
  2697. ;==================================================
    + A  ?1 ~& ^; L" r' }, A
  2698. Sound_Init;音乐初始化
    * W( G9 q0 A- _
  2699. PHA
    9 _  y8 A; O! N" G  ^0 \' @. X
  2700. JSR Switch_Music_Bank  ;切换到音乐bank
    ; i1 j  j" {4 `/ j8 s0 L6 \1 k1 Z
  2701. PLA5 d# f) l* f7 D% s/ {0 P
  2702. JSR JSR_Addr_Op        ;执行音乐初始化1 j& _3 E1 [! ]5 K# E8 z0 V
  2703. JSR Switch_Main_Bank   ;切回主程序0 B) I( ?% t5 p3 G
  2704. RTS
    9 g- R9 O( L# J  T1 V: Z

  2705. 7 }1 N. p/ {* t1 s0 a
  2706. ;==================================================+ R( C& k, j& u5 }7 s6 ?
  2707. Sound_Play;音乐播放
    2 J- u# i& g% f) t2 V
  2708. JSR Switch_Music_Bank  ;切换到音乐bank
    0 i! ^5 M5 U; j! ?
  2709. JSR JSR_Addr_Op        ;执行音乐播放3 D9 V6 j7 a* @" ]6 u7 t
  2710. JSR Switch_Main_Bank   ;切回主程序
    7 e' P7 @9 T) @6 ~
  2711. RTS) f! l. y( u4 L) q
  2712. 1 o9 A' w. ^3 B! [; j
  2713. ;==================================================
    5 R* ~6 A  |3 R. K1 E# I/ U% z
  2714. MainLoop;死循环$ `$ n0 K8 b1 T" ^) v! D2 J
  2715. JMP MainLoop
    / a- m2 a* z, V& v9 }: w7 v& T

  2716. ! w) P  W8 t" b0 C
  2717. IRQ_SUBPROCESS_JMP = 0! \  Y# e5 M5 s

  2718. , S! R- B0 q$ f& }4 o
  2719. .IF IRQ_SUBPROCESS_JMP
      a: l6 c  M+ x) y  b- m/ Q
  2720. ;==================================================
    ) O4 |; T5 E0 R) d, V0 l% Y9 \
  2721. IRQ_Process_0;IRQ处理过程0
    0 ?1 ~' O0 \: k5 d9 H8 ~* J

  2722. + v$ g9 W3 q. ?- N5 I+ {1 V
  2723. ;15条扫描线后触发IRQ
    4 Q# _" i0 T% U( V% P9 @
  2724. LDA #15- d4 b) b, c, B8 _+ f6 _  b1 Q) p7 _
  2725. STA MMC3_IRQ_LATCH' K& r; {2 Q" u5 q

  2726. 0 K7 W1 k5 ^5 |0 E$ m6 u
  2727. ;设置屏幕滚动1 O+ m' D2 [' k+ o4 O
  2728. LDA <Scroll_H
    ) l( Y( r- l7 q* _
  2729. STA PPU_SCROLL- Y  ~- |5 w: P3 \) [! y3 Z
  2730. STA PPU_SCROLL3 D8 L! d7 z, m( o" l7 V* y0 ]
  2731. , j+ N7 z% c4 G" C2 D3 {
  2732. IRQ_Process_0_End
    . p* {" H2 a2 C1 ?, i3 \
  2733. INC <IRQ_Process_Index0 T3 b* R5 ^1 _
  2734. JMP IrqProgramEnd' X: ]! @( Q; O  h

  2735.   a2 G  z4 u5 [9 `+ U2 I
  2736. ;==================================================4 Y" Q2 N9 C% n7 W" g1 W
  2737. IRQ_Process_1;IRQ处理过程1
    * b$ y6 R4 a+ B$ K" D
  2738. ) f* N; w9 |+ J$ G% Y- O/ R
  2739. LDA #55/ P# I, D! f) u
  2740. STA MMC3_IRQ_LATCH" ~$ e; l# R2 h, O, U) V* \5 A8 }4 R

  2741. . k1 n/ q% t0 ~3 q) N
  2742. ;设置屏幕滚动
    - J+ y$ s& H" o" }$ [- t& t
  2743. LDA #$00  D5 ~3 N0 u2 J. j) O) y
  2744. STA PPU_SCROLL! w' Z9 k- q  w8 C, j! e( p
  2745. STA PPU_SCROLL4 j/ o) Y" [( M5 Y) C

  2746. 5 O, W9 O& j) a0 ^/ Z7 w1 A. C8 M
  2747. INC <IRQ_Process_Index; {- P' k, Y- Z) S0 q
  2748. JMP IrqProgramEnd
    / Z! [" ^# G2 W& z

  2749. 1 l' c3 e/ G- h, m7 E! c4 Y
  2750. ;==================================================/ F  u* o/ m0 n' T
  2751. IRQ_Process_2;IRQ处理过程2
    ( R* S2 n4 U; e% f  f
  2752. ' `8 @. @8 [/ E& n' t
  2753. LDA #15/ Q4 i( v/ Y# s# N5 g  e5 j" }
  2754. STA MMC3_IRQ_LATCH
    9 U$ t) Y% z) m" u$ V/ s
  2755. ' u& f3 k9 Y4 E5 @$ l
  2756. ;设置屏幕滚动
    7 N( N+ }! d2 J" B- X, q  [1 P
  2757. LDA #$00' x; s9 N* v6 E4 y+ H+ C
  2758. SEC+ p5 \$ M5 ?) j1 C% B" p/ z* z
  2759. SBC <Scroll_H
    + _6 [- e9 Y# I7 {
  2760. STA PPU_SCROLL; R9 W6 Z9 q4 f6 `  J$ ]; _  _. h
  2761. STA PPU_SCROLL" _- {* U8 ?: O! R/ A7 @

  2762. 9 L! A8 ]) G* T1 L' Y" |( J$ z
  2763. INC <IRQ_Process_Index
    5 Q4 B( F5 w+ J" i2 ]
  2764. JMP IrqProgramEnd
      T8 Y. k* o0 Y# K( v7 ~7 X

  2765. ' I+ S: N' X" I. n/ l0 ~
  2766. ;==================================================
    + I7 e; M% k. |4 O! d- X! _% U
  2767. IRQ_Process_3;IRQ处理过程3! L# S% A- N( i8 O. M9 l
  2768. 9 P  {$ o' O' q9 K3 ]1 |  h8 O, ~* @
  2769. ;设置屏幕滚动4 T4 f0 d) O/ A* K& X) ?
  2770. LDA <Scroll_H
    4 T" J3 B3 Z& N/ C8 o8 @. d/ ^
  2771. STA PPU_SCROLL
    1 l. x1 A, r% c. f6 }9 P& i
  2772. STA PPU_SCROLL0 y3 u( }( R9 H2 V  H) n

  2773. 6 b2 A. b9 v3 e1 l. b' @2 @. ]
  2774. ;禁用IRQ
    6 G4 d/ O3 r7 l+ Q! ]7 m
  2775. STA MMC3_IRQ_DISABLE" u; }: E4 M" k7 R
  2776. JMP IrqProgramEnd$ ~* `2 `. D; G+ i0 \" I
  2777. 2 D7 s' F  P5 i" P( A: L* _: H
  2778. IrqProcessAddr
    - s* P7 m; d* l
  2779. .DW IRQ_Process_0,IRQ_Process_1,IRQ_Process_2,IRQ_Process_34 Z$ r; Q& ]  |. I( l9 H1 F3 ]

  2780. % x  L* t/ k* e
  2781. .ENDIF% J% B: @. G) G# }6 u7 \
  2782. ) Z3 z; e' L  [" M. |
  2783. ;==================================================
    1 a$ J3 ?. d$ H( B
  2784. ;IRQ滚动模式常量5 B5 }! h, e( k. ~+ r* D) {
  2785. IRQ_SCROLL_MODE_ZERO    =   0       ;不滚动
    8 U% |# {  c9 X: h* R
  2786. IRQ_SCROLL_MODE_LEFT    =   1       ;向左滚动7 `5 h' |6 G0 ]- G% w
  2787. IRQ_SCROLL_MODE_RIGHT   =   2       ;向右滚动( r" L$ B' b8 p

  2788. ; }' f* Q5 X0 P
  2789. ;IRQ扫描线数据. X9 M6 P* V1 y7 y- V; \% B
  2790. IRQ_Scanline_Data+ w! p2 t1 E6 j" `& O/ s+ x
  2791. .DB 8
    + `. I; ~/ m. X- G; S0 v* M
  2792. .DB 54
    ) Q' I$ R4 W1 s; Y+ z3 y
  2793. .DB 8
    . M! b3 a- S- t' K3 T! a. V7 Y+ t' v) p
  2794. .DB 00 ;关闭IRQ
    6 {8 ^' Q) d; y* v  ]- ]4 g
  2795. 5 x4 t8 q: U& W" _. y% F$ S
  2796. ;IRQ滚动控制模式
    , w( G! F( ~% _3 G* v8 E) X
  2797. IRQ_Scanline_Mode3 i$ d: L% Q* j1 N6 R- k5 ]
  2798. .DB IRQ_SCROLL_MODE_ZERO
    % L: a; d9 }+ a/ q- p' w6 Q7 C
  2799. .DB IRQ_SCROLL_MODE_ZERO
    / p. W/ R/ K. X/ y. r* F9 ^
  2800. .DB IRQ_SCROLL_MODE_RIGHT
    ) ^& k' u4 d' m, m
  2801. .DB IRQ_SCROLL_MODE_LEFT
    & E- Y- P' k# P0 I  K

  2802. 0 c- }& }5 |! C" H8 }2 F; c
  2803. ;==================================================
    ! U+ v$ r- L# D( g  A% R3 C0 J
  2804. ;IRQ处理
    1 o5 L! O% n# ~+ ~  B6 R/ S
  2805. IRQ_Process
    6 u5 m1 v: V+ b% _5 @9 O* `
  2806. LDX <IRQ_Process_Index
    " l5 B2 n: I+ a8 J, i( u; h
  2807. LDA IRQ_Scanline_Data,X2 l8 f6 g. N/ z; e
  2808. BNE IRQ_Process_Latch
    8 O$ p  j" ?' N% p' b
  2809. IRQ_Process_Disable;禁用IRQ3 b5 i! A- Y  [# n! K6 _
  2810. STA MMC3_IRQ_DISABLE
    6 r' u" I9 }" @. D- Y3 P- Z
  2811. STA IRQ_Process_Index: u- _2 j3 Y: k% D) e4 A$ Z
  2812. BEQ IRQ_Process_Scroll
    % z/ h" ^' p' K0 Z% v) H& a
  2813. IRQ_Process_Latch;设置下次 IRQ 触发扫描线
    & u0 e+ r4 r1 s3 Y6 s: i# Z
  2814. STA MMC3_IRQ_LATCH9 A. n. Z# Y# {6 i. l
  2815. INC <IRQ_Process_Index
    $ e" G0 y4 E; N- p$ r; \# G
  2816. IRQ_Process_Scroll;IRQ滚动控制/ Q: H: f$ ]1 _* f
  2817. LDA IRQ_Scanline_Mode,X! |4 d" @) w- J. C1 ]2 y! f. b
  2818. CMP #IRQ_SCROLL_MODE_LEFT& B# _* f) L% s( t3 `
  2819. BEQ IRQ_Process_Scroll_Left) j3 y1 m3 Q& C
  2820. CMP #IRQ_SCROLL_MODE_RIGHT; V* f' H* [( e+ |  i' L" X
  2821. BEQ IRQ_Process_Scroll_Right
    : F( E% F* z) W& k( R( {
  2822. IRQ_Process_Scroll_Zero;不滚动
    # f" q" S$ b7 w: S5 S  T
  2823. LDA #$00( |3 T1 m  }3 L4 l& ]9 @/ m
  2824. STA PPU_SCROLL3 U5 F% X' g! e4 [" z) X$ D/ ]
  2825. STA PPU_SCROLL4 k7 ?! \$ R  P( c! @# V  s6 I: U. ]$ w
  2826. RTS7 |4 U' K0 u) s( I
  2827. IRQ_Process_Scroll_Left;向左滚动
    9 Y7 H- n1 ^3 W
  2828. LDA <Scroll_H2 X  y2 r' F: ?+ M' b  {
  2829. STA PPU_SCROLL
    ( Z4 d2 l2 V9 E
  2830. STA PPU_SCROLL
    & j) F  l+ H+ S2 ]  n  C
  2831. RTS
    # `+ C$ ~  y" ^' T( p  }: A8 \
  2832. IRQ_Process_Scroll_Right;向右滚动4 P5 ]% A# p5 J& q+ C
  2833. LDA #$00
    4 g6 J3 t6 T9 E* S# j
  2834. SEC- q. x; l/ f8 ]) S& u/ Z; o% v
  2835. SBC <Scroll_H
    % v$ y) r$ ^9 J4 @( a0 _1 @  D
  2836. STA PPU_SCROLL
    & A* ]; ]1 F- }1 h) T- ?; b
  2837. STA PPU_SCROLL
    ( x2 w9 `( F9 k  J6 S! w
  2838. RTS, |* J8 M1 y( r9 e, s( `

  2839. $ N5 e+ j$ R" X( k! S: K
  2840. ;==================================================
    6 u1 l' q( I8 G1 N; L
  2841. NmiProgram;Nmi中断处理
    / @) k5 X# p% T- L" I9 o$ D2 @
  2842. PHA. o6 |7 b4 A  Z! ]' m. k) @' L5 s
  2843. TXA$ k: O# {$ c0 V( H
  2844. PHA' p. s6 b" A9 S( Z3 w4 h
  2845. TYA
    $ g* ~- h. j4 x- |( y
  2846. PHA- @0 d) ?! m/ P# a$ \. m; [. G

  2847. , i6 A. v5 \# G; V) R, ?" h, }
  2848. ;读取清除Vblank标志, 防止重复进入
    3 g' }, ]) e, B* t2 p) D' L1 [5 F
  2849. BIT PPU_STATUS8 a/ ~4 J; i* J! `' L

  2850. 0 p" K. v* c. r/ l2 Y1 ?$ ~* f
  2851. ;切换主程序bank. f3 f  \3 f/ g, O) U0 |
  2852. JSR Switch_Main_Bank
    8 `; [  Z, ~  \' s7 z+ X

  2853. / M# [( d9 |! i, x
  2854. ;Nmi处理1 P' \2 h& d; }5 m4 ~$ v, J) a6 D
  2855. JSR NmiProcess& S8 S, C+ t* X5 f( A" ^

  2856. 3 C6 b; o! [4 F- \$ q
  2857. Nmi_Proc_End
    ! L# m7 i" s  }, ]& }; R8 h; t
  2858. PLA
    6 s+ v4 D  N: [( ~5 v+ a
  2859. TAY
    ; j7 y3 x4 {. Q! l- _9 n$ K) V* z
  2860. PLA
    0 ?" @" F! ?9 s4 ?8 u/ [/ o
  2861. TAX
    5 z6 P$ p. L! ?2 r7 H7 g
  2862. PLA9 {. M( l) D. q7 b
  2863. RTI
    / L; _8 S. a9 I, `
  2864. 1 ~7 \! _6 j5 A0 C. x7 P
  2865. ;==================================================9 z6 g6 z/ s  N* N/ N* R
  2866. ResetProgram;重置中断处理- J; F/ Q  u* }, k& r
  2867. SEI% h7 R6 x& k' h0 v* ?$ w* y
  2868. CLD
    ' O- t. U. l0 h6 o& p. o+ p2 Q
  2869. LDA #$00
    5 K$ |2 e( c* y: Y. V; l
  2870. STA PPU_CTRL) W1 T# n- C' g& o$ z: ]
  2871. STA PPU_MASK
    3 [, Z& }  b) F* V- x5 a

  2872. 1 g% }* p3 g2 Q
  2873. ;切换主程序bank3 X  j$ }3 w8 ^2 o' m+ c: c
  2874. JSR Switch_Main_Bank" [9 l8 B# c- @' c& n+ c* V
  2875. 8 |9 h2 f3 o+ y& f! j- a* O7 p
  2876. ;程序处理开始
    6 S0 z  f6 f6 Q) y9 D0 f- Z
  2877. JMP ProgramBegin2 ?7 m9 e# E4 p5 n% G9 p9 ?

  2878. $ f: g5 V* E; i& Z( i. f) ?* F9 r
  2879. ;==================================================
    $ i9 x+ u3 |0 a4 E% ?" X
  2880. IrqProgram;Irq中断处理! h! P6 x) J6 h3 h8 q
  2881. PHA' d. z! _0 f5 O' Q2 r  z
  2882. TXA, c7 A8 \4 |7 r2 F# M2 q$ `+ ~: Q
  2883. PHA
    ! p* r' e0 d) ~  |) v
  2884. TYA& C- N2 W$ s$ r& r3 ?7 E" V8 V
  2885. PHA
    % K  R! _% p7 G
  2886. 3 m, _. s* D" o) x- E& {* ~
  2887. ;关闭IRQ
    / S, c" m, y. W! N* l0 Y2 Z: D
  2888. STA MMC3_IRQ_DISABLE1 p0 b& N, H, T

  2889. 8 \- d8 d- |0 R3 ^8 q
  2890. ;允许下个IRQ触发
    9 B; `/ |; w/ r8 D8 ^
  2891. STA MMC3_IRQ_ENABLE9 E: Y5 \1 p. x& q# g6 f
  2892. 9 s! Q) c+ Q, P- P! {
  2893. .IF IRQ_SUBPROCESS_JMP% o2 P4 o) N! T7 Y  s! |" P3 A3 ]

  2894. , B' q2 x5 c# w# [
  2895. ;执行IRQ过程) X# x/ }" [& Q# U4 m! Q
  2896. LDA <Data_L
      ~  u0 U1 U+ o/ k7 L
  2897. PHA
    3 c# u' Q+ K$ M( G
  2898. LDA <Data_H
    8 s3 [$ Y/ w- }; b
  2899. PHA* m$ e  A" n. v0 D
  2900. LDA <IRQ_Process_Index
    7 c/ c- G* E0 S9 Z
  2901. ASL A9 V# B' i9 q# |; E9 M  X2 P$ ?
  2902. TAY6 E9 Y* m% \% E* I
  2903. LDA IrqProcessAddr,Y
    3 U. R6 E: ^& B$ R" _1 b
  2904. STA <Data_L
    * U) N/ V5 u/ ?) C6 ^
  2905. INY+ k1 d/ F3 D0 I8 L1 }
  2906. LDA IrqProcessAddr,Y9 E8 Y$ y" l0 m0 d5 M2 J, M4 e, c
  2907. STA <Data_H% c3 O" U  `7 l3 D# R1 o
  2908. JMP [Data_L]& ?4 X! H; P) L5 |+ j
  2909. - Q. h' t8 u' V  s5 }
  2910. .ELSE
    0 N& k. e/ Q* ]# {* X

  2911. , f: G- A2 \% ]
  2912. JSR IRQ_Process
    : l; A) n: X; k! c4 _8 l' u" k

  2913. # {& Z- W$ M: O* }3 U" {
  2914. .ENDIF
    5 N" k. ~/ S; p9 {" b0 _4 X

  2915. & I+ H% o  t1 }9 m1 x. f
  2916. IrqProgramEnd6 k$ {- \0 H  q- c( L8 V
  2917. .IF IRQ_SUBPROCESS_JMP" }$ {/ ^$ ~" g: _9 ~; {
  2918. PLA. a0 D% G& h/ `8 e$ ?
  2919. STA <Data_H
    * p2 z% T9 R" a5 a( s! |
  2920. PLA7 s0 v: l9 ]5 j1 I0 e- R: Z
  2921. STA <Data_L- X. C- B& t; x( v
  2922. .ENDIF
    * M; n0 B% A: z' T; `- o
  2923. PLA
    ; I/ C% m7 J2 S8 M5 m1 }4 x
  2924. TAY
    6 t  i4 B9 Q, ~, w7 j
  2925. PLA
    5 Y5 p- D- j3 E7 Q0 C
  2926. TAX
    ( U* Q6 O' D* b/ _  j- ~# x
  2927. PLA
    ! n. l, m; s( j6 D; D' e9 {6 }  m
  2928. RTI2 N' Q. J& F* x; u# r7 ]% ]( Q- H

  2929. $ W) n' K8 L. x. h9 ^5 v
  2930. .ORG $FFFA
    . L7 I1 B8 a( x" h' e" K
  2931. .WORD NmiProgram- j. g& q8 N+ A1 ^5 `# C
  2932. .WORD ResetProgram5 O; E) l, S% M  i! X3 P4 T% a
  2933. .WORD IrqProgram9 J2 Y* D" k; \6 `
  2934. 6 b" \+ `& b4 |' w: s6 D
  2935. .BANK RESET_BANK & BANK_DATA_MASK( [# _; \# w: j' u' o: ]  y
  2936. .IF SOUND_BAR_SHOW_ENABLE2 ~6 {* M% T/ E/ z

  2937. 5 w  J' D( a* d  [
  2938. .ORG $FE00
    8 C+ ?5 ^5 x" Q# C( Q# m1 g% I
  2939. PHA3 E3 g( y0 i" W5 X/ h4 ]/ I. J
  2940. STY $07BA
    : e2 g4 i  \* j8 p
  2941. LDA #$8D8 C  S1 D! S3 G  ?
  2942. STA $07BC8 x$ K) U$ e! U$ k: o+ L$ O
  2943. TYA
    ) C3 M% X0 i7 M0 w5 ^: ^4 Z
  2944. CLC% b( A  y& I- j1 }+ u
  2945. ADC #LOW(Sound_Bar)+ p8 e% Y/ i' I$ u# c3 F  q
  2946. STA $07BD$ M/ x  y; c* |- Y
  2947. LDA #HIGH(Sound_Bar)
    ) T1 ]) \, n, V: p- l7 c
  2948. STA $07BE
    / U5 \1 Z2 h7 V, ^  H2 Q, L. h# V& g
  2949. LDA #$60
    0 e% S) w. t9 T1 i# {
  2950. STA $07BF3 R7 @) C' D- V9 H0 E1 s9 s
  2951. PLA
      I& w- X  A" C9 n) |+ y8 W* ?
  2952. RTS
    $ N/ U8 u$ N+ K% C; f
  2953. ' s" v, N2 a- r6 u/ j' I% B) ?, q* L( V
  2954. .ORG $FE200 s: u0 a% [- g4 [
  2955. STA $07BA
    " l9 `  [: u: S5 m9 @$ Q% V' U4 x
  2956. CLC: I0 U+ _6 r( m% ~! R5 Z
  2957. ADC #LOW(Sound_Bar)( }( `9 F4 p4 |5 h5 k
  2958. STA $07BD! w8 B/ K, z1 Q4 m
  2959. LDA #$8D( g4 R4 c$ ^4 E
  2960. STA $07BC
    , W- [6 l: s; |. N
  2961. LDA #HIGH(Sound_Bar)! e6 v7 E1 R5 F. j3 c$ [3 k" T, p. _
  2962. STA $07BE  [7 S; h- g, S& y
  2963. LDA #$603 A) k* s4 N2 P5 R1 U" s
  2964. STA $07BF
    8 o8 H% Q3 {2 U4 R1 g! q1 k
  2965. RTS
    / B7 U; j6 P- P! G3 _! w
  2966. 3 M; x! {: j% S+ d5 H# U
  2967. .ORG $FE40! u# D5 P& l& f1 q( \0 j9 L& E8 p
  2968. PHA" J& {9 P! @) r- d5 G+ `5 d8 I
  2969. STY $07F1
    # k, b: |3 L8 d" @& X! @
  2970. LDA #$8D0 R) c- U  Q8 S% K1 `
  2971. STA $07F3$ |3 V0 K9 Y3 z4 L% `) C. f0 P
  2972. TYA0 q$ C! W, G( `
  2973. CLC
    5 D6 p0 a1 R8 C
  2974. ADC #LOW(Sound_Bar): ~8 o9 P9 o# n3 A* N; g# }
  2975. STA $07F4
    1 P# _4 h7 g1 r  t, y' x
  2976. LDA #HIGH(Sound_Bar)) e3 a) d8 f# M: R: b: N
  2977. STA $07F5
    9 X4 R; r4 n, ]$ P( L) s0 s
  2978. LDA #$60
    0 y- T+ U: `* q/ K1 I
  2979. STA $07F6$ \) H) u" _% Y; l8 j7 r  E9 g
  2980. PLA& J4 W$ n# t( u$ \1 q/ d
  2981. RTS
    9 X! b, [. ~. T) p9 V- X3 n. x
  2982. $ M8 k+ K& k) B# T) s# h
  2983. .ORG $FE60# H! v4 ?# j( h# l2 v9 \/ C* n
  2984. STA $07F1+ y9 c4 r9 T% q; w- }$ F5 f
  2985. CLC
    . W8 E# e: S2 X5 l- u
  2986. ADC #LOW(Sound_Bar), E# d6 b& K6 l# y5 R
  2987. STA $07F4' f* r8 i( V0 n8 {: \2 q
  2988. LDA #$8D2 x  v$ C1 l  ]3 A1 O% x
  2989. STA $07F3
    8 k: @3 I! O6 w/ s' c# \) q) K
  2990. LDA #HIGH(Sound_Bar)" I7 h& f( C; E5 t' p4 f# {
  2991. STA $07F5
    : g6 u: `3 a$ C* a% d
  2992. LDA #$60& m9 ^6 Y' t9 [, D6 l
  2993. STA $07F6- R. T8 e7 f( h2 K' W* l+ }
  2994. RTS
    0 f/ G5 H' v) @# G! i2 n

  2995. " W0 {" S; v9 r+ J6 a1 v( R
  2996. .ORG $FF40
    * k+ u, B$ h& V8 s9 Z& z" @) z/ H5 N
  2997. STA $4000
    ! Y0 b3 F/ d) l' O, |
  2998. STA Sound_Bar + $00
    " X8 K3 y* ~/ t/ K  L, C
  2999. RTS, q$ |5 ~  k- o9 W

  3000. + m: t; p  a* x3 f
  3001. .ORG $FF48
    2 Z, D; f0 H$ T7 `' ~4 n
  3002. STA $4004
    4 k1 _3 ^( a/ f, `
  3003. STA Sound_Bar + $047 q) `* I5 k4 F/ N% c# M8 K2 y5 t  `
  3004. RTS4 T( M% Q: ~. t. c8 I
  3005. 6 J. q1 U* ?: D. ~
  3006. .ORG $FF50+ f' E- H7 V+ O: C7 g) t  f5 w8 n& x, J$ F
  3007. STA $4008
    4 `! P, K' E+ e7 j' ?( |
  3008. STA Sound_Bar + $08. q1 X8 S; \8 E$ Q$ Y9 j! M
  3009. RTS6 L9 Q+ U/ B: i/ Z1 s* {; M, p- A5 L* z

  3010. 5 u1 {3 E& r7 B$ y3 h! h
  3011. .ORG $FF58
    " N% t; \0 v& C9 u! H3 ?0 m* e1 f
  3012. STA $400C
    8 k) p% c! S' n3 o" @/ u
  3013. STA Sound_Bar + $0C- M% v& {$ s+ A! k* p& ]. F  \
  3014. RTS9 p" [) B7 L3 D8 m) b! V( J
  3015. 9 f, J$ M8 y% X$ w1 q  k! X
  3016. .ORG $FF60- {; D; F* H  Z9 M/ m+ ^
  3017. STX $4000
    1 }4 l' L: ]& ~/ o6 s* e# x+ R
  3018. STX Sound_Bar + $00' C, t$ b" s9 {% i
  3019. RTS
    # ^6 r7 z1 c& F
  3020. - J  Y; F$ C) w$ B6 g5 c/ T
  3021. .ORG $FF68
    : t2 @% M9 k- G9 H( d: Y0 v. G
  3022. STX $4004) @) L: }6 V& v
  3023. STX Sound_Bar + $043 W9 g  _+ c; @- O0 U2 @
  3024. RTS
    % \- B2 K9 r( t0 z. p2 H
  3025. : s+ K$ A3 K3 v; k  g
  3026. .ORG $FF70
    & c# H$ h) L  w5 [3 C$ I
  3027. STX $4008
    2 `) Q; v- R0 D$ O( B
  3028. STX Sound_Bar + $082 _+ Q2 a3 @! a6 A* F/ U
  3029. RTS
    1 R) n7 w9 g& b
  3030. & [: W" q2 x. ]2 s( j1 _
  3031. .ORG $FF78
    ; q- A7 h, d% g7 }; O9 @
  3032. STX $400C: A8 z: K5 h9 g  R& u* b/ C
  3033. STX Sound_Bar + $0C
    0 f; v+ g2 W4 j
  3034. RTS
    ! @/ X4 Z  f" D, G2 \

  3035. 0 w6 }" i1 s% t
  3036. .ORG $FF80' n& m& h6 |2 X1 u
  3037. STY $4000( R! f( D' m! A
  3038. STY Sound_Bar + $00
    + N) c' G. ^. o
  3039. RTS( c: A. G+ B/ H
  3040. 7 e% c" M8 v2 }* s1 \1 q8 {/ |& F" W
  3041. .ORG $FF88* S# O. N4 B* [+ p) E: u
  3042. STY $4004+ `3 ~; r" P( D1 o; `. @9 T
  3043. STY Sound_Bar + $04
    & E1 F% p4 s' h! _% g+ D
  3044. RTS
    . s3 z( ?6 a0 z1 B' i5 ?
  3045. # {7 r+ e; s: h- X9 x! o
  3046. .ORG $FF90
    ( f1 a3 \. y/ r2 H9 b
  3047. STY $4008( v9 e' q# i8 a
  3048. STY Sound_Bar + $080 F9 P" ^( L+ K# e( K+ N  V
  3049. RTS# k4 ?- ^0 U+ R+ ]8 F
  3050. 6 q  \& M3 Y) M) Y% F" `! B
  3051. .ORG $FF98
    ) ~$ m9 M& b! a  n: E  F: }
  3052. STY $400C
    ) a# F' e0 q+ E' A
  3053. STY Sound_Bar + $0C
    ! N; d0 _2 w+ j/ Z
  3054. RTS; W( w$ U  p1 X% Q5 S) E' B
  3055. / V- i0 ?/ O  N  |0 G# M
  3056. .ORG $FFA03 n* v  z, P- A
  3057. STA $4000,X# H: w8 b. S, {& t, Y
  3058. STA Sound_Bar + $00,X, |) d# z. r' Q& ]; R1 s, u4 q* h
  3059. RTS/ [* Z1 ~, o! p* S

  3060. & |( P% K' S+ m- F( U
  3061. .ORG $FFA8. P! m# T+ H2 k6 @
  3062. STA $4000,Y
    0 _' }6 r# j; }: P
  3063. STA Sound_Bar + $00,Y. ]+ V5 @% S: u5 O- v
  3064. RTS
    5 b/ u* t7 m7 I6 `+ @

  3065. 8 \/ V8 z7 A3 x  o" ^/ B
  3066. .ORG $FFB0+ s+ W" t6 U0 h
  3067. STA $4004,X
    , E7 L4 _0 z1 D. T# ^
  3068. STA Sound_Bar + $04,X; g/ g3 {3 s0 O8 {2 ?
  3069. RTS% k& U3 N$ X, m8 i: A  f! i4 u

  3070. 3 l! t2 B) d& U% S
  3071. .ORG $FFB8/ D# M/ L/ L0 H8 V
  3072. STA $4004,Y
    * s2 S0 H( i2 u1 s: N( a, Q
  3073. STA Sound_Bar + $04,Y
    , @# \, y2 Q" i4 T; `. c
  3074. RTS$ k5 u5 ?( C) w' T0 d( G" V# c' J9 J
  3075. % \1 e: E; s3 }9 V' C
  3076. .ORG $FFC0
    ; R+ G& l; @$ d: \& g0 R' r& k
  3077. STA $4008,X& W0 ]& Y' ~; J$ a0 u7 _7 J
  3078. STA Sound_Bar + $08,X  K3 ^" C) B% Q. e7 ~: t* C
  3079. RTS
    % F( ?. J% T1 J& b. @4 Q5 Y
  3080. " N, d4 T( F9 v' |  E  O( F7 e
  3081. .ORG $FFC8
    $ j. B. Z* d% w( t
  3082. STA $4008,Y) c" Z) f; M7 X3 c& n" i
  3083. STA Sound_Bar + $08,Y- j* z# v% u/ n# o
  3084. RTS
    8 Q4 k; m8 p" T$ W5 n
  3085. 0 [* X- I: @& H/ t
  3086. .ORG $FFD03 @. g3 ?4 Z! [* a
  3087. STA $400C,X
    # v. u* X) W) D/ Y' K5 @+ t
  3088. STA Sound_Bar + $0C,X
    3 x5 q5 Y# U9 i
  3089. RTS
      Q" ^: F! w1 U+ e  C/ x0 z& f# ?
  3090. 3 r& Y! g* D+ b7 a, G9 o( f
  3091. .ORG $FFD8
    3 d4 J. q6 E0 P! f
  3092. STA $400C,Y' _7 o+ {8 m/ D) t3 V$ D7 G
  3093. STA Sound_Bar + $0C,Y. M. F. T! D' u+ C
  3094. RTS
    8 ?6 T0 p: a% a0 M

  3095. 1 \' }& [8 n8 M
  3096. .ENDIF! A4 \; T, e4 W4 m
复制代码
7 d) m+ O# M- |
游客,如果您要查看本帖隐藏内容请回复

本帖子中包含更多资源

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

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

签到天数: 3087 天

[LV.Master]伴坛终老

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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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