|
本帖最后由 yandagui 于 2017-4-2 13:21 编辑
& C$ @8 T( |% M4 ]; \0 x& H" ], ~
: \. f9 u! D0 O9 V/ {- g$ T[FC][忍者神龟2][END选关]
z! L& e: q7 q9 ^* e4 h- G6 y. ^5 \% x. ]! X
时间:2017.3.316 d( U9 D3 ?& h
作者:FlameCyclone- .ORG $B9E03 U! ]3 X1 `; u1 b4 R9 L- E! ?$ \# |
- ora_data:: w! ]- X! C5 T8 i1 t w) A
- .BYTE $08,$04,$02,$01,$80,$40,$20,$10- m5 N5 k7 K/ x1 w! S# ~
- and_data:
+ K" s3 w1 H& Z3 u, U; K - .BYTE $F7,$FB,$FD,$FE,$7F,$BF,$DF,$EF
1 t E' Y. S1 _+ Y3 ^# m - ' z* d, j [4 t$ ?! y
- button = $F8
; V# l" j X7 D4 k8 m$ N - flag = $6000
0 V7 ^% o1 B3 K1 t4 f6 B - pause = $3D- `' j4 i" T2 e" ~. D1 k, E
- 1 {! O! k$ {# {9 |3 n2 Y9 k
- .org $BA00
- _2 d3 X0 N6 a# J$ O/ ~
5 W6 s8 G/ w8 N' v0 h& G7 i- PHA5 o$ l- w+ D8 t* _! a2 m& U
- TXA! ]0 J$ w/ j7 ~5 g& [! {9 h, W# v
- PHA
2 [$ }! H) L4 [/ s& U* z - TYA: R4 {8 S2 T3 W2 T9 M; B
- PHA
- V* o: @& i8 F* }, e7 g! f( I) ~ - JSR KEY_OPERATE; }! G0 s4 Y% K' c( p% ~7 ^
- JSR INV/ }, n! `; ?0 f
- JSR LIFE
* N( ^7 T& K7 k3 i - JSR BLOOD
, a3 W/ T! W$ l - PLA
4 t% e% g8 s- f0 ^; N. V - TAY
$ v; U- ^' M5 @2 W3 J1 Y. Z9 Z - PLA. n0 G$ F" `, l+ H t' Q1 r7 N
- TAX2 N0 P- [9 ]7 x* ^2 l/ m
- PLA
$ g1 ]2 G# i+ O' {4 z( X3 R' r - RTS m) ?2 ^9 V0 ] Q( C
- KEY_OPERATE:
# } }# X9 ^: A* t' F; r/ ? - data_protect:
2 H2 M% t9 S8 A* [- r - PHA1 x3 t/ i9 V' @* R% f
- TXA" r1 X: ]$ {6 Q& H/ v7 Y
- PHA
9 l- X7 }/ L! W4 z3 q - TYA- E6 O6 `9 H+ m q
- PHA* z; d& E" ]+ G+ j( D5 T0 L
( J! k0 n/ B) `! k5 e9 I- FLAG_CMP:6 p9 g' ?7 g' @! Y, `$ L
- LDA $600F4 L# [7 Y% U- `" Y5 j' I4 y C
- CMP #$7F ;标志数据初始化条件判断3 j' Y' Q* I' u1 `
- BEQ pause_cmp8 d6 N5 d5 Q7 h) w& N, T. E {
- LDA #$80( m& g) h2 F. s# m; }- H
- STA $A001 ;6000-7FFF写入启用
/ P6 U n: k# v& _0 W - LDA #$00% N# Q& V# f, V% a9 w# C
- STA $6000 ;数据初始化
, B: T c q1 B; K- B! S - STA $6001 ;数据初始化
) P( x5 n- M; x0 E+ R# F - LDA #$7F
1 e6 V4 j" p! n+ E& Q2 P - STA $600F! w+ k: k; D. L" s$ p* w
- pause_cmp:; N, o. a6 B: e
- LDA pause
5 e5 S& e- W4 K+ a! k7 | - CMP #$01
4 ~) P- j% O. d6 q6 b8 { - BEQ button_press: @' D" {0 P' y) k, s
- PLA) ]1 {5 A6 H$ }; B, F
- TAY
3 {* G4 u+ v4 ~ D - PLA/ t$ S1 Z* u# S7 L4 F# c
- TAX
( B& d" g* C" ^) k - PLA
9 K& E. G f' k O - RTS
' [% u' ?6 i: X& l
; C1 a, l3 ]6 \6 }# l# C$ z. j& i5 Y- button_press:; C9 i) o: Z4 E
- ini_Y:$ A, S |% H7 I, T, D7 ~
- LDY #$00# g0 `: [' c& E. y% k
- button_cmp:
4 [% M8 d2 u2 ^ - LDA button,X
' O- M' }! U8 y; I0 Y - CMP ora_data,Y
& \4 V6 o/ @4 h* G z- f - BNE count_Y_cmp0 z0 _9 b2 G6 x
- flag_cmp:' F$ F- X3 _ V7 p
- LDA flag,X0 g/ D7 t9 G, n& P( d4 ^* n
- AND ora_data,Y
* [% h6 l2 w: W. b5 t# ^' { L, P - BNE flag_and( V+ P. M p" e, X9 Q4 ~9 @1 M
- flag_ora:: b1 b8 R8 g: J' r
- LDA flag,X
8 U% r2 D9 Y8 v5 U) b% c9 S - ORA ora_data,Y
* V j2 n- Y2 r' B( R3 { z - STA flag,X+ G! e8 m+ w+ ]7 C" I! c& z
- BNE count_Y_cmp0 E1 E- k7 M. O o
- flag_and:
0 |% \! ] I/ H) q - LDA flag,X* ~) U$ k& j7 V1 Y7 M$ j, l
- AND and_data,Y$ B) q( e, i; ?8 |, X
- STA flag,X
& ]5 m3 T. i {* A* _4 f' x - count_Y_cmp:
" w* Z. S+ O; q8 u- r - INY
+ \& v2 A+ ?9 {7 v% @! v: V! M - CPY #$08
8 ^$ q: H/ }# z! M' C - BCC button_cmp4 C( X4 I+ p! p( i
-
% `1 r& h9 z/ \4 Z! T0 [1 x - data_extract:7 v6 L7 g! R( k5 M7 N$ ]9 ?
- PLA
8 s1 h. W) I6 k% ?2 e4 ?' V& g - TAY- a- }2 I( k5 f# P
- PLA
2 a ?" F1 p9 K3 Q. i+ G3 K& P( @ - TAX
3 C& I3 d) U+ D - PLA
, v: z; R+ A" p' J0 ? -
- ~* Z4 C' T+ P6 l - return:
8 x3 l1 m: h* [7 c& l - RTS! V Y B9 \1 j! ?
- 3 u4 r3 J: L0 B
- # h7 e. J, \, T4 X( l- K+ v
- INV: ;无敌: ~4 C: G% Y H
- LDA $6000,X
: ]- r5 {/ e9 Y& D/ P* d( b: _ - AND #$08
( d4 T% e4 L. _ m - BEQ INV_RTS6 W3 x6 q) k( v0 F2 Z; M7 p
- LDA #$05
0 u$ b2 l0 t# [ - STA $93,X1 S' ?: u N0 J- Y2 |7 h$ G, i6 j
- INV_RTS:
9 l( M1 t8 p% z7 M6 B/ G" @! w" _/ L7 _ - RTS; V+ V: x) `; \, ?; k' K+ f2 M1 J' F* \
- M' j5 ^* ^8 |& U
- 9 k; o# s8 H: A7 {
- LIFE: ;生命( ^# }( n7 c6 B3 i5 O4 ?
- LDA $6000,X
, C" R$ i4 J: b - AND #$04
6 I* a- z, H5 ?3 L l( H/ ` C0 J - BEQ LIFE_RTS5 i8 I4 `: g2 A
- LDA #$09
7 `4 n! z; U; f5 ]; K) w - STA $4D,X
& k$ D# d: ]" ` g8 `6 X' I' _/ d - LIFE_RTS:# Y6 t1 Y9 i1 U7 B! T0 l7 E: y
- RTS
4 b6 W. K. _/ ?5 \* W
# f4 M; \& a+ x-
3 s: u5 c2 _# r8 P - BLOOD: ;血量9 C/ d2 W" i; p; q. r- X/ p0 T
- LDA $6000,X
! U9 {; _, d+ q2 c# ^ - AND #$014 l# d6 n& J1 c. d y0 L2 G& o% R
- BEQ BLOOD_RTS
( E5 Y+ C/ m/ I5 W! o - LDA #$38
2 l( s; x' u1 S; G4 i6 d* m) S1 [2 w) B - STA $0568,X
4 S3 b% ^' L" U1 F! m" |0 { - BLOOD_RTS:
0 z1 k2 M# `/ D3 v/ R4 J - RTS
0 \. x2 U: S; y& _4 L0 i3 g - ( I6 m7 k3 q( n. @6 o
-
. ^ w0 S6 V& i- C# g2 X - .ORG $FEFE; A8 a) _$ z! h* B B' M
- JSR $FF606 h2 p" f- v1 m9 }3 L M- V
- NOP
6 K7 Z; R5 P1 u) q& |1 F7 b: G/ { -
. \- Y8 J" ~! a0 y) e& n - .ORG $FF60: k) w2 ^2 h% v5 G% e
- STA $F8,X
" T3 {7 g q8 W - STY $3A,X
' x5 Q. Q4 ^* k" F, X - PHA2 _6 }; i. J! Q9 Z
- TXA
* |7 D3 ? A# y/ |1 A' n1 ~& n _ - PHA% b7 X2 }, ]* y5 |% B% z
- TYA' f' r+ ~% A$ H. M( k' \* A2 G
- PHA
8 N4 S+ @) L; d/ R/ m" a" C8 y" T - LDA #$02
}; H1 A Z# ^" N/ {! S1 A% R - JSR $DB11 ;调用系统切页
9 |8 [7 j/ D% a* e, g5 B - PLA4 @* ?$ P3 Z4 _: m; B
- TAY' @9 Y# k1 o y: F/ R5 b
- PLA
3 g- }# _6 R7 a V8 f- f - TAX
% g* C$ [- p0 F# i% Z$ f N% H3 G - PLA* n5 A1 b- d( V8 b( S
- JSR $BA00# _2 l7 _5 F( v, u9 [1 I
- RTS
6 o2 Y& D9 m9 q8 V - c2 d9 O+ l) i. S5 `7 c6 ]4 m9 Z
- ;[FC][忍者神龟PPU][END] N' u6 X( l' Y0 y8 ?
' d# s" Y$ j; v- .ORG $BC003 E* Q' w y" W1 [9 t
-
7 y( _0 b9 ]! y2 n+ a( F' O - STY $4014 ;补上覆盖的精灵写入指令" ]6 Y; T1 i, |8 @8 T3 H& G+ u
- PHA& {, d& d% b5 _8 e$ b# m
- TXA
& G, x: x5 U# y) z8 G! F* |3 W - PHA
. f- \- T: l# C! X1 E- j [ - TYA/ [& v: F; }/ m! Z
- PHA
& q, k1 Z9 K* }7 J. z - LDA $018
! x" s" `& d5 m+ W1 e) F+ v( D - CMP #$01 ;比较是否为标题画面! i0 C0 n+ E* l D8 S1 i
- BNE RET, x# y3 n3 M$ J5 O7 K
- LDA $019
1 K' X% v1 {) J- K. I3 n - CMP #$01 ;比较是否为标题画面6 o4 h2 O8 W3 F1 L Q/ R
- BEQ PPU_STAGE
9 l* B q! J H- C* n! ~ - RET:, Y$ i& S% ]" C* q4 j3 a+ J6 v
- PLA. l+ @$ m/ U0 G7 X8 J
- TAY2 L7 U H1 [1 M# L6 i" m P" w1 W
- PLA& X l$ e, d; D7 Y* h2 p
- TAX9 k- J. l' L+ m" z
- PLA
! B6 B' i9 r# Y8 u - RTS
# w( Z4 z3 t: X( b+ ~ - PPU_STAGE: ;STAGE显示程序
1 O- t6 [+ h3 _. f/ l - LDA PPU_ADDR_DATA( U, k9 D9 Q+ d0 W( Z, @. ^
- STA $2006" x/ ~& b: X( L1 {3 I! Q
- LDA PPU_ADDR_DATA+1, Q9 p2 ~7 a1 H$ _: z+ H
- STA $2006 ;坐标设置6 \# _8 j e/ E0 I" d
- LDX #$00
1 V& T5 b# {9 D% B* A0 h6 s - PPU_STAGE_WROTE: ;写入STAGE字模/ O9 c% [4 E2 I6 e
- LDA STAGE_DATA,X7 @# ]4 x, _0 Q F9 {' J
- CMP #$FF
! D; G' K) ?: M0 [7 [, [7 c - BEQ STAGE_CMP( s! q* X3 ?* s
- STA $2007
& Q! s- R% X' f0 ` j3 t' z# G - INX: Y! w1 i/ \4 J& l& T
- BCC PPU_STAGE_WROTE
1 @' n9 d& ?& |& S9 B - STAGE_CMP:
: S+ g3 ?3 X' l6 B8 D# J: ` - LDA $6010 b( L' V& c2 t$ S# X. z& U) y- W
- CMP #$FF ;关卡数据初始化条件判断9 K6 V+ m3 a( s M# F+ @3 I
- BNE KEY_B
- [! X5 o& d+ p& n7 Y+ C2 B5 i4 b* n - LDA #$00; e# R4 A9 K% Q5 g* ^7 q. ]5 o
- STA $6010 ;关卡数据初始化 e1 E' b6 ?1 f, I u$ ` w
- KEY_B: ;关卡减少3 P* Q7 h8 u( D: D* E, K1 }+ p+ V
- LDA $F8; H' g% v e- `0 q3 C
- AND #$42 ;按键B或左减关
7 r$ c* ^* I4 S, }! i - BEQ KEY_A( k# M7 F# I: ~3 ^$ J, j
- LDA #$FF
* o6 [ B2 K- X - STA $40
; h& m4 u! U' ?' E - LDA $6010; C$ I+ Q" Z8 | _; m3 Z
- CMP #$00 ;关卡比较
+ `; C; V$ }7 i) ` - BEQ KEY_A# U, S6 M7 s3 m ^3 Z
- DEC $6010 ;减关
/ x+ I: s' B; g; ]% g - LDA #$57
% E+ g( o, V/ O: K! n2 Y+ e1 O% \ - JSR $DB52 ;按键音效' u. t* Q! b2 F, E0 w3 d+ p& G6 x. X
- KEY_A: ;关卡增加
/ q: S- f5 g- c0 u) P; g - LDA $F8
4 f, k% _6 h) l) p2 M, O - AND #$81 ;按键A或右加关
/ U4 M* o. r) l3 ~) g y' _. ] - BEQ PPU_NUM_WRITE$ V6 P9 s/ A- o& B
- LDA #$FF
1 f# j j0 r7 \4 z - STA $40/ \" ]" t2 T4 F8 }4 S
- LDA $6010+ Y5 [; e: \7 ]( w$ z9 ]: v
- CMP #$0B ;关卡比较
* s }. C9 @ R" g& L/ I: ` o4 D - BEQ PPU_NUM_WRITE* T+ Y# m# }$ k+ a, P0 m4 Y
- INC $6010 ;加关
& _0 U/ r$ @# Z+ b, ^7 E5 ^ - LDA #$57
$ [0 Z4 S& }7 w& c. B. v4 | - JSR $DB52 ;按键音效
3 a' D, s; |% e% l% } - PPU_NUM_WRITE:3 u$ w* n! \$ c( R4 L
- LDA PPU_ADDR_DATA
7 L. i' u5 y* M. g3 ^" N: W9 ]+ U) \ - STA $2006
+ x! o& g& d+ f7 k/ {9 G - LDA PPU_ADDR_DATA+1
( H7 K1 k: e9 C$ M9 Y - CLC
1 S& Q3 B0 K3 l* l" F" { - ADC #$06
+ u+ y4 {# `5 l) P( c$ G# S - STA $2006 ;坐标设置: D6 l2 o% }7 {+ K" ^$ m- h6 l! M3 L
- LDA $6010
0 G! m: M/ D' X" J2 c% O0 [- F - TAX
T! d" O* Z9 ^7 p: L - LDA STAGE_D1,X ;写入数字
, B- {3 l* @9 @: j8 n# Z! k - STA $2007
4 b4 \2 O$ a/ u8 D$ |% n$ Y m: ` - LDA PPU_ADDR_DATA
4 Y" K2 U, {; x% A3 r, t - STA $2006+ \0 i, n3 _& T9 ?; x$ P
- LDA PPU_ADDR_DATA+1
! c) i7 m0 }- n% W" h - CLC" N1 S; B, u* @2 L( J* N
- ADC #$0B' v% k8 F5 [/ L3 Q
- STA $2006 ;坐标设置/ ^5 K: u) P( p
- LDA $6010
- f* X: k- G4 w" e4 i. T! d - TAX
1 V0 Q' |- y! O, k0 S" m( W- f - LDA STAGE_D2,X ;写入数字
1 Z$ f! K: t) b% E3 b3 O* e - STA $2007 z6 X7 h6 c8 x% l% z
- STAHE_WRITE:0 j8 w9 e$ K9 n1 b0 S5 |6 h' u
- LDA $6010# l) {$ L2 W- m$ ^$ v, S, p
- STA $42 ;初始关卡写入
7 X& c7 s: \1 S0 C* c1 v: o) g# d - PPU_RTS:0 u6 T4 x) h0 y6 v# u1 ]
- PLA9 S5 G: w! r0 I* _5 M3 c' G: ^0 F4 V
- TAY
* b) F0 U5 Y+ g6 _8 C3 q, @ - PLA7 ? D& r* u4 ^& E( h, t$ w
- TAX' D2 j+ ]( C1 P8 n" J E6 P0 A) _) V! Z
- PLA
g0 d5 b5 D2 Y! [; H) _- h6 { - RTS
' M- X* G7 ?% R- ?7 B -
" h- h5 u4 J7 ^+ D* p -
8 _" z" {3 @) @9 a4 l - STAGE_DATA: ;关卡文字S,T,A,G,E,X,-,X字模数据+ q5 K% y* h8 s
- .BYTE $1D,$1E,$0B,$11,$0F,$00,$00,$00,$1E,$19,$00,$00,$00,$FF
- u# X" Q! w, T; G3 b0 `; x- [ - ) s( y% g9 v: Z7 a9 w
- STAGE_D1: ;关卡数字
, P w8 p2 m) f i4 B. x& E# o - .BYTE $02,$02,$03,$03,$04,$04,$05,$05,$06,$07,$08,$08
' Y) V7 i7 ]9 }; [' d - 4 q/ a: ^) [" ^
- STAGE_D2: ;场景数字; M4 l/ @+ P2 A, L
- .BYTE $02,$03,$02,$03,$02,$03,$02,$03,$02,$02,$02,$03
* M% P9 @6 N" e0 B -
( _; ~: f! I# t, @7 z. G - PPU_ADDR_DATA:: _% S: a+ l+ z; v/ j
- .BYTE $23,$4B& O4 l! p6 Y! N5 t4 L! j4 ?
-
0 ?" l i* i4 R- q- m. { - a$ W7 b/ n$ q" p
3 h2 t4 ~/ }! P a/ b" _- , p0 w! y$ }# ?! Y& g) i
' ?; j d" c g- u% k- .ORG $FE21 $ b$ H" T H" W1 t1 g6 X& f- z
- JSR $FF40! J) X0 I' z* |# ?2 ]
- / }6 P: X) {; f7 o. w. r
- .ORG $FF40
$ J; n+ x( b$ _6 k% N, P - LDA $BCDF
7 q4 n T+ X' }8 d4 | - CMP #$7F1 j8 d+ K4 O+ n" B/ ]4 `; g/ ^
- BNE ADDRFF56
* X1 `4 \, w: e2 a/ q - LDA $0018( e+ H O7 K" q7 p
- CMP #$04
; [1 c! o9 ]# w; W4 a - BNE $FF52
- c0 r+ F: m4 @: d @. S - LDA $6010
3 s2 u2 x0 H2 J3 i8 _ [ - STA $00426 u& p4 w7 h3 [# f i
- JSR $BC003 l$ e6 M @0 [
- RTS
9 @/ V3 y; n. b% O - ADDRFF56: ! ]& E+ ~2 S0 t/ I9 \" t
- STY $4014) P9 N' ]: H, p+ I# A
- RTS
$ z) S/ Q! X8 [ - / |3 ]$ x' @7 z' w: A i
复制代码 内容:
) h% z9 L) v+ i4 g) ]1 U4 M 1.关卡选择: 标题时,左或B减,右或A加;
5 f9 y! N2 j R& \2 b1 d 2.一击必杀: 暂停后,按B键切换;5 Z9 P- y$ ^* R- Q/ G
3.无敌锁定: 暂停后,按上键切换;5 `, j. o4 c1 d C* {
4.生命加满: 暂停后,按下键切换;
8 i' K/ c; \1 X; | 5.血量锁满: 暂停后,按右键切换;
# t6 @) d7 U9 T0 j$ l- a1 X- [7 L) C8 A& v) |3 X
3 I6 H, U# q( o- f( g+ L
FlameCyclone.ys168.com1 j% ]7 T" A/ w% Z' a1 g8 c% L
www.nesbbs.com
M; t) h+ v: C/ N+ f% U5 k. y" W) q: O0 Q( b+ f3 f0 N, p
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
评分
-
2
查看全部评分
-
|