EMU618社区

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

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

 关闭 [复制链接]

签到天数: 1573 天

[LV.Master]伴坛终老

发表于 2009-3-10 19:51:07 | 显示全部楼层 |阅读模式
console basics" J. F" ?. J7 l* E6 m5 X/ a4 {

+ ]/ T! J% Z0 P5 X# T  Y作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
+ T! w: u8 b7 O4 |( u# {( V- ^/ J4 c% n; j

: l7 _. w7 Y* l' d( U% F# ]- V$ [3 b  N3 H/ f
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.6 r& K0 ?0 j1 s# m/ A0 G: S$ ^
+ d& ?3 L! r0 M: c- _4 R- S5 ]
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.
* k2 W: U. S: Z) e/ DSo I lost a life, typed "search 2" and I was down to 4 results already !6 o" j& a+ z8 g9 N8 o) e
Lost another life, and this time "search 1" sent back only 1 result : 100397.
/ z% {$ D5 |8 c, c
+ O+ D% a/ ^9 X' tThis 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...
+ X1 P5 h* i3 r+ `1 _$ ~$ i. Y6 Z" w
, Y: N- ^( B9 Y- i8 |As you see the syntax for the command line is extremely simple, and should remain as simple as possible...- g! }& J8 r/ g
And this thing could probably be used as a debuger too (68000/z80 debuger).
' V+ M; H0 s' C, T4 B5 U4 |
& \) h8 ?/ M: k  n. z7 O[ 本帖最后由 疾风之狼 于 2009-3-31 20:36 编辑 ]

本帖子中包含更多资源

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

x

签到天数: 1573 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:55:07 | 显示全部楼层
console lessons level 2
) w2 x2 t/ K" `, W5 l$ q: K: a4 ]5 ]* t- b# ]/ y4 N1 Q$ B+ H
作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
: _( _- B. B' `  Z
6 R; B8 Y6 H7 Y2 d- y" S& Whow to find the location of the weapon for metal slug in ram ?3 ]1 e! G: d7 i% p6 m
Welcome to the relative searches we started to talk about in the other topic..." ]2 b& R$ l; \8 S0 S# A

9 _+ P! o  n! j% h7 RSo 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:
2 _% x! Z3 p3 Q% \9 D$ H# Ksearch !=
* s! \/ F$ T/ ]# hwhich will search all the bytes which are different.9 G2 d' [3 I. D
Well there a few hundreds of differences, so it will take time.
: L, i1 [! m* Y4 |# H# bThe idea is to wait a little in game, then return to the console and type! u6 P4 ?+ k6 |- A" f
search ==
7 W8 F2 B0 D: J& n+ `' |7 bto 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 :7 Y' D1 V8 c0 Y" H
search ==
. m2 {5 G4 H/ y' _and after picking it up :4 @' b% }/ N8 c+ \4 h& a
search !=$ H" s% O- g! K- U
normally when you pick the machine gun again and you type search !=, you'll get only 2 results which are both valid :
! R% v9 }7 r" p2 T: ~% Z' B; h2 |% ]' p3 T" ?8 v

2 t' w+ D, s7 \% F0 l8 \* o( @+ J! l9 U+ h5 W! Z$ O
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 !).
2 ~4 ~: x7 D. y/ ^( g( J" h
$ D" A& i/ j) o- {0 U+ T( eThis is a lot harder than the simple life counter... !!!5 I# c: g3 E) A3 w1 v1 _! W2 ]: B
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.0 h+ I& }' F; U
7 _& U6 Z* Z- k/ R& K- p
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 :
6 Z% G) s9 r$ C! L* m - 00 : Normal Gun
) P& Y/ W# N9 q  U% n, B, ] - 01 : Shotgun7 p: {1 i2 T6 L. X  f+ C$ Y: h
- 02 : Flamer
/ s# C/ L) z# ~: e2 R4 Q9 P - 03 : Rocket Launcher
8 ~7 u- ~5 {# N4 z! U4 a - 04 : Machine Gun/ f6 R: a' Z; ^/ r( S
the alert function works like this :
. p0 _$ d2 g! J. _* \- x3 q! x3 \alert("message|button1|button2...")( y9 ^8 I0 {8 [. A9 f, m
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.0 @& X! F& V! s3 L& q. X
So you can type :
. P$ q8 N- g+ p+ ^4 i0 E) u) F. f. v
" m9 _( J7 P, P0 @, d% oCode:
0 Z5 P$ }$ E) p+ o  v/ c  poke $1004d1 alert("select weapon (ESC for normal gun)|Shotgun|Flamer|Rocket l
. B# m( ]/ q, z8 @( Fauncher|Machine gun")
6 H& I" m! A' m8 d* S  dpoke $1004e2 999& q8 L8 s9 Y9 W4 ?; b4 I5 X* ^

% K4 I4 y1 @# K5 N, Q- G% N# h1 ^/ t# u# H6 w2 q
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

签到天数: 1573 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 19:58:26 | 显示全部楼层
Console lessons level 3 : invulnerability and timers ' {- y' c+ I% m4 {$ U9 S3 F" f

. _' U% D: P) L: |' K1 y作者:Tux 文章来源:http://rainemu.swishparty.co.uk/msgboard/yabbse/index.php
% X. I- h9 P- @6 [6 `: K. C* d( z4 q* A3 }8 M. A' z; I" n
This one is possible mainly because of the explanations from Stephh about how it works.; O  U# R0 g9 ?8 \0 m, |' F: p/ K
8 G3 W! C) a+ d2 b  F1 f
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.
& j1 A% B# Y  l6 U" N3 l# o
& c; K( c0 H, y* Y0 iIt'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 !
3 J& Z: B$ M! A' k8 q! B% O) {# SIt's easier to loose a life and then start the search for the 2nd life because the counter is initialised only once then...
  W- A2 ?' `; F" vSo : 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 :, ^1 D  _4 i6 b. f, T: U2 \
search <
& \/ C$ a$ C" Z6 z( @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.
0 \6 X5 m& X( B5 RThen once it has stopped to blink, you can type :
- Y0 w' B) _' [7 ~4 `search 0% ?, r: L! x( I9 m" n# }: q/ T$ @6 c2 @8 l
because then the counter should be at 0.+ E' U. |+ X: j- ]9 J
! T* o1 u; P0 b
In the end, you should have only 2 or 3 results if you made enough searches.
/ |' i0 c% y3 T' f/ \To 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.
4 {& o3 A) S9 ]4 q# x+ qNotice that you have a different invulnerability when you are in the tank. In this case, $1005e5 is the address you want.
* L9 _! m5 s* b$ Y. }# d' @! uOf course all these cheats will be installed in the next release... !; L6 L# `3 N" A2 B7 _

本帖子中包含更多资源

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

x

签到天数: 1573 天

[LV.Master]伴坛终老

 楼主| 发表于 2009-3-10 20:02:46 | 显示全部楼层
Cheat Searching
' z" n% D+ e5 E& M- k/ IIn 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:
" C) X; w- u/ J: s* w
0 k$ U, B. g  G! }$ B; [$ _Absolute search: 3 h) Y' t# x4 a& P6 |7 v- S5 ^
+ w4 m% t1 F- l( [4 f  _+ Q

9 ?( A' m6 l4 g8 p0 BSearches for absolute byte values. $ I0 h1 `  E0 @$ ^# F+ r
Most useful for lives and other data.
# V( O4 Y! F: s  n8 K( jRelative search:
* E) K. l: A4 m- u, ^$ k- p5 C+ e2 F" ~4 ^% k( W1 V

+ w1 R% e! ?1 g% F. ISearches for the difference between byte values. ( T, H# P) X5 k) Y9 B
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). ) f: @0 Z9 ~+ m) r' C# p& T
Single Bit search:
1 H7 a4 ]# v: X! G: W0 Z
9 Z: i6 ]: D7 T- `" V7 O3 s' a. A( a7 b2 o1 V4 V
Searches for single bit values.
; E2 B  q" v- T" A# RUseful for status flags, and stuff like 'extend' in bubble symphony, which is stored in 6 bits of one byte. 1 j& r6 x0 r: q; H
Slow deep search:
  Y7 D7 e. t; G' k* ]0 z1 L" u( x2 {( }' n/ B7 ?9 q& C. F: P
+ B" E' Y- O' V
Searches for the following changes in byte values:
1 a5 W* j+ N7 m# ?new byte == old byte, new byte != old byte,   [; e+ R7 ~- C& o/ Y1 e! Z) F. q
new byte >  old byte, new byte >= old byte,
  y- |1 J, |$ l8 hnew byte <  old byte, new byte <= old byte
7 z3 e) w5 E) N8 A3 KUseful 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. $ q' b  E. P5 B- U
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.
1 p$ p( d! I; E; H% }: s7 o9 [+ b
/ |2 n' n3 |( Q! K( Xconsole简化指令4 O! G7 R6 C- y8 H

$ _  t3 h% I  E! _# P  - h = help7 u/ z+ ^  a( J9 }% m( l' r
  - x = exit
$ L. a/ L6 h4 ]7 H4 o8 }6 y  - s = search (could also be good to have "si" to initialise search)
6 ]1 j! Z9 Z! m5 Q2 A, \  - d = dump / ds = dasm# J3 h* a  W( Q" G2 B* E
  - r = registers& U- \( A  D8 T3 `+ d% p3 ~
  - w = watchpoint
# l) P3 I2 s0 ^8 x4 w  - p = poke (put value in memory once)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-5-3 13:59 , Processed in 1.062500 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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