|
本帖最后由 yandagui 于 2017-4-21 18:58 编辑
1 p9 D3 N! z8 H/ k! r4 f
) \ H( N# F0 z* a; l [FC][最终任务][END选关]- g- u: c* h! }, B' T
8 T4 ^# |* m0 r8 I N/ j
时间:2017.3.29
1 C6 r* j$ `+ m3 @; j作者:FlameCyclone4 |1 P0 {" S& { l$ K
内容:. Z7 m6 q- s+ Y' x" c
1.关卡选择: 标题时,左或B减,右或A加(1-5关);% F. _& [- G; r: K# j9 P
2.无敌锁定: 暂停后,按上键切换;7 S3 i6 K L8 k4 A$ ~
3.生命加满: 暂停后,按下键切换;4 w E* J, W) Y6 A9 t, W, Z
4.速度调节: 暂停后,按左键减,右键加(1,2,3三级);
+ l' t; I/ m0 E: k5 Q, X) y 5.子弹切换: 非暂停,选择键切换(普通,W,L,B);
! ], N; Z9 i X9 P- A 6.B弹数量: 暂停后,按A键切换(1个或2个); s a. Z1 J$ F! m) O
7.副武器类型: 暂停后,选择键切换(普通,W,L,B),非普通时子弹方向是向右发射的;
" {5 `/ ]2 p, d2 B- s. R4 O% {
; S6 s6 m+ G8 _: @; O% [7 `1 J2 D2 x/ l% H
* x. Q5 s2 ?" }
! u, n6 Z, K2 I6 }. @6 D! c( v4 b8 Q% G( z7 j7 z
% M& q! {: T% ]( I
) K0 r' D% o% W3 @( {. TFlameCyclone.ys168.com
0 q! Q/ ~( T7 Y: nwww.nesbbs.com- ;[FC][最终任务KEY][END]+ e4 U( u: c% L
- button = $04 ;单次按键
( f- E* k" B( n% Q! [" u - flag = $6000 ;功能开关标志
; ]. ^5 V3 U# n+ O S$ M0 {+ r8 E - pause = $000E ;暂停地址
( T6 u R W I" V, W
/ f0 U5 o5 ?; F- .ORG $80001 p: |# j0 y M1 z& X" S6 H( y
- LDY #$08 ;自带的按键程序" d- M" K8 Q0 T; {8 ] L& M; Q5 G
- ADDR8002:
/ [) Y" Y: R/ _% B - LDA $4016,X
. Q: Z* R8 t8 g - LSR
/ b7 q1 a1 _6 c' E8 H6 E, \* [9 l - ROL $0021# h& J: d0 c% G0 M+ ?
- LSR3 H4 }% {, ^: J6 m
- ROL $0029
2 _8 J. o/ d; K; f+ }6 O% C& e5 | - DEY
$ S& K* h, X* A3 v& w+ F' B' U* z+ N - BNE $8002
% s, L+ C" x/ f; y - LDA $0021
6 {6 {' ~% M. j; K - ORA $00292 T& h9 ?) G* o0 q" x
- STA $0021
/ V3 Q& w; a+ L- J( j, N( c - LDA $0020
2 n2 X5 H8 f/ [5 \4 o' G - AND $0021$ @- O$ s! `- N. L
- STA $0020
8 h2 \7 C$ c4 l2 ] - LDA $06,X, h9 {# x6 R5 _( q, }
- EOR $0020
( R1 |; k3 y4 f - AND $00202 ]* H. n" N* N8 i( A9 t
- STA $04,X
' I9 J: t$ [! n; V - LDA $0020* {7 j9 O1 I, X& o1 Z/ t: U
- STA $06,X/ N' b: t# X" L0 v* v% Y- M2 Y
- JSR KEY_OPERATE. ^ }4 B, l# e2 M2 I- m* L$ i
- JSR Function ;功能调用3 l. W+ Y: P4 H( _" R$ J" Y0 {
- JSR Weapon ;武器切换调用
( x* f2 e$ o, {' J" C - JSR Power ;威力调用, ~$ W% x! P0 w8 g) \# \
- JSR BULLET_NUM ;子弹数目5 E9 O n% H4 Z- H
- JSR BULLET ;副武器类型
: A+ B5 C8 S, q - RTS
# @, P6 I" k4 e } -
# o; M6 i- {4 }5 D9 p -
: r- U4 o. \" E6 V8 V0 t0 D - 6 L, {( y+ @/ n w# p" m8 Z) o
- .ORG $80507 ^8 g; O) J7 H* k9 }9 S4 Y
- Function: ;功能. N: }7 P6 X4 T
- WUDI: ;无敌' b) g; T' y' A; f/ m
- LDA $6000,X- _2 O" {- g3 s4 @1 d3 r1 a, ^
- AND #$08 ;开关判断- Y, p3 b1 {9 U) E' p( e1 r3 O. w
- BEQ LIFE
0 ^/ [ D+ i6 e9 ^4 ? - LDA #$05
3 @+ t+ @$ _& p7 d; D - STA $05DC,X ;无敌锁定% o8 r# m& D% _% ?- i0 K! E
- LIFE: ;生命
7 z5 ~& d. s* B9 H - LDA $6000,X
: T( B! N5 G) v: M8 A - AND #$04 ;开关判断
/ b/ ~, a |8 q) G - BEQ FUNRTS+ k3 q5 _& \7 G8 [3 @9 @
- LDA #$057 P- Y2 G- b0 {
- STA $1C,X ;生命赋值3 I9 i4 s* L5 R% G" f* @( K8 a! W
- FUNRTS:# y y" h, u7 \" k6 \
- RTS- {0 _- j) ]2 h9 Q( ? w
-
5 A; ^& {- [/ d& P, s9 @/ }) r - Weapon: ;武器切换0 i s1 j% J9 W0 S( m# l& R
- LDA pause ;暂停状态判断 r! o6 S1 i S2 z& l z& d
- BNE WEARTS
3 V& f& X, o8 S' n - LDA $04,X
' \3 i. @: W& h - CMP #$20 ;选择键判断- r& H1 c; @3 O3 T5 [ E( T
- BNE WEARTS
5 V7 v8 g/ O; z# e( R - LDA $12,X/ h1 m) z+ |2 ^4 Q
- CMP #$03 ;武器值判断
& g8 l" O5 _4 e( G4 J, u7 P - BCC WEAINC3 \8 W. o* e$ {+ f* g
- LDA #$FF# x3 O0 Q. O, L) j4 c
- STA $12,X ;武器重置
3 `* \' c- d& P3 b2 B - WEAINC:: {0 m( G' U& s
- INC $12,X ;武器增加$ M% |% w4 u5 W" C6 a" M
- 6 _5 h5 X! I2 Q4 G
- WEARTS:
# Z. t: L& `6 Y - RTS9 U! S& o& m# G- D- f+ f
-
& N# M8 T3 R8 _! T1 j- p - Power: ;威力
8 \+ V. i& f2 n* ~3 `0 n0 X - LDA pause ;暂停状态判断8 Q1 ^. K; k6 j/ O5 m# C
- BEQ SPERTS. Z- X+ Y( H; q- h$ p' |
- BUT_LEFT:
4 L4 {% z- o l - LDA $04,X
& P% u$ S$ { w: E8 t - CMP #$02 ;左按键判断8 C9 K7 n7 q! ~
- BNE BUT_RIGHT! {# N/ V4 f$ T# a
- LDA $88,X/ b3 X) n- Y9 t1 Y& @
- CMP #$00 ;威力判断
# o" u4 F! l/ U; F; z5 A - BEQ SPERTS8 {' \% _: [5 `: u
- SPEDEC
8 O) n A2 a* B6 Q1 Q$ H% q; u$ B - LDA $88,X ;读取武器值
6 a0 o; C: f- F& G - SEC! L5 @) {7 \. w Z# i* }0 u% d7 ~' b& c
- SBC #$08
# l4 O! o% e( a) `, S - STA $88,X ;威力减小6 U( y! V }' D
- BUT_RIGHT:
) t2 v0 W. Y! [" D) f" x0 o - LDA $04,X8 u* _% s& x% W: j* ~: N
- CMP #$01 ;右按键判断, l) Z; q' q2 ]) s/ L) U% J
- BNE SPERTS& p6 t; L2 m8 A# ?/ z1 t
- LDA $88,X
5 H- m# Q# H+ I2 M+ G0 i/ b0 P - CMP #$10 ;威力判断
6 I( y0 a1 t1 W, J; ` M F4 a - BEQ SPERTS9 ]% x" c9 e4 d: s3 u
- SPEINC:& V9 ^+ m# n3 W- i1 V$ p0 e
- LDA $88,X ;读取武器值5 [+ J. D7 X4 K& M2 u( [
- CLC
% T5 [8 [; d7 e9 r/ V3 E - ADC #$08- q- {5 u1 R" r" q" v3 f
- STA $88,X ;威力增大1 @) G! m7 d, C1 G3 C4 t/ V
- 8 X* _. w) `6 h7 s' H# f& D
- SPERTS:
1 z5 u4 {3 x% Q$ a4 O' y - RTS
, j/ w+ y+ i- ^8 Y' ], p - T: O) |0 E1 l8 y" M
- BULLET_NUM: ;子弹数目9 a' |9 H6 B# Q! Z8 t% W
- LDA pause ;暂停状态判断
9 g/ p5 C; \1 A, ?1 i% }7 g - BEQ BULRTS
& |9 D) R4 ^) B0 I7 k0 F - CPX #$00 ;主机玩家判断3 P7 N) D9 H. [- l
- BNE BULRTS2 f4 r7 H% x& R* F
- LDA $04,X ;主机玩家判断
) o5 g/ j! s% F% R8 q0 o* C1 W0 ]" r! S - AND #$80 ;按键A比较- ]0 b2 i; Y- B. T9 E; h6 F& l+ Y
- BEQ BULRTS! i& ]3 ^, w& O Q9 ~6 a% i
- LDA $87 ;状态判断
$ s! X+ t2 b0 \7 N - BEQ BUL_2& E! s; L2 I4 v# q6 \
- BUL_1:
5 _4 s3 w8 n: F0 b0 C3 m - LDA #$00! a8 K( Y8 I5 x
- STA $87 ;1发子弹2 v) X {4 u5 C# c; ]; b# F0 K
- BEQ BULRTS
1 M" V4 B$ u; m9 l! T+ G9 h1 _! T - BUL_2:6 n! Q4 L! L: V0 T
- LDA #$01
2 A) \! O/ A8 G0 w8 u" X# x - STA $87 ;2发子弹( J7 v; P6 b& [- \5 O/ G2 x9 J9 k
- ' c6 `" l: Y Y, I" h5 }
- BULRTS:4 ?! A6 x7 Z+ @+ [8 i
- RTS4 J W- b" k+ b; ~1 F
-
# Q, S# M( C+ }+ A( I
5 ^: p0 [$ S9 {- j$ j- F9 p' o- BULLET:9 c6 f# T* I( x: w0 _7 O; z3 E& {
- LDA pause ;判断暂停状态
3 I3 f- Q+ G/ R& f- g: ]( p - BEQ BULLETRTS& h3 A2 Z; {# L3 w: I% @; `( S
- LDA $04,X
) z, X9 n$ N. u2 L# S* s - CMP #$40 ;按键B比较; V5 J* l2 Z, ~) ^! B
- BNE BULLETRTS
9 l; C- q: ]! D R3 b" o# S0 } - LDA $6002,X ;读取副武器
& e4 Y& m& ]2 K7 D+ P/ g- e - CMP #$03. {' s: E$ z! _4 I! j
- BCC BULLETADD
8 h% u9 Q8 \6 S, P& h9 N& z& ? - LDA #$FF
. K% T; b4 c' ?, M5 ^5 @4 d - STA $6002,X1 u3 {. ^# a9 k( w
- BULLETADD:
/ u+ {3 O% ?3 k& O) X2 ? - INC $6002,X9 M$ z2 s% ^6 [ w
- 9 F* `9 h; E, P3 q7 R0 \9 i
- BULLETRTS:
/ b2 z$ W+ ~8 O( ]$ O0 r - LDA $6002,X
5 {$ d% [% F9 E- B/ g) } - TAY! ]) q3 X1 D0 j
- LDA BULLET_DATA,Y
6 s+ p( J" K3 d8 M% d - STA $6004,X ;写入副武器数据
; L, P+ |7 q6 p0 i. B9 `- J% l - RTS
# t/ H7 g: ` o - + P" X3 M' O! l. M# ^7 K
- 7 h/ c8 g x- Q$ ?: q) s; Y9 K
- BULLET_DATA:
( u# F' \& G, T0 `' n' a - .BYTE $06,$02,$03,$04& ~- `1 U6 j6 |3 d" L0 W- k
-
, ?9 p; i7 d. c8 m' C2 ] -
5 a1 F% |$ z9 L9 r n5 U) {( w+ b -
( Q( X6 I. |' |$ n - KEY_OPERATE: ;按键开关操作, `! ^) j- P: c% n
- data_protect: ;数据保护% f2 O/ d0 K% {3 M& R/ H# s# J
- PHA
% I9 r' K( u0 [$ ?! n' S' h - TXA# l- d1 h' e4 k- U+ l
- PHA3 r! ?' T$ }, E) Z6 L6 a; `
- TYA9 `* R* L0 p7 ~+ t+ d+ F7 J9 m, w, o& [
- PHA
# |4 B |& U9 ], W
, J [2 w3 { g; [. D/ v- FLAG_INI: ;开关标志初始化
7 ^5 G; U; P( N$ }
. q. h" z& g9 s0 K- v! U- LDA $600F$ @4 c- A1 E2 r8 x- X1 p: q
- CMP #$01$ T1 n8 G+ O* G* f' R
- BEQ pause_cmp
$ }/ z1 Q" [! W* X - LDA #$00; o3 E9 u; f" E
- STA $6000
! p2 ~ r( E* U- i1 F( P! i F5 g - STA $6001 {! o# g2 A- o
- STA $6002( G( _ X2 p/ T% v+ K! Q8 @8 U
- STA $60038 J! ^: _7 a: T/ V X5 Z2 M
- STA $60049 O( u! }, P/ }5 d( q4 P- P
- STA $6005
0 r# F1 W) t2 w3 v9 a& |# c - LDA #$01
1 r) s' f4 D4 U C. j9 p - STA $600F
3 m( X; Y/ C6 T: M: O* O -
6 d. s0 v/ E9 h2 D( G. C - pause_cmp: ;判断暂停状态
4 w; y: b& j% M. ~' {* l - LDA pause
) `" a2 j: B1 ] - CMP #$01 ;判断暂停状态7 _2 i) k3 z% r% l( Y
- BEQ button_press
4 D0 `# M" N7 D8 M+ K2 p0 Y0 m2 d - PLA
- S9 J! i7 O3 j3 C8 R5 h ]/ l - TAY
, y( h7 |: K6 y3 X" T* v - PLA$ R `5 w2 s' O( [) K$ R# N
- TAX. A. O1 o- C9 u- {' h/ C$ A
- PLA
+ d" A# q; p q0 K& L1 o0 E% O$ O) J - RTS
, u$ S) n6 x" Q, l, D - & o# U. ?' ], ^/ o3 x$ |
- button_press: ;按压操作* D+ f7 D( h; c9 f1 O7 b+ G- g3 w! y
- ini_Y:/ [0 f# r/ G! n/ T$ ]3 d) b. b. i
- LDY #$00
" G( B' l; S3 Q - button_cmp:/ a0 N0 a5 ?5 a( z1 C
- LDA button,X
- ]8 y% C* K5 x0 j! Y - CMP ora_data,Y
: c& F3 _0 U0 m) D - BNE count_Y_cmp
5 `0 r) X3 V, K1 C1 x5 [ - flag_cmp:
+ G# Q8 s" l* D, ? b$ N6 ~ - LDA flag,X" L$ d- R/ [& u8 w
- AND ora_data,Y, d% [ F7 T. Z% D! Z0 k, n3 i
- BNE flag_and/ `, o1 K4 d2 \! Q; A
- flag_ora:; o+ c" h+ m3 U' b& c |9 @
- LDA flag,X. Q5 P" j0 p! ?: z9 T
- ORA ora_data,Y
' a. l$ j, N' k. y2 J - STA flag,X
2 }+ g8 V* Z, ^' B0 t( S - BNE count_Y_cmp
$ [3 ]' q# C& ]( _ D0 z - flag_and:
/ R: W& q3 b3 O) H2 ? - LDA flag,X
3 d( C5 I9 R' A1 s0 m% T - AND and_data,Y& B' J. I; u, S* ?
- STA flag,X2 e1 |8 b2 j/ L R
- count_Y_cmp:- V( B, n6 P8 i! X$ e' p5 S8 v
- INY3 r7 j+ D: I5 ~# }9 v- G. r4 {6 R
- CPY #$08, b2 {/ \- M4 U6 Q3 y: \2 w; r
- BCC button_cmp
9 |) ~8 a- P S5 V+ y - 0 E$ S6 y' _* o2 `8 y
- data_extract: ;数据恢复% t) q0 U# D! }( Y) o1 C6 W+ G3 C
- PLA0 x; x8 t5 @, @: I9 c. F* b+ {
- TAY
( P0 p! E; y6 Q' F8 U% D1 {% x - PLA
+ e! i( X/ y9 `# i- x5 L2 Z/ E - TAX
6 ^7 ]# i O* F/ {# M1 [. R) u - PLA
5 Q! }6 _; z( X6 \9 c; m. N! R -
7 V: k0 e1 R/ d+ T7 I3 x - return:
7 [6 X( [0 C- `9 {; {0 d - RTS
* _& x- M6 r% I) [1 }; b; K1 ^( M - 4 Z, t1 i6 N$ U
- ora_data: ;按键相或数据
4 H1 G( s' F/ k5 g) A! b6 y - .BYTE $08,$04,$02,$01,$80,$40,$20,$10, m4 F1 x8 [: A$ h! Q; W% K5 U, |
- and_data: ;按键相与数据
5 R4 T' ~$ M3 E$ v5 H; r: o - .BYTE $F7,$FB,$FD,$FE,$7F,$BF,$DF,$EF
- h" `1 b. Q" }$ B- v -
2 I8 ?. F4 x0 T+ n: q0 f8 A - " L4 i) j1 c) M; s) Q8 U
- S. t8 h7 g' H% R$ o
-
7 A. w8 S" G6 u, a - - g7 F* s# s. s& Z7 _
-
+ {( R9 D- B+ x' O
3 l* G( e1 H2 i8 ]( ]5 I6 u- ' O# i$ ~" A$ t5 g
- ' K5 ?0 [" T8 t4 n5 w
- .ORG $C264 ;自定义的MAPPER2切页程序0 Q9 i1 [/ ?3 m9 E
- PHA
1 b8 b3 J7 S) O0 _& L - TXA5 F8 @/ @: z$ d" t4 {1 C
- PHA
4 w$ R# |; X, T3 X% ~3 O7 N - LDA $0066: q) W2 _+ S+ B _7 f6 ~5 E( O" F
- BNE ADDRC280, q2 i0 w' x1 S( V5 ^
- LDA #$07
/ o( g+ \7 x$ `/ ?2 y. H8 x6 _ - LDX #$03
/ l' n0 Z8 c5 x - JSR $CD9B ;自带的切bank方法, V: ] K4 v5 B1 Y7 H* w
- PLA0 r9 f. `) c/ Y7 o6 z b
- TAX
! I+ f3 z2 Y, b - PLA+ A- r& K% M# z; m4 A( ?6 F, _
- JSR $80006 V; Z3 ~7 Z* [6 c
- LDA #$06
1 X y2 @5 F A4 q9 K - LDX #$037 O# E& H* C. P
- JSR $CD9B ;切回原该切得bank(可以不用)
( s. H. r4 q7 j1 P1 Z - RTS; b3 j$ D+ W4 z
- ADDRC280:
1 }( X4 |" u3 g# K4 g* D. D3 x0 l - PLA( C* F/ P; Z/ f7 j7 r& G
- TAX
; H7 Z5 ^7 z( y) e: l& j2 Q - PLA
8 A/ X3 S; a! R - RTS8 o3 q4 h! Y+ T/ m G8 V0 C8 }
- 0 ^3 u. N: G. M0 ?
- 8 }" u7 N$ a7 m. s' O
- ;[FC][最终任务PPU][END]
o; p& H% m3 y - .ORG $C056 ;跳转到PPU重写程序6 R# [" Y) a: M% H; \) Z4 w0 a
- JSR $7000
; i! b, d. s! M - . b F! n `5 M! ^
- .ORG $CEBF
3 Z: M# y: R! f& C: t5 X I - JSR STAGE_DATA_WRITE ;跳转到关卡数据写入
+ `* ?' W1 X5 b3 Z/ p( \/ b - 5 h# G" A4 n( S4 g1 B
- .ORG $E4604 ` T! B. ?3 x6 O2 C
- JSR BULLET_DATA_WRITE ;跳转到副武器数据写入
n r" r* T' q2 S5 a) p8 d* w3 D -
U! L# `( I+ ^3 g; k. u$ _) U - .ORG $71F0
7 o1 `; C- u& t& n0 b - STAGE_DATA_WRITE:
/ R' r3 o* o! f - LDA $6010: Y% g, Q# W! E; U, j
- STA $1E ;关卡写入
g$ ^9 a" _' \ - LDA #$00
6 o% N7 N* p E6 v - RTS
# s3 h" G& W# V0 ~* E: E - .ORG $71C0
$ v# r! s, H; H# Q u, R - BULLET_DATA_WRITE: ;副武器数据写入
7 E; y/ J, Z' B; n - CPX #$0E
3 o7 F1 v+ E; D: j6 h - BCS P2_BUL
8 _. M; ~! @. `! N0 T9 l, O - P1_BUL:6 `; i+ s$ {* J; \$ m5 E
- LDA $6004
3 Z, Z5 {! k' L3 ^! ^ - JSR $D7D0 ;P1副武器数据写入
- q) X6 U' o* d; n" h H+ S6 U - RTS
2 \8 l! _+ s4 `5 i/ s Q2 `0 H. i - P2_BUL:. c2 p! o% L: D) \
- LDA $6005
5 j' g8 [- G0 ?: \# b4 T2 o5 j - JSR $D7D0 ;P2副武器数据写入
0 Q& P% v" G3 X6 i# X" e - RTS
( S( m% C7 |( F5 U+ S) w, n - % r/ g$ f( [ u" N% y! f
2 i0 d! l+ n2 R# T! f; \" M, E- .ORG $7000/ P- d- T8 R! H' @6 A
-
7 M/ l/ @3 J% R# m - STY $4014 ;补上覆盖的精灵写入指令9 a7 Y& P3 ~- r& C
- PHA
: U* V0 g8 P- w7 p. K$ S - TXA
0 Y% D! f S7 U2 D" X# { - PHA
. [: X6 a1 k; h, n d) S - TYA$ w" }9 }7 l- [
- PHA, z% G( w. Z1 r. s! i
- LDA $0C
$ c7 `+ w! x# f' K - CMP #$01 ;比较是否为标题画面. F. N/ J/ i, n* s
- BEQ PPU_STAGE
" ]7 X4 H$ q6 h - PLA
3 q7 C' O E' D9 w2 |4 r+ v4 h - TAY6 x, L2 t/ }% S$ E4 S/ k! Z) J
- PLA
& w9 ?) k' S- w/ i - TAX
9 M* v1 Q6 T( W - PLA& P: j' B+ I' `4 }: U. U
- RTS. J( @/ W- X* D, T& G* C0 {0 `
- PPU_STAGE: ;STAGE显示程序
9 i6 d* _0 [ p* f9 v( }, S/ N- j - LDA PPU_ADDR_DATA4 U1 y* [' y4 [" X( Q
- STA $2006! @! e+ [3 |% k: z: B
- LDA PPU_ADDR_DATA+1% n" }9 d7 S" \' q5 h! C' `; h5 V
- STA $2006 ;坐标设置
( q. d" m4 ^! B! f& L8 L - LDX #$00
' i) g8 y* C; b4 z4 } - PPU_STAGE_WROTE: ;写入STAGE字模# F6 Z; g% d0 ~
- LDA STAGE_DATA,X% t8 n8 ~* [, |9 r3 t
- STA $2007
7 |+ E5 N& l9 G% J J; K - INX2 }& D7 P% E$ ^7 I1 f7 {
- CPX #$06
* L. e1 V/ R. ~ O ]4 Y- A - BCC PPU_STAGE_WROTE p! P$ w1 B6 [0 W! u& S
- LDA $6010
6 ?- F9 h0 Y2 x* Z/ Q ^ - CMP #$FF ;关卡数据初始化条件判断
+ X6 F% {8 Q' C9 V! y - BNE KEY_B' K! R! X3 ^8 r% r) R" n
- LDA #$00- S- w( u0 J, y, P8 X/ Y: q5 U- c
- STA $6010 ;关卡数据初始化
! m/ P' J* s, s5 Q - KEY_B: ;关卡减少* z9 v# _* r6 ?5 V9 j5 v
- LDA $04
, k/ ?& T& a m- X0 k( [! y - AND #$42 ;按键B或左减关
) t- O* {, X |& ~ - BEQ KEY_A
6 w# U; x; \' M/ p. v - LDA $6010
3 c- N$ M6 g/ f' H/ g- d - CMP #$00 ;关卡比较; M L8 ?+ |! U2 g. {8 ?* u; Z) [
- BEQ KEY_A
( b# y3 L {/ e6 A r - DEC $6010 ;减关3 r% c$ z9 U2 @, t0 k- t# r4 { C9 ~
- KEY_A: ;关卡增加
2 J# x& R5 u4 S - LDA $04: h/ t- P9 E' V
- AND #$81 ;按键A或右加关
9 c S8 _! r" F# ~5 v& C2 g - BEQ PPU_NUM_WRITE
7 N* r6 j6 v% V0 @" c - LDA $6010
V3 o1 y8 F: x+ x! x3 e) a O - CMP #$04 ;关卡比较$ E8 t" R& S, Y% z
- BEQ PPU_NUM_WRITE
& u$ }6 f4 y6 m2 U" }% L0 C+ V1 { - INC $6010 ;加关
; \: b1 r m: v) w- G7 u3 M% O - PPU_NUM_WRITE:- V# U( ]& i& c, j) e% u6 P
- LDA $6010& T2 T* M6 I' y, i
- TAX
1 ^( ?: i# q) i) w( c. ? - LDA STAGE_NUM,X ;写入数字
! I( l, N* T) c8 q* P. A! N - STA $2007; n$ J& |, N: K; V+ I, ]% S
- PPU_RTS:( h/ Z- K/ l% q
- PLA+ r' ?" Z9 a0 [' |
- TAY9 y3 [5 Z- V. g! l0 O) J
- PLA
1 } o# H. o8 N( u) Y: G* @ - TAX. `( T4 \8 f1 o+ }
- PLA) |- x# A {6 X0 W* _( P$ j
- RTS" R2 N$ q- c! }0 I; b8 X
-
$ w5 z4 S3 g e - 1 S* r+ w7 {: {9 q1 [. h
- STAGE_DATA: ;关卡文字S,T,A,G,E,字模数据
1 V% ?0 ]8 f! R8 |5 e% Q6 n - .BYTE $EC,$ED,$DA,$E0,$DE,00
) H& b( W" U1 S3 s1 _, ]- `5 d! m - STAGE_NUM: ;关卡数字1,2,3,4,5字模数据
. |4 i, I/ \7 k - .BYTE $D1,$D2,$D3,$D4,$D5 p3 z" ^" m. y4 E4 e9 C) N- h
-
0 @& W& l3 [1 d - PPU_ADDR_DATA:, J+ d1 B5 N9 |
- .BYTE $23,$0C- Q" H5 E% z% j7 X# a" E8 u$ I/ Z! [
- # d5 k8 {$ o" f# V8 s& C
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
评分
-
1
查看全部评分
-
|