EMU618社区

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

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

 关闭 [复制链接]

签到天数: 1803 天

[LV.Master]伴坛终老

发表于 2009-3-10 19:51:07 | 显示全部楼层 |阅读模式
console basics6 H  D  f  i  J2 p/ w6 R4 v

9 A) \. G: l, z3 r' Y作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
' n. l" b9 c  ]0 D! i
9 @$ Q3 p$ f4 D3 u0 F' _/ l& [4 k1 h( l$ k

* [/ a/ Z  j. s, Z1 ]0 }3 cI 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.8 ^& G: W/ N- j( v& T- ^" t. f( T
: P0 D1 x. @5 ]
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.4 y) |6 b- m, o: Y- m
So I lost a life, typed "search 2" and I was down to 4 results already !
1 u% I7 s  v5 L3 kLost another life, and this time "search 1" sent back only 1 result : 100397.
' ], F- {9 N* v1 y9 `: W( o4 U
- f* H  v; v$ q* {! _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...3 b  C+ t; j/ O0 T

3 e* b/ ^  X: }. N$ N. d: s, X- JAs you see the syntax for the command line is extremely simple, and should remain as simple as possible...4 B& s- W% F, V! E9 J9 E' g
And this thing could probably be used as a debuger too (68000/z80 debuger).
" ]4 P7 R% B" [
  I+ _6 v( F. P0 C6 v# I2 Z1 E[ 本帖最后由 疾风之狼 于 2009-3-31 20:36 编辑 ]

本帖子中包含更多资源

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

x

签到天数: 1803 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:55:07 | 显示全部楼层
console lessons level 2
" N+ M, t0 b" w% E8 f/ `4 u4 f8 o; ^
" q' M5 Q  \% w3 a作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php. w$ H/ s3 u  G; a
! `, J5 t* A. O9 q$ ~
how to find the location of the weapon for metal slug in ram ?9 }9 K3 y/ j+ U  K, W! m4 E, n$ u
Welcome to the relative searches we started to talk about in the other topic...
, Z" N3 ?" W$ c
  _+ u5 s3 }& ^/ P8 c5 E( P4 DSo 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:
, B1 @+ q; A, l0 osearch !=
& }- V5 @2 r0 n9 [9 q: E  Wwhich will search all the bytes which are different.
" m1 Y" W9 @, h) Q+ [. ]8 P& t8 aWell there a few hundreds of differences, so it will take time.
) G" k" D4 z% Z! T& l' P: U9 f* vThe idea is to wait a little in game, then return to the console and type1 n2 I9 K$ Q' F. L, H- N( j
search ==0 Q; s4 z+ [& C5 M- A
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 :
! G3 G7 \3 t, s8 d# l9 Y/ i* gsearch ==
/ l! R0 d, u9 M1 y) L' F- Eand after picking it up :
# t6 [7 s* x4 B' a1 ?; Rsearch !=
& m% m7 X2 A4 K! v6 {" ?normally when you pick the machine gun again and you type search !=, you'll get only 2 results which are both valid :/ k+ @6 c, L$ h' n

) v. P  C7 E* L) W2 ~+ M: u
  L) W' G6 t$ E  v1 E+ E+ D+ Z* I  H1 Y
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 !).
; S7 \- J. x6 c' ?* @8 z& w5 E) ?/ g! Y0 W! w; T: k
This is a lot harder than the simple life counter... !!!7 M+ Y6 N. o  n
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.
, }# t% k- c7 O- q  P9 D
$ G# S; }  l" H) L# b" p6 T! ]# dNow 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 :
# h$ i5 ]- r4 q! N* t6 Z& G - 00 : Normal Gun4 k$ ^0 R5 B; I" H
- 01 : Shotgun
# j1 ?3 K4 _, n9 }- J4 f$ y - 02 : Flamer) G7 F0 p" K+ f5 {2 B& z# x9 F
- 03 : Rocket Launcher& V6 h' G" k- q1 ^' E7 T
- 04 : Machine Gun2 s8 ^, t3 U4 H
the alert function works like this :
2 L: W) M1 G9 ^alert("message|button1|button2...")
. N4 h: c2 z, |* B" }2 Q0 [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.
6 O0 J& k/ r* x3 ESo you can type :' F9 g! g8 G8 P0 d$ ?

! v7 {9 Z- Y- KCode:8 d; T( k7 x9 ^. `8 V- k; W
  poke $1004d1 alert("select weapon (ESC for normal gun)|Shotgun|Flamer|Rocket l2 w3 X1 F- Q2 O; W' {' V
auncher|Machine gun")9 b) _# @1 T+ v& J
  dpoke $1004e2 9998 M2 l# Y$ h  a7 \; k* H

2 e6 Q- }* ?# N/ A! L2 |, x
/ I5 R0 ^+ l! mThe 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

签到天数: 1803 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:58:26 | 显示全部楼层
Console lessons level 3 : invulnerability and timers
$ T+ [1 a( K  F, n- ~
* L3 Z6 S5 _: d' n) x( M4 W( ~作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php1 G0 T. t# R4 a! v
% [. ~' D0 s" K# Q5 C" p' J5 a
This one is possible mainly because of the explanations from Stephh about how it works., @+ ?) x/ D4 s. W9 {/ ?
( p/ z6 Q$ B+ `+ 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.0 F$ ~0 w: w; D
5 ^% [! @6 n6 \9 M
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 !
- K( s+ H# Q2 s6 j! ^It's easier to loose a life and then start the search for the 2nd life because the counter is initialised only once then...: V" q4 \/ y# `& }3 E$ h8 D, Z! W
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) ]. X' Z# x: [; _! |( T
search <6 W; N) J1 v6 V& F7 c% \2 O. w
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.
2 C$ m' p7 M5 R) WThen once it has stopped to blink, you can type :7 B/ g4 l7 E4 `9 k2 t/ g: |
search 0/ J3 C8 a+ z. V1 [
because then the counter should be at 0.
" D5 i. i7 y! Q; s
) f) h! ?3 t0 |% D0 r5 H, dIn the end, you should have only 2 or 3 results if you made enough searches.
% ~& q& Q( r/ S, }7 ^, QTo 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.3 Y5 f, y, N5 o6 U5 z& |
Notice that you have a different invulnerability when you are in the tank. In this case, $1005e5 is the address you want.) D3 Z0 v$ e+ S' X& H& O7 ^
Of course all these cheats will be installed in the next release... !; i% t$ L+ @1 P) I% ?6 ~

本帖子中包含更多资源

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

x

签到天数: 1803 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 20:02:46 | 显示全部楼层
Cheat Searching 3 U8 y) |6 o1 O- F" y, T
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:
, A7 A0 F. n* r! N1 t0 l% `, J% a) ?& q# a6 v: j0 a
Absolute search:
: j) }3 n0 x' p+ S% F8 B4 j1 L- ]3 X4 M) f
1 }$ n* U" j7 ^# B% l
Searches for absolute byte values.
1 G: K8 N( A7 F2 OMost useful for lives and other data. ' j7 J6 e9 j7 d5 E( z
Relative search:
) J! y6 }: M8 F' q& K& \8 k, Z( Y
, s/ B. [" F) y- \# E9 M" A
Searches for the difference between byte values.   `1 F$ j8 r7 g+ A/ n( s: o
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).
* U$ a0 s5 P4 PSingle Bit search: ( N3 j& L! {. H0 d

1 Q& ?  R; w( G7 A! b4 v( u
9 X! e5 n. ]$ W% Z! h2 [Searches for single bit values. * N; `, k6 ^. q' l
Useful for status flags, and stuff like 'extend' in bubble symphony, which is stored in 6 bits of one byte. - D: C& w+ m7 z8 n8 O
Slow deep search: , I$ N! f! x$ ~5 b# p9 s
+ j- ~& [; b3 J
8 ?$ [% p/ `5 J5 e( X
Searches for the following changes in byte values: 0 [+ r% L2 o  {2 R( M
new byte == old byte, new byte != old byte, / z7 T; l0 f4 E8 r$ }0 v- F% ?! v
new byte >  old byte, new byte >= old byte,
( {( i. C" |. {( M7 w2 q; s* Wnew byte <  old byte, new byte <= old byte 7 }$ _8 V. T: f2 U. u. o7 W+ W
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.
) e; [% B, n; |8 D3 a3 L8 o2 I) sThe 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.
. I1 _0 W( h" @+ k; m! M1 h" w1 A& n* C( o/ s! i: C1 W6 C( Q) P6 C
console简化指令
! V) D* x+ B) }5 e, j  W, N( l4 ~* j. y( v5 c  f! f
  - h = help$ o4 w" G6 M4 u% i
  - x = exit) E5 L, u* b* b+ u
  - s = search (could also be good to have "si" to initialise search)
" \0 E1 Z* c" I/ q$ ]  - d = dump / ds = dasm
- ]* A  H9 E/ k6 q2 b9 G% U  - r = registers
, e9 T. q! A6 x! {7 z# c  - w = watchpoint& w0 t# i2 D$ C# K6 |. x! M
  - p = poke (put value in memory once)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-12-19 01:18 , Processed in 1.081054 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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