EMU618社区

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

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

 关闭 [复制链接]

签到天数: 1772 天

[LV.Master]伴坛终老

发表于 2009-3-10 19:51:07 | 显示全部楼层 |阅读模式
console basics6 ?- e9 k& L, S' O4 D  v

# C) S* a" V' B* K* ~* ^5 M作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php- J2 b9 \# }* Q

% f9 E8 K! ?3 x7 N/ S, \3 {4 u+ `5 x1 T. `( B$ T' a

4 H9 K) T7 C+ t2 o/ [4 KI 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.
3 F- X) Y' [+ A
2 U/ `9 ?  S! P' i: h$ ^4 _* SSo 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.& y* M" X2 G5 E) A
So I lost a life, typed "search 2" and I was down to 4 results already !  Z  w7 c3 }$ Z
Lost another life, and this time "search 1" sent back only 1 result : 100397.
2 C7 S% J' i& D* f: \- P/ i. q/ y7 ]  Q7 |6 W3 }% G- Y
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...4 G* `% B! H7 c$ k
/ ?9 ?' V9 ]/ M* B4 i* a7 K
As you see the syntax for the command line is extremely simple, and should remain as simple as possible...  C9 N6 x, @' W% ]6 A
And this thing could probably be used as a debuger too (68000/z80 debuger).5 m/ c' z  i5 S3 u1 {% {4 Q
6 ?0 j& y# P. w2 Q1 [
[ 本帖最后由 疾风之狼 于 2009-3-31 20:36 编辑 ]

本帖子中包含更多资源

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

x

签到天数: 1772 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:55:07 | 显示全部楼层
console lessons level 2
/ E+ L& I% u1 |
2 D7 d8 i7 B- R: K: q作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
/ }: b7 b! Q8 q3 M8 b
9 D7 V& p  q5 w) G9 Ohow to find the location of the weapon for metal slug in ram ?- B  e3 |* |& j9 o/ N5 U9 U9 h
Welcome to the relative searches we started to talk about in the other topic...2 H( Y) Z$ A. f$ u0 b+ d: I

4 I$ [& p4 E. A8 Q1 ISo 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:
) G/ [/ H) Z. b$ i1 W9 e3 Jsearch !=
, o, e" D$ W1 l7 Pwhich will search all the bytes which are different.2 h* z- M) G- G. s
Well there a few hundreds of differences, so it will take time.
8 t! w, P& }! C; _8 \The idea is to wait a little in game, then return to the console and type
: C/ X0 Q: D' ^; a. z# `7 wsearch ==6 h9 O( ~3 |3 ^' @
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 :
4 ~; t, f) A# M) Esearch ==
$ _& x8 r' f" }6 dand after picking it up :9 l) h$ c7 y' b  t4 U( a- F3 b% W
search !=
# Z; {0 V% B! W; G+ G$ K- {normally when you pick the machine gun again and you type search !=, you'll get only 2 results which are both valid :- t. [. h3 a4 s9 L7 \
& ~3 m8 P* f: q# F% M
5 {6 v+ S1 h4 @+ X8 r) G5 K

5 g3 m/ [6 J$ E) hAfter 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 !).+ A; k8 A: `4 A+ i$ ~
" E: v7 u: d" D2 W
This is a lot harder than the simple life counter... !!!
9 Q0 y& Z- ?& ~% R/ y7 NBut 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.
; g/ \9 |! z4 G( A* ^2 ?+ |$ h+ b. ?9 R6 F" q+ d0 x
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 :/ M, j. h  ~0 P$ P
- 00 : Normal Gun
' C( b5 v  O+ l7 f - 01 : Shotgun
  z" k; c4 U! G/ Q1 c - 02 : Flamer
; j' H/ h. a9 o' K! t; _ - 03 : Rocket Launcher
3 [) e. w  k- o& T, F; E - 04 : Machine Gun
1 K0 @3 m0 h, {7 e$ \# u! K( athe alert function works like this :6 S$ g! G5 T4 e$ |. c+ C5 E2 I
alert("message|button1|button2...")
8 q: E% N/ Z, S  p% K4 x: w" Aand 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.9 w7 g; E- H3 N' o1 j2 D
So you can type :4 b8 E; h8 ?' x! D# O
: k$ B: M; H' g7 l
Code:3 z1 ~7 y9 b, v' m& B
  poke $1004d1 alert("select weapon (ESC for normal gun)|Shotgun|Flamer|Rocket l
! m% U: d  a4 t# g8 A2 ]auncher|Machine gun")
3 M: F2 g% b) z' f1 e  dpoke $1004e2 999
. A& F* z1 O. S
* ]* t) a1 z8 [" x' Y1 A! m9 g! u9 ]) l* n7 v
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

签到天数: 1772 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:58:26 | 显示全部楼层
Console lessons level 3 : invulnerability and timers ! i' H4 n3 h/ l6 T) _% \7 j

, j7 J) Z& O' d* ?' g, d作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
6 K1 b  C7 r2 m# Z  F9 R  L3 A( V4 B/ R" d
This one is possible mainly because of the explanations from Stephh about how it works.
  f& M* i/ c* w2 U, A5 ^+ Y* l7 N) `$ V
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.* O/ y" |$ |7 C. @% U5 [) O
! Y- J+ l. O3 s
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 !* r: {" g& s$ Z( ], s9 x) W3 j' c
It's easier to loose a life and then start the search for the 2nd life because the counter is initialised only once then...
+ W. S4 t7 T/ k1 l( sSo : 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 :
: P3 y6 `  O& W. i, Qsearch <) X8 C) K- h, }2 G& [: [' e
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.6 {- r! W' U. r, n
Then once it has stopped to blink, you can type :* P% L. n& [. E# D/ Y( E
search 09 \2 u! K7 u1 f7 O! V* o0 ?
because then the counter should be at 0.' r9 c- I+ r+ ]2 g: L
8 E8 P2 V7 E/ o0 q
In the end, you should have only 2 or 3 results if you made enough searches.
( y6 h: z: m( @) cTo 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.
5 l: N. z2 g% w. ^: h) ~Notice that you have a different invulnerability when you are in the tank. In this case, $1005e5 is the address you want.3 k- {8 X8 Y6 X! K
Of course all these cheats will be installed in the next release... !' H1 Q. Z5 T$ i) D/ y

本帖子中包含更多资源

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

x

签到天数: 1772 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 20:02:46 | 显示全部楼层
Cheat Searching
; O. ?: `% W6 o( w8 ^( S0 ]In 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: 9 H, C" }( W3 w

1 F/ t  q! K& f$ x' SAbsolute search:
# j' D# e5 t2 V2 z+ O) w" P" b1 C* z% q7 r- p  h/ B

5 |- i2 O% p9 @. [Searches for absolute byte values. 7 U6 L, x8 s2 L" N* w
Most useful for lives and other data. * W$ B1 Q# E# U. o2 X" i
Relative search:
! ]# x# [7 G$ b  P7 M" ]
$ L8 A% U* v& z' C/ w; E) c
! x* @3 M1 g2 H4 sSearches for the difference between byte values. : z% s% `, F* g* J: |8 ?4 \
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).
, q, e5 k7 j* P0 _4 |, T0 KSingle Bit search:
1 w  O! K4 f; b
6 T$ \! U7 i+ l9 v
; T" Y* q7 V- jSearches for single bit values.
, c6 ~$ p+ Z- T- O/ z+ a- g  v* yUseful for status flags, and stuff like 'extend' in bubble symphony, which is stored in 6 bits of one byte.
1 ^( d8 P( X) ]7 S. k% E1 kSlow deep search: - {& W2 K/ ^; H' G* \

. q! Y# G) W: x* d3 V1 C
6 @0 b6 R. v4 }Searches for the following changes in byte values:
* }. A1 _$ e" S' enew byte == old byte, new byte != old byte,
- [+ S/ ]$ {$ k8 t1 a: Fnew byte >  old byte, new byte >= old byte,
1 K. [( R" `) L- ~& A% |) Z- mnew byte <  old byte, new byte <= old byte
& u* P  H7 a, M- B, l  ]Useful 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.
% s0 H9 d) r) D" z8 eThe 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. & y# b" d/ P4 A* h+ O

% p7 F4 L9 ]& o/ Iconsole简化指令
$ K$ ~! v- H8 B) h: `! h. z: a1 a
+ Z, }* x4 V' W  - h = help
! r( U0 \( O: N1 f4 ^0 p  - x = exit
2 }: {' Q6 P& h3 M" v4 x5 D: P2 T  }  - s = search (could also be good to have "si" to initialise search)6 D  c+ L" G/ h# H& o; W
  - d = dump / ds = dasm, Q9 N. f" @) x: h
  - r = registers
6 C: d) p7 `5 y7 Q/ z! F' c. M  - w = watchpoint  K: m  k* H; {4 G1 I$ w0 y
  - p = poke (put value in memory once)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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