|
本帖最后由 yandagui 于 2015-10-28 19:02 编辑 " {% P: C+ p, d# ~$ t9 O
5 c! B+ ^6 G1 w) c. e) r- t
FC自动演示修改教程
" A8 z! k' S9 _% f! G4 b" t% d$ V' F作者:火焰烈旋风
/ M+ j% q6 F0 ?" I8 s" G4 G' g9 Y工具:FCEUX中文版(www.9553.cn搜FCEU即可)/ x6 J0 n$ ]# Z( {
1.找按键地址:# }, A2 Q2 M# V8 @. B V2 q: U
首先,我们打开FCEUX,再打开魂斗罗美版,进入游戏无动作,打开FCEUX的工具>作弊,若左下角的"活跃时暂停"没打勾请点击打勾,游戏暂停了,点击中上部的"重设",在已知值输入后输入框中00,点击按钮"已知值",此时搜到大量数据为00的地址.单击FCEU窗口,游戏正常运行,按住一个按键不放如上键,点击作弊窗口的">",游戏暂停了,此时剩下几个地址,再单击FCEU窗口,按住两个按键如上+选择键不放,点击作弊窗口的">",游戏暂停了,只剩下几个地址了,再单击FCEU窗口,不要按任何按键键,点击作弊窗口的"已知值:00"最后剩下两个地址F1,F2,点中其中一个,再点左下角的"添加",发现按什么按键人物都不能动,说明这两个地址就是按键地址,双击左上部的锁定地址,前面的"*"号消失就解除了锁定,并且通过调试知道上=08,下=04,左01,右=02,A=80,B=40,选择=20,开始=10.9 @) Q- M# m3 M
2.找演示时按键的数据来源:0 n0 X% g" T3 g( a7 n
既然知道了按键的地址,那么就要看演示时是什么改变了这些值.点击FCEUX的>游戏>重设,等进入自动演示时,我们打开打开FCEUX的调试>调试器,在右上部分点击"断点"下的"添加",此时弹出"添加断点"窗口,我们在"地址"第一个输入框输入F1(我们找到的按键),将输入框下面的"写"打上勾,CPU也打勾,点"确定".此时调试窗口出现如下指令:
# i: Z0 m8 {8 K e6 y7 W7 Y07:C38F:94 F1 STY $F1,X @ $00F1 = #$01$ B$ F* w i m M
07:C391:94 F9 STY $F9,X @ $00F9 = #$00) t, \! h2 c, h! B
07:C393:CA DEX3 R9 b. ^ A' |0 X0 ?: L
07:C394:10 F0 BPL $C386) F5 r y+ _: S9 J( `
07:C396:60 RTS" N( o U2 ~/ V4 F9 \
我们点击"运行"左边的上拉按钮上拉,看到如下指令:
, O$ y, ?$ d9 d3 q& ~( t/ X H07:C378:A5 1D LDA $001D = #$07
& d" S& S+ v7 n1 \5 V0 T. u$ c07:C37A:29 04 AND #$04
4 S3 ]$ ^; u9 h4 h# m, I07:C37C:D0 06 BNE $C3841 q( L" n. D9 v! C- T% |
07:C37E:A5 04 LDA $0004 = #$00
; f e% m6 J) @) y- f07:C380:05 05 ORA $0005 = #$00
5 }+ v" }9 o3 t07:C382:85 04 STA $0004 = #$00: s4 p7 T' [6 q& l7 @
07:C384:A2 01 LDX #$012 o: l/ q( I1 o6 P3 _% m6 C$ A
07:C386:B5 04 LDA $04,X @ $0004 = #$00
# S; Q3 @$ M# e, p: N07:C388:A8 TAY
\+ O& O# G0 I1 J. q9 X07:C389:55 F9 EOR $F9,X @ $00F9 = #$00
9 }% s& w% s, k# C, }0 a7 b07:C38B:35 04 AND $04,X @ $0004 = #$00
- f5 p; Q; \; g7 o, X( S07:C38D:95 F5 STA $F5,X @ $00F5 = #$00
! e' E' [* A+ }07:C38F:94 F1 STY $F1,X @ $00F1 = #$01% F( n8 x* b) T0 x$ {0 l( f% q
07:C391:94 F9 STY $F9,X @ $00F9 = #$006 L) j7 t! Y! J& K) w& `4 M
07:C393:CA DEX
- A3 Q' \# y: v* C" T- m/ h8 P7 I07:C394:10 F0 BPL $C386$ J7 P; U' e5 N% _
07:C396:60 RTS
9 y. e% u9 T0 }' J! x H由于演示的数据存放在某处,然而这里并没有读取某处的值送F1的指令,所以很可能不是我们要找的指令,点击"断点"窗口旁边的"运行",窗口中出现如下数据:
( F" a9 H- ]9 N6 I$ ]" F" o* ^05:B3A3:95 F1 STA $F1,X @ $00F1 = #$008 a9 o$ A) O% }
05:B3A5:A5 2E LDA $002E = #$C8
; J9 s' w" G6 O4 x% C0 ` Q05:B3A7:C9 50 CMP #$50
/ m8 c0 ?# }8 `05:B3A9:90 20 BCC $B3CB
7 a2 l3 L q( y05:B3AB:B5 AA LDA $AA,X @ $00AA = #$00. p# g/ \* r( O
05:B3AD:29 0F AND #$0F0 v3 z: [+ `- G! Z9 {" f7 z
05:B3AF:C9 01 CMP #$01( i9 l7 A; U2 [! W/ W6 V Y" t& r
05:B3B1:F0 04 BEQ $B3B7
$ @6 J! b6 O3 ^# d" d; a3 ~; _* H- G05:B3B3:C9 04 CMP #$04
, [/ ?: O& V0 C( k- T.........$ F' o, o9 i/ O7 C& m1 J; C& s
我们点击"运行"左边的上拉按钮上拉,看到如下指令:
8 P/ `1 K5 `3 j3 Y05:B39F:B5 5C LDA $5C,X @ $005C = #$01! R9 C" Q3 B$ J4 a- m% W8 V2 d
05:B3A1:95 F5 STA $F5,X @ $00F5 = #$01
; U- n$ ~- f* g) _05:B3A3:95 F1 STA $F1,X @ $00F1 = #$00
& _: E' b# ~2 }/ S05:B3A5:A5 2E LDA $002E = #$C85 h, b$ E" Y0 P4 t4 i; ~+ m- T) A6 g
05:B3A7:C9 50 CMP #$504 `/ O, @2 F y5 Q0 [
05:B3A9:90 20 BCC $B3CB1 K7 ^ R- o" b6 z
05:B3AB:B5 AA LDA $AA,X @ $00AA = #$00; r: G9 e& X5 v% H: A9 y
05:B3AD:29 0F AND #$0F
- S1 `/ e9 X3 e/ A5 N9 n" Q% a, l看到' e/ e6 R; t' M/ ~- X8 [# Q
05:B39F:B5 5C LDA $5C,X @ $005C = #$01# `2 L8 s! y8 _5 A7 ]
05:B3A1:95 F5 STA $F5,X @ $00F5 = #$01
* @" f1 Z6 I/ W05:B3A3:95 F1 STA $F1,X @ $00F1 = #$00
& n5 X" I0 C3 H* }7 \6 Q; @( r6 ]没有?这个说明F1的数据是从地址5C送出得到的,说明我们要找到存储演示按键数据必须从地址5C入手.! U; G- U) ?4 n) ^
接下来调试器,双击取消F1断点,点击"断点"下的"添加",此时弹出"添加断点"窗口,我们在"地址"第一个输入框输入5C,同样"写"打上勾,点"确定",一会出现如下指令:
; m+ F. g$ u; e5 d% k, v# B* ]05:B392:95 5C STA $5C,X @ $005C = #$01
! r$ o% g! v4 u: \& ]6 [( z4 M& q05:B394:C8 INY0 a0 s2 I% T; w
05:B395:B1 08 LDA ($08),Y @ $B3F2 = #$09
, t, D8 [1 c( u4 D& j- L" t05:B397:95 5A STA $5A,X @ $005A = #$00. x" c! r1 n8 N0 m' X2 R+ b
05:B399:C8 INY
8 U$ g s, L: Y ?05:B39A:98 TYA4 _3 A' b" R- ~6 n0 g: _( \1 o% g
然后我们再上拉,得到如下指令:
1 b1 s1 B' a1 t, S$ ?05:B38C:B1 08 LDA ($08),Y @ $B3F2 = #$099 S$ i8 B! o* Z3 O' P
05:B38E:C9 FF CMP #$FF
' P S8 q A3 j' }! R% ]# `05:B390:F0 3D BEQ $B3CF8 w/ R5 s) K) p, K$ N# x h
05:B392:95 5C STA $5C,X @ $005C = #$01
& u/ Q4 P, ?0 ?8 V2 o05:B394:C8 INY
( v. ~, @% E' D; a6 U' ~9 ^05:B395:B1 08 LDA ($08),Y @ $B3F2 = #$09
: J# s5 }, x5 k2 U$ _' A: ?% @05:B397:95 5A STA $5A,X @ $005A = #$00, t$ ?" ^2 H5 F. b8 K3 [( u
05:B399:C8 INY. m4 G) A! t1 U% Y, `0 {1 O
05:B39A:98 TYA4 }3 L/ V. p% i5 h* J6 f) u+ I
看到05:B38C:B1 08 LDA ($08),Y @ $B3F2 = #$09
& J4 n! h7 [1 e' {6 G没有?说明现在5C的值来源于变址得到的$B3F2,哈哈,演示按键的数据找到了,在游戏CPU的$B3F2附近.. U. s! T9 ]+ V5 Z3 Z0 R- ~
3.修改演示:
; ~0 z2 f* G+ p* E0 {' S- Y5 r 打开FCEUX的调试>十六进制编辑器,按Ctrl+A或点击十六进制编辑器>转到地址,输入B3F2,此时黑色光标标记的地方就是CPU的$B3F2,右击黑色光标>转至ROM文件中对应位置,此时已转至ROM文件中对应位置了.0 B) w! W! ?9 G# s$ H* Q& o# K6 B/ ^
我们要修改,必须从开始演示的第一个演示按键开始,接下来去找到它:
' Z7 i' ^# ?+ {* i打开FCEUX的游戏>重设,此时游戏暂停无状态,点击调试器的"运行",出现黑屏,再点击两次"运行"游戏运行了,过一会又暂停,再点击两次"运行"游戏运行了,出现背景画面时暂停了,调试器窗口中出现了如下数据:
2 v' V; k" G- I! U1 f( I05:B392:95 5C STA $5C,X @ $005C = #$00
7 Z. T2 G1 \' v! F3 X# c05:B394:C8 INY
8 p: W h. h) K3 {' h05:B395:B1 08 LDA ($08),Y @ $B3DE = #$006 C! b9 m) p6 z; s+ ]1 N0 N
05:B397:95 5A STA $5A,X @ $005A = #$00
) O/ ^8 K7 q9 ?- b# P# j05:B399:C8 INY
# ], z0 `, t9 T1 `$ }1 H6 f05:B39A:98 TYA$ c/ c" U, J4 I; v
我们上拉看到了:
1 N4 j5 v4 A" S; c, _* L; j7 f05:B38C:B1 08 LDA ($08),Y @ $B3DE = #$00; ?6 U, P; @% j0 Y$ t2 o- \. D" h2 J, C
05:B38E:C9 FF CMP #$FF, _4 D* u. A4 [
05:B390:F0 3D BEQ $B3CF
/ y6 c: ~) v+ x6 c05:B392:95 5C STA $5C,X @ $005C = #$00
5 i( @' }% ~0 s! Y05:B394:C8 INY
" i/ F! u8 X `6 P05:B395:B1 08 LDA ($08),Y @ $B3DE = #$00
1 I6 U1 s5 n" ^5 w5 B05:B397:95 5A STA $5A,X @ $005A = #$00
6 }/ H |$ ^, c0 _$ m05:B399:C8 INY
6 ~) {' ^: x' Z% D1 k& S05:B39A:98 TYA
4 I9 R- s) Q) L3 h0 P5 p看到
# d, R/ y1 n1 j1 J: Z7 s0 T/ C05:B38C:B1 08 LDA ($08),Y @ $B3DE = #$00
3 x! ~' v: g' Z8 U1 n没有?它应该是第一个演示按键,接下来进入十六进制编辑器,点击查看>NES内存,此时切换到NES的CPU内存,按Ctrl+A或点击十六进制编辑器>转到地址,输入B3DE,此时黑色光标标记的地方就是CPU的$B3DE,右击黑色光标>转至ROM文件中对应位置,此时已转至ROM文件中对应位置了,这里就是演示按键的开始地址.
- f+ |& K# [4 F% K4 ]说明:演示按键地址的结构,以开始的00 21 01 03 00 0E 01 3D 04 06 05 33 00 0E 04 0A 05 01为例:第1个00是按键数值(无行动),第2个21是指按键数值21前的按键保持21(时间),第3个01是按键数值(向右走),第4个03是指按键数值03前的按键保持03(时间).......以此类推,判断根据:
$ K. ?; [7 f0 c0 d' d: u2 {05:B371:B5 5A LDA $5A,X @ $005A = #$7F
% l/ R) W6 M3 S( A+ i f3 d05:B373:D0 28 BNE $B39D(如果5A=00,那么就会跳过28字节执行2A递减的指令)
6 K- [) m% ~/ G4 q7 o% ]3 Y4 A: y05:B375:A5 30 LDA $0030 = #$00
& |" ^; f1 p: K" _# i05:B377:0A ASL' C* Z2 \" l! ]& D8 ^ Z# T
05:B378:0A ASL. v3 c0 S% W* s e
05:B379:85 08 STA $0008 = #$29
7 K" t" Z7 Z: L) A* j05:B37B:8A TXA" `; e: F& N' z( R* G" ~: }* ]/ U. ~
05:B37C:0A ASL h+ H4 x5 n9 }0 T% H" s ^- ?5 E
05:B37D:65 08 ADC $0008 = #$29
5 x3 w2 c/ d& h2 e' P e4 H05:B37F:A8 TAY r) B4 l3 z/ n- Q$ M+ U
05:B380:B9 D2 B3 LDA $B3D2,Y @ $B3D7 = #$B4( b1 I3 i! h' E6 ^
05:B383:85 08 STA $0008 = #$29/ q+ o G {) J; o
05:B385:B9 D3 B3 LDA $B3D3,Y @ $B3D8 = #$FC
: q" R% K" n3 a0 \, G, B0 E' E1 J05:B388:85 09 STA $0009 = #$B2
: i. x' ?3 ]& ]$ ^8 v/ P05:B38A:B4 5E LDY $5E,X @ $005E = #$02! p, x$ Y1 B& T' p+ {" r
05:B38C:B1 08 LDA ($08),Y @ $B22E = #$105 _1 d8 o" k& H2 W9 D0 [
05:B38E:C9 FF CMP #$FF
1 S, t4 {+ _, y$ k' h7 T05:B390:F0 3D BEQ $B3CF
! b* o$ o+ k: Y4 v05:B392:95 5C STA $5C,X @ $005C = #$00
' o x! L7 l( |/ e( t" D05:B394:C8 INY
% w& q& K$ {# f& J* f1 X R+ S1 Q05:B395:B1 08 LDA ($08),Y @ $B22E = #$10" M' `5 ] R0 H3 V; l3 s
05:B397:95 5A STA $5A,X @ $005A = #$7F
$ z6 o e7 h+ ]05:B399:C8 INY
3 C9 \$ z2 v3 [05:B39A:98 TYA
, U% R+ ^+ R, o( W _3 _1 ^05:B39B:95 5E STA $5E,X @ $005E = #$021 X" c; G# v* H7 d' _; M
05:B39D:D6 5A DEC $5A,X @ $005A = #$7F(5A递减)6 u# j% f* j2 a2 y" y) g3 d- s% I
05:B39F:B5 5C LDA $5C,X @ $005C = #$00" e5 T8 j& ~9 O5 o3 t. H
05:B3A1:95 F5 STA $F5,X @ $00F5 = #$00( y& \8 e: H$ ?0 m3 L
05:B3A3:95 F1 STA $F1,X @ $00F1 = #$00
; ^0 s2 x2 T: D2 k0 u0 r8 E
Y# _5 R4 \6 w2 L2 Q由于技术原因,本人以前只能改到打完三关,因为间址LDA ($08),Y得到的地址发生改变,那时本人无能力了.现在全部完成,用到其他方法们再次难以叙述了, Y& a* m5 A1 y; Y/ s) s; r( o d
可以下载玩一玩
7 u' _3 Q( \2 [* F; K- k( e' j- Xhttp://pan.baidu.com/s/1bnE0AwZ |
|