|
本帖最后由 yandagui 于 2017-4-2 13:21 编辑
2 ^/ L- t0 r) w% m" D5 \- ?( |
P' {5 \- M' i, [[FC][忍者神龟2][END选关]
* q& `- @! F( K! v1 X! z6 o, W6 b1 {
时间:2017.3.314 h( j l1 \) E
作者:FlameCyclone- .ORG $B9E0
$ ~( u& L) U" M3 @. l! y - ora_data:9 W6 @4 O, c+ R3 e% |' N. B
- .BYTE $08,$04,$02,$01,$80,$40,$20,$10
5 t; \0 `( p* I! R/ E; g# X1 ? - and_data:- C; D( N: O2 y: }! L+ _
- .BYTE $F7,$FB,$FD,$FE,$7F,$BF,$DF,$EF
4 ?4 Z& J- G! {* @3 A0 R - c* P& m5 ?- i _8 _8 V; [! g8 {
- button = $F8, ` b2 k3 K) T9 X/ X8 W
- flag = $6000. o) c& N1 X: c% n& W# N
- pause = $3D
& A2 ~; W% {! t+ @% X
3 Q2 k* x+ Z* ]; L( P- .org $BA00; J. d8 ]! X- a) ^5 L6 T6 l
- + l8 D w+ O$ L2 h+ ]
- PHA- p+ j( v: V( F3 i( y2 I# m- a! V
- TXA% F* u+ S. |0 `. Z I. G1 B) a7 R5 L* @
- PHA9 U* R& ]9 ~6 B {. ?3 R
- TYA$ r3 _* D/ [8 j2 G% ~2 m+ b
- PHA
$ S, r# d8 H- _( Y- d$ d% G3 ~5 F7 R - JSR KEY_OPERATE
T, F# v* O5 Z3 W4 u - JSR INV) m! Y3 n# c9 s6 w! \. j
- JSR LIFE/ E, y. ^; e/ C# R* c8 v9 `
- JSR BLOOD. Z. B2 E3 Y- M8 N5 i
- PLA8 B% x" y/ s$ q% T" q
- TAY
3 ?" q! p M& ~ - PLA3 W8 {0 `3 J1 y5 n
- TAX
1 k5 H, U' ^ B- m0 F3 v8 L7 N4 e - PLA
3 R+ h4 F, S0 g4 ]! V" Q - RTS6 x3 W. [. k# h1 m9 c$ R
- KEY_OPERATE:# }( f8 o' }1 O' q2 |0 L; ^
- data_protect:
# s' U' g2 E4 ]; K. E2 h - PHA; |# q2 J, h0 r- }
- TXA: c) `, z- ~ g( N D
- PHA
& D8 t, S0 y0 G- L4 e - TYA
G1 H& m0 A6 Y' Q1 P' ] - PHA
1 u* _$ j( n/ U% v9 L - 9 J9 u$ N1 n: w7 z
- FLAG_CMP:
" w7 ~4 P2 O8 @% } - LDA $600F( y* a! k5 Y5 E" l+ e
- CMP #$7F ;标志数据初始化条件判断
3 [- U. }( z% Y8 k7 H1 M - BEQ pause_cmp! Z6 x4 h2 a2 B; Y$ J" D
- LDA #$804 D, o1 ^" f/ [, \7 C
- STA $A001 ;6000-7FFF写入启用
$ c0 G2 S, t* D8 _# _ } - LDA #$00
+ U7 E' o& ]5 A9 g; N0 [ - STA $6000 ;数据初始化
" y5 R/ V9 s% A% {9 H( Z - STA $6001 ;数据初始化
$ K' T! w/ j3 ]) K" J - LDA #$7F+ q3 Z4 b5 y n8 N* p
- STA $600F% n6 z- f s1 C/ }2 k
- pause_cmp:
7 Z# v, p) n! X$ A1 a - LDA pause
' O* ^# X( |' a, x1 N! p9 d - CMP #$01
' A1 \$ f+ {. A - BEQ button_press
" Q# B3 B% L/ \6 l7 O - PLA) U4 K) ], o1 l6 y8 D
- TAY) A+ ^( {0 G, n) X: E9 P7 J
- PLA
7 n. W" o* X, s) p - TAX* J1 G$ i) {+ M; h6 o( z0 T, \
- PLA
) }' b$ v3 \8 R; U% j# j - RTS% d1 w! N9 F& x% A
- / W# M4 P* Z# y7 K2 k; f& b% z
- button_press:
. j. c; a/ p/ d: f - ini_Y:* c/ T' i n6 L4 S: F% s: w6 P+ [
- LDY #$00: E9 o$ W& \! n6 U4 g5 M
- button_cmp:1 M, e8 T' l3 N+ ~% d+ x0 F# d
- LDA button,X' p3 u1 P2 q0 T3 L/ M
- CMP ora_data,Y
; P. M" O! w& t" O$ l& B - BNE count_Y_cmp
, [7 m$ m0 t" j- U* Z - flag_cmp:. A" g+ q9 [6 Y9 K
- LDA flag,X
$ c! S; n- W5 a - AND ora_data,Y7 c& F. O- h% F+ e* A; T/ a- J
- BNE flag_and5 V/ g2 _' ~4 a
- flag_ora:8 U$ ?- T7 }) b8 M3 @# y4 d9 C
- LDA flag,X4 [" n% T' d! Q. v" K: H
- ORA ora_data,Y
4 I; V- ~2 m( \6 a/ ?- z - STA flag,X
+ p, j, z7 x3 S- V - BNE count_Y_cmp( N3 \2 c2 }# s8 m
- flag_and:
. j. D7 b$ g6 ^ - LDA flag,X# `, h+ S( d) d. m5 K7 W
- AND and_data,Y
7 n( H( Z7 s' j) M, X& v' a - STA flag,X
. P' u& j- E' h+ j. r8 {5 m - count_Y_cmp:
$ p O: I1 P* b - INY
# ? ?$ ~9 ]5 z$ {0 c+ Y% C - CPY #$08; n% j- j4 j9 h% `# s b- J5 \
- BCC button_cmp
# V! h4 e- e* ~* |% ^ - ' U* I: W) L/ h& v
- data_extract:
% w2 V% ~/ l- i2 m& s0 p - PLA0 j& n' y6 a4 i5 ]# ~) m2 J
- TAY
! K& W: [# a0 U5 s - PLA
( N8 {2 P4 U/ P3 T$ ? - TAX+ o; v# v: X( I9 j$ Z: C4 e
- PLA
: D0 K) M" N. q7 x; k$ l/ ^ - 0 s8 m! a; Q$ {
- return:& ]6 f( f' b% ]
- RTS
- E' G" a( a% l9 s - 6 G% X' k% ]# `' n0 p" z7 O3 _
- & }/ @( }* F' w8 }
- INV: ;无敌/ e7 w* R- i2 e; t
- LDA $6000,X
/ @0 b' n; E0 X9 y4 T1 a" Q$ d - AND #$08
* l' ~) [* | {7 g |9 Q' K2 \ - BEQ INV_RTS, _0 r8 j5 M2 W% G$ y* {2 K
- LDA #$05
7 `2 S9 p# g. [, A - STA $93,X
2 n* ^4 Z+ M& `3 x' ^7 L - INV_RTS:, Z# }8 l2 J" n& ~) q! z
- RTS
8 p+ }8 a5 N+ S" [) w" ] - 8 D4 y. n5 ]6 P; ]0 ?
- ) C- W, J9 R: y5 |: d8 r6 L
- LIFE: ;生命( W$ W" K6 L7 X B" \4 \2 a
- LDA $6000,X
8 P/ t& o2 D" V- h1 \ N2 [ \: @ - AND #$04* k! S6 G& v$ e) }. ^
- BEQ LIFE_RTS% z; Z; N1 O9 R! }
- LDA #$09
6 A# O3 E Z" e: a! ^- C - STA $4D,X
( o! z2 S3 [* g1 f" S1 c - LIFE_RTS:0 v+ a, ?: O6 L# u% _0 T/ @9 `
- RTS8 M- J7 {; c9 s+ ^1 w
- + C1 _% e( i9 @; a5 b) }
-
: V, J2 @7 a. {2 { u - BLOOD: ;血量
8 D3 Z6 W: J) R; I! U - LDA $6000,X
8 p4 \( s' |" S* r- `( r - AND #$01
$ M3 Q( {. A6 Y2 d3 U - BEQ BLOOD_RTS
+ W [) D, ~# U/ Q. U - LDA #$38
$ F v* t* z4 m- u3 d& n/ O - STA $0568,X
6 e d2 T' n& C, i - BLOOD_RTS:4 x3 d2 o$ L& ~: H8 n9 t
- RTS
3 V! U# w" B8 g( ^; h; p3 G4 m - - _3 i+ j$ \& E
-
' e; l# B2 L. j' n - .ORG $FEFE: L8 D" s8 z& W
- JSR $FF60
( l S/ V" C! A3 O - NOP- M+ B; B# f3 K" c [4 t* q
-
- e* _2 h# q5 X9 d9 C4 y - .ORG $FF60
( |0 V3 W! N8 s2 F - STA $F8,X3 i- \$ K/ P, s
- STY $3A,X9 }' A7 p+ [9 e+ I$ F. s' e
- PHA1 A: [5 s( n0 b$ k, R) ^
- TXA
0 u7 r$ W2 F: G- s% b - PHA* \" u6 w# g- I- { z
- TYA2 Z- I- S l) O) N
- PHA
+ ~( T$ Q3 p( V8 S" j) p- D$ k - LDA #$02" h: V6 N" Y: ^5 c; v0 t& S
- JSR $DB11 ;调用系统切页
6 {4 g; F5 ?2 g w - PLA
7 b- @# \+ p6 q3 e - TAY8 D* U% V# m1 ~, {: x3 R- s
- PLA
7 V7 b8 {& ]" B3 V8 O - TAX5 [* e9 L2 V0 {5 V
- PLA
2 M8 m$ J8 o3 k* M7 I - JSR $BA00; f: a6 T$ g- v8 F+ _ o3 g
- RTS
" ^. Y# K( e+ I) O$ b2 | - 4 }# b2 v {$ G: z
- ;[FC][忍者神龟PPU][END]2 G7 I6 n+ `# m& ~2 J& \
. G/ t, h. R( \* A! Q- .ORG $BC00
8 C& P, o# `) w8 `+ l - ! }- O M% s. h8 u! }
- STY $4014 ;补上覆盖的精灵写入指令
' I: _7 w5 J' [7 k! U - PHA
7 Q5 V, t) ?) | Q. o - TXA
! u# a8 X7 a0 Y% {4 L" X4 x: d - PHA: P; F7 B/ G6 Z7 e) b7 I" R
- TYA
% P7 f d# K6 |1 `3 g. N1 B - PHA# k4 [# j+ [5 U3 g8 _
- LDA $018
- s# m) I5 [. G: D. h - CMP #$01 ;比较是否为标题画面. t; S& C* ]4 {! {# x9 r; h
- BNE RET
( k2 s: z% N1 e! A* @ - LDA $0194 {1 U3 E4 s3 z' A6 V
- CMP #$01 ;比较是否为标题画面8 p/ f& g `" X1 |, w7 U0 F
- BEQ PPU_STAGE+ M9 l% v% j' L0 h$ j; c& s4 e
- RET:
6 W; r( p! J- m1 z! \2 F' | - PLA+ B5 K9 } g2 e6 t9 A* \( ^
- TAY+ B7 n D2 l. ]$ R
- PLA
7 d6 c! S* W. A# g - TAX
/ W; M" b( K: G! Y - PLA; {8 R9 I( }7 A
- RTS
: a i0 D$ g3 f - PPU_STAGE: ;STAGE显示程序
& y: g1 @3 C: I& ~ - LDA PPU_ADDR_DATA
r$ i* [8 v7 ~& T r5 W; E - STA $2006
' \9 b: ~, C, R) M8 \( U* e: z - LDA PPU_ADDR_DATA+1
7 b) Z' E- H1 Q: n' M - STA $2006 ;坐标设置# P9 R# b: T; Z }& y2 P
- LDX #$00
8 n, D. Q2 m( M7 d+ M6 I - PPU_STAGE_WROTE: ;写入STAGE字模
; D( f T9 P9 j8 P/ \! s - LDA STAGE_DATA,X
: V5 `; e3 }; L - CMP #$FF
5 B. g5 j& _3 Q7 ?2 p - BEQ STAGE_CMP* K' m9 p' b; l4 B' {% g1 R
- STA $2007
$ d6 ]( j* ~5 U7 ^$ f) v+ ~) f - INX; e8 Z! \; N- f( x% E: y
- BCC PPU_STAGE_WROTE9 ?+ a, b5 N& d- U
- STAGE_CMP:
" m* a q* N' }8 N - LDA $6010
6 |) y5 ]+ V* {& B1 o& d, v: A - CMP #$FF ;关卡数据初始化条件判断
, O) e) j$ W4 u - BNE KEY_B9 Z1 I4 l( I/ g3 |
- LDA #$008 F! g- b D4 i
- STA $6010 ;关卡数据初始化
3 M$ M& D& B; l/ H+ c' M$ a - KEY_B: ;关卡减少- x$ E" \% ?5 a" v0 F
- LDA $F8: _' s1 M4 s* c. b1 `2 ~
- AND #$42 ;按键B或左减关 w3 d: L; F( c0 O( `6 Q1 b+ l
- BEQ KEY_A$ z" ~' m3 i g# N* W7 Y7 S
- LDA #$FF
! }" Z2 ]3 N+ Y; g - STA $409 S% s: N( i: ?3 b; x; ?* [/ M( ]
- LDA $6010
0 r% Z* X2 y1 P! N Z/ y! Q9 I - CMP #$00 ;关卡比较. P3 |7 P0 `1 u: g/ T0 h
- BEQ KEY_A
7 y4 F' C9 P5 ~0 l - DEC $6010 ;减关: p; Q0 j8 A) v4 s& _: V9 F
- LDA #$57
5 }8 f& O. W8 _; M A+ \ - JSR $DB52 ;按键音效. {4 S9 h" ^# ^3 V
- KEY_A: ;关卡增加
) ?- R- X$ z; G; P8 U( s9 C - LDA $F8; [3 t' ]3 U; Z( O! R9 k: P+ w
- AND #$81 ;按键A或右加关& y6 Q* h5 `& a+ @/ x
- BEQ PPU_NUM_WRITE; U* k- Q( j: W. m1 C$ R
- LDA #$FF
0 `' g* g- A' P n/ M, }7 f - STA $40 Y% {# W" k+ p" z
- LDA $60106 }5 V* n; D) r: p8 B7 K
- CMP #$0B ;关卡比较
$ g' d' D; u, H8 d; e; l: v3 ? - BEQ PPU_NUM_WRITE
3 _9 V3 g) {; J: Y2 C8 o - INC $6010 ;加关0 }% _0 F: Y& o% {
- LDA #$574 U* ?* @4 q% E8 d, x
- JSR $DB52 ;按键音效, ]+ S; B$ U" {( ?* a2 S
- PPU_NUM_WRITE: o1 c3 d! i* N) z0 k6 s- }& Z" C
- LDA PPU_ADDR_DATA l4 o5 Z5 i) I& q
- STA $20064 |' B+ ]" W I# a
- LDA PPU_ADDR_DATA+1
' A3 Q. Y) h( |% {0 d - CLC
+ O& p. D! Z, c1 l - ADC #$06
- r2 r# ?" a! O, b( v1 { - STA $2006 ;坐标设置
1 Q, g, y- `- f) k - LDA $60101 S0 x' O. v4 r F8 j |- B
- TAX5 c. V$ u7 B* F0 F) `
- LDA STAGE_D1,X ;写入数字
3 `( D5 F3 |: M L5 U, } - STA $2007
: Z. \; |* V- G: p% s6 R - LDA PPU_ADDR_DATA
! D( n3 ?/ l. }' t, f2 _ ^5 L( k" c - STA $2006
" j- ?* P+ x! I% |, R4 r& _" F - LDA PPU_ADDR_DATA+11 O8 y8 C/ G d l* c
- CLC, a: X1 q# W3 f1 K5 p
- ADC #$0B, e0 c5 q5 [. h2 A# D
- STA $2006 ;坐标设置
8 ]7 R. ~! R3 s2 U; f; W) Y3 V& H) \ - LDA $6010
& S5 ]/ f5 p9 A! b/ V - TAX+ w' ~! v; H0 @- x# j; K
- LDA STAGE_D2,X ;写入数字7 J0 M& U7 E, g, d; P
- STA $20077 @$ S1 Z% b# ^/ Q. S% V
- STAHE_WRITE:& h" Y" k, ^6 w/ Y
- LDA $6010% Z# N$ d) O3 M( i% o
- STA $42 ;初始关卡写入' _) D% I+ a; k( b0 D% T b
- PPU_RTS:
" y: M, T; C1 K2 w! E) w - PLA
# w' X5 j$ R! V8 h# ] - TAY! n( o# l/ |# X1 V3 d N1 s$ Q
- PLA
& q! i+ f4 M) I! K6 v( ^ - TAX
3 |8 g: o/ x0 \5 d - PLA
& j8 k0 {2 m/ f0 t - RTS
7 F7 O3 s$ P: f3 z5 v; z+ ~- A6 J9 u0 e -
) K9 |" |0 m" d' g: s3 d -
' Q* E& k! ` X) O7 z+ R2 f - STAGE_DATA: ;关卡文字S,T,A,G,E,X,-,X字模数据
; W5 V& L2 P$ N; R - .BYTE $1D,$1E,$0B,$11,$0F,$00,$00,$00,$1E,$19,$00,$00,$00,$FF( B% V; C- w0 V k3 L, C0 E, \$ ?3 f
- ( b! F9 H! W+ \# }2 `
- STAGE_D1: ;关卡数字
, l6 F0 i+ R8 ?9 D - .BYTE $02,$02,$03,$03,$04,$04,$05,$05,$06,$07,$08,$08, U3 V# S! Z1 u0 ?5 N. D3 P
# n& [! N U# `0 ~* k) _( i- STAGE_D2: ;场景数字7 @+ L/ z5 ^) }2 |. N9 U1 U% m6 A
- .BYTE $02,$03,$02,$03,$02,$03,$02,$03,$02,$02,$02,$037 @) l; L+ l( W9 K7 D! I! K
-
% C- |# D0 t% [ - PPU_ADDR_DATA:! U. q+ J4 {3 d5 H ?1 N
- .BYTE $23,$4B
. w( C) @5 P6 M -
- g! F4 ]( v6 j8 q. j4 X# k6 e$ [; s - 0 {2 r' d+ j* R! t* `
& ]2 @" r4 ~) o2 j$ ~3 ^- ( g# V' Z0 |2 z8 C; j! x8 j# U0 m
+ ^- Q5 {* w ^4 z; } C6 r- .ORG $FE21 " t0 M$ [3 V, [4 M
- JSR $FF40" ] w5 u2 ?; c, W9 _% N J
-
' j! h4 r6 y# Z! T4 h' C - .ORG $FF40( \ ^+ ]9 [$ [4 R. ^6 ?
- LDA $BCDF2 g! ^% B3 e, |& w( g
- CMP #$7F
) ?: ]- R: n2 [ d9 ?7 m- h - BNE ADDRFF56( n* S9 o/ q/ ^$ l
- LDA $00186 a- X* n2 v5 K6 K$ K- F6 T
- CMP #$04
3 f7 k+ R* X$ M - BNE $FF529 O/ |3 v: a4 e* {8 V/ ^
- LDA $6010! w k+ C3 W g' R1 `! G
- STA $0042
2 R$ X" U: ` ^4 v0 B - JSR $BC00) @' E3 Y1 H% |8 K
- RTS
- y5 b: i+ Y- p$ R9 @4 ` - ADDRFF56: ! f3 K' K$ v, U' f$ N
- STY $4014& n+ H! t& n+ ^' g. |
- RTS- I7 N7 ?2 v( Z. Y5 g, H2 f, |! z6 [
- 6 h# g; n O S! l: } R; T6 q
复制代码 内容:$ k3 ?/ [( D+ M- j* S0 A
1.关卡选择: 标题时,左或B减,右或A加;& M0 P4 O8 u% Y4 q* I# B
2.一击必杀: 暂停后,按B键切换;
) w9 K6 z/ |( Y# Y9 z 3.无敌锁定: 暂停后,按上键切换;" B7 L: f# Q. L6 L1 c" i
4.生命加满: 暂停后,按下键切换;2 @9 C, u, Z2 Y$ Y" G
5.血量锁满: 暂停后,按右键切换;' v; e/ f5 c. D
0 t G, v8 a, \5 {; `
9 O" K5 j+ M( o j1 R8 iFlameCyclone.ys168.com
# o6 l; \! x! R- w: U( }9 ^+ bwww.nesbbs.com( B' H& H. c3 V! h3 V0 n
# F8 `% P0 ?" ~3 w$ f$ h4 M |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
评分
-
2
查看全部评分
-
|