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