PDA

View Full Version : Memory Viewer/Editor & Advanced Cheats


skyboy
28th September 2010, 04:46 AM
A way to view the running memory of the game with the in-game addresses would be a nice addition for people who make cheats, and being able to edit that memory live would also make it easier to check that you have the correct value.

Also, a more advanced way to apply cheats would be useful. Allowing simple operations (addition / subtraction / multiplication / division / bitshift / XOR / OR / AND / equality) would allow for fairly advanced checks to be made, such as to apply a patch to the memory in a different part of the memory based on another value (ie. level).

squall_leonhart
28th September 2010, 04:56 AM
Read the pj64 blog and change list.

skyboy
29th September 2010, 02:21 AM
Well, the memory viewer is there, not sure about editing.

There's still my other suggestion as well, which would be more like a pseudo-language, eg:

if (x11A7BC != 0) {
x11A7BC = FF;
}

if (x117DF5 & 20 == 20) {
x11A6D0 = UserSelection(ID1);
}

Which would have advantage of being a little easier to read, allow more than 2 bytes to be written at a time, and be significantly more powerful with OR, AND, XOR and the bitshifts. Bitwise operations would also make it easier to do button-commands such as "Press L to hover" since R, L, and the C buttons all share the same byte (32 values to check against if you want them to work with all other buttons, 0x20-0x2F and 0x30-0x3F for L and any other button in its group).

But due to most cheats being in GS/AR format already, there would need to be two cheat modules to do this with full compatibility with little extra work.

HatCat
29th September 2010, 05:34 AM
Didn't really comprehend the operations. Are you asking to revise the GameShark format to accept those kinds of operations such as bit shifting?

Yes though the debugger for different kinds of memory gives read and write access. In the beta layout the memory searcher is used alongside a viewer [and editor] to test.

skyboy
29th September 2010, 07:23 AM
But due to most cheats being in GS/AR format already, there would need to be two cheat modules to do this with full compatibility with little extra work.

I'm saying the GS/AR format will still be there, but there would be a more advanced engine right along side it.

Also, I used a rough example using a common programming language syntax (C, C++, JavaScript, ActionScript, Java, etc.).

= assignment
!= inequality (logical operator)
== equality (logical operator)
&& and (logical operator)
|| or (logical operator)
& AND (bitwise operator)
^ XOR (bitwise operator)
| OR (bitwise operator)
>> right bitshift (bitwise operator)
<< left bitshift (bitwise operator)


Here (http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/operators.html)'s a list of operators in ActionScript 3.0.

HatCat
5th October 2010, 01:19 AM
I'm not aware of GameShark functions incorporating those operations--except for equality check and assignments--so I don't see how a side view can exist as a high-level language translator of GameShark codes.

AAXXXXXX DDDD
(AA == 8?), then XXXXXX = DDDD;
(AA == D?), then boolean (XXXXXX == DDDD);

in my own bluntly made up syntax

Yep based on experience with just ActionScript 1.0 (but also minimal C and Java) I know about those operations. High-level languages have been boring me though.

skyboy
9th October 2010, 05:29 AM
I'm not aware of GameShark functions incorporating those operations--except for equality check and assignments--so I don't see how a side view can exist as a high-level language translator of GameShark codes.

AAXXXXXX DDDD
(AA == 8?), then XXXXXX = DDDD;
(AA == D?), then boolean (XXXXXX == DDDD);

in my own bluntly made up syntax

Yep based on experience with just ActionScript 1.0 (but also minimal C and Java) I know about those operations. High-level languages have been boring me though.
I know GS codes have a few of the commands, and what I mean is having two separate engines for cheats running side-by-side. Also, AS1 makes me cringe, AS2 being little better.

I started some work on it, but stopped for a short while, and have drawn up a mostly complete language sytanx (I plan to add variables that are separate from the game's running memory).

Syntax in EBNF (http://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form):
code := thing | ( ( number | spaces ) , ";" ) ;

for_statement := "for" , spaces , "(" , spaces , 3 * statement , ")" , loop_block ;
while_statement := "while" , spaces , "(" , spaces , action , spaces , ")" , loop_block ;
if_statement := "if" , spaces , "(" , spaces , action , spaces , ")" , block ;

loop_block := block_begin , ( thing | [ break ] | [ continue ] ) , block_end ;
block := block_begin , thing , block_end ;
block_begin := spaces , "{" , spaces ;
block_end := spaces , "}" , [";"] , spaces ;

break := "b" , "r" , "e" , "a" , "k" ;
continue := "c" , "o" , "n" , "t" , "i" , "n" , "u" , "e" ;

thing := statements | [ { ( for_statement | if_statement | while_statement ) } ] ;

statements := [ { statement } ] ;
statment := ( action | nothing ) , spaces , ";" , spaces ;
action := stmt | group ;
group := "(" , spaces , stmt , spaces , ")" ;
stmt := assignment | exprs | expr | number ;

assignment := address , spaces , assign_op , spaces , action ;
exprs := expr , [ ( spaces , operator , spaces , ( number | exprs ) ) ] ;
expr := number , spaces , operator , spaces , number ;

assign_op := assign | ( ( arith_op | bit_op | logic_op_a ) , assign ) ;
assign := "=" ;

operator := logic_op | arith_op | bit_op ;

logic_op := ">" | "<" | "&&" | "||" | ">=" | "<=" | "==" | "!=" | logic_op_a;
logic_op_a := "!" ;
arith_op := "+" | "-" | "*" | "/" | "%" ;
bit_op := ">>" | "<<" | "&" | "^" | "|" | "~" ;

number := hex | int | address ;

address := "@" , 6 * hexDigit ;
hex := "#" , hexDigit , 15 * [ hexDigit ] ;
int := digit , [ {digit} ] ;

spaces := [ { space } ] ;
hexDigit := digit | "a" | "b" | "c" | "d" | "e" | "f" | "A" | "B" | "C" | "D" | "E" | "F" ;
digit := "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
space := " " | ? US-ASCII character 9 ? | newline ;
newline := [? US-ASCII character 13 ?] , ? US-ASCII character 10 ? ;
nothing := "" ;