|
- Contra (J) PPU写入程序; s$ e1 I4 U) _3 ~% J' @% C
- 作者:FlameCyclone1 f' U" g2 v' m5 [
- 时间:2017.2.123 q/ }1 r! }" R: O% {. J) i
0 E( w1 j0 N: n ?4 M8 C- 按键跳转:
% x$ R0 W: e+ T/ G* _ - C1EF:95 F5 94 F1. S3 s$ d, Q" f4 D7 G% s# T
- C1EF:20 70 FB EA- q8 Z8 q( X V. N* |( Z
- # b: z9 _( v) j0 r$ K2 C* R0 e/ d. g* _
- 滚动偏移:
" [3 ?. ?5 X4 J6 M# q# J7 A. J - F936:A5 FD 8D 05 20 A5 FC 8D 05 20
, D) Y0 e+ h9 t$ z* X1 C! r5 l - F936:20 C0 FB EA EA EA EA EA EA EA
3 m$ b; W9 s9 d- P: H4 T6 a1 M* M% L - 4 N) P# {( T( G/ d: y% g
- 背景调色板:6 V4 G) {% d' L6 x$ y& ]
- CF20:9D C0 076 Z* T' S/ n: M1 x9 B
- CF20:20 A0 FB
2 \$ l$ Q. z/ w5 T5 [* b2 V! V - 7 c# N" F1 e1 C5 ^, e) S- G
- PPU BANK号:
1 x, [& k; c3 x0 x a - C8C9:9D F4 07, z* y$ H1 H. A( H0 A7 R5 f. E- t# ]" U
- C8C9:20 B0 FB
/ W% v# K0 j+ d
2 j# h# d2 `1 a$ M) t$ D6 f; v8 P- 按键跳转:
0 l$ z/ I9 F8 p& n3 R5 i - FB70: 95 F5 94 F1 48 8A 48 98 48 A5 FF 29 7F 8D 00 20
9 H; E3 g N% g - AD 00 80 48 A0 00 20 21 FB 20 00 A0 68 A8 C8 20
- ~) L/ B7 w; ^1 m - 21 FB A5 FF 8D 00 20 68 A8 68 AA 68 60 FF FF FF
, z( m# s& E% ]1 i1 ~! D - . L# H3 z& L( N6 r [3 l
- 背景调色板:. y# B! e6 u- u) l0 e5 K+ w% ^2 R6 ^
- FBA0: 48 AD FF 7F C9 FF D0 02 68 60 68 9D C0 07 60 FF1 a* h* g. N& ?9 q: `( Z' ?
- ! R4 }! P' y. a t
- PPU BANK号:0 d$ H2 G- \9 K- A Z1 r+ Y
- FBB0: 48 AD FF 7F C9 FF D0 02 68 60 68 9D F4 07 60 FF
, [8 U* M0 K) N2 t - : O2 L$ i$ }3 W M1 y" q
- 滚动偏移:
/ u! `1 p$ N- _# N D5 W) b - FBC0: AD FF 7F C9 FF D0 09 A9 00 8D 05 20 8D 05 20 603 h7 Q7 h) Y9 a0 [$ a
- A5 FD 8D 05 20 A5 FC 8D 05 20 60 60 FF FF FF FF
0 M$ }& y, d$ e; a6 y - $ Z7 B0 _( U& C* [
' e2 x/ O/ X, K3 C- E- Z. Y- 切BANK后A000:
2 L# ^8 l, Y- _" Q. ?9 P0 F - A5 FF 29 7F 8D 00 20 AD 02 20 A5 25 C9 01 D0 0A B5 F5 29 CF F0 04 20 8C A2 60 48 8A 48 98 48 A5 25 C9 01 D0 07 AD 0A 01 C9 00 F0 03 4C AC A1 AD FF 7F C9 FF D0 19 AD A0 7F C9 00 D0 0B A9 FF 8D A0 7F 20 3A A1 4C AC A1 AD FF 7F C9 00 D0 DD AD 02 20 A9 00 8D 01 20 A2 00 A9 FF 8D FF 7F 8D A0 7F 20 6A A0 20 3A A1 4C AC A1 A5 FE 8D 50 7F A9 08 85 FE A2 00 BD C0 07 9D 00 7F E8 E0 40 90 F5 A2 00 A9 00 9D F4 07 E8 E0 04 90 F6 A2 00 BD 2A A1 9D C0 07 E8 E0 10 90 F5 A9 3F 8D 06 20 A9 00 8D 06 20 A2 00 BD 2A A1 8D 07 20 E8 E0 10 90 F5 A2 00 A0 00 A5 BD 48 A5 BC 48 A5 BB 48 A5 BA 48 A5 B9 48 A5 B8 48 A9 00 85 B8 85 B9 85 BA 85 BB 85 BC 85 BD A9 00 85 BA A9 20 85 BB A9 00 85 BC A9 60 85 BD A5 BB C9 28 D0 06 A5 BA C9 00 F0 27 A5 BB 8D 06 20 A5 BA 8D 06 20 AD 07 20 AD 07 20 91 BC A9 00 8D 00 20 E8 E6 BA E6 BC E0 00 D0 D4 E6 BB E6 BD 4C E4 A0 68 85 B8 68 85 B9 68 85 BA 68 85 BB 68 85 BC 68 85 BD 60 0F 28 28 28 0F 28 28 28 0F 28 28 28 0F 28 28 28 A5 BD 48 A5 BC 48 A5 BB 48 A5 BA 48 A5 B9 48 A5 B8 48 A9 00 85 B8 85 B9 85 BA 85 BB 85 BC 85 BD 8D 01 20 A2 00 A0 00 A9 00 85 BA A9 20 85 BB A5 BB C9 28 D0 06 A5 BA C9 00 F0 20 A5 BB 8D 06 20 A5 BA 8D 06 20 A9 00 8D 07 20 A9 00 8D 00 20 E8 E6 BA E0 00 D0 D9 E6 BB 4C 69 A1 EA 68 85 B8 68 85 B9 68 85 BA 68 85 BB 68 85 BC 68 85 BD 20 8D A2 60 68 A8 68 AA 68 A5 25 C9 00 F0 12 A5 25 C9 01 D0 0B B5 F5 29 EF F0 05 A9 00 8D A0 7F 60 AD FF 7F C9 FF D0 F8 A9 00 8D 01 20 A5 BD 48 A5 BC 48 A5 BB 48 A5 BA 48 A5 B9 48 A5 B8 48 A9 00 85 B8 85 B9 85 BA 85 BB 85 BC 85 BD A9 00 8D FF 7F A2 00 A0 00 A9 00 85 BA A9 20 85 BB A9 00 85 BC A9 60 85 BD A5 BD C9 68 D0 06 A5 BC C9 00 F0 24 A5 BD 8D 06 20 A5 BC 8D 06 20 B1 BC 8D 07 20 A9 00 8D 00 20 E8 E6 BA E6 BC E0 00 D0 D7 E6 BB E6 BD 4C 0E A2 A2 00 BD 00 7F 9D C0 07 E8 E0 40 90 F5 A2 00 A9 3F 8D 06 20 A9 00 8D 06 20 BD C0 07 8D 07 20 E8 E0 10 90 F5 AD 02 20 A5 FD 8D 05 20 A5 FC 8D 05 20 AD 50 7F 85 FE A9 00 8D 00 20 68 85 B8 68 85 B9 68 85 BA 68 85 BB 68 85 BC 68 85 BD 60 60 20 B9 A2 20 C0 CB 20 DE A2 20 FD A2 60 20 42 92 8B 8D 95 80 8C A3 80 90 96 8B 97 8F 8D A3 8D 96 99 98 8F 80 93 98 80 83 81 82 88 FF A2 00 AD 9A A2 8D 03 07 E8 BD 9A A2 8D 04 07 20 91 A5 BD 9C A2 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 28 A3 20 C0 CB 20 56 A3 20 C0 CB 20 7D A3 20 C0 CB 20 BE A3 20 C0 CB 20 EF A3 20 C0 CB 60 20 3B A4 20 C0 CB 20 69 A4 20 C0 CB 20 90 A4 20 C0 CB 20 D1 A4 20 C0 CB 20 02 A5 20 C0 CB 60 20 A3 9A 96 8B A3 8F 9C 80 81 82 FF A2 00 AD 1C A3 8D 03 07 E8 BD 1C A3 8D 04 07 20 91 A5 BD 1E A3 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 E3 9C 8F 96 93 90 8F FF A2 00 AD 4D A3 8D 03 07 E8 BD 4D A3 8D 04 07 20 91 A5 BD 4F A3 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 EA A2 00 AD 7B A3 8D 03 07 E8 BD 7B A3 8D 04 07 20 91 A5 A5 32 20 42 A5 AD 03 7A 8D 05 07 EE 05 07 AD 04 7A 8D 06 07 EE 06 07 AD 05 7A 8D 07 07 EE 07 07 A2 03 20 AB A5 60 21 23 A1 8F 8B 9A 99 98 FF A2 00 AD B5 A3 8D 03 07 E8 BD B5 A3 8D 04 07 20 91 A5 BD B7 A3 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 21 2A 00 01 02 03 04 98 97 90 9D 96 A2 00 AD E3 A3 8D 03 07 E8 BD E3 A3 8D 04 07 20 91 A5 A2 00 A5 AA 29 10 F0 07 A9 9D 8D 05 07 D0 05 A9 8D 8D 05 07 A5 AA 29 0F DD E5 A3 D0 06 BD EA A3 8D 06 07 E8 E0 05 90 EC A2 02 20 AB A5 60 20 B3 9A 96 8B A3 8F 9C 80 81 83 FF A2 00 AD 2F A4 8D 03 07 E8 BD 2F A4 8D 04 07 20 91 A5 BD 31 A4 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 F3 9C 8F 96 93 90 8F FF A2 00 AD 60 A4 8D 03 07 E8 BD 60 A4 8D 04 07 20 91 A5 BD 62 A4 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 20 FA A2 00 AD 8E A4 8D 03 07 E8 BD 8E A4 8D 04 07 20 91 A5 A5 33 20 42 A5 AD 03 7A 8D 05 07 EE 05 07 AD 04 7A 8D 06 07 EE 06 07 AD 05 7A 8D 07 07 EE 07 07 A2 03 20 AB A5 60 21 33 A1 8F 8B 9A 99 98 FF A2 00 AD C8 A4 8D 03 07 E8 BD C8 A4 8D 04 07 20 91 A5 BD CA A4 C9 FF F0 08 9D 05 07 E8 A9 00 F0 F1 20 AB A5 60 21 3A 00 01 02 03 04 98 97 90 9D 96 A2 00 AD F6 A4 8D 03 07 E8 BD F6 A4 8D 04 07 20 91 A5 A2 00 A5 AA 29 10 F0 07 A9 9D 8D 05 07 D0 05 A9 8D 8D 05 07 A5 AB 29 0F DD F8 A4 D0 06 BD FD A4 8D 06 07 E8 E0 05 90 EC A2 02 20 AB A5 60 8D 00 7A A9 00 8D 03 7A 8D 04 7A 8D 05 7A AD 00 7A 8D 01 7A AD 01 7A C9 64 90 13 AD 01 7A 38 E9 64 8D 01 7A EE 03 7A AD 01 7A C9 64 B0 ED AD 01 7A C9 0A 90 13 AD 01 7A 38 E9 0A 8D 01 7A EE 04 7A AD 01 7A C9 0A B0 ED AD 01 7A 8D 05 7A 60 A2 00 A5 FF 29 01 D0 09 AD 03 07 29 FB 8D 03 07 60 AD 03 07 09 04 8D 03 07 60 85 21 8E 01 07 A9 00 9D 05 07 A9 01 8D 00 07 8D 02 07 60 FF FF% p# l# N( k: x( X1 G, A
- ' F0 A! A6 c! \
- ) X( V+ e/ Y) n0 q. ` s6 w
- 6502 simulator:# y9 c# j( e5 b, l+ x+ u) t
- PPU写入程序:
8 A# e' M0 }' E$ @; Q: j; } - .ORG $A0004 i4 C' J, _1 J' i' x; K
- CSP = $802 X7 e3 p: _- r# U* O- k
- C0 = $81
8 D- T" n7 ~" C, `1 l1 i( s. U - C1 = $82
% T+ R- L9 P+ Q6 ?3 U - C2 = $83* w! u$ b ?7 X2 \9 v6 K
- C3 = $84* K' p7 i; v& @- B6 D& F
- C4 = $850 P% j+ O% L z! u
- C5 = $86, S1 ^; l5 G' t# O8 W; |
- C6 = $875 y# l4 I X, t6 i/ b& L
- C7 = $88
+ r3 `" l! l; c' M& o, R( N - C8 = $89! O- ]& f& g: `# H. o
- C9 = $8A
+ J" D8 }( Y4 r8 s& E, B% S - CA = $8B
7 J6 r. w; r3 i; w - CB = $8C
, X; }* M7 L8 g" c. _8 K! W' ] ? X - CC = $8D2 }* ^5 r. e+ f
- CD = $8E# J h2 i" s) O8 z) ~
- CE = $8F
& _$ S) s! [' `. U Q - CF = $90
& p4 v2 N( N: b9 z0 R - CG = $91
* V6 j# `2 n1 ~/ M' E7 N1 X - CH = $92+ T4 k; B: v( T) B
- CI = $933 R3 l7 [/ T+ H! m: \
- CJ = $94( ? H& Q: W: ?' g; H1 s: T# n
- CK = $95. i! K8 @4 L5 d' Q. n$ S" \8 d
- CL = $96
) L) q" `, m L; E( J/ H+ E - CM = $97
% E- r! T: [( V8 z: B& m - CN = $98 q+ e& L1 c0 D$ O: Z; e# c* r# V
- CO = $99
+ o* ^: @& i0 U! |8 w - CP = $9A( N% H& h' J# H! R; Y4 B: x2 f9 N
- CQ = $9B, C S2 h9 f V' ~
- CR = $9C/ Z2 I( D4 Y1 t( S! o$ r- g! H
- CS = $9D2 ?, p9 l. O. H% |$ @' E _3 S
- CT = $9E5 F6 J! Q% Z8 b- I
- CU = $9F
+ o: h7 [$ C, a8 ` - CV = $A0% e7 C- S" P7 D: R
- CW = $A1
8 t. \* U( E' S0 E% H9 i0 ? O - CX = $A2
7 x! [2 G: i$ d1 s n* V Z - CY = $A34 h5 u0 B) K3 i6 n' T
- CZ = $A4* e) X& l, {9 l: a
- CEND = $FF
# m8 ?( N' y3 g$ q ^* |8 c - 1 {8 P& A+ I* K* {9 ?: A. h3 S
3 C: z/ S; @5 I8 i5 P- CMP_RE:
* p! p8 e. @' R8 ]# l; U - LDA $FF8 Z; c( c+ s1 ^( F+ ^3 e, `3 \
- AND #$7F$ Q' ^+ C8 C7 o j1 P
- STA $20009 e/ |! g: m- ^: d7 O
- LDA $2002
- c- T2 `+ C5 ] - LDA $25
% L; I+ d: S! w- T+ W1 Y - CMP #$01( q2 z# _4 _6 b2 G0 L
- BNE PROREG+ v7 _3 F9 B4 Y' I# b P
- LDA $F5,X
$ `! V9 z& w a* ]/ M2 T8 G - AND #$CF
: K) R9 L7 q0 p3 f, ^6 R0 |. f7 H - BEQ PROREG
6 R/ u$ W Q1 t - JSR PPU_CMP
( m7 O6 ` N/ p) N# g - C_RE:
o: Y- V" m9 R$ \" ^ b4 ~ - RTS
6 V+ s% S: F0 G& D8 U - PROREG:
, a8 f4 \: ] A( i6 Y+ S$ u - PHA2 \1 I( T; y; F3 d
- TXA
/ K' m. E8 q. |7 j - PHA5 y( p8 {' d: i
- TYA! S. _6 u% \/ G" H2 Y: l
- PHA) t# r; q, k8 e
- LDA $25
2 P, E8 S2 C4 W# X - CMP #$01
: z, x, ?/ |$ w4 \0 k4 w - BNE RE
4 E3 W7 s$ S; o% p# V - LDA $010A4 N0 Y& \; |/ _
- CMP #$00
$ v* Y3 ?# T2 H - BEQ P1
. n% B M/ u) X8 _. C9 m) s$ C - K) O0 T9 j& [ U
- RE:
" o/ w# o2 f3 V) U - JMP PPUWRITE9 Z6 ?6 ?3 w7 P6 O' }
- 8 z# s: g T: _. n, n
- P1: ; 条件判断
0 Y3 S% t6 }2 D" p3 v. M - LDA $7FFF% h" N6 P0 j; P4 P" l
- CMP #$FF% I: H) {4 ~1 W6 z; h4 T$ n5 ~: g6 r
- BNE P1RP
( e. f/ M0 \6 ?. b/ s# p6 G! s - LDA $7FA08 m8 R5 `: G2 B; L- s( f
- CMP #$00. p+ c, b8 f) a) V, e* l
- BNE P1CMP1 H+ O0 }$ D: O/ B' h
- LDA #$FF/ x/ ]5 A) K) j
- STA $7FA0
) b( p) M. Z& O5 z - JSR CLEANA
% R: x* E' i+ @) o - JMP PPUWRITE K H$ U! ?3 F3 [0 f) O s
- P1CMP:
2 A: n% [4 D1 s' \9 Q - LDA $7FFF
, R! `4 h }" v2 O - CMP #$00
2 `! z7 [( ?4 z/ g: U - BNE RE6 @ P4 b# V( X9 q' g
- P1RP:! x# ?8 N# ^9 P, `/ Q
- LDA $2002
7 X% L1 H1 S/ N( l( j* v - LDA #$00! Z7 ]' \% _( Q( V! ~
- STA $2001
4 `9 a" I7 ]- |; P* D( a1 @ - LDX #$00. K" [0 O2 ?& P1 b) g5 o) a
- LDA #$FF
0 G! T3 K- ^1 ^2 i9 h - STA $7FFF. _. q1 x* c* C2 a9 ]
- STA $7FA0( E- n& V7 n1 e8 a" o, Q+ W
- JSR COPYPPU
$ Z/ N7 Z% h' ^ - PIRP2:
x( I' V2 r5 f0 i+ N0 e0 U0 J; C7 V - JSR CLEANA5 N; r! Y% O9 j" ]4 [* I
- JMP PPUWRITE: O" b0 ]6 H9 J
- ) Z6 j- L$ J4 z9 a8 }- E
- COPYPPU:) u) Z! H: u/ ]4 n0 h; O+ H$ \
- LDA $FE% {8 O2 j) j; P! g9 r& S8 j4 j
- STA $7F50
/ \" t, M- E- }; z2 J. x/ k - LDA #$08
. c& P2 {! P* Z' n% k9 U6 S; e - STA $FE! X9 w) ~7 A4 }- x9 G( Z" T
- L0:6 D9 p6 d! Q% c. k
- LDX #$00
# D' g- O4 h M5 k E8 B8 r - COPY_07C0_07DF:
1 c" {: ]; o1 A. J( f5 g: \ - LDA $07C0,X
% ?4 j; z$ d) F- M9 x! \* C E - STA $7F00,X
3 f5 L. ^" @8 q2 E: q - INX. F' e5 p" p9 }0 N- W' _9 f
- CPX #$406 k9 ]+ w: y2 x2 i$ n
- BCC COPY_07C0_07DF
3 O! A# I' M- t- o' X - LDX #$00
( O. P8 C0 ?& r" ^. j - PPU_07F4_07F7:
/ I$ _% b8 D* j! }/ l, O* Y5 u8 t - LDA #$00
, J L0 T5 l- V9 y9 \: O - STA $07F4,X
4 Q/ v( n6 q' F; r, f - INX# p* z3 H/ C4 e: @( V
- CPX #$04
1 \9 g! E! q3 B: \ a, | - BCC PPU_07F4_07F7' \6 E% d2 n; x
- LDX #$003 O6 d r `* M) P) t3 z W
- COLOR:6 C! A) j4 L$ ]4 H
- LDA COLOR_DATA,X9 q1 T6 I/ s' ~$ d1 d5 ^
- STA $07C0,X: k. W0 |- Y% ?8 @% [0 Y
- INX
9 `# h+ U- N( l( n8 K- A/ a( E - CPX #$10# T0 ?1 n& ?, s( Y: ]) T
- BCC COLOR
4 m' l) H$ E1 M6 u2 r -
% ]$ p4 y6 B9 d" v7 p* m' b, M7 L: G" G - PPU_COLOR:
8 f" A' N ?0 [' `8 t6 n - LDA #$3F( b" l4 K0 f" W$ @
- STA $2006
: m x* z" ?& d: f7 A' X) f1 N - LDA #$00
: H- A: V: p4 j1 k# Q - STA $20062 o) X2 ?& y _9 B6 |
- LDX #$00
) v1 O* H5 Y5 Z. D M7 C( R. d - PPU_COLOR_W:+ k4 v& m9 o% Q
- LDA COLOR_DATA,X
. ~, m& O9 ~4 M - STA $2007
" x, x5 c1 \! F" H - INX
$ [7 v5 i' r" q# r# f - CPX #$10
' ?( h9 j" i7 m" R - BCC PPU_COLOR_W
, G8 C! R! n9 J# `+ O& i2 z -
! Q$ ^. K- m; w5 B2 a: P/ Y - - _) ^6 D) Q* W" g; ^
- LDX #$006 X# H: N, P5 U* }
- LDY #$00) ^! ~( ~2 J1 R: C$ L. y% Q
- LDA $BD
P: ?5 y( g: i9 H, t - PHA
' q/ n! g7 b* p6 C. z, L7 t - LDA $BC& I( k. ~% b+ ]! J4 M) t s0 F
- PHA7 [4 l. L2 d" z; z8 R# y+ O
- LDA $BB% W5 ~* F8 |" X* V! B9 S
- PHA9 O9 s' z7 M9 {; o/ S- }! Z( X' X% m2 q
- LDA $BA
0 ]4 R* d& D9 E; q, t R2 u" e - PHA/ ^; B! l& E3 m2 Z3 [. N! g
- LDA $B90 d1 R' l9 p: ^ t1 @% u
- PHA! P5 o: Y: q; N) x6 f3 y9 w! j) i
- LDA $B8
" h1 B2 c; k6 a7 s# Y, b, m- O - PHA* c2 c6 m0 P5 r1 c
- LDA #$00
, w$ R/ L0 H0 Z; m - STA $B8( W' u8 G9 {5 Q0 e
- STA $B9$ D/ H6 H2 X4 h- r
- STA $BA4 Z/ a: I/ F3 x6 u% }
- STA $BB! r! Q& x2 ]" H/ D+ e! l
- STA $BC4 L/ D( K8 P9 s5 n5 S' b. K$ Q
- STA $BD
. B U6 b2 b: h% K ~% }$ Z( {0 S - LDA #$00
4 g, o# ~& ^4 z+ b1 A& [ - STA $BA1 v4 E$ F/ r9 @6 S% ?" l
- LDA #$20
" j R; F* Q- P2 {) o - STA $BB
! @* d' B) r0 e8 k7 B - LDA #$00, ]) O; @+ Z' m* M4 l& h
- STA $BC
8 h( c; U0 K$ R8 A# R - LDA #$60
8 ` R6 X" K/ [' o1 m - STA $BD# R) b7 {6 h5 L; R5 U
-
" w+ ~8 e( F# u - L1: ; PPU复制
, ~1 c9 P r7 x# r - LDA $BB
& p: E& G. X+ u1 {, V$ B: | - CMP #$287 H3 J4 g+ q) M$ r5 }+ u8 O+ c! a a
- BNE L2
2 u: r! Q" M$ o, E( @ - LDA $BA; O y+ Z) u0 n/ A( {
- CMP #$00
9 x9 y# D# r8 v! g% i - BEQ PROADPLA
( U+ _ g! {0 N5 | - + I1 g E) \2 U$ `. x. Q' O
- L2:
( U" }( T- L C) B' c6 C" f6 r7 _ - LDA $BB
5 y9 D. r: V% R% m8 P6 ~ - STA $2006) `: k+ X6 V& n: X# H3 x+ M; k
- LDA $BA3 j. {& F$ x0 E( o+ \
- STA $20062 U0 b, H+ p1 r9 n# i2 k
-
- h7 K1 ?. g# Y - L3:( U( F: p2 m/ v5 B& s. [
- LDA $2007. N% m, M6 B% L/ y. \
- LDA $2007
% X' Y! A# {% [. N( w9 V# u - STA ($BC),Y5 t0 ?# O( |& K, P0 o
, f/ x6 o. K l+ s/ w* G5 R- L4:1 a( G' a- e. i7 [8 J
- LDA #$00
8 K4 M( `+ {+ B4 Q, I9 b - STA $20002 a a4 u0 F/ x
- INX0 g% b& r6 R6 _
- INC $BA. P( F' J2 l' o! t
- INC $BC
2 O5 O, q, v2 {9 P; w6 K, A+ y) j' \" x% H - CPX #$00" l5 p3 P7 X, h6 o# ?/ y
- BNE L1
+ f% A' w5 z3 `9 [ - INC $BB
. s8 o7 L8 n! W - INC $BD3 t' U/ ^: T6 ~) p8 ]
- JMP L1
2 p+ L8 l( |" m - 1 t; R. v6 k, ?4 n* ~) J" j4 N
- PROADPLA: ;出栈3 Z0 E2 x8 J- Q: T' Q# e4 W
- PLA
1 m6 V) I7 U5 N+ ^) b+ |8 x/ L# l - STA $B8/ r7 C2 Y5 I2 Y( @4 Y/ {) u& e6 Z0 }4 [
- PLA4 J/ C) m5 N+ p; `9 { ~
- STA $B9
. n# J6 W4 X. m - PLA4 \" D6 X9 v6 v( h# y. T
- STA $BA
7 Z% K& C9 I7 Q6 D - PLA
; T7 L, w/ l" |+ |" [ - STA $BB
# o/ B- i% e& }; @! X9 f( Z4 T9 J - PLA
! u0 U/ g/ A; n# ]' y, m$ X) P0 h- h - STA $BC, R7 s& R7 O: O4 h. ^5 y3 R1 v
- PLA
& \# p6 G, }/ G - STA $BD
2 H0 ]' Z% Z4 Z9 Q+ y( H - CPRE:& P. J; ]/ t0 l
- RTS
W# ^4 U# ~1 X
+ D9 E7 e7 k: H( \' p( w' t8 h+ K- D- CLEANA: ; PPU清空9 v" }4 a: ]; `4 ?7 ]* p
- LDA $BD2 w% G! e' f. S% Z
- PHA
6 ~1 q/ @5 }. f) R/ c- G( k" C/ ?4 { - LDA $BC$ b/ I1 t7 o8 i3 J; o/ H. L
- PHA
6 [" ?8 C4 b( f+ d( B t - LDA $BB
& R4 }. S: c# P& B% W0 i3 D# l! L - PHA" f/ d# P/ ~. F5 g
- LDA $BA
3 G" B6 U, x2 k7 s - PHA+ X# T' v: d8 T" Q$ x
- LDA $B9: u g8 T. U/ X2 n" D$ y2 H
- PHA' d a o$ v7 c$ ^6 _8 ^
- LDA $B8
$ Z! R: |: U& U# [! L. |. d - PHA
8 O9 W) P" o# T3 i0 V - LDA #$00# P, E5 J2 ~# C7 v8 V9 j
- STA $B8
- }$ L+ d/ F5 l5 Z$ v# t - STA $B9
0 H1 F7 ~, x# z9 p! R. {1 L& |/ A - STA $BA
3 d* m5 m0 M5 L+ i* F' q' f - STA $BB- @. T" a2 f2 _& J5 ?
- STA $BC
) Q0 d9 v2 i2 X y5 K0 L& _ - STA $BD
) J8 M- |5 x p: K5 h7 _ - STA $2001
# m" [/ h" C$ x8 N, p( y/ b% k6 S+ ?! e - LDX #$00
) v: D' l: e& D w - LDY #$00
0 n3 F4 r& b0 \8 D - LDA #$005 |0 ]3 V8 I' _6 g: E* N: f
- STA $BA
3 M, z7 p* S. F5 H9 c - LDA #$20 g# S2 H. y, \( v
- STA $BB* b" F% f& n$ d- U: w$ Y3 h) z5 O
- / c# J4 \* d1 {8 t6 v7 E* g
- CL1:
* x2 N; p4 d( W# ?' g# A# |. N - LDA $BB% d6 ^) ^7 }/ w) z8 H
- CMP #$28" v n. U4 Y3 R
- BNE CL2 I$ B1 r. x0 }2 x0 f
- LDA $BA7 B5 {' _* T& F' G2 s5 G0 y- P
- CMP #$00
% D8 d6 E2 e/ P* B9 P3 N- | - BEQ FREEWRIYE
+ e- _; X' a2 i - ( C2 o# N6 J; x7 n7 F4 V. J. [
- CL2:6 d0 z2 Y J5 h) x
- LDA $BB# D9 C4 g1 R/ ]8 E, O# t7 ^
- STA $20061 N, [- H6 z2 r8 d: j' P9 l' v: r. t4 S
- LDA $BA! n, n$ [6 o4 r4 {
- STA $2006$ V4 n$ @8 U9 R6 C9 k
- ! \0 ?' _5 b: F' I) f+ D8 a
- CL3:. P4 v3 V8 z! \* k
- LDA #$009 q" g9 h3 I5 ?: [
- STA $2007
. @& A. U- p0 P; q* r- ]+ P/ w# q1 \& F$ b - * J5 d, r2 a# h6 m4 b8 U# n2 j
- CL4:5 f( Q5 o/ B3 \5 t7 V; ~( U4 P4 l
- LDA #$00
; z2 E# b* l9 ?" ~/ y% Y - STA $20009 q; h: G" R3 z5 M& c! W% a+ ~
- INX$ u3 O0 R% ]% ?
- INC $BA
P- |/ j+ E7 F& G- p7 k$ F$ c - CPX #$008 r0 Q) a) K9 t; `! B, i* d8 C
- BNE CL19 G& S0 M. v) i" e h! p4 o0 Y6 d
- INC $BB
4 {. h) m0 G x8 j N - JMP CL1 7 I% y5 A: y* e4 a) V% T$ E
- 5 d, W5 u& [3 c) R' j
- 4 m% q4 P6 w% W4 ?- P
- FREEWRIYE:+ u* I; K. _; z% l D( q
9 U; A) h* B' p. R5 b# s" K' d5 G- NOP& B* w/ e/ B# z% E
2 \3 m+ c M& k, {" ^
" \4 f7 G( ~6 n: C6 y$ @# ^- . e( }4 _, b; k4 M8 Q
- ' N" g3 U% \3 T2 Z# U6 V
- + W8 b- P1 O R& z8 J( m
- CLEANF: ; 恢复现场) z- R' l' D4 V& f* X
-
4 d0 \/ F2 ?" |7 s$ V7 C - PLA
; y5 c. O9 Q, T, X, w; b- f. c6 D - STA $B8
+ X' u5 n8 n$ u: O3 c( @ - PLA5 [- `6 m' Z% V$ N3 W4 N. Y
- STA $B9
1 k% r5 T( g4 l) s" w9 x - PLA( f# t" |8 r( o& [2 W
- STA $BA
" T6 U- L0 ~8 m0 s0 i - PLA: \* S5 u5 v, w6 L
- STA $BB v) r2 p8 s- o; i% M: u* s9 K
- PLA
" f! L$ P2 x q8 w6 `0 Y - STA $BC
' O" e3 M6 [6 p W( A7 g7 I! H - PLA
: ~5 _) o: h, Z# e5 |+ B8 h& r - STA $BD1 S) s2 O1 c) a. S1 M
- CLRF:- v4 w; @4 q/ w# p+ z7 S
- JSR FREE_PPU
1 `( k. y( l+ g$ l9 Y, [2 B( z - RTS5 W" b: ~# [+ j2 j7 x; d3 s
- ' V2 Y3 T, D- z6 n7 l e9 k
! I2 A7 m+ [+ r. `- PPUWRITE: ;PPU写回
( {/ i- D+ C# U8 _5 x - PLA
. d6 m/ X. q; `+ T% v% P4 |% V: I - TAY
+ C+ S. D% U/ G# }4 a - PLA& ]" ?+ p9 G; R" ]
- TAX
; M8 ^; C* C9 q$ d% F - PLA
. B; m5 P$ G/ A4 E0 g. f - LDA $25
% b5 D$ p8 j0 J( ^ - CMP #$00
4 w9 E3 s0 ]# {; `# M - BEQ WP1
) O- i/ |' V3 a, F" ]' { - LDA $25
2 C, |& d7 K, U: t - CMP #$01
+ j! ]" B$ G2 ]0 U - BNE WRE
2 U5 A' N% g9 b* M# K1 N1 H1 J5 A - LDA $F5,X3 f ]9 q; j+ d
- AND #$EF; t- E/ [$ P3 t% ]7 Y
- BEQ WRE! \. V6 M1 g1 K1 x
- LDA #$00
. @6 o x* J0 O& A: c3 j- Y/ I( J1 W - STA $7FA05 Q: R9 U: d! E G& X, T( q& a# h
-
1 K0 q: Q5 `! t0 `' s - WRE:% W$ @; g J \9 a( a4 D+ {
- RTS$ O7 S' U) N: N7 X9 @/ [6 y) i6 \- i
- % u9 _9 `5 |9 W( I/ |5 D
- WP1:8 U/ j( e& B, ~$ k3 ^
- LDA $7FFF9 k! o; e6 l$ h9 K& X4 Y: _
- CMP #$FF
9 t0 {5 y: m1 [5 G, H - BNE WRE
, ?% I. h8 }* I - LDA #$00: B) r2 I. f c+ U; c. K5 O) R
- STA $2001
4 q2 |3 B/ i/ C3 B: z: I0 X/ s - LDA $BD: R1 Z% P2 g3 f
- PHA
+ l, q8 w8 }9 g - LDA $BC, Q( J( O# g2 b3 I
- PHA
7 T7 m8 Y/ \# w/ u$ ] - LDA $BB
# k& _# @# t- o- T" t4 ^ - PHA
% D: j; {2 h3 X2 }! v - LDA $BA
# y; ~$ X( v5 T+ M7 b - PHA& e5 J) A: q& }2 \2 n* X+ p% n
- LDA $B9
7 r8 |. H. o7 I# b# r0 l - PHA
0 I% z8 E: i& G0 K3 Z4 e! f) i - LDA $B81 @/ W {. D- j5 |- d: z$ ]! w
- PHA3 S( j1 t. e; n; i
- LDA #$00
) Y4 U2 z2 {$ c+ k - STA $B8' v: X0 z2 U1 D7 A, c
- STA $B9; T7 \: I4 C* l/ ^: w
- STA $BA
) x- I7 J7 G5 @) |" n0 A* y - STA $BB
& t7 `. V4 _! i8 r3 Z% ` - STA $BC
1 [. q( L: D- P o - STA $BD
. M$ V8 N3 D# a2 g3 B* S - LDA #$000 c# J6 b/ @5 \( u/ ]4 D
- STA $7FFF
$ u' j7 X# N) o3 } - : \% z- _9 E: M6 N7 x! j% m, y: L* ]
- WL0:1 x _' o! E( v4 B! J0 B) k
- LDX #$00# d6 K% P. q6 V! e
- LDY #$00
/ e' n- ?1 _) y0 i; q! a1 M - LDA #$00 n3 a" O& [, _( K3 F! {9 H
- STA $BA* E! s! T5 Y& S1 ~
- LDA #$20& s3 D8 X. t1 y/ b- ]) P
- STA $BB t8 M* z4 l) G" c" A, l0 n) ~
- LDA #$005 y. {6 h' B1 U
- STA $BC
( P/ w0 h \* t, P8 A - LDA #$60
1 i) k9 J" A; x" O - STA $BD
+ u& b2 }- ^5 C$ _+ P; @/ `' B - 7 k* c* u ^8 d, s8 I! k9 J
- WL1:! t* k* w6 x# M
- LDA $BD) t$ z; m6 `5 O
- CMP #$68
) t& n3 b) G. a' @% o/ ^" ] - BNE WL2
M. X9 H3 z, }# r; H7 U - LDA $BC
( V' B Z' @; z0 X& [9 w$ k - CMP #$00
7 V% D( u7 Z$ f/ f) b' D - BEQ WLR- `3 K0 ]. `* T1 G
- 1 R' T" B) U0 b! y- G8 t
- WL2:
$ M2 a5 h* C9 ~( v. I2 y - LDA $BD
/ h$ B6 A3 G: d v$ X; U: G - STA $2006
7 p& o0 j3 p$ Q- \6 z- }' @ - LDA $BC
4 [$ {) r* K1 u8 L) f1 K. U( ^* |/ D - STA $2006' x5 g4 U0 U; ]( J: H0 t
- V5 k8 M, i% r! p$ E& r2 R
- WL3:
* q5 p( H/ m- i }, |' d; Y- M8 k4 V - LDA ($BC),Y
6 \ w8 n/ P( Y, L. o8 f - STA $2007
7 h2 d: C) O; Y! q' C
" z2 q8 u' R1 B4 y6 v- WL4:
. i6 O3 q; H8 {# R - LDA #$00% Q+ G; {1 j) U- a }
- STA $2000
0 Z% l0 f, ~' ?; P$ J% a - INX
7 k2 Y3 O& d7 y. e( Q8 u - INC $BA3 g" O* `1 B2 X7 |+ _* V
- INC $BC2 |) P! }8 ]3 n7 K2 W3 J6 D9 z8 \
- CPX #$00" q- N* l& h7 a/ J+ W& ~$ S
- BNE WL1
9 J: T$ `* p5 z& W1 e - INC $BB
- X% i, U; Q7 ?4 x$ {: M, @ - INC $BD& B# U" `, f) h/ P7 }& ]
- JMP WL1
) I/ v( g, y4 \4 T' O% h5 x - 1 b9 T) m( X; j% K# Y' {3 r9 s6 p. V
- WLR:
0 \8 X) S0 n8 V, o4 z - LDX #$00
7 s- _8 w, e% @$ s) F - COPY_7F00_7F3F:8 U+ k: P7 ]. L% D( F" S
- LDA $7F00,X% t- M0 I6 b+ d* s5 \* e
- STA $07C0,X& P+ V) ?- ^1 `
- INX
2 j3 h& l! ?, y" \( Z5 e - CPX #$40
) F/ P# C* S8 S# y/ b - BCC COPY_7F00_7F3F/ }/ j' h5 f( P# P ?# x: J& b. ^
$ ^- g- }! s, {2 y; b- LDX #$00
4 X3 g+ t4 D- A* _: a: Y' } - LDA #$3F# A7 j9 x$ b0 g4 ^. t2 p2 o7 e+ y
- STA $2006
: m: ]5 D: c5 G+ r/ ]0 J# z9 d - LDA #$00
0 C0 Z% ^9 t8 U; e - STA $2006
1 G+ p* k* _2 A) @8 j# u3 D - COPY_7F00_7F10:
( t) g L" m y% Q - LDA $7C0,X( z0 k: N. ~+ ~1 F6 m3 g- O
- STA $2007/ \' A8 F) }5 x" f2 t0 j
- INX0 l( t" r, c5 U. `' w1 m3 S/ n
- CPX #$10
3 d3 k3 O' {& T0 X9 D7 p - BCC COPY_7F00_7F10
. F) G3 M/ H' w8 G& n -
# m+ p( u8 A3 I5 Q& L - LDA $2002& X8 P8 c1 N. T; [
- LDA $FD) l) Q2 g7 W/ p& X; g
- STA $2005
5 x* R$ U$ {9 ^3 Z- Q0 b0 m: f( Y% a - LDA $FC8 i4 m2 I0 n: m/ x0 P
- STA $2005/ g9 E& w( J. s* n% L/ S
: ]( w* ^6 x# K0 |0 I7 T1 h7 ~- LDA $7F50# K. \2 O6 y" Q
- STA $FE
t9 P1 {! O0 ], C. M - LDA #$00
0 |- F J4 K6 S5 n. e+ w2 } - STA $2000
0 L2 @9 p& o8 c - PLA( v+ t3 F1 j. e K
- STA $B8
$ E: [- f$ q" X1 i8 p8 ?" s h2 |+ U - PLA6 J) g9 [1 Z E' Q! _7 A# L- y
- STA $B9
4 p$ _* X+ ?" x! ^7 ?& H - PLA: j/ D9 ^6 m M. C. |2 `$ j' [
- STA $BA
' v4 I6 E! x, o$ ^! ` - PLA
6 A/ S& ~& s2 i1 x& | - STA $BB
& M# r. @1 f, }7 ^4 ^( Z - PLA( I' M7 S7 Z3 E' w+ p3 }4 }
- STA $BC6 I6 E: a0 T0 G* W; e6 J
- PLA
4 O9 ?- u, \8 k# R3 J3 X2 k - STA $BD
& G4 y" O7 e2 T9 o, P" g - 6 T3 y& E) t3 c% c- d4 l# k: U
- RTS
/ q. \' X0 b' D# W) p% c - 3 l" d$ Y8 V8 h" a0 D7 u- L
- PPU_CMP:
; i0 s( P7 u" C) ~' L( n' Z, _
2 \2 K( D# L+ @) q$ O-
7 Y9 g8 \: N* c1 P; l8 b/ \8 K - PPURE:. W7 I; o& ]( F" z, _5 i" h! D
- RTS" Y* K7 H" J# j! @0 D
) y$ V" O% [7 L, k" f7 v" \
- |3 R" b2 f! c1 z1 Y9 w- J- FREE_PPU:
) z, m9 F& b6 \& B2 R
+ V0 J3 Z; A. N4 X- p- \- JSR TEXT01_PPU
]2 x5 l2 c$ y: N% K, }, R( Y - JSR $CBC0
" R$ {6 X+ _& K' I6 P3 v7 T - JSR P1_PPU
' e" w- f8 @, h- b7 J# S - JSR P2_PPU
+ d! s% A/ ]0 ~$ X* |) f - RTS8 f! g5 D( C5 M* F5 z* D
- + d, N& d) ~) i0 x
- TEXT01_ADDR:
% J7 J0 Q5 |4 x) K6 d - .BYTE $20,$42
& r$ h' l& _8 @7 R' w& M p - TEXT01_DATA:2 ~$ j2 [' Y& b& o
- .BYTE CH,CA,CC,CK,CSP,CB,CY,CSP,CF,CL,CA,CM,CE,CC,CY,CC,CL,CO,CN,CE,CSP,CI,CN,CSP,C2,C0,C1,C7,CEND+ c$ y; a- K( Z% n* y
- TEXT01_PPU
, J: U: d C" r3 `+ J; b; N5 ] - LDX #$00 z$ ~+ T8 ]: w$ e
- LDA TEXT01_ADDR% S9 P6 D( t, ~# m+ \5 @: A' A
- STA $0703
7 w$ R* ^( v% L3 q& @+ z - INX
3 b) B6 b( \" ~1 ]; c) P - LDA TEXT01_ADDR,X4 E9 @' x6 \, s: }" d7 f& E2 _3 m
- STA $0704' W; q$ h& z0 O: N9 C
- JSR PPU_PROCESS; F) I2 I9 ?+ V
- TEXT01_W:
( H7 K9 _3 {" a7 k1 I - LDA TEXT01_DATA,X9 q; Z3 K% l, z8 i2 Y* i
- CMP #CEND
# D9 _2 Q+ p6 e& b3 K W& O - BEQ TEXT01_START7 A9 [' t9 M8 N$ Z& |# y
- STA $0705,X$ G3 n/ k8 m: z
- INX- i x' L7 ^" D; d
- LDA #$00
$ G" z+ S2 c, b# v# F - BEQ TEXT01_W( |0 s( K6 ^# H P: w! U( r% a
- TEXT01_START:
8 P( ?" J( Z# C- l - JSR PPU_START
3 L6 M3 O0 K6 Z4 B. e* z - RTS0 f2 Z( [, l [6 I
-
5 s1 E8 G+ ~* d0 F, H) j - ( {1 k- e' V2 A+ x
- COLOR_DATA:; N& h. t$ _2 |8 P, ?, X) A/ h
- .BYTE $0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28,$0F,$28,$28,$28: R: d O9 }3 q
- ; J' B! s; ]7 n9 i
- P1_PPU:
3 Q( U- d. U! z$ w9 B- p& c& m/ i - JSR PLAYER_01_PPU
2 F% {! [* j, ]+ @ - JSR $CBC0" S1 R2 h: ~& A8 G, C3 \7 ]! ?
- JSR RELIFE_P1_PPU
. m. d* Y& g+ V$ x. t& { - JSR $CBC01 [. @! ? F( z1 o! `: y
- JSR RELIFE_NUMBER_P1_PPU) d+ T' c* C, `2 P/ o
- JSR $CBC00 R9 b6 M9 R# P$ n: c4 k; b& X2 `
- JSR WEAPON_P1_PPU6 z& \' L" a5 \' }
- JSR $CBC0
1 m& E$ A; z/ _/ E0 Y% p - JSR BULLETPPU_P1_PPU
$ j% f1 s6 N. b. @ - JSR $CBC0. I% R" P5 b5 ?, u# a
- RTS
# o) n; V7 j: Q- F - 6 u& ]- W) o8 ]3 z+ |2 u! d
- P2_PPU:& g, c+ p9 r% @; @. n; a' x% m1 |
- JSR PLAYER_02_PPU
+ ~# @3 p1 i9 B7 P2 b4 K5 H - JSR $CBC0) @* ^- @" D4 ?% k5 B7 l! ~& W p
- JSR RELIFE_P2_PPU
T$ D. h' x) U - JSR $CBC0
& U* m8 w. y7 b% m5 V - JSR RELIFE_NUMBER_P2_PPU$ d( ~0 Q9 a" `( v
- JSR $CBC0# n2 M% T7 G; }) O: w
- JSR WEAPON_P2_PPU
6 I9 f+ e1 k2 ~, G. a - JSR $CBC0
$ M. R+ `$ i/ `( D: f& m, p3 E7 \ - JSR BULLETPPU_P2_PPU
8 Q- O( U% ^: `, q - JSR $CBC03 l0 o/ X5 r# A( C ?4 g
- RTS F. q3 l i; }- Q7 l' y
- ! e% r+ r$ j. t1 t
9 _# I4 h; t; X1 X) c- : _! i9 C5 _2 z! @3 {
- PLAYER_01_ADDR:
8 R3 x+ J# P% \/ W: a& O - .BYTE $20,$A3
6 x; I" D* o2 e8 R8 n - PLAYER_01_DATA:
9 D/ |( Y/ |, `0 P6 F - .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C1,CEND
- d; Z7 }; q: j) \' o" ~ - PLAYER_01_PPU:
2 Q, z f! w4 p1 Z - LDX #$00
1 m. J9 r0 n3 P- v J3 r5 Q1 Y6 H - LDA PLAYER_01_ADDR5 F! c8 P3 k3 R0 V
- STA $0703
& a6 a) H$ K* O% e5 { - INX
, G$ U# Y: P P: N - LDA PLAYER_01_ADDR,X1 \& R2 K7 B- E B* E! v
- STA $0704
N; ]7 W) r# ]2 W - JSR PPU_PROCESS
6 g8 N1 O$ F9 N, Y! T5 | - PLAYER_01_W:; j E; W$ c4 Z6 i L5 v" M
- LDA PLAYER_01_DATA,X
1 s" e x4 J3 e - CMP #CEND; z1 ]2 H4 |* D
- BEQ PLAYER_01_START! S; a2 V/ v3 y9 {* Y" O. B
- STA $0705,X
7 y) Q& P& }# U2 C2 f6 X' x - INX
: c0 t: D9 g0 j5 A - LDA #$00' t/ h) }) q5 _
- BEQ PLAYER_01_W3 z3 f7 c: k3 V7 Z* F
- PLAYER_01_START:5 \, X& W7 C; H; m, f Z T! R# C
- JSR PPU_START
) O5 d% d3 T# f0 W7 j7 T0 z+ p - RTS
9 K( }: Z& |. j, w7 w$ `# z - 2 A9 g* `$ F' a2 u. i$ |# B9 P9 T0 O
) T$ H& r% }+ _( M' D, G- RELIFE_P1_ADDR:
' R) B6 P1 f- ?) {9 p - .BYTE $20,$E3
) C& C( I( J2 J D# K7 O - RELIFE_P1_DATA:( c- \# S2 E$ C
- .BYTE CR,CE,CL,CI,CF,CE,CEND
2 s% a0 ]' _3 g. {9 @0 o - RELIFE_P1_PPU:3 a$ z9 t, C; g1 D0 Z) g
- LDX #$00. g6 J0 K3 G: t4 Z' J
- LDA RELIFE_P1_ADDR
2 v& G& K* W: K. m - STA $0703( u+ a# m, l& M( Y
- INX. H3 G: F+ r! S4 A) t
- LDA RELIFE_P1_ADDR,X$ X6 A6 v! P2 I
- STA $0704" a7 g; o, V5 n3 i' m7 n4 k
- JSR PPU_PROCESS
! ]# u' x; P6 A. I- { P4 Q b6 U( H - RELIFE_P1_W:- O' h1 i# {- O$ X
- LDA RELIFE_P1_DATA,X
; h2 a; E5 T, g. b& U, g2 z$ ?5 @( O - CMP #CEND
2 m, e, K) p) y1 m% I/ @, b2 Q- R - BEQ RELIFE_P1_START
4 |. P/ H, C+ X/ R7 l# R$ F- R- V - STA $0705,X; d5 F; h5 o$ w0 g2 t& P" }4 q) o
- INX
2 V$ K1 W. i" _& Z! K9 ~ - LDA #$00( Z8 }5 a% S4 ~0 \8 z8 q
- BEQ RELIFE_P1_W; j$ X4 Q* ]+ |; k. `: L- Q+ g
- RELIFE_P1_START:$ z ]6 ~ t- h, b
- JSR PPU_START5 Z E& S4 c9 w. f& F) B
- RTS- X- E2 o, b- d4 b6 T7 P( b3 ~' f
- + @7 B) ~- ]6 |1 Y
- 9 {7 v$ a6 m' s4 z2 f4 x# q
- RELIFE_NUMBER_P1_ADDR:$ I5 M7 R0 Y$ J( H8 [7 k
- .BYTE $20,$EA7 O! p' F3 g% y
- RELIFE_NUMBER_P1_PPU:
5 h, F9 X* r' z, i/ } - LDX #$00
2 s4 j% J! b4 ?; S4 i6 \& w - LDA RELIFE_NUMBER_P1_ADDR
- Y1 {0 _; \! C% Y; D# A - STA $0703* g4 R' \: A X/ R0 o* D# h
- INX
. V* k/ P; A, U8 q - LDA RELIFE_NUMBER_P1_ADDR,X; ? M1 X, G& N) l' F9 h
- STA $0704' q) O. K9 M) T- K+ o" K
- JSR PPU_PROCESS4 y2 E) X) W0 ~9 M
- LDA $32
9 G1 D& _1 J! o, O+ t1 J - JSR LIFETODEC5 N" B. k1 d' C1 h2 D0 G
- RELIFE_NUMBER_P1_W:* E6 k$ O+ R# @3 {5 J! ~. u
- LDA $7A03
. ^, ^/ D9 w9 u# z - STA $0705" ?8 H& P, [/ Z, U; T
- INC $07052 w9 {& U7 E4 m1 I
- LDA $7A04
; A/ J2 d" B4 m; B2 `; f - STA $07068 |, f/ Y P* G, F- n0 n8 p
- INC $0706
5 B( z6 D7 F5 V$ x - LDA $7A05$ \4 V% ^: C2 d- P
- STA $0707: D+ O3 w) M6 V0 H
- INC $0707
& Q9 F3 X2 p9 h3 W; C" `: v - LDX #$03
2 h0 p- n( w5 ~0 | - RELIFE_NUMBER_P1_START:: `0 \5 N U. V# F+ W- L+ M( U
- JSR PPU_START
4 _" P8 k" {, l3 K1 Q - RTS
) O) A7 b) J+ V - 9 ?, C& C' ?4 a
- WEAPON_P1_ADDR:2 |% @" Z7 Q6 c6 l: L6 U
- .BYTE $21,$23* |% w8 t/ B6 m3 V8 C
- WEAPON_P1_DATA:
1 K( F2 b, I. Z O - .BYTE CW,CE,CA,CP,CO,CN,CEND) d( ?) W1 a% I$ O# y
- WEAPON_P1_PPU:
0 U, n9 Y6 o6 x/ F& h - LDX #$00' R6 D( Z6 y5 H% V4 P* _, B
- LDA WEAPON_P1_ADDR
6 L0 F) K" q' [# ]- h. \% C! d" d - STA $07038 I, v, u4 k3 Z8 _8 I
- INX- L5 M* y- T7 ]/ j
- LDA WEAPON_P1_ADDR,X* n8 s' j! _# [" e& ?$ a
- STA $0704
7 b4 W( e* H* l! F5 a7 @ - JSR PPU_PROCESS' i7 K* `* v2 k5 A/ \
- WEAPON_P1_W:
3 e4 A# a5 u$ v2 d - LDA WEAPON_P1_DATA,X4 ?/ I/ l2 b8 }: O( h
- CMP #CEND
4 Q: t4 l/ L% ]) l3 G - BEQ WEAPON_P1_START
& @" X) X' g( c$ q/ } - STA $0705,X
% ?* Y4 S0 b6 d+ w5 V, g - INX K- x& v- a% N- ~/ y& R: v
- LDA #$00
p5 u$ N! x) z, \ - BEQ WEAPON_P1_W) s9 ^! v. a) [+ d$ A5 ]
- WEAPON_P1_START:) N) B, r3 \# B# ~( H
- JSR PPU_START. _# b- M# S! D$ [" u
- RTS
6 S+ e [! i" r% B) x) f) W - 0 g! h( h: p0 |% G- `8 \
- BULLET_P1_ADDR:
( k. n5 f, q5 [0 m0 A2 l - .BYTE $21,$2A
9 S/ a: w* C8 x$ Z# R# Y/ y$ A- h9 P - BULLET_P1_DATA:) I0 G ^# ~, `7 e% ^
- .BYTE $00,$01,$02,$03,$04
% X4 C! N% T3 w! a" c - BULLET_P1_NAME:
, y Z" F: H: E - .BYTE CN,CM,CF,CS,CL) ~4 u: k9 I4 l
/ O" f' v2 P+ S6 i, D0 }- BULLETPPU_P1_PPU:
% l% @# A. P% l - LDX #$00
4 @ {# I( q) R. D - LDA BULLET_P1_ADDR/ q+ F/ W9 o% ^" G8 l5 W
- STA $0703
. e+ w2 N. @1 | - INX& ~; v K+ J$ ~" }3 [ n) T% w
- LDA BULLET_P1_ADDR,X2 K% ^" T2 e1 p" d# o2 h& s
- STA $0704( @9 F" N0 I; H( \+ K# p* ^9 x
- JSR PPU_PROCESS
$ X ^0 |' h6 e6 ^0 p9 ? - BULLET_P1_WRITE:
$ m# `: Q- G1 q4 U6 l. b7 F3 P4 `8 h - LDX #$00$ o- _; A$ i$ n) B$ |' J* l
- LDA $AA& B% M4 h* |3 w0 ^
- AND #$10, D$ r6 \3 Q4 d3 \, C/ f! v
- BEQ C_BULLET_P1
! @& L: _3 h" |) k* V: U3 P - LDA #CS: r3 Z8 I6 d( j6 l8 W1 Q$ V
- STA $0705
: |4 N5 ]0 E. [% b, B" x: k - BNE B_NAME_P1- @. h2 D) i5 h5 K
- C_BULLET_P1:
/ s3 y4 n! U: F! s/ O$ R+ | - LDA #CC
! Q$ F- h$ Z& a- e - STA $0705
/ p/ c X4 T+ t4 N% S- u+ } - B_NAME_P1:9 _$ o8 l, q4 S% U+ l
- LDA $AA
( j, n3 K) A* L$ i0 P( y - AND #$0F
. G$ b7 H2 c4 ?1 t+ C7 g - CMP BULLET_P1_DATA,X
! k& k! e4 y- K$ w - BNE B_NAME_P1_RECMP
( [* S' _$ _" K# y - LDA BULLET_P1_NAME,X) H4 h6 A E5 i+ X( i
- STA $0706. i/ }5 L% W1 v% p9 H
- B_NAME_P1_RECMP; b; U3 v) |# w( e
- INX
+ _7 _, Z& K; V* y. k - CPX #$05! h! T R( o( j# u1 d6 q( z3 E+ U
- BCC B_NAME_P1
* m: W1 p0 Q; W6 B - LDX #$027 B( q6 n e4 x( Z k
- JSR PPU_START+ o& t- C) f3 ]/ \: i7 C" k
- RTS; L/ }1 o9 l- Y! }& a8 K
- ; t" E: m, V" s8 d* p5 w
- 9 Z. H( r) m% T; m- c" T* M
- PLAYER_02_ADDR:, X7 E7 g( K' a, i2 U# g3 @
- .BYTE $20,$B3) P3 s* E( K$ ]# E* o7 V
- PLAYER_02_DATA:
+ W( X o" }4 h ?6 R: H - .BYTE CP,CL,CA,CY,CE,CR,CSP,C0,C2,CEND8 f0 N3 B) h6 _ g$ U
- PLAYER_02_PPU:: |8 w8 ~2 a% ^
- LDX #$00
- B9 k8 g3 A! p# P6 @7 F7 W - LDA PLAYER_02_ADDR
9 Y9 a9 T, X! H/ e; \2 d7 k - STA $0703' Q0 U) J) r. F% b% N! @" ?- w) q
- INX
# d/ m$ k; o: [% Z0 s - LDA PLAYER_02_ADDR,X& t1 L1 K: }. r+ y! t' v
- STA $0704
4 l( _3 a. \+ C - JSR PPU_PROCESS
) {- z: K( [. k/ i; ~. V' u - PLAYER_02_W:5 o( J3 r4 x. u- ?- j( T4 V+ X
- LDA PLAYER_02_DATA,X
) u# W' L) ^2 I3 O - CMP #CEND/ Y/ l) Q1 J; D5 w) [
- BEQ PLAYER_02_START; d! g- G7 \8 p3 K% o/ \) n9 h8 {6 v
- STA $0705,X
/ O4 A$ G3 G8 d - INX
: t, M* E2 D# H! {; D( Y - LDA #$00) z, u; s5 u( N7 F- a+ d7 Y
- BEQ PLAYER_02_W! a5 B" W% a5 W7 S
- PLAYER_02_START:
$ L9 R7 G$ i t - JSR PPU_START
! L. l1 Q3 X. u1 A$ U: ^ - RTS
* D4 `* H& b; ]7 \ -
2 ]' A; f4 R1 `1 C, n n( T3 I
# V& d) w. I5 r$ t9 ^3 Y- RELIFE_P2_ADDR:2 B' a% L8 c1 x, _# p
- .BYTE $20,$F3
6 |! _; f: F$ w& k1 G - RELIFE_P2_DATA:7 s' a2 F" j* y, L7 e) K
- .BYTE CR,CE,CL,CI,CF,CE,CEND' t5 C* h7 D8 S' h* @% o! G
- RELIFE_P2_PPU:" A+ h! M3 O- O
- LDX #$00
7 M o4 c* J2 i1 W - LDA RELIFE_P2_ADDR
/ {4 P" v* E5 A) l5 b' k - STA $0703
# I* ^# ~3 U, U C - INX
' f" Z* I3 H% a0 u - LDA RELIFE_P2_ADDR,X3 ~2 O- u: m: p8 J2 u7 x: p. O
- STA $0704, C! P/ K3 o' ^+ o$ ]
- JSR PPU_PROCESS
, r: ^ Y! W0 z1 n/ C - RELIFE_P2_W:% N9 ^+ c* Q+ B
- LDA RELIFE_P2_DATA,X
6 A/ ? E" Q! f/ h - CMP #CEND
8 G2 _, Y8 L4 L7 Z! V1 h - BEQ RELIFE_P2_START3 q" K$ S3 e# D
- STA $0705,X
0 [( J5 j+ o2 }$ x2 F1 i - INX
% c4 |, z8 J; B, _ - LDA #$00# H, L* {/ G, _
- BEQ RELIFE_P2_W& i( M0 V9 N; N) [
- RELIFE_P2_START:
" O- ^! M2 |' K' ] - JSR PPU_START
9 z# X) ]: c: x0 n - RTS
( e7 b- l' o2 N; J/ Q% Q - - {1 o6 T/ V, d
% ^ W3 c- V0 y6 w- RELIFE_NUMBER_P2_ADDR:
; y) U; j- g8 d) V$ m* S - .BYTE $20,$FA
( q7 S9 ^4 H2 b- C" B3 Y" A7 B% | - RELIFE_NUMBER_P2_PPU:" P2 x+ C; y- n W ~! e
- LDX #$009 t3 o9 p# a7 S; ^! B
- LDA RELIFE_NUMBER_P2_ADDR
* ~9 a' l# H$ j3 u2 R2 U# k - STA $0703
( }0 R o# S3 y, E: W - INX
* D, M. J! p. n - LDA RELIFE_NUMBER_P2_ADDR,X
! U0 W) `3 v* F: | - STA $0704$ _- `5 t. @- j: J( a. c
- JSR PPU_PROCESS6 M$ u2 C8 D1 u
- LDA $33
8 @/ k! N/ `4 `$ |% | - JSR LIFETODEC- h! l; ]1 Q; a1 W4 ~. D$ j7 Q
- RELIFE_NUMBER_P2_W:# G0 k$ X0 j4 d" \7 H+ t: [
- LDA $7A03
& K8 o+ C5 S2 ]) o- ~5 B - STA $0705
# s+ B9 @* a, w( w2 p - INC $0705. N0 |) o) \, n' w% Z1 P+ A2 @
- LDA $7A048 Z) x, H* S" U, V- O
- STA $0706
9 `" v% V1 I" S/ y. y* `" N - INC $0706
. s7 G. A0 ?6 s1 s$ q - LDA $7A05( d# X: E4 _/ y z' S
- STA $0707
9 _+ E4 v% N* S6 h" v - INC $0707
- `( Z' C( W9 X6 o6 H: O - LDX #$03
6 P' Z3 R: w3 l+ i - RELIFE_NUMBER_P2_START:
6 R; O9 k( }; {9 ~1 M9 c - JSR PPU_START
+ N% h# X$ ~! z% r* ~7 G - RTS8 i1 i: n/ v- o+ m$ B; R" f
- ( l: L; E" k0 E0 Q
- WEAPON_P2_ADDR:/ r4 y& Y! O, Z' w( {. O
- .BYTE $21,$33
/ ?2 |3 ~! c0 o. n - WEAPON_P2_DATA:
6 T# {' r" J$ x& k - .BYTE CW,CE,CA,CP,CO,CN,CEND
9 P" V& P2 m# A9 W* X - WEAPON_P2_PPU:: t# k3 d, c+ S+ ]3 Q$ B
- LDX #$00+ ` `2 B9 u' b1 @
- LDA WEAPON_P2_ADDR
( L0 P6 z9 S* |+ E& S& l& ~ - STA $0703
: u. e3 u* B; S1 L# X ~ - INX
+ n4 y# h+ P2 U7 d. Y t - LDA WEAPON_P2_ADDR,X
! [$ A7 U) m- R; z - STA $0704
. m+ t% B2 v, x9 y3 R - JSR PPU_PROCESS
* y+ p7 ^/ g! P, D8 w5 l# b8 |# ` - WEAPON_P2_W:9 N$ w: u7 _6 r% P1 H
- LDA WEAPON_P2_DATA,X
T8 A, p. s' M! e8 y - CMP #CEND' J$ F6 W% S3 n
- BEQ WEAPON_P2_START
- O8 j/ Y" C" p; x - STA $0705,X
. g3 {7 c, ~( ~: R; i! ~" P - INX9 [3 S( W7 |$ D7 ]
- LDA #$00, ], i% Q- _. c3 c
- BEQ WEAPON_P2_W$ m8 a9 a$ E# ]5 ~6 _
- WEAPON_P2_START:
6 O7 X5 \6 M4 e+ u' X8 z8 Q, f, | - JSR PPU_START
# S* A9 ?( H8 r! F% R+ A - RTS n3 k5 ~+ h! B W! G
( y! G4 x+ H/ h# a% y- BULLET_P2_ADDR:
8 \# ]) F3 F& w& g& p+ G3 K - .BYTE $21,$3A' |' ~1 ^, v/ N) L V: n0 X6 s3 q9 W" J
- BULLET_P2_DATA:
: G) o& M* {1 Q6 {& ] - .BYTE $00,$01,$02,$03,$04$ y! A4 L w. B ^" a1 X
- BULLET_P2_NAME:! b3 R, Z' a9 I G& [9 z' n
- .BYTE CN,CM,CF,CS,CL
7 t l/ ^6 X" v - ! P v3 D5 v; M
- BULLETPPU_P2_PPU:
1 G& Z1 B' I6 R: f# f8 `# @ - LDX #$00
) |2 {4 N7 q! _# }( `' b - LDA BULLET_P2_ADDR* g% l ?/ }6 ]7 K+ `
- STA $0703
5 a4 u8 O/ ?/ F" w - INX4 W- g* j) [, @+ p
- LDA BULLET_P2_ADDR,X
/ J( ^# o7 [! L- d% `! M( S1 o - STA $07040 X5 K- I# ~ K9 f9 Y1 ]
- JSR PPU_PROCESS- N& k: |9 V' ?1 u; \
- BULLET_P2_WRITE:
! Y8 o# ?7 X e) t7 j - LDX #$005 _7 c' ~' v( ^' y8 \8 a) M7 g. X: |
- LDA $AA
0 h* B5 G9 N; p9 z - AND #$10
4 Z. s, d5 X1 z# `$ } - BEQ C_BULLET_P2
# o) w1 w* I& x1 {4 b- ]' y# I* d' | - LDA #CS$ d& B3 u/ |8 Z I6 @
- STA $07056 p/ |$ g8 Q+ K1 ~8 m
- BNE B_NAME_P2
! d9 x9 y8 H% q" R. X2 [ - C_BULLET_P2:; R4 R7 O6 f5 n# Q0 C
- LDA #CC
8 L) r" D" N+ X9 t - STA $0705
- I$ R" |+ Q- S' r, P. { - B_NAME_P2:
( T3 Q) V7 M8 a% M% ?" T - LDA $AB: n1 E5 O7 E5 ]3 e: d9 S. _* q
- AND #$0F
( x$ H a" D3 a& v - CMP BULLET_P2_DATA,X% I1 {& ?, H: H; b
- BNE B_NAME_P2_RECMP
, F9 b% a- c( T - LDA BULLET_P2_NAME,X
- ~/ |4 X( }' Z - STA $0706
1 }3 \4 M8 n: O3 [9 o2 O0 q( D - B_NAME_P2_RECMP3 H7 R C6 Y& ~$ i0 |
- INX: d2 x9 y: u9 \' e% x
- CPX #$05
# b9 t, G d! \ P2 A8 u9 P - BCC B_NAME_P2
9 J$ o) @3 i7 _. A0 W0 S3 x* }2 L - LDX #$02
6 d" x7 y4 F( t7 ?* y* a. E - JSR PPU_START
4 [" u! |) U& k% ]2 O - RTS" j+ @6 Q, Q& L) l; F5 K
- * h; V1 W) m" o
- 4 M- v1 T9 ~' n
- / Q( [1 X% N' ^
7 [* ]2 M5 N7 {. F6 l0 B- 3 Z5 `) y6 l3 v9 D# B. w- N7 C
7 G/ Q% d) o, }9 x7 @& E! W1 j- LIFETODEC: ;十进制转换0 [; _5 \% X4 d, x8 h
- LIFEL1: ;initialise
, K1 i' Q. a7 k* D. v - STA $7A00 ;$7A00=F3
( [7 `, O% X2 Y) o - LDA #$00
; n* ~: @/ a5 B4 a% {0 O1 ~ - STA $7A03 ;$7A03=00
) U8 D4 }4 E" N - STA $7A04 ;$7A04=00
$ C% ~& K& n- L o( R - STA $7A05 ;$7A05=002 J9 ~2 q: S2 u" n
- LIFEL2: ;copy data $7A00 to 60016 N- l# ?- T$ J0 H
- LDA $7A001 {6 `7 {. ?/ N
- STA $7A01' X: l' ]7 B }8 Y0 ^7 L; M
- . p4 r6 m: I, N0 U
- LIFEL3: ;hundred! R: j3 ] c+ {# v) p; `# w# w) h" V+ L
- LDA $7A01
0 ~- e6 d8 w6 m# @ - CMP #$64
8 {6 L9 o* l7 Z - BCC LIFEL6 ;$7A01<100 goto L65 M& R5 g% c. x
- LIFEL4:8 k4 C1 x* X! {3 T9 b, l7 |/ O* u
- LDA $7A018 s& x: W) |5 O
- SEC
6 H) z: L) j+ U, A. b8 A* r - SBC #$64 ;$7A01=$7A01-100! p5 b7 n( F1 M% ~
- STA $7A01- t f% u8 E& ]8 y) e0 L$ }* S1 B% }
- INC $7A03 ;hundred++- a# s9 U& H& y% l/ y
- LIFEL5:$ k, _% b$ V! r0 A
- LDA $7A01% P+ ~9 K1 v- v( V3 C. J: T
- CMP #$64; A" u% p$ t6 I2 w% u, V, r* T3 ~- ?% T
- BCS LIFEL4 ;$7A01>100 goto L4& N- _7 l6 u7 e6 _; s2 X- e& ~
/ l4 e7 x9 i1 T% u- LIFEL6: ;decade
6 o: Y5 `' g( B' x8 |) d5 v; d - LDA $7A01) X5 C6 p" n9 f* M
- CMP #$0A ?5 f" ?* Q' [" G' a: C1 A) I+ b
- BCC LIFEL9 ;$7A01<10 goto L9
; e% A* R' N$ r5 g - LIFEL7:
, \5 ^3 ^% C" K- m2 O% a - LDA $7A01
9 v" x: z$ U( i4 Y$ _1 Q& ~ - SEC
! _: B9 A, b' P' C& ` - SBC #$0A* B& H: }5 h9 P4 @& f% ^* e) {3 Y5 J$ s
- STA $7A01 ;$7A01=$7A01-10
7 u; \8 {3 v$ {4 L, C - INC $7A04 ;decade++
5 U) O. E! h/ L$ s$ V; t$ Q5 Q - LIFEL8:5 u1 |9 f1 |2 A7 D
- LDA $7A015 X. I8 m- u, u) Y/ E
- CMP #$0A
5 H0 T5 ]8 I* g/ V a. I - BCS LIFEL7 ;$7A01>10 goto L7
. r7 l/ G. n- [" m" [7 V - ;unit* b0 n' I0 V$ Z* a( G& f
- LIFEL9:0 H- f5 H& O" P+ |6 T
- LDA $7A01 ;$7A05=$7A01
! Z- y1 u3 B1 _1 N - STA $7A05 ;unit+ \6 r7 S1 p% @3 c2 u0 Q0 f$ Y
- RTS ;return9 n0 E! x# C' t. c4 P
( O8 P/ c. w/ t6 y
_7 M% }0 x9 D- 9 k8 l& D! L; g" M d0 q
- PPU_PROCESS: ;PPU地址处理程序2 N0 Y# m, d' ^" j6 [# n4 Q/ h
- LDX #$001 ~) s; Y/ A/ W, A0 s" E& ~
- LDA $FF$ C: Y8 k0 L) L" k( [- @2 }
- AND #$01
) {6 I0 C, S' R - BNE PPU_2400_27C0
% A2 ?9 L9 H6 r; f5 u" { - PPU_2000_23C0: ;命名表1
3 a" n. |. O. f - LDA $07031 b" R' ^1 Z- U$ x2 z
- AND #$FB+ z9 r& x3 p& y% N8 N
- STA $0703
/ M/ Y/ A7 b; [ - RTS
* r3 H; [! g8 l8 D) ~/ e2 J - PPU_2400_27C0: ;命名表2
/ \# e% K" [5 Q n- K- v - LDA $07039 v4 h1 W' A6 {( g$ T
- ORA #$04
/ h7 F5 u ` T! C- j - STA $0703
, S! g0 G) t3 T! }' _ - RTS/ O$ @% |% [* [$ g' L7 r
-
5 \0 I3 Q) j6 O+ ]: _4 K! ]4 L/ O' V - PPU_START: ;PPU数据写入8 _- ~- r6 L2 x w1 X: I
- STA $21) A; _- {9 b0 j) T
- STX $0701
0 S' C) z0 c$ J9 P - LDA #$007 I% V3 q7 ^: [& J# `6 _3 h
- STA $0705,X
1 u& c! W0 D+ q. G - LDA #$01
5 k2 y' p [) x4 D% d - STA $0700
3 g# n% L9 T( q8 K8 D+ h - STA $0702' o* i# V* ~) R3 P/ F: }6 ^
- RTS/ @# R2 w2 [* ~% b, x
- 4 g% v* F3 d, \' s
- ! A. E! O8 L8 E' X1 c' `: @! w, W
- ' d0 K$ n& J* b& U
- " E" X9 F* T! H4 _/ t. b4 q
- ( E9 U5 j7 M& n# N m
- S. a; b, m$ L% F4 L* c9 q" y+ q
复制代码 - ^8 ]" K; q+ b8 [4 G a. z! l
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|