EMU618社区

 找回密码
 立即注册
搜索
查看: 2633|回复: 3

[转载HACK教程] NEORAINE修改教程(作者:Tux)

 关闭 [复制链接]

签到天数: 1813 天

[LV.Master]伴坛终老

发表于 2009-3-10 19:51:07 | 显示全部楼层 |阅读模式
console basics& g3 }2 @' R9 d: F$ `  Y! F  X* H
2 S" j0 m( S. l  V8 u+ {
作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
7 T+ s/ |0 R- _7 K' o9 L- h/ `: @- Q- l

# x+ e( W8 N0 o/ e. Z& ^$ n& m4 k
  s2 K$ v8 g; QI know a command line is quite intimitading, but it will be much more powerfull for what I want, and also it will be much easier to add new features this way.! V3 Y4 s, @" L8 ?: ?. q
/ v+ R3 F/ W9 {2 H( n/ ?
So here in mslug, I wanted to look for the number of lifes, so I started by search 3 just at the begining of the game and there were more than 39000 results.
* E- q$ R1 Q, w# N) YSo I lost a life, typed "search 2" and I was down to 4 results already !
3 y  b" K' D, fLost another life, and this time "search 1" sent back only 1 result : 100397./ y/ M  O/ {' ]* ?9 Z

4 e- `; R/ o2 I" I/ W9 iThis is the very first beta for this, I want to add other functions like the ability to modify any address in ram (to test the result by puting any life number for example), to be able to explore the ram at any address to see if there are other interesting addresses nearby, and so on...
# @- t3 L8 d# M' t5 v4 {, q4 T* h5 S7 P1 w3 w
As you see the syntax for the command line is extremely simple, and should remain as simple as possible...7 l4 u$ s0 A. j
And this thing could probably be used as a debuger too (68000/z80 debuger).
4 r# t; V# h8 X1 u
1 O9 m2 l+ \6 q1 F[ 本帖最后由 疾风之狼 于 2009-3-31 20:36 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

签到天数: 1813 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:55:07 | 显示全部楼层
console lessons level 2
5 W3 x# U" _- F3 u
% G5 I+ u1 ^; `) F! u作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
+ X& h/ C+ c4 [( P, Y; T/ J8 p2 `  e: ]
how to find the location of the weapon for metal slug in ram ?
- H( n2 P' a4 c6 A2 m/ k" GWelcome to the relative searches we started to talk about in the other topic...
1 F7 ?4 A5 `3 E. v8 U- H" o) N5 x- O6 d: n" l- _: C8 U$ ?' ~) m
So just start the game as usual, and open the console just before picking the machine gun, and close it immediately. In doing so it takes a snapshot of the ram, and you'll be able to look for differences later. Now take the machine gun and type:+ K% G0 D, n, [- P! E/ N# e
search !=
4 f$ M8 `" w5 I! Owhich will search all the bytes which are different.; M; O6 Q* X5 o
Well there a few hundreds of differences, so it will take time.; ~& T- Y  C3 R0 G* M
The idea is to wait a little in game, then return to the console and type: B1 w8 `2 c! z3 e( D1 @. g. Q2 `
search ==" Y1 j1 C  x& L% O1 J  G; }
to look for the areas which didn't change. Half of the results are gone, but you still have a lot of them. Play a little until the flame thrower and just before picking it up, type :5 p6 d- r% x+ c
search ==
2 Z) t# v. T4 M" _2 Yand after picking it up :
0 H" w& r" c! s. P7 \  \# gsearch !=
. m/ x+ n6 f0 m( `. u! u% K4 K. }normally when you pick the machine gun again and you type search !=, you'll get only 2 results which are both valid :. ]  ~. \( h- @! n( }: i

! s# I; q* a  @( P; J, I* |: F% E/ }' o7 b
3 W6 {! ?  y8 J$ b8 B% H
After a few tests, the 2nd address is the one you want, puting 4 in it gives the machine gun and 2 is the flame thrower (I didn't test all the weapons !).. Q/ R( }/ U# j! i# B" H$ J
: f* z4 [6 q. F3 p# v" _2 ?  j
This is a lot harder than the simple life counter... !!!+ n. E) u3 `+ g6 @# Q
But it works well. Todo : mouse support in the console (too tiresome to type all these addresses), history for the console to access the previous commands, and the scripts I talked about in the other topic to be able to save what we find.
, o9 M8 Y4 |& h# m, o3 l- l1 v# g
Now with the old cheat system, you would have to add 1 cheat/weapon, which is not very convinient. Here you can add a single cheat using the alert function. First here are the weapons you can get :3 y5 t! q8 k* }; O+ {; L+ r
- 00 : Normal Gun( V# b  C; c$ F# Y7 E- B
- 01 : Shotgun; f- [1 |- M5 A- X1 a: Q1 z* [
- 02 : Flamer
0 u- C+ M/ S1 I2 s1 @ - 03 : Rocket Launcher
! D$ J" v  @  { - 04 : Machine Gun
, r5 K6 x- t" l# \the alert function works like this :
9 S( b( g5 p. n. L9 O8 Xalert("message|button1|button2...")! N4 l& O0 o7 o# \- Y6 `- J
and returns the number of the button you selected starting at 1, or 0 if you pressed ESC or used the 2nd button of your mouse.: q3 H6 o, q- b. M; o5 a- l
So you can type :
0 l  D$ h3 ~- z0 O1 k0 X% P0 I: ]/ s4 K9 P5 H0 `
Code:$ [% c. P( G4 o3 [$ W# d, {
  poke $1004d1 alert("select weapon (ESC for normal gun)|Shotgun|Flamer|Rocket l! j. }( X) x) E5 ?$ E' }, S: e
auncher|Machine gun")' o- P% ~9 [* ~
  dpoke $1004e2 999
9 w" q+ ~8 V/ r9 P
; x/ [0 e* Y. @1 b
, F3 |: y, U3 _7 D& b  TThe 2nd line gives 999 munitions at the same time, it's more convinient. Once you have tested, you can add it to your scripts using the script command, and it will appear in the cheats dialog (which you can now call directly using a key from the game).

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

签到天数: 1813 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:58:26 | 显示全部楼层
Console lessons level 3 : invulnerability and timers . s( A: o" O: n- O. y; h+ }! V
2 a/ _% a/ g0 ?2 I  ]& E3 Q7 M) t
作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php! l* @& C1 c/ e: I/ k3 V4 H

9 `, d7 V. e/ O/ F  fThis one is possible mainly because of the explanations from Stephh about how it works.
! M* ~8 b5 I+ b) p# ?3 t" [7 X% D1 Z, G$ f& G
You probably noticed by now that almost every arcade game makes your character to blink when it first appears, and while it blinks it is invulnerable... This is the secret of invulnerability : while it works, there is a counter in ram which goes down to 0, and once it reaches 0 you are vulnerable again, so the idea is to use a script which will be called for each frame to prevent the counter from reaching 0.
  l$ i3 H( Q1 D. }( p5 @: B
: S$ @  p8 M1 p! u+ CIt's a lilttle tricky in mslug because of the little animation when the player 1st appears in the level. For the 1st level, it starts to blink while it is still in the air, then stops blinking for a short time (it is vulnerable at this point), and then starts blinking again when reaching the floor. In fact the counter is set to a high value 3 times during this animation if I am not mistaken !% f; a: H1 E  Z9 U8 f, \6 f8 s
It's easier to loose a life and then start the search for the 2nd life because the counter is initialised only once then..." A" M8 J# P: t+ S; B
So : as soon as you see the player is starting to appear, go in pause mode (p key). Then call the console to take a first snapshot of the ram (using its key, default is tilde), and then exit immediately from the console. Press the space bar while still in pause mode, and the game will run exactly 1 frame. Do that until you see the player character has changed its color. It shows the invulnerability counter just changed. You can then type :" I. z, ^3 D6 k% l- q
search <
1 v: A0 m. B' f$ a) b. g, hIt will give you a lot of results of course, there are a lot of things which change at every frame in mslug. So you can repeat the same process a few times, calling the console every time the character changes on screen and type "search <", until the results shrink.
0 z% l' j3 ]* _- R) y  \/ EThen once it has stopped to blink, you can type :+ |7 b4 r# w4 |) t
search 0
+ x3 [6 A0 U& e6 h9 `- b% X) p3 ibecause then the counter should be at 0.! X/ Z% p6 Q- l1 g& K" L
! m& h# Z" n  U1 S# }) b/ O0 ~
In the end, you should have only 2 or 3 results if you made enough searches.
5 ?# ~7 d- a& |/ K/ w; ETo test this, just poke a big value inside. Since the value goes down by 1 for every frame, if you put 180 inside you will be invincible for 3s (60 frames/s). You should find quite quickly that $1004a5 works great for that." P3 C7 w7 s/ I6 p. h6 ~( f
Notice that you have a different invulnerability when you are in the tank. In this case, $1005e5 is the address you want.
7 A$ V: D* [% X  E# ^5 yOf course all these cheats will be installed in the next release... !
. f5 b0 z/ b! k" a: z1 G

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

签到天数: 1813 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 20:02:46 | 显示全部楼层
Cheat Searching
5 f1 u6 G# i) l7 e# eIn this window you can find new cheat data. To start a search, click new search, then choose a search mode. When you are ready to continue the search, click continue search. There are four search modes: 6 {( T  H  S# r9 o9 w' }  r
! T' t/ S4 _' C. a8 x: G2 s8 K3 g
Absolute search:
& r( k7 [: V# A+ ^; Y: V
4 s1 c# W- f( h1 t. K4 I5 K2 i- B2 s( s0 r/ a+ X/ e- T, Q( K
Searches for absolute byte values. 3 u% i" Z  q  W" R
Most useful for lives and other data.
! t' u5 D% b0 S7 XRelative search: - B& b6 {$ w5 @: D, b. r
$ p8 k5 Y6 T: r
) J. H3 \. \% D; y# k  @1 c( _* I
Searches for the difference between byte values.
- g: ?( v4 j2 r0 r4 P/ R% f$ C* `Useful when absolute search fails, like if the game stores lives starting with ascii 0x30 or stores lives +/- 1 from the value shown ingame. Remember that if the difference is positive you should enter something like 0x01 (+1), if it is negative, then you should be searching for 0xFF (-1).
) j, K  B4 D1 ?( E( J, U$ b5 k3 eSingle Bit search:
0 ?- Y+ o+ P% s% o1 i2 x" H$ `) p: y2 q$ N7 l. @! l" ^8 d

( L% `* _" t" d$ m+ r5 vSearches for single bit values.
8 O8 u% `( q, M  T: U/ o) HUseful for status flags, and stuff like 'extend' in bubble symphony, which is stored in 6 bits of one byte. 6 z+ H' H2 _) X/ `
Slow deep search: 2 ~, O4 x8 p6 P

% l' I8 ?  ?, I0 H7 W2 g) s* W2 K0 F; N# d
Searches for the following changes in byte values:
! ^0 _; H* ^- C$ _$ B: @+ jnew byte == old byte, new byte != old byte,
( Y; M) x$ [  G$ D. t9 snew byte >  old byte, new byte >= old byte,
5 n3 i( I; w; L* jnew byte <  old byte, new byte <= old byte
: X4 ]2 q8 R' F8 v& j1 tUseful for timers and anything not found with the other modes. A nice cheat to have is invulnerability, use this mode to find the invulnerability timer. , |) M, H1 t- ~+ X. y* U  e3 g. [5 Y
The search results are shown in a listbox, when there are more than 512 results, only the first 512 will be in the listbox. You can double click on the search results to open a scrollable hex/ascii view of the memory area where the result lies. Any bytes that are in the search results will have *..* around them, so you can easily spot them. ( B  g/ F, Q% _5 p

9 ^, Z: }0 o7 y4 y% H; d/ W, p4 wconsole简化指令
  k& L$ k' O5 W$ S! d) v, G* L% s
  - h = help/ o0 r6 t6 K+ z1 U8 m
  - x = exit$ `" N2 H9 z, L4 l
  - s = search (could also be good to have "si" to initialise search); m: E  s6 K" `
  - d = dump / ds = dasm
; ?1 r) s6 l8 u8 n0 \4 R0 X* x+ j  - r = registers+ Y7 s, K, ?9 P7 _( T
  - w = watchpoint
- Q; t) K, Z! U6 T" O  - p = poke (put value in memory once)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|国治模拟精品屋 ( 沪ICP备15012945号-1 )

GMT+8, 2024-12-29 09:08 , Processed in 1.072266 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表