EMU618社区

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

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

 关闭 [复制链接]

签到天数: 1769 天

[LV.Master]伴坛终老

发表于 2009-3-10 19:51:07 | 显示全部楼层 |阅读模式
console basics
& A# L+ r5 B9 p4 X) V* F$ o: |8 h' w$ A) F# ~2 `5 i2 M9 R
作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php+ \% Y+ ~+ _' `4 A

+ u2 {) d) L7 m+ ?0 c8 S. N% F& x1 m  C& d$ e& }2 J2 P6 p
2 n6 s, ^! S! [, b' l: W, c
I 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.- {4 A; E6 o# L4 S
2 R! x! j* q( X$ x
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.
$ c4 g8 V% D0 O/ I3 a/ hSo I lost a life, typed "search 2" and I was down to 4 results already !' S) B9 t! h* E# t% y$ R
Lost another life, and this time "search 1" sent back only 1 result : 100397.% S4 k. y4 v  Q0 n$ U: S
4 F- r( T4 W) ]3 ~$ k; z
This 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...; J, W9 Z% j1 c

/ R. b1 E3 m, VAs you see the syntax for the command line is extremely simple, and should remain as simple as possible.../ _( K8 j& A6 ?: o5 n+ X
And this thing could probably be used as a debuger too (68000/z80 debuger).% C6 a8 l- O! @0 s

- B9 U* Q  c; E3 Z[ 本帖最后由 疾风之狼 于 2009-3-31 20:36 编辑 ]

本帖子中包含更多资源

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

x

签到天数: 1769 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:55:07 | 显示全部楼层
console lessons level 2 . ^# I% A3 K1 x% f

; z* T) l7 V6 n% S! b; V作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
6 I( s9 e8 {3 D( L  c! M+ D
" u  ^8 F8 [' z7 Zhow to find the location of the weapon for metal slug in ram ?
4 a' x! n' v7 H+ o* @Welcome to the relative searches we started to talk about in the other topic..." I- [/ Z" }) v0 n+ [9 x( z) I
8 g& Z; \7 A: O8 ^
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:
5 k$ @5 k0 Y' i1 ksearch !=7 A9 s- S3 r8 C9 G! k
which will search all the bytes which are different.- a0 ?  H! m1 p1 W
Well there a few hundreds of differences, so it will take time.
8 c, w# h) o7 lThe idea is to wait a little in game, then return to the console and type4 d9 c" U! J2 s7 ~$ u8 S0 W2 W
search ==
% U* a3 ^% n8 vto 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 :
, H4 c, g8 M9 w) Fsearch ==
" [) a/ u5 l7 q2 ~and after picking it up :
7 e7 q7 {: Z; Rsearch !=+ V" U& L& p. ?
normally when you pick the machine gun again and you type search !=, you'll get only 2 results which are both valid :+ j! O2 Y7 L3 a1 R- w
5 Z: D3 k$ q1 h$ I- L

* C% q$ [! Z' J2 E
3 f" C. {  _6 J7 c* i9 [6 bAfter 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 !).
5 _8 `5 ?8 }; B+ Y9 e
  G  |  @& Y9 V/ |. y$ [! r3 X9 m- XThis is a lot harder than the simple life counter... !!!
, u- s. _; i2 n6 g3 F  pBut 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.
% ^6 ^# v5 W& x6 U
1 J9 l' W& R0 C" f6 k, H% bNow 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 :( b% B3 [/ `  S* F1 ?4 d# B" s7 |
- 00 : Normal Gun
. C; q" M4 t; B' w- l - 01 : Shotgun
: I- i7 ~9 V% L1 l3 O. { - 02 : Flamer
$ N5 J1 Y: d- Q# l - 03 : Rocket Launcher( `4 {( j4 P2 w+ E1 [4 |9 v* F0 ]
- 04 : Machine Gun3 x5 F( [$ n2 @5 T. o
the alert function works like this :
, q4 D1 F( _0 Q' N0 falert("message|button1|button2...")0 |# M6 A( N% }+ p, O; r6 S+ {
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.
! z: T! k& T- j" iSo you can type :
, L. ~( J- H' X: I
7 r9 ^! Q: f. ^1 ?% @3 ], ]Code:
3 S4 K7 N& K8 k4 D: t2 V% o; L2 B  poke $1004d1 alert("select weapon (ESC for normal gun)|Shotgun|Flamer|Rocket l& d/ @# N; _! q* g
auncher|Machine gun")
% m4 o2 m- Y2 X2 u" C  dpoke $1004e2 999
" ^& g6 H1 @7 Q% a& r5 I
- D) `6 z$ z, O  H6 q0 D/ l* F7 F( ^; P$ m& z# \- U: w
The 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

签到天数: 1769 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:58:26 | 显示全部楼层
Console lessons level 3 : invulnerability and timers " E- q" G4 y& \3 h$ F  P
) `0 n0 d2 d2 @2 i/ M) q* Q
作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
& Y, s. X' r5 h' b
  p( U& N; [5 Y9 n4 iThis one is possible mainly because of the explanations from Stephh about how it works.
0 l1 E! n; j4 O! Z+ [) Y' d: A% ]7 u6 W" X0 T. P
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.
! z9 H. b  Y5 [. H3 J& _! ~9 D6 j/ \- s% V# R6 V
It'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 !/ J; Y5 N% W, z3 y* f% \
It's easier to loose a life and then start the search for the 2nd life because the counter is initialised only once then...
. O* w1 C1 ~- j* E; D0 ^5 O& eSo : 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% ]' u- _8 s; f6 N& n- m3 F# asearch <) f! Z! @) v* E5 J7 A% B1 t
It 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.7 N; a5 @% g" N5 C3 ~- i) t+ g
Then once it has stopped to blink, you can type :
9 C$ ^5 H5 U6 jsearch 04 S9 C3 u6 W/ ^; e3 U9 `& d  S
because then the counter should be at 0.
5 y0 K( J1 Q  W0 G8 v  C, V8 |& J
In the end, you should have only 2 or 3 results if you made enough searches.
5 T0 y3 r$ }. l& p7 W4 K! ]7 GTo 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.
# M* |7 D+ [2 ^8 b2 ^* LNotice that you have a different invulnerability when you are in the tank. In this case, $1005e5 is the address you want.
+ P/ e/ u% k. S( f: n8 w3 {1 U4 [- _Of course all these cheats will be installed in the next release... !. ]$ G* ?/ `* w2 f2 e4 l5 Y

本帖子中包含更多资源

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

x

签到天数: 1769 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 20:02:46 | 显示全部楼层
Cheat Searching
8 r$ J/ n, r# |1 z' uIn 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:
# d' W9 \5 Y' P9 a. ~" k1 J
5 t0 g- Z2 l# O$ t$ wAbsolute search:
/ t# V* V% X" D$ a; S3 b8 k
" o- N5 R3 g9 ]2 K+ D3 m
2 ~+ ?5 j4 n- G3 e. J5 ^Searches for absolute byte values. & E# ~& u& m* C" U
Most useful for lives and other data.
1 M& d0 d2 N4 W" r1 V5 k3 T3 ~+ E) cRelative search:   J7 ]4 Q/ l& _, o) N; S* l

; E6 v. ^  M, D! |- m' s
9 }) S1 |) U; lSearches for the difference between byte values. 2 G; q+ b9 }9 M4 x2 ?% l+ e
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).
9 n1 D! N% R8 SSingle Bit search:
* L0 Z0 @% Q4 O; O
" s$ ]: o6 A( \' K. Y) S2 ]3 i; i5 `2 G7 T  ~1 Q' t
Searches for single bit values. % r6 E0 L' P7 d. U8 R
Useful for status flags, and stuff like 'extend' in bubble symphony, which is stored in 6 bits of one byte.
( d6 x7 ?! W; w/ U9 \Slow deep search: ' e+ R7 i; {' n4 a" R

( K/ d6 T: l, J6 d) [3 o" X  ]
- t2 p2 R+ |0 o$ G  ^0 eSearches for the following changes in byte values: * D" [1 [) A. t2 n/ @, F* k* c5 D* v' @
new byte == old byte, new byte != old byte,
7 `$ o5 k1 Z* y% D+ G- r: unew byte >  old byte, new byte >= old byte,
( h0 f4 E) S& h0 c, Pnew byte <  old byte, new byte <= old byte
* g) x; \9 Q& EUseful 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. 0 x/ H1 ]& G) Y9 i4 O4 l9 J2 `1 a) Y; u% w
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.
# I% g" l% K" h( \' M$ `& k7 D. x0 G' q: Y
console简化指令
, u0 j2 l7 q/ m( N+ ~; x, ]
  D" S5 U$ I; h$ S& m* x% ]  - h = help
# w1 Z% ^6 [- t" e1 ^- z6 p  - x = exit
7 K" O* ?% ^5 K2 ~8 ?+ p: |  - s = search (could also be good to have "si" to initialise search)4 u2 a  o& H* {- I. H- r5 X* b# \
  - d = dump / ds = dasm; {+ l9 t; y6 D; k
  - r = registers0 w) x! _: ~1 ~8 h$ x! f
  - w = watchpoint4 C& M; I0 x" t" H
  - p = poke (put value in memory once)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-15 09:18 , Processed in 1.070313 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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