|
本帖最后由 yandagui 于 2017-4-21 18:58 编辑 4 M- x1 z4 p4 ^
1 b2 i; w8 O; t! ?: z/ E! G
[FC][最终任务][END选关]7 T& v$ H; x3 B9 q$ {* O2 R* V& _
& [9 ]/ {" }- P
时间:2017.3.29
; Y. t: ^! p$ N: t2 d作者:FlameCyclone
. R2 Y7 Y" g/ y) Z! \! O$ Z内容:
, d- u" G Z* M 1.关卡选择: 标题时,左或B减,右或A加(1-5关);
3 \4 ?$ e& P, q' H4 f% Q 2.无敌锁定: 暂停后,按上键切换;: j6 d( ]& |* H6 [6 t
3.生命加满: 暂停后,按下键切换;
# |( F9 t6 m- p# c9 W0 Y 4.速度调节: 暂停后,按左键减,右键加(1,2,3三级);
* ~% ~$ B+ f- b5 ^6 x3 P3 E 5.子弹切换: 非暂停,选择键切换(普通,W,L,B);; r& }- Q0 w' ?& G, q1 b
6.B弹数量: 暂停后,按A键切换(1个或2个);
r: C, q1 w8 h& T 7.副武器类型: 暂停后,选择键切换(普通,W,L,B),非普通时子弹方向是向右发射的;
( Z1 R) v0 y& }: V7 X2 Z
- J& I( H& F% r& r9 e1 M* b' q) ?, |# o/ y8 H9 h3 q' p
$ b) Y7 y0 I2 Z, a
0 _7 Q$ Q R, t9 ~! c; \% S) y' m
! e e/ O! [3 l1 N& k" Q* B6 y$ l" u/ U; [
+ ^# \# e$ d3 b' p5 t# Z6 [FlameCyclone.ys168.com
9 N9 h1 i ]" o/ Kwww.nesbbs.com- ;[FC][最终任务KEY][END]' X+ w# Y( i( M% e; E( L
- button = $04 ;单次按键
% p8 `+ S- b) n9 O$ c5 Z. s2 \ - flag = $6000 ;功能开关标志, g/ z8 U4 @ x% q: G
- pause = $000E ;暂停地址
9 C. }/ i5 n3 E' V# a8 K
" \( r) s& x& G5 b- .ORG $8000
* y, L/ P0 M3 @( X$ @% u# A' H - LDY #$08 ;自带的按键程序. S; s$ f' S3 ^' \, t* h5 m2 J
- ADDR8002:
2 H; N2 N& W1 R9 O- s - LDA $4016,X5 G E( a" ^) `8 D8 u7 q
- LSR0 [6 V6 W2 s, f/ s/ ]7 Q4 Z/ z
- ROL $0021 L: P) m) H7 e. Z8 s- g
- LSR
9 v+ m% B1 E& J4 ^# E& | - ROL $0029
+ A% m2 |# I, |: ?. H6 f; [5 ^4 V - DEY
4 ]! a* f7 g& G" Y - BNE $8002
0 [0 R# C; v, R* F# r% n6 I+ y - LDA $0021
1 f, H8 L. c, j' a* D - ORA $0029
& Y8 }; _2 _+ } - STA $0021
/ S8 d; Q: E: i4 i, a# o - LDA $0020
* b3 K+ o8 H$ w4 n% h& h - AND $00217 a$ A$ J3 M" }" h8 i5 F _& j
- STA $0020
. {$ _0 C) H6 G2 E' q4 \& a& G - LDA $06,X
0 c4 _% t: _! Q* {& P/ m2 i - EOR $0020' |& Q7 O5 M7 o1 G }. C8 O5 x
- AND $0020
$ X7 L' ?; W+ t/ _' ?8 E - STA $04,X. h5 g* M, h9 |2 z9 K9 f
- LDA $00200 W6 P! e0 ?7 d5 h6 N! T
- STA $06,X
- }% w. d. k U: e, a: f - JSR KEY_OPERATE
/ w* Y" G/ |7 p - JSR Function ;功能调用
' z- W& a/ j; z( P, H1 A$ q6 e% ? - JSR Weapon ;武器切换调用, Y, y* d9 T1 J* n
- JSR Power ;威力调用; z% a( ] P# E5 |3 v8 T) A
- JSR BULLET_NUM ;子弹数目4 p1 [+ X* C, R4 N a4 X& F/ O. V- x
- JSR BULLET ;副武器类型7 f& x; Z( E! V
- RTS! e+ e4 h( a Q( ^
-
# o) Q3 Z6 `% G) _4 e -
+ F: i$ ^ |) N* S# l/ `, G
\2 h) _+ e b& a3 t- .ORG $80501 ]& k8 b- q5 m: J( R! d
- Function: ;功能
" o# Y6 S( y4 `8 y4 [/ Q - WUDI: ;无敌
$ c3 V+ }2 c& z, V! f - LDA $6000,X" m" [9 X0 c) G# M2 x' C. C
- AND #$08 ;开关判断/ i& X' d7 i7 g* m" ^( |. G4 l
- BEQ LIFE
" I6 A7 g: [7 ?: N0 j/ `. a - LDA #$05
+ l K. {3 g+ h - STA $05DC,X ;无敌锁定' B& |/ ~. G$ J; ^: S$ ~
- LIFE: ;生命
- k3 N1 t, M; {5 z8 J P - LDA $6000,X6 w6 O8 X& G; f2 J3 G. J. j
- AND #$04 ;开关判断
B9 Q# n) b9 M. N6 o - BEQ FUNRTS
, ?5 ~0 a% B9 {! p - LDA #$05% ^$ g7 n; t6 z7 Z9 @
- STA $1C,X ;生命赋值2 n M$ n7 Q5 C1 Z8 G
- FUNRTS:
F- f% w4 w; O! q u2 D - RTS0 D2 i/ U1 \' ]! ~+ ]# ^
-
$ Q3 y% y' W, R - Weapon: ;武器切换
2 {; k8 P: |1 l& P: V. |' e# Y - LDA pause ;暂停状态判断
7 i! f8 B1 ?7 k8 p6 J - BNE WEARTS
" B3 g& S/ b! e' {1 x7 W+ o) k* a/ X - LDA $04,X" x' F) M% H1 ~4 f2 s# m
- CMP #$20 ;选择键判断
2 ?! O9 u: @( U( L2 @; y - BNE WEARTS
) l. Z% v2 b0 \ - LDA $12,X
2 z: N9 W0 p6 N. A: u - CMP #$03 ;武器值判断8 ^2 \& I V/ ]* H' a. Q! ~7 e
- BCC WEAINC. B/ e4 y, `) ~" r% [2 Z
- LDA #$FF
! F2 \) ?, c$ Y8 \8 X1 I - STA $12,X ;武器重置( L" F) Q; Y, ^4 d! p5 I
- WEAINC:
4 \, J8 v. o2 U: p# l - INC $12,X ;武器增加, L8 v) ~7 a4 G, G% M# \: f
- $ f4 O- Y* F8 ?( Z' o# D1 C
- WEARTS:( s5 j x* f" k$ q7 J" Q% L" L$ H9 ?
- RTS) f: o+ U' p" [2 u
-
# a: H8 s7 @' C4 g - Power: ;威力
- C) ]/ }# D5 n; x: d - LDA pause ;暂停状态判断
3 Z* D, j7 |3 N- v0 f - BEQ SPERTS1 J T6 i, P- ^# L5 p. H
- BUT_LEFT:
4 c; k, m( w+ A4 m - LDA $04,X( Z/ H5 n0 f$ ^
- CMP #$02 ;左按键判断0 W6 B' _* c% K, o/ _+ U
- BNE BUT_RIGHT
& d, V- s$ M" k" @5 B4 o - LDA $88,X
y3 u, l) g: ?4 G0 T - CMP #$00 ;威力判断
& F# t; x, X/ `" { - BEQ SPERTS y" d: J. {: g+ {. Q
- SPEDEC
6 b. w, n& r4 h5 B+ ?, |! D - LDA $88,X ;读取武器值3 A" r- u5 z8 s9 A' g; \
- SEC+ ^$ O, r% n7 B% `" x7 Y& t
- SBC #$08
( A6 _" Y/ R* O/ ^; c$ t' N - STA $88,X ;威力减小
% L6 e" l" u6 s7 J, ?$ u! L - BUT_RIGHT:
3 t$ H1 o1 M. y8 P! W - LDA $04,X
6 j4 w* `% t6 I) U; B - CMP #$01 ;右按键判断( w9 E \1 B5 Q+ S
- BNE SPERTS
) |: T. r3 e( q - LDA $88,X# a2 X2 A+ T9 y3 w0 Y$ {. B
- CMP #$10 ;威力判断
+ ^2 y L- g' ^1 ^ - BEQ SPERTS
, a+ x( Q/ c, U4 N9 i( L - SPEINC:
2 ?$ m% F- Z, _ - LDA $88,X ;读取武器值
) n+ i; w1 l7 b# H) E. @+ @) P+ K - CLC
& j% b4 {# L; v& E( j9 Z8 Y - ADC #$08
$ |$ I) u, Z8 P9 @+ c - STA $88,X ;威力增大9 e/ K4 X4 X8 M' `! F/ Y# Y
-
* N7 H& _! ^7 N; h, c2 }. { - SPERTS:) v2 b/ S" g4 N( W- t* J' V
- RTS
% A$ \1 E0 G. E, ^ - ! O! ~/ Z l! B, t" p9 R( c
- BULLET_NUM: ;子弹数目- P5 G. y- [0 P% x' z; T/ _
- LDA pause ;暂停状态判断+ b4 k2 @2 r0 K4 S3 R) o. y/ o
- BEQ BULRTS
( i7 k% J: Z, T* p- ~; l - CPX #$00 ;主机玩家判断
K$ ?4 ~; C, e; a( n- R - BNE BULRTS
# u! \) r1 p. ^3 d! e9 h- n7 x - LDA $04,X ;主机玩家判断
6 D4 g$ `( s7 `; K1 U# O - AND #$80 ;按键A比较
* {0 v) r9 W. A( a+ J - BEQ BULRTS
* d1 p5 }( D/ r% h - LDA $87 ;状态判断
, s$ q* L) ]! e' @- A+ y- Z - BEQ BUL_21 g9 c! w1 J# L5 u3 Z) v: t
- BUL_1:; e3 n5 o& ^- R( M. {
- LDA #$00/ _/ k7 n& {. N; |+ p" P+ [$ n
- STA $87 ;1发子弹
' {5 k3 N7 Q4 K9 c5 f! ?8 t9 A% T - BEQ BULRTS
2 \1 F1 ~% }/ {2 {; y- n2 H - BUL_2:
% O! L( W) ~" l! A! r! D0 A - LDA #$017 I+ a( I# C2 E0 J& ?+ {2 d9 G5 }2 K
- STA $87 ;2发子弹) G* ?$ W" Y1 q2 m6 c. @4 c& G' Z
- # t, x* r$ r8 m
- BULRTS:
& K1 M) I1 `+ p. F7 C- N4 Y: t N; {, I - RTS% U2 U: n. N! a" ^# |" j0 P
-
/ G0 h* A# [/ n! K' N9 I5 o _
5 P1 C7 k9 z- e- BULLET:
. E7 ]9 E- R9 l( Q - LDA pause ;判断暂停状态9 e3 R( U6 V" i7 S7 w( E C0 Y9 V* p
- BEQ BULLETRTS
4 x. Q$ B% u! ~. U( Q9 \4 h: s0 K2 M* ` - LDA $04,X, Q' \: J0 a, K6 t
- CMP #$40 ;按键B比较
: @( x+ p( L" }! A3 \! |9 o2 K - BNE BULLETRTS$ e. z5 w) v2 U y
- LDA $6002,X ;读取副武器& v2 J) B: p& N; Q" F! ^5 d
- CMP #$031 D8 j P8 ?5 U9 ^% |. g6 j
- BCC BULLETADD# [, z! Y' C' A ~1 a8 L
- LDA #$FF
4 M8 W* c) r" O% z2 q - STA $6002,X- y* W! b1 m( B; A" |# }2 w ?3 H. ?
- BULLETADD:
, _) {: B% }, {% F - INC $6002,X X0 \ o6 a; h- d9 W J
-
9 L6 G+ E) b/ s$ B - BULLETRTS:
/ K& m5 N. D$ P2 f - LDA $6002,X
+ f! v F% ?! j' ] - TAY
# v6 h2 E2 j9 x Z/ D - LDA BULLET_DATA,Y
6 L3 H9 L) k# R5 w+ x - STA $6004,X ;写入副武器数据
0 f- m4 }2 }: Y A0 ^ F: k! ? - RTS. P; t, P; ~8 {; {; N5 {
-
2 o$ c: A% B4 d" z' u2 a - - @* x% f8 n+ b) I
- BULLET_DATA:( f+ E, {% s3 H& a
- .BYTE $06,$02,$03,$04
1 n6 r [6 @( }* h8 a2 V! A. b - 3 @! Y7 P D6 W( m2 U& X3 d0 E
- 9 v: V ^$ C* F0 @& j
- + s8 H% D. y; ^. B: H( K' v) _
- KEY_OPERATE: ;按键开关操作4 l1 X$ U$ ], D0 R+ a5 `/ I
- data_protect: ;数据保护2 e. r% L* l9 [1 g Q
- PHA0 a ?' J" D/ B) O
- TXA5 x. ]! d2 Y- \% p! J7 D9 B, G
- PHA
+ \4 P4 k$ ^/ E7 R" x I - TYA0 ]1 v! P4 q) d2 v- Y
- PHA
8 P6 I9 G: l, T8 T
# J0 f* B2 i0 }2 h5 X* j1 T- FLAG_INI: ;开关标志初始化
- \- v: {! ?, d
5 r) ]4 P2 n$ J5 {# u. x9 ~7 A2 |- LDA $600F( f0 o' E! b* B+ P4 s7 U
- CMP #$01
$ t# y! e. g ^* S9 f' b2 N/ M3 G! R1 X - BEQ pause_cmp
$ T' \. |- G! F- T n3 n+ ~- K - LDA #$00
1 V: z/ J, _0 e! R% U7 Z - STA $6000
4 I# F1 O- P, K/ W - STA $6001
: e% {& ]) ?! c/ x0 s1 n6 j - STA $6002+ z8 g) W) j2 r. `. ]
- STA $6003
2 f9 @( {* m0 Z - STA $6004
: H$ y- y8 N/ Y4 G8 W8 ]7 R) a$ R5 X - STA $6005
0 g* h& n4 e1 w0 @0 E7 U - LDA #$01" |. X$ W( M8 k. J2 t5 ^( c
- STA $600F
4 D% ~3 X2 I) ?& V0 d: C) D - . `0 V5 c' X R# i& N& R9 y6 l4 i8 T
- pause_cmp: ;判断暂停状态
5 n. M9 u) C( I! D/ i1 j - LDA pause3 ?) l, ^. @/ H- h* L
- CMP #$01 ;判断暂停状态
z" p" i8 Y3 V3 u - BEQ button_press6 V$ q4 v7 q/ \7 b: V3 F
- PLA* K- P1 U) w& I8 |+ V" c
- TAY
- }0 P: [ H! _4 t - PLA! v: o6 L( e4 w; D* E) W0 L
- TAX
4 X& R8 _) p3 A - PLA$ X4 u6 n, y: R' K
- RTS
8 K+ o7 @% q. D: X2 Y9 P
6 i. B9 r5 z- I2 d- button_press: ;按压操作
; i1 s8 z! x9 X& y - ini_Y:9 z1 p3 }2 f0 j$ j L: X% m2 o
- LDY #$00
# m* w4 U5 v1 [6 j. U5 t T - button_cmp:' b4 N& h7 c- s0 n
- LDA button,X$ |) q1 P# m+ F3 w
- CMP ora_data,Y$ [4 }7 B" l5 O2 E" N
- BNE count_Y_cmp, b3 I+ X, |- C+ O/ s- L- O
- flag_cmp:
+ D0 S9 x0 E4 t C - LDA flag,X
' S) E4 G! [% W% U/ n - AND ora_data,Y7 F- D! H0 n0 A1 t
- BNE flag_and
; w/ A$ B( I. K2 k+ D - flag_ora:
, I& r5 Z3 ]% T' X- l* i( \( A - LDA flag,X
+ o9 a l. V' W+ A/ G# s - ORA ora_data,Y2 m- M5 _ E+ M/ I" a. ^' x! @ D& F, Q
- STA flag,X v9 h; I0 b+ V8 q( N7 }, `$ `9 i+ N
- BNE count_Y_cmp
: g7 W" K: C9 J+ S - flag_and:4 O6 _# W' l9 x0 G
- LDA flag,X9 L9 c N( u. R3 w' }0 `% ?* M
- AND and_data,Y3 a" R. H% G/ \ o: N
- STA flag,X
+ a* ^2 c3 E! }+ B, \( B. }5 q - count_Y_cmp:6 w, D+ z/ L7 _) {" n& X
- INY6 I% r2 J: N0 v# ^4 N9 t
- CPY #$08( M6 U" N# d. o9 X4 i+ T
- BCC button_cmp
- J, _! ?( [" [: Q( C' K -
( ?2 m0 }) z# a% b - data_extract: ;数据恢复* m& }- m$ {/ i: k4 y& Y [
- PLA3 D: ?* _' A3 E
- TAY
2 I8 \, H$ t" i' T - PLA' z$ K" l0 F. `
- TAX
. g& N& f, d4 j, n4 c3 d - PLA
1 _" O& ^ E$ ?$ O7 i# t5 g7 n o -
0 @' A" S7 t! f: k# u - return:
0 d5 u1 H8 Z$ g% K1 T, J - RTS
) ?% Y; W. k4 Z) [5 @ - - J# f4 q b3 B: E) T5 B% K9 a8 n
- ora_data: ;按键相或数据' [8 i& B. H; m
- .BYTE $08,$04,$02,$01,$80,$40,$20,$10
2 l, Y+ n2 Y7 a/ v& k) v - and_data: ;按键相与数据$ A' T3 c1 d& c0 Q. ?! j* Y
- .BYTE $F7,$FB,$FD,$FE,$7F,$BF,$DF,$EF
- b# J+ |- {) I5 | -
. k5 D8 c% s7 Y+ W8 d$ p$ P -
3 q8 s- c; `, k+ A8 s. ?9 X3 k7 q; Q - # Q. o9 B, F0 ~5 y! g
-
# Q7 D5 f6 S( l$ X E7 k+ s -
- O9 j' t5 X/ o/ G - ; Z' S* o) I7 i: K! o. w" X9 {
+ Q G. r7 D8 e1 ^# q7 L% ?1 K5 l- b, C, W# e! a% n1 H
4 {) E7 v( H* X0 g! c3 @# E- .ORG $C264 ;自定义的MAPPER2切页程序
2 f8 w* U) t& V8 C( P0 Q/ }& o4 ^0 \9 ~ - PHA
9 R1 x( Q F6 w( l: C+ p - TXA6 F/ D c3 O0 O) g% W+ ~/ r* ^
- PHA' G# b. t! f) k( e) A- Q- _
- LDA $0066" v) T9 R; C* A' V' Y4 f
- BNE ADDRC2800 g4 A! l2 `8 i5 _, r0 y
- LDA #$07
% c% {- A+ S, z" O+ ]- m - LDX #$03" e8 x! M% F3 W+ k, C2 Q o
- JSR $CD9B ;自带的切bank方法7 u2 ]3 S& E: w/ r8 O0 C
- PLA+ r9 \- \( ]2 c W
- TAX: O- a: Z, Q$ Z' Y$ e; r3 Y
- PLA
0 Q# ], t8 T) j6 A4 Q - JSR $8000: Z; [' r: `( B6 S: d* [" c
- LDA #$06# i3 M1 L. \3 F8 V% x$ z* e p. f8 [
- LDX #$034 p; ^# ~+ z) b U
- JSR $CD9B ;切回原该切得bank(可以不用)/ M5 w: O+ e$ I! J, {' i; E
- RTS
, T, O5 z' f' P9 i - ADDRC280:8 y! x2 ]7 g2 L6 _
- PLA
# h( P* C* b3 j& I3 U - TAX8 k5 }. E5 K- n( B
- PLA U0 f* m# K% @" O! K( M
- RTS
( E4 n; `( g/ e7 U* ^ - - }. L1 ^1 e/ f3 G: I
- 9 G) x0 \; p+ S1 @; u( r, j# s
- ;[FC][最终任务PPU][END]. m7 s! f- Y+ `: S9 r- y) Z1 `
- .ORG $C056 ;跳转到PPU重写程序
+ d6 M8 N; {6 Q - JSR $7000' K* D* @# P5 K4 w* r- x
6 |( @0 S: x1 g( e* @3 E0 e- .ORG $CEBF/ j; Z* G% ?* E$ C+ T) k/ Z
- JSR STAGE_DATA_WRITE ;跳转到关卡数据写入
/ Z7 [6 p6 V. U$ _$ c% I' w - " i" D1 K0 Y8 s# O
- .ORG $E460
* U4 U m3 j$ b - JSR BULLET_DATA_WRITE ;跳转到副武器数据写入
5 l# {; Z# K B6 i' p - , D, x0 Z7 Y( S/ x; h0 P
- .ORG $71F0
" d* [0 \ V" F - STAGE_DATA_WRITE:2 O( r3 x5 ~3 I1 |) L/ R' _
- LDA $6010, L4 t/ Y/ p0 @' M4 v$ Q
- STA $1E ;关卡写入
0 D! ~, p( x/ n* {6 m - LDA #$00
; D: v& c/ n( W2 P( ` - RTS1 s9 o( V* U6 W( U9 H6 k
- .ORG $71C0- u; @; T5 i$ S3 y
- BULLET_DATA_WRITE: ;副武器数据写入
& G% q0 y( `1 f - CPX #$0E
6 c. m P9 `' D- m4 y - BCS P2_BUL
7 z$ W, W) O1 U$ O) I - P1_BUL:
! `3 `, D2 i) l! e! K( \ - LDA $6004/ b1 p2 C& V, }" E1 U3 |) D
- JSR $D7D0 ;P1副武器数据写入% p$ r' }6 W7 C+ F+ J; z- r
- RTS
% z+ w( `+ M, ?3 D! U& D - P2_BUL:8 p& }9 @0 L! l; g
- LDA $60053 z0 _" ?( T# F# S3 K6 d
- JSR $D7D0 ;P2副武器数据写入1 {9 X* t# l$ @* L& a2 ]& p6 N
- RTS2 P. N( y# [& _& o' x
- 5 G6 N& w0 f a: j: A2 q4 ^5 Y
- 7 c+ }4 t! z. ~) W5 ]1 a
- .ORG $70000 V, Y2 o6 R4 m) q
- + H/ Z- Z( |, k3 T, [+ ]+ G5 o
- STY $4014 ;补上覆盖的精灵写入指令
* f' x2 {4 j9 s - PHA% O& Y! w9 V* S* a" N) [
- TXA
+ k( X! I0 `9 F6 g - PHA1 `% I+ `) y- A2 P& u! b
- TYA# T {( \* _* k' p v
- PHA
" \3 W* Q) e+ w) x9 c0 t2 c5 ]' q - LDA $0C
6 T. K$ y/ `5 E7 B - CMP #$01 ;比较是否为标题画面
( r6 P/ x$ {/ z4 O$ P- U7 P7 {* G$ ~ - BEQ PPU_STAGE
( y+ R0 P( J, o, s - PLA4 [; T: @' D0 ^8 @1 Q4 s
- TAY4 n. w+ _ j& V% u
- PLA
! _ |" O6 z/ M9 C - TAX: u; G! z- v6 p) @
- PLA
6 `. \& y; `; D" G) k6 G5 T4 E5 T - RTS" G7 i! P- a l: E0 ^
- PPU_STAGE: ;STAGE显示程序
, u, i2 \; \% j$ b$ J - LDA PPU_ADDR_DATA
. ~# X; y. r/ D# C3 m8 X - STA $20063 |8 s; G1 y$ }1 z/ X
- LDA PPU_ADDR_DATA+17 v8 F6 G5 |% k+ h: T H
- STA $2006 ;坐标设置
# s- `' B+ D5 P' y& @) b( W - LDX #$00
0 E+ h" N2 a& ~8 c! ? - PPU_STAGE_WROTE: ;写入STAGE字模
! l7 p$ S/ x* x7 T! X - LDA STAGE_DATA,X; O1 m7 V1 b: ^# n1 G3 s0 N3 ]
- STA $2007
' \) s. J9 k1 `3 ^! g" {) C" s - INX
8 n3 H5 m% l: n, C1 _) L* t% G% @( k* g - CPX #$060 |7 Y" z( W- b4 D& \6 F3 J( d+ a
- BCC PPU_STAGE_WROTE
& s: Y. N+ |; r1 V3 s' Q. x - LDA $60105 Y/ g2 p: ]3 F0 P
- CMP #$FF ;关卡数据初始化条件判断
& x3 b+ C; f6 f( X8 O - BNE KEY_B' D# e( c! ?( x, @; T4 ^' d
- LDA #$00
e2 n% j' o O. I. Q( n - STA $6010 ;关卡数据初始化# z" o/ B5 z9 ~8 z
- KEY_B: ;关卡减少1 n. [2 }1 ?- b" @% @3 h; F$ \
- LDA $047 R I9 X$ T9 w" K; a
- AND #$42 ;按键B或左减关
6 \' ^; v. O8 E0 S - BEQ KEY_A% { v B0 ]) m
- LDA $6010
( N. c. E5 F3 I4 i3 c3 }( O$ f3 E - CMP #$00 ;关卡比较* i B: Z# a4 G8 ?( l5 w
- BEQ KEY_A
/ g0 m- c. ~# L! R5 V: P% m - DEC $6010 ;减关7 E) u8 ?8 M' ^+ C; F4 P$ e) z
- KEY_A: ;关卡增加6 O+ U9 b J' }
- LDA $04$ l/ l! _& |! r! W" ?1 l
- AND #$81 ;按键A或右加关
; H6 X4 b _2 c7 E L - BEQ PPU_NUM_WRITE0 C$ u$ ?9 u% W+ G
- LDA $6010
: {2 i) k: d( \" v" j* g - CMP #$04 ;关卡比较
6 v/ F- `) ^3 V - BEQ PPU_NUM_WRITE8 h; m% a. ?: C. _$ u% u( P
- INC $6010 ;加关7 F" @. ~, J- b
- PPU_NUM_WRITE:
! f- \' R0 W8 F: j* F - LDA $6010, j7 D0 n/ M: Q' m1 y H
- TAX
# {/ g8 v1 i! [8 w; s* v3 C% g! [! Z+ z - LDA STAGE_NUM,X ;写入数字: r. J* y2 i5 i. J, ]* R
- STA $20073 a4 P! ^# H+ ^6 _. b+ P8 m
- PPU_RTS:# C- P* x _- C6 z. O- h3 G
- PLA
4 a+ f2 L ?1 w/ r/ ?6 [ - TAY/ a: l) |# H7 c$ l
- PLA
$ n0 l M9 s( m- _- ?6 W - TAX
4 Q) P5 {. ]0 R7 T' \& l) a - PLA
* I" H% E o% j - RTS; ~" R, S. q% I, q t* w
- ; g0 ]7 s7 `/ N( O! H7 u; w" c
- 6 P) J0 _* H% v* [# i6 W& W5 e/ _
- STAGE_DATA: ;关卡文字S,T,A,G,E,字模数据2 ]2 I% e$ s: @/ y. f0 A
- .BYTE $EC,$ED,$DA,$E0,$DE,006 L) F1 e( B. t, P
- STAGE_NUM: ;关卡数字1,2,3,4,5字模数据
# _0 _8 q& E* U4 F& R) v6 R. ~" m - .BYTE $D1,$D2,$D3,$D4,$D5
3 v+ |+ M" u. Z3 i3 L$ [# K; z - # I0 X) I, ?0 ~- H3 x4 ^
- PPU_ADDR_DATA:
) E8 n }' @# W+ Q% I. c& d- O - .BYTE $23,$0C
, G0 {7 N, V; C2 I5 a1 p - & m& q9 B3 Z0 o P1 \: P; U
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
评分
-
1
查看全部评分
-
|