|
本帖最后由 yandagui 于 2017-4-2 13:21 编辑 , s6 f( C% V$ y
* V5 w5 r2 M/ `/ g9 Q X# [+ X
[FC][忍者神龟2][END选关]4 T+ S9 G; y+ L" s
1 q Z2 Z4 |% g( q时间:2017.3.31
' i4 f" p8 x! _$ G. G5 j, W作者:FlameCyclone- .ORG $B9E0" F' T9 |* _8 ~& o
- ora_data:
. M) O8 @) _$ { - .BYTE $08,$04,$02,$01,$80,$40,$20,$10! p8 q9 [) e6 M* G! a! ~
- and_data:
! p& _5 k2 S0 S, Q; X- n* k* H - .BYTE $F7,$FB,$FD,$FE,$7F,$BF,$DF,$EF
e! F2 b2 H; U2 y) P2 p# ^, h - $ T- O6 T; O$ o X3 S- J4 M4 T3 q9 z1 N
- button = $F8. T; D4 c, V5 }, Y% b2 B
- flag = $6000
# T, S* N7 G! h- o& w - pause = $3D3 V* x+ S( y7 k, O
0 q& Z' m0 Q% d) f4 F; x- .org $BA00
* J: ^6 C/ [+ d- ?3 l
( M# P+ W' x3 u e- PHA
# V& \* `- Z/ K% O: M7 R) r" U - TXA7 Y; g% r- }! h2 p9 l8 q5 q
- PHA
1 o$ N3 j1 p- B" `0 o. F - TYA
, ?/ ?- c+ W5 k0 Z& [' \ - PHA- ` ^% D5 x: g, |( h' g* @
- JSR KEY_OPERATE
: K" _" N1 `+ S6 \; z - JSR INV
\- Y2 x o; {+ U - JSR LIFE/ l* A3 L" Z X
- JSR BLOOD
: B4 z l8 V& w u8 q1 E# M, T7 c - PLA: m& W$ S& l9 ]+ S+ i& O+ y! k5 S' x
- TAY
; J+ v$ H! ]- n! d4 K- @ - PLA
7 d n$ L) V4 N8 ]3 p - TAX
: R. u5 l' D; ~! z( a# z% z6 O x - PLA( \& c7 a" C0 v5 E w. g, C
- RTS
/ o$ w, R q, o! O- [/ F - KEY_OPERATE:$ w) G9 e& v/ B5 S
- data_protect:& Q6 y& O5 \, v" D/ G; O
- PHA6 \# ^4 Q: Y) g! N: }) V" K. R
- TXA' w3 R( I. M6 o- g, c
- PHA
/ k9 D) E; l: L - TYA
, T; Z, A4 O6 j6 t* E; y" r" X - PHA' H) ]' a% H( s7 l$ `
- 4 W. h; i+ F) U' E @: {: o# x
- FLAG_CMP:
! g2 U1 i4 T8 S/ E, L3 C - LDA $600F; j; }+ D- I4 E, n# E
- CMP #$7F ;标志数据初始化条件判断
; p8 l) _& T2 } - BEQ pause_cmp
8 ~! O c% k6 I8 f - LDA #$804 Q' q, G. N. f# w6 L
- STA $A001 ;6000-7FFF写入启用: A2 f. X9 [. H6 R. U" b) S1 |* {
- LDA #$00
. f3 z" r, j) X, b1 w% o, V8 y- T - STA $6000 ;数据初始化# ~3 x4 O0 a' J$ |, L" |! D; S
- STA $6001 ;数据初始化 [9 I1 [6 w4 X* t
- LDA #$7F: @2 Q4 K/ ?$ t3 c% J& F, Q
- STA $600F4 [2 h$ i2 S) C7 A7 i7 I$ l$ ?
- pause_cmp:
/ U2 M3 u& s$ u: c4 J - LDA pause8 w2 c2 ]7 `8 z. `' H4 x9 K
- CMP #$01
1 Q# _2 \! E* O - BEQ button_press$ l$ q! I! B# Z1 g( D* ^8 ~
- PLA# L- u$ ?& B" |. \
- TAY
0 B; r+ _5 e4 p0 E9 |3 [ - PLA
: r! L' L' G6 f; W - TAX
; H& [; X8 }) e4 d( Y2 A - PLA" u/ q8 s* l+ K# a ]( @: Q) |
- RTS; |+ s( c3 Z; j# y0 D
: Z7 ?, t7 D6 J: X6 t+ O/ v! L! R& N- button_press:" f. d6 \: X) O+ N
- ini_Y:
R+ Y. ~' }3 k5 f6 g# M x - LDY #$00
2 F8 e+ V4 I3 U - button_cmp:" @1 x5 B& c5 G; [" P' n" ^$ q+ y
- LDA button,X, p" K' n+ p# I( }' V- @2 A
- CMP ora_data,Y
9 n! l& Q Z) w' \ - BNE count_Y_cmp3 o0 e3 S% _: G& r" X* s
- flag_cmp:
& G# K0 e7 y5 l$ g, h$ D - LDA flag,X
, O5 h5 e+ S( C/ A) s - AND ora_data,Y
: _5 A) q* X2 d, x7 s3 A - BNE flag_and* ~0 ~" r& t4 x3 G
- flag_ora:& f1 K; L- t5 s/ s% R% z
- LDA flag,X
6 L0 m. u7 V1 g) m }0 z - ORA ora_data,Y6 i! C7 q" V. ?8 s
- STA flag,X- `/ S- l! R$ D& N/ t5 W9 O
- BNE count_Y_cmp3 s# Q5 p0 I/ m5 u/ g# ~
- flag_and:. A ?- M0 N9 Q& L+ \
- LDA flag,X
. J& D2 @( n" v1 g - AND and_data,Y3 D3 P2 \; j R" K( L: Z
- STA flag,X
" R' n2 n: H! o4 F& G7 v - count_Y_cmp:
! V/ I+ i8 f5 R& X8 v1 s8 A5 Q3 r - INY
, x. [# u: `+ T - CPY #$08/ n- n) A0 g9 D6 I
- BCC button_cmp4 ^2 y! T3 F0 a+ `1 @3 m
-
3 u R/ \- Z0 `( Y# @ - data_extract:
/ ]+ Z- y; b6 h w. u1 G - PLA
$ q2 f% a* Q' |: U4 B# P+ }: b7 f# ~) { - TAY
$ J" O n Q a% o. ] - PLA: N4 h. K: y. {# p1 Y4 v& [
- TAX8 E% O6 s, m7 C2 S/ s
- PLA
( ~+ p5 r% y5 g' W -
8 I& u; u( r# L3 h; P( @6 ?) ` - return:
7 O" x. f$ ~0 c ^ - RTS
9 n! M( S* s/ \+ {* N% P* M -
3 Y, a# t' W0 K) L ]/ _ - ' w4 _2 h6 ]9 x3 Q, _6 p3 y
- INV: ;无敌
. I: j4 k3 n" N5 u; n - LDA $6000,X
* Z. d) x6 E- v1 D: F- w - AND #$08+ t) S: }: C! ]9 P
- BEQ INV_RTS3 o& U" Z9 U- D/ d
- LDA #$05! W9 }4 {2 e! u/ ?, v$ Z7 S
- STA $93,X
* A s: I' q" @ @ - INV_RTS:# a4 T1 k0 j0 R& r2 M, F
- RTS/ L1 u) ^& ~5 D) _
% r9 P& _. x! @% ~2 |! Q-
) O$ I9 Y& y+ Y+ u: u% Q" r4 K - LIFE: ;生命8 u! F N* ]- T3 t+ s* h
- LDA $6000,X
5 s" X+ |3 R# p3 T4 ~7 P1 ~ - AND #$04
9 ]: o% {$ `+ g7 c* _: T. n - BEQ LIFE_RTS9 M# w; v/ G! x: E% B
- LDA #$092 C( c+ z! z3 X- d' j
- STA $4D,X) j7 K1 Y) z# a: f0 ~& j
- LIFE_RTS:- x, x( A# s( _5 M W3 D
- RTS
- N7 a" O" R+ J8 O
, c' Q% F7 Z1 \-
7 @ ~# C) s5 j5 {* v2 O - BLOOD: ;血量
3 T) g+ U) G) j0 u( B: a - LDA $6000,X
. S0 k c. d3 h6 v O - AND #$015 {: R2 _) ?" a* ~0 l% q; X
- BEQ BLOOD_RTS
: ~( m- m6 Z4 K% J3 e0 Y - LDA #$38
4 _+ N9 F4 T$ ]% C% \! K6 i/ J - STA $0568,X
: K; M @1 Y) O9 |1 |. m - BLOOD_RTS:% I( a, B7 @0 | m
- RTS3 o6 D' A8 Z9 V* U y5 p' d/ l S1 v
-
& ~* O# Z7 R0 B n8 o -
1 O9 i! g' d/ K1 k- m' t2 j - .ORG $FEFE
6 k2 \6 v+ N% y( y( l - JSR $FF60% j8 S+ }! t" f) c6 G* l, T, r
- NOP
X+ n* N( k6 J- q( z: x - 7 b* }0 y B: l2 \) b: [
- .ORG $FF607 ?- I; T, y" D# \4 Y. l
- STA $F8,X" `4 T* C3 I0 Q; W+ c- K, b
- STY $3A,X/ y& i+ q. A: J( W% v1 ]
- PHA+ a/ A6 C: M0 n* U+ h4 |
- TXA
$ }+ a/ K4 l. a! |8 a0 ?! J - PHA
! Z) n i" ?$ c' o0 W; S - TYA) c2 l% p5 k5 r
- PHA' Q7 e7 |; T% A" h7 R1 ]
- LDA #$02% e+ L* }6 N$ t6 K
- JSR $DB11 ;调用系统切页: c$ B& c* X+ L9 V3 P- w5 f
- PLA
6 `& s0 N( `, B3 ?. P, K- { - TAY0 d, O/ Z* c# a4 y' a$ t2 ^
- PLA* Q+ c: u$ {" F( b
- TAX
' |: e/ Z) @! J$ a) z - PLA
) f) X. T; w) W: ~" d8 I* w - JSR $BA00
' ]- X+ |$ v$ m, l7 }2 U; P+ n - RTS ) a& y$ \7 O0 Y- I# E* m
" ~% X3 A( w# J( d: z% @) d' ~- ;[FC][忍者神龟PPU][END]/ @$ c1 _! e- E+ i ]- T! l
4 n& a. b" F( o4 Z6 E- .ORG $BC00
+ _9 I0 O. V% L0 P1 l# g6 l9 I - & Q( G9 u( y& B. c, F6 N+ y
- STY $4014 ;补上覆盖的精灵写入指令
1 [) l' z; W6 p4 t - PHA. k+ Q, j4 r. f ]' g* f0 @( F9 M
- TXA" m" I! s. A0 i5 R2 F d3 f
- PHA0 f; J/ \& j3 h6 C) B
- TYA
/ m4 X( z6 ^) b - PHA
4 L( e9 H" S. Q/ b* F - LDA $018
# ~3 W' {* B8 I3 t6 m) K: | - CMP #$01 ;比较是否为标题画面$ X( Z4 L1 h1 N1 y v, ^/ Z0 c S
- BNE RET
1 n5 @6 o5 ^: W - LDA $019" n% `+ Z4 c2 k' F: c; x
- CMP #$01 ;比较是否为标题画面
% n" }: {) \2 C# f& [ - BEQ PPU_STAGE
. [* P2 J1 ?; M) k5 \* C0 I+ v; L - RET:
- u7 V* n: G2 d# H y- ^, h5 p - PLA/ }; P! B* W2 n. r% {
- TAY
) m- {) [! o7 U7 e1 {% {3 S, V - PLA
/ W$ G5 W) \2 z, h- P9 } - TAX
0 t9 |* b+ O) y+ {3 K# m# ] - PLA8 a# e3 G; _& V) x
- RTS- L( B' g. d7 w ?0 E! t& n; s' j0 \$ q
- PPU_STAGE: ;STAGE显示程序6 l. O1 t# }1 G7 ^ M
- LDA PPU_ADDR_DATA
4 X0 i6 k2 N& _7 v9 ~' p: g$ \ - STA $2006
; C- m: S' G+ Z - LDA PPU_ADDR_DATA+1
8 h! N, I+ E2 }0 y' K4 {- G - STA $2006 ;坐标设置 h0 `" b4 H% `/ [* V5 x
- LDX #$00
- z2 F+ b' z. o3 j3 Y4 D - PPU_STAGE_WROTE: ;写入STAGE字模
- J8 c& p# W1 U& p6 q8 A - LDA STAGE_DATA,X! _( f9 T# p: o# B5 I5 t( r
- CMP #$FF
0 ?. x2 O0 F& X. O5 W6 d. q - BEQ STAGE_CMP
: R# z, w" U/ t) e" D1 z1 y - STA $2007
E5 ?1 o3 O4 l. e( H& z4 Y$ f - INX
7 t; e( g& J$ w0 P- f% { - BCC PPU_STAGE_WROTE8 t! u4 B( w/ I1 X1 ]* [; a# D! j7 s
- STAGE_CMP:
) R+ f- W; A" y* e - LDA $6010. s1 {4 @1 F% a
- CMP #$FF ;关卡数据初始化条件判断
/ X. N) q) U4 L, L7 c4 b5 z - BNE KEY_B
: Q5 q- M+ S$ h( t - LDA #$00
" T7 D: l& O! h z% k+ m - STA $6010 ;关卡数据初始化
. |: N) u! f+ v( P. X - KEY_B: ;关卡减少
6 P( ~3 x9 W4 v9 v - LDA $F84 @9 O1 y, u+ A0 [! M
- AND #$42 ;按键B或左减关1 y; a# [$ c$ T
- BEQ KEY_A* y/ d' h1 B! l% q: n
- LDA #$FF
' l$ E+ L! k# r- O8 c3 i2 W \ - STA $40
& G% i, k- i* l n - LDA $60106 F$ @5 U5 L7 |
- CMP #$00 ;关卡比较
- [+ Y' r+ U! x# i: @ i - BEQ KEY_A' }0 h" j' J& h7 ^8 N( r
- DEC $6010 ;减关
: M l3 `; m# H4 {# ` - LDA #$57
- w+ w+ t5 t* o( _6 x; v - JSR $DB52 ;按键音效
7 {) b! y5 l7 Y B - KEY_A: ;关卡增加
* g" o! Z2 R; q6 v1 m% R - LDA $F8$ T+ u- v `6 W7 E
- AND #$81 ;按键A或右加关
6 b$ j$ N R% T! i - BEQ PPU_NUM_WRITE
1 J/ Z" k0 ?4 I7 w - LDA #$FF
# y1 R$ G9 V- e: j6 K - STA $40
7 D7 `1 \& `! V4 n! U$ M2 K - LDA $6010
# ]7 S* W+ K" v( Z: f" r. r7 t# ] - CMP #$0B ;关卡比较
) `+ b& S6 ]: U/ s - BEQ PPU_NUM_WRITE7 ?* [+ g! e1 |" c0 ^9 p
- INC $6010 ;加关
3 M- a! O4 m2 |5 R% Z- c - LDA #$57- A) `5 E) x7 e
- JSR $DB52 ;按键音效5 z4 t$ \( j3 x0 H# H3 t) v
- PPU_NUM_WRITE:8 K9 l6 \4 p; i+ W2 ]
- LDA PPU_ADDR_DATA
( m: u: I& y9 o7 U. \ - STA $2006/ U$ [, ]4 H5 @# v l: h/ C
- LDA PPU_ADDR_DATA+1
6 _. u4 r. ?* A - CLC0 c8 o$ S% m# c
- ADC #$06- r( v8 O4 o- u/ o" U! D
- STA $2006 ;坐标设置* n7 P" k9 y1 h, Z! f) |
- LDA $6010
$ |. D! w1 [& d1 [ - TAX9 f6 G, e; N9 p. w+ {
- LDA STAGE_D1,X ;写入数字
8 n1 d0 g( |5 d# w7 l3 f2 b3 G - STA $2007. i. K$ k6 ?9 L* E
- LDA PPU_ADDR_DATA# t' `2 q: o% C7 q% F
- STA $2006/ u2 Q; y9 q! D0 X- }& H3 f
- LDA PPU_ADDR_DATA+16 Z; R- t# v- q$ t' s0 n
- CLC
) U5 n$ U1 K0 c+ l& j; ?3 V' n; X - ADC #$0B6 R) S/ o! N; C) G
- STA $2006 ;坐标设置
. y" d( N( E7 H+ s - LDA $6010; @1 ]* |3 y7 I4 }) s* F2 _* f0 S
- TAX: H* r6 n- ~0 Y$ A
- LDA STAGE_D2,X ;写入数字 [! ^1 {9 D- s1 d/ n! t* F& T5 l
- STA $2007
! K: h. X5 ]6 Y9 ^1 I - STAHE_WRITE:
- g8 @6 m; l6 e: p/ a - LDA $6010
' a& x+ T- x% p. N - STA $42 ;初始关卡写入6 e! P/ y9 _: b7 h. n% q8 Z
- PPU_RTS:
- E$ d4 N. q) H3 Z( b - PLA
% Q& X- i; F1 j8 Z6 h) Q- x- v - TAY
$ c% d/ s3 ?1 Y! V+ S) {4 U( }: i - PLA7 H3 W A7 _( b1 Z9 l# q
- TAX: r( y9 C: _5 H0 S& L+ Z+ `
- PLA
9 X( K0 [2 g% d - RTS
, y" }6 [+ T7 L J% _) u* v - : p( q1 _, l7 `0 o
-
. x5 Q7 `5 N# h% b2 U+ z - STAGE_DATA: ;关卡文字S,T,A,G,E,X,-,X字模数据
) b6 P+ l, O, r - .BYTE $1D,$1E,$0B,$11,$0F,$00,$00,$00,$1E,$19,$00,$00,$00,$FF# S1 H( ~$ }! t
; I* k- R, X# Q) H7 H- STAGE_D1: ;关卡数字! |! \! j' ~! M/ U& c) A
- .BYTE $02,$02,$03,$03,$04,$04,$05,$05,$06,$07,$08,$08" d* |2 Y9 B5 m2 P
- . _( C, s* d. e- J/ G
- STAGE_D2: ;场景数字
6 K2 s, `% j7 ~0 A - .BYTE $02,$03,$02,$03,$02,$03,$02,$03,$02,$02,$02,$03& h+ H7 \; I# z8 N X
-
6 Z. P: n4 u8 `/ D8 S L - PPU_ADDR_DATA:
0 l9 |3 m6 o" }1 m0 _/ U - .BYTE $23,$4B
9 C6 }( C: a7 q5 h% b0 L - ( G5 {7 O" |* d$ K2 }+ N
- . n- Z0 A# g) B5 p% b: Q# M5 Q. s
h' H% Q g. c- z- + N+ k* k7 ?4 ?
1 V9 P$ C8 V: K9 C9 S7 F, c- .ORG $FE21 0 { S) w+ v# G# D6 E" t
- JSR $FF40
2 w- A- N9 C, b- d* L7 R$ | -
9 \ N" v1 q& F2 i - .ORG $FF40/ l- `+ h! g5 k0 Z' G1 w/ E
- LDA $BCDF5 v+ ]) J. a/ o1 ~; J: ^
- CMP #$7F
5 E4 r! ^7 i2 `4 ?* l. ^0 V: Q - BNE ADDRFF56! B9 m( ^2 ]0 L# E
- LDA $0018
' ]8 ]. |! n5 s - CMP #$040 r6 t. |. g6 x* d/ o
- BNE $FF52
9 D+ _3 J# O7 @- L3 Z( E7 l# t& r - LDA $60102 q9 a2 l/ N7 _% V3 C3 Z& \! [
- STA $0042
) C! n: F$ e6 @1 u* P# d - JSR $BC00
6 @2 O1 k6 A( y9 r- ?' O6 a - RTS
6 ~: Y/ i T" c/ M: M. O - ADDRFF56:
# x0 C# A% B9 J# E - STY $4014
7 }, ?9 X. F( _8 ?- \ - RTS2 }+ \, L2 I: R# ~# J8 |% }
- " n% D; Y+ K1 d6 }
复制代码 内容:: g, l2 ^7 W5 V0 I
1.关卡选择: 标题时,左或B减,右或A加;
; j1 _: O. A$ D5 O7 a5 ]; R# q% p 2.一击必杀: 暂停后,按B键切换;
# F/ Y5 N* _% Z" M 3.无敌锁定: 暂停后,按上键切换;# Q% [7 t! k0 d$ @
4.生命加满: 暂停后,按下键切换;
) S3 q. T3 E. B- t7 E) a" R& `$ } 5.血量锁满: 暂停后,按右键切换;7 O( o! ]4 I- z) V
6 N+ D9 r- C4 O X$ n
! n8 k, X6 A& d/ hFlameCyclone.ys168.com# R* f; R, r* N5 B# S$ z
www.nesbbs.com
- T# p' H! l% g' v S" S" c7 ?2 d% i; \( I! Y9 n- s
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
评分
-
2
查看全部评分
-
|