Post subject: Using Gameshark codes in psxjin
Joined: 11/22/2004
Posts: 1468
Location: Rotterdam, The Netherlands
Hi there. I was trying to get a Gameshark code working in psxjin in order to test some Metal Gear Solid "walk through walls" tricks. The gameshark code to enable walk through walls is:
80027250 9CC4 
80027252 0800
However, I can't seem to be able to make this work. When I write a lua script to set the addresses, they don't work (a memory.readbyte returns 0, and seems to be broken with both writedword as well as writeword). When trying to use RAM Watch to watch for 80027250, it says "invalid address". I'm really new to this, maybe someone can tell me how to do this?
ventuz
He/Him
Player (126)
Joined: 10/4/2004
Posts: 940
Because those address is not valid RAM address. First 2 digits is "command code." Try remove first 2 digits "80"?
Joined: 11/22/2004
Posts: 1468
Location: Rotterdam, The Netherlands
Thanks, this at least makes it possible for me to write and read those addresses. The cheat code doesn't work though. Weird! Maybe I'm not using the correct one.
Lil_Gecko
He/Him
Player (98)
Joined: 4/7/2011
Posts: 520
You wrote dword instead of word which is 4 bytes, that's why it didn't work. The lua should be written like that :
while true
do
	memory.writeword(0x27250, 0x9cc4);
	memory.writeword(0x27252, 0x0800);
	emu.frameadvance();
end;
or
while true
do
	memory.writedword(0x27250, 0x08009cc4);
	emu.frameadvance();
end;
with dword.