|
本帖最后由 yandagui 于 2017-3-18 16:17 编辑 ; [/ A0 d9 j/ ~+ j$ g" O
/ s; `) R2 g0 @5 u- k2017.3.13& B- l0 u, w4 V( {9 l6 ?. F: s" ]
; Z* ^& z) V9 N# U/ l/ q* d
$ Z1 p) y9 h4 U4 x3 Y
i' u) U* \5 ^! x- .ORG $936E ;CONTRA(J)7 \# L' Z4 W v2 C" W- m: N
- LDA $25 Q$ G! y) n3 _0 P; U
- BEQ ADDR_93C9" X) ?8 |( y/ e8 x) H
- ADDR_936E: LDA $0022 ;读取地址$22数据到累加器A($22==0,单人模式,$22==01双人模式)
, x- m7 S# R9 T# c& R! Z$ r: R! |! B - ADDR_9370: LDY $001C ;读取地址$1C数据到寄存器Y. a* k' v# X O w, R; T. @% v9 r3 ?
- ADDR_9372: BEQ ADDR_9376 ;Z==1?如果结果为零则跳过$2字节
( I% X& [5 T! v& t" L) @ - ADDR_9374: LDA #$01 ;读取地址$01数据到累加器A+ A0 n6 l, }* ^: \# u/ f
- ADDR_9376: STA $0000 ;将累加器数值送到地址$004 z" k% Y m# D% ]1 P
- ADDR_9378: LDX $0004 ;读取地址$04数据到寄存器X
- S4 r4 q1 \, M7 P - ADDR_937A: LDY #$08 ;读取立即数$04到寄存器Y
/ `/ t. `4 _. h# R" `1 e: H% r; h - ADDR_937C: LDA $001C ;读取地址$1C数据到累加器A
- }( ~2 _( z1 r' Y9 \! l6 p - ADDR_937E: BNE ADDR_9395 ;Z==0?如果结果不为零则跳过$15字节
2 n# c: z- Q2 }6 e - ADDR_9380: LDY $0000 ;读取地址$00数据到寄存器Y
' h; F, [* |* G3 [; { - ADDR_9382: LDA $0038,Y ;读取地址$38,Y数据到累加器A($38==01,P1结束,$39==01,P2结束)) _6 B. w8 I% V% M( i& F4 c
- ADDR_9385: LDY #$08 ;读取立即数$04到寄存器Y
1 Y, s, e( J6 }5 D$ n - ADDR_9387: LSR ;逻辑右移
+ l* M) s( M: S/ Q9 u$ r - ADDR_9388: BCS ADDR_9395 ;C==1,有借位则跳过$B字节) R# p% w0 n9 z9 g% S9 ]
- ADDR_938A: LDY $0000 ;设置Y==#00
2 o. Q) M" B2 B, z- h - ADDR_938C: LDA $0032,Y ;读取地址$32,Y数据到累加器A
/ Q5 p b& i* g" `' Z6 C! h" e. @ - CLC% ^# i) ?( y3 B5 k' V
- ADC #$02
% N) @2 ~, z, w I% { Y, M - ADDR_938F: LDY #$00 ;设置寄存器Y为$002 Q+ `( k2 P& O: a+ E
- ADDR_9391: CMP #$08 ;比较Y==$04?
5 w% U) E0 v9 [9 t4 c# O - ADDR_9393: BCC ADDR_9397 ;C==0,有借位则跳过$2字节! t& Y( m$ {, I! K
- ADDR_9395: LDA #$08 ;读取地址$04数据到累加器A
2 a6 J/ t/ x( m+ R- J) ^ - ADDR_9397: STA $0001 ;送入地址$01
& C9 O9 ~- L' N; T+ P - ADDR_9399: DEC $0001 ;地址$01递减
9 j( V0 T7 V! Z; k - ADDR_939B: BMI ADDR_93C3 ;N==1,结果为负则跳过$26字节
& `6 Y/ S1 R5 _ - ADDR_939D: LDA #$08 ;设置纵坐标数值
& Y* v+ i5 u0 D8 L! I - ADDR_939F: STA $0200,X ;送入纵坐标地址 `5 C9 K+ j0 y1 n* @" Z* N
- ADDR_93A2: LDA ADDR_93CA,Y ;读取图快号数据8 |7 B7 W9 |9 g1 g8 S; T4 ]7 k
- ADDR_93A5: STA $0201,X ;送入图快号地址3 Z) O( F1 Y- b, s: S
- ADDR_93A8: LDA $0000 ;读取属性值数据
w7 i+ ^/ G) H& u- T0 M( @ - ADDR_93AA: STA $0202,X ;送入属性值地址
& N, T* r- N: `4 U+ H- d - ADDR_93AD: LSR ;逻辑右移% q$ R& |0 p/ b$ ^
- ADDR_93AE: LDA ADDR_93D2,Y ;读取横坐标数值2 D, R% i: L* e9 K& ]0 R$ |5 _; j; q
- ADDR_93B1: BCC ADDR_93B5 ;C==0,有借位则跳过$2字节
5 B( e& C+ y9 |! X - PHA
, o K, Y; ^+ b$ _& a1 B - TYA
, Q# R. K2 a8 X& a - PHA
3 s* D6 c5 q# P* g1 c - LDA #$D4
% E; Q- v* I0 p3 H4 { - STA $0200,X
% s) P2 o" a1 b( L% g - PLA/ [3 {0 c& L) ?' j: M) ]
- TAY$ P5 F8 M [1 D1 r, Z
- PLA' c& W2 c! Z S1 {
- ADDR_93B5: JSR WEAPON
# Y) W, b% @0 L - ADDR_93B8: DEC $0007 ;地址$C7递减
8 r+ ]' T2 t4 ]& r - ADDR_93BA: TXA ;X-->A3 o0 b/ O7 k* ?2 ]5 P3 P: w
- ADDR_93BB: CLC ;清除进位标志4 |3 l3 I+ i' i# }( {' B% i
- ADDR_93BC: ADC $0010 ;加上地址$10的值% ^* ?* q5 u# T+ P' R4 [5 _% k( o
- ADDR_93BE: TAX ;A-->X/ H4 ~) z% o9 X4 j1 I3 a
- ADDR_93BF: INY ;设置Y++1 p( G9 ]7 k& ?2 U- j" S2 c3 W
- ADDR_93C0: JMP ADDR_9399 ;跳转到ADDR_9399
. Y3 P0 _+ ~$ r6 p* D9 L, g - ADDR_93C3: DEC $0000 ;地址$00递减0 d3 l8 f" V+ L [ @" h7 H+ r
- ADDR_93C5: BPL ADDR_937A ;N==0,结果为正数则跳回$100-$B3=4D字节0 Z( `: ~# ]$ P( h2 X
- ADDR_93C7: STX $0004 ;送入地址$04
# |. @( A6 q) _: g! j, V, |8 n - ADDR_93C9: RTS ;程序转回-----------------------------; I. p! a' P8 x( g9 c
. @) S. H$ A0 m- .ORG $FB60
( X+ i# A }0 s/ R$ W8 _. U - ADDR_93CA:
+ a- q" i. ~3 W) N9 t6 g/ p2 Z - .BYTE $0A,$0A,$0A,$0A,$0A,$0A,$0A,$0A ;生命图块号
5 i( Z5 Z" C" o - .BYTE $02,$04,$06,$08,$FE,$FE,$FE,$FE ;GAME OVER图块号8 f2 i3 \8 k+ S( z
- ADDR_93D2:
* S- _8 z0 j; t ]1 {4 Z$ D" x+ P - .BYTE $14,$1C,$28,$34,$40,$4C,$58,$64 ;生命图块坐标- Q' ?# J0 R% c0 J) e# E$ F
- .BYTE $10,$1C,$28,$34,$40,$4C,$58,$64 ;GAME OVER图块坐标
4 ?- ~) O; |, Q1 k1 \ { - 4 V' e4 n. O2 b0 W5 s( K
- * R2 t) ` [ s; S, O: L* Z
- .ORG $FB80
' j+ a' U* `! p" N& O4 U e- e - 4 u' i& S$ ^& {
- WEAPON:9 _8 [/ J: e; M" S9 Y
- STA $0203,X ;送入横坐标地址& V9 k! x0 y" F( Q
- PHP
: c# s, J5 T# y7 `+ b - PHA7 {% p" Z* y0 ^$ D8 s! v1 i
- TYA
1 r1 H0 ]6 h3 M+ e* g - PHA
% c: W7 Y! B& x8 X3 G5 }4 i - CPY #$00# J# A2 q' z: r1 }
- BNE LB
3 t/ g) B* r3 O% g+ ~1 Z Z - JSR S_WRITE ;第一个精灵
: _2 z ? t" |" }4 V8 e6 e - LB:8 m _/ M" i2 X! R: D
- CPY #$019 }9 h2 a( J; a% d' b
- BNE RE
0 ^8 W* O7 A/ E) Z* E# n - JSR D_WRITE ;第二个精灵
0 J4 o( X* z) D - RE: E2 x7 U- d4 c x" M8 r2 {
- PLA
( V' I: B4 ?& C# l# t - TAY
?/ q. c% Z6 v8 v! ?& d: m - PLA
, k$ z& O( V; ^: a - PLP
% ?7 c/ ]$ b V6 q - RTS" `8 Y/ h4 r6 O/ \ H
-
9 x! u2 v! [# u% M5 Q/ F1 p - S_WRITE:
8 A. R" v( T$ r8 f& {8 a! q0 K9 x - PHA- x% A5 a. q* {- p# a
- TYA
; F6 K" ?" m" ?* z9 z - PHA
& j5 v8 m. N; ` | - S_CMP:
! c' R* g- k n - LDA $00; v: C: U' r( K% D8 [/ W
- TAY
4 m$ M0 e1 s0 I$ a/ L - LDA $AA,Y ;读取武器值
. z2 |+ I/ `. O2 n: c. ~2 P - AND #$10* J2 ]0 b) z: q# r+ b# h- h, O: u
- BNE S_WEAPON
+ s7 ~2 ^4 |- d6 U - M_WEAPON: ;普通状态
7 f+ y0 ^6 p. ]' Z - LDA #$269 y+ R% G4 Y% L1 b7 q0 e
- STA $0201,X
! g) A0 l3 U6 E' s4 l - BNE RETURN
0 L3 u! c" a; m - S_WEAPON: ;加速状态9 J& m# r0 L) A" L0 `* j
- LDA #$1C7 R- ?( X f& f- {
- STA $0201,X/ }. W, W3 B$ v9 ?& r3 |
-
: A: [4 ~$ t0 K8 b7 y% Q - * l& }# b( g1 |1 T
- RETURN:& x: q) \# A! O% G, M2 [7 J8 B& q/ V
- PLA+ Y( |* p7 x _1 n- h1 R$ R
- TAY" z/ B g& |+ ?% F! X( E
- PLA. Y# c4 u2 S$ J- t1 \7 V/ w) @! _
- RTS
+ H" l5 c3 b" F4 k# I" r' u - . C; K4 m0 N2 h& `! V0 x
$ U X% d! \* h& m5 G- D_WRITE:+ V8 T; A! i1 _1 R
- PHA
) _- h; r- [9 N8 |1 a - TYA
6 G- U; X3 R# l0 g9 m7 U - PHA' S4 |, B* }% |) c" d. H/ E+ v# G# [
- WEAA:; O! l; ?5 \8 P+ p
- LDY $008 S; f: T* C0 g; M8 B( D& ^
- LDA $AA,Y& k" z8 i+ y; V/ h- Q( a
- AND #$0F6 j- ?+ n& G7 L2 ?3 `7 K
- TAY" ]- H8 i$ E) {$ U4 I! |
- LDA DATA,Y
" Z6 R- s( M3 u t5 K" M7 |9 s$ V - STA $0201,X, B4 V3 k# a/ l; ?, u
- 6 X5 J3 r, x" E' V" b6 j4 I
- PLA
8 [ [& H4 H& R5 a' S - TAY
$ ~$ S9 S+ C. m+ J# | - PLA
, _1 O3 K1 B2 | - RTS
: }% }3 _6 m) I4 D; V/ @: p -
% i4 X- T8 [# r - DATA: ;武器种类图块$ J) S( W( T( C9 _9 Q% c9 n P
- .BYTE $24,$26,$20,$1C,$22
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|