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