News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Making a "walk through walls" cheat for 2 snes games  (Read 827 times)

aqualung

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Making a "walk through walls" cheat for 2 snes games
« on: July 31, 2020, 03:02:10 pm »
I'm trying to make a walk through walls cheat for two snes games, Jungle Wars 2 and SD Knight Gundam Monogatari - Ooinaru Isan.

I was just trying to learn how to make table files, but then I started to peek into the no$sns debugger and found some values related to the sprite movement. I found these two addresses:

In SD Gundam, I found that the value at the address 000011 changes to EE (238 decimal) every time the main character hits a wall). Then it changes to any other arbitrary value when you're not in collision with anything).

In Jungle Wars, I noticed the same effect but at the address 0001E0 which changes to value 00 when bumping against walls.

I thought that these addresses stored something related to collision detection and tried tampering with them a little. I tried editing them and leaving a fixed value (always different to EE in case of SD Gundam and different of 00 in case of Jungle Wars) but in both games the character still can't go through walls. I don't know if there's something I'm doing wrong or if I'm just messing with the wrong values that have nothing to do with collision detection despite seeming so.

If someone can tell me if I'm on the right track, I'd appreciate it. Thanks.
« Last Edit: August 01, 2020, 08:13:58 am by aqualung »

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 471
  • I am the baldest romhacker
    • View Profile
Re: Making a "walk through walls" cheat for 2 snes games
« Reply #1 on: July 31, 2020, 03:27:07 pm »
Games don't necessary store "hit the wall" state in ram, instead for example they can reset velocity value to prevent object from moving. Can't cheat that.

But you can still keep searching, it probably looks like a switch 00/01, 00/80, 00/FF, something like that.

Your best bet might be analyzing collision routines and affecting the final result of calculations.

« Last Edit: July 31, 2020, 03:32:22 pm by Cyneprepou4uk »
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

aqualung

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Re: Making a "walk through walls" cheat for 2 snes games
« Reply #2 on: August 01, 2020, 08:13:40 am »
Games don't necessary store "hit the wall" state in ram, instead for example they can reset velocity value to prevent object from moving. Can't cheat that.

But you can still keep searching, it probably looks like a switch 00/01, 00/80, 00/FF, something like that.

Your best bet might be analyzing collision routines and affecting the final result of calculations.

Thanks for your answer. Maybe this is a just little more that what I can munch. I've tried studying some walk through wall codes for a few snes games (the one that a person made me for Super Shell Monsters Story (SSMS) and anothe rone I found on the internet for Lennus 2) but I couldn't guess exactly what they do. I suppose they do some kind of ASM hack and that is totally beyond my programming knowledge.

The fun thing is, for what I've managed to find, the walk through walls code for SSMS somehow tampers with some memory addresses I've found that store values which seem to be related to sprite collision (they change only when I hit a wall or other static objects like trees or furniture) so I think I wasn't that misled after all, hehe. Well, I'll continue looking at it and see what I can find.
« Last Edit: August 01, 2020, 08:18:56 am by aqualung »

FAST6191

  • Hero Member
  • *****
  • Posts: 2896
    • View Profile
Re: Making a "walk through walls" cheat for 2 snes games
« Reply #3 on: August 01, 2020, 09:49:00 am »
Several approaches, assuming there is not a walk through walls item, state for the game (some cutscenes might) or debug mode.

1) You make a cheat to shuffle you however many places forward. Anybody that has ever "fallen through the world" (which I am guessing is most of us that ever played a 3d game) will likely be able to attest that most things only care about the immediate collision and if you make it past that then yeah. Find what stores your character's location (might be a virtual one, might be simply what is in the OAM, virtual tending to be if the screen scrolls where OAM is more for "single screen" affairs but not always and https://docs.google.com/document/d/1iNSQIyNpVGHeak6isbP6AHdHD50gs8MNXF1GCf08efg/pub?embedded=true also has much to say here) and go from there, do note that some games will instead move the world around you. Often a bit clunky but simple enough to do an add 2 to given axis type cheat, or several for different combos or able to be fired in emulator.

2) You edit the map itself to have what is collision and what is not. Can be easier if the game does the whole hidden passage but looks normal thing.

3) You mess with the collision physics itself. As with 1) then you find what controls the location on screen (don't do collisions here, just walk backwards and forwards with nothing else happening in the game if you can - no enemies, no npcs, no animated backgrounds..., not fatal if there are but less changes makes life easier). I would probably go from the button presses there to see how one of those starts out and goes from there. Somewhere in that will be a collision detection. You might however be able to skip a few steps, or work backwards from the thing that tweaks the location value in memory.

aqualung

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Re: Making a "walk through walls" cheat for 2 snes games
« Reply #4 on: August 09, 2020, 10:37:47 am »
Several approaches, assuming there is not a walk through walls item, state for the game (some cutscenes might) or debug mode.

1) You make a cheat to shuffle you however many places forward. Anybody that has ever "fallen through the world" (which I am guessing is most of us that ever played a 3d game) will likely be able to attest that most things only care about the immediate collision and if you make it past that then yeah. Find what stores your character's location (might be a virtual one, might be simply what is in the OAM, virtual tending to be if the screen scrolls where OAM is more for "single screen" affairs but not always and https://docs.google.com/document/d/1iNSQIyNpVGHeak6isbP6AHdHD50gs8MNXF1GCf08efg/pub?embedded=true also has much to say here) and go from there, do note that some games will instead move the world around you. Often a bit clunky but simple enough to do an add 2 to given axis type cheat, or several for different combos or able to be fired in emulator.

2) You edit the map itself to have what is collision and what is not. Can be easier if the game does the whole hidden passage but looks normal thing.

3) You mess with the collision physics itself. As with 1) then you find what controls the location on screen (don't do collisions here, just walk backwards and forwards with nothing else happening in the game if you can - no enemies, no npcs, no animated backgrounds..., not fatal if there are but less changes makes life easier). I would probably go from the button presses there to see how one of those starts out and goes from there. Somewhere in that will be a collision detection. You might however be able to skip a few steps, or work backwards from the thing that tweaks the location value in memory.

Sorry for my delay in replying. I've been trying several approaches but I had no results. I tried to inspect the cheat a person made for me some time ago for Super Shell Monsters Story but couldn't really figure out what it was doing (it seems to patch some ASM instruction and that is totally above my capabilities).

I found a document that explains how to use the debugger for the gameboy emulator BGB to add breakpoints to a ram address that stops the game execution when some instruction tries to modify that address (and then you can debug instruction by instruction with F3). But no$sns doesn't allow "breakpointing" ram addresses.

The document I'm talking about is this one: http://games.technoplaza.net/gameboy/txt/GameboyGenieDebugger.txt (I found it because I was also searching some way to make a "no random encounters" cheat for the GB version of Jungle Wars and luckily this faq also explained a little how to debug by adding breakpoints in ram addresses).
« Last Edit: August 10, 2020, 05:57:22 pm by aqualung »

aqualung

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Re: Making a "walk through walls" cheat for 2 snes games
« Reply #5 on: September 14, 2020, 06:52:04 am »
I wanted to do a little update to say that somebody has provided me with the codes I was searching for and is ok with them being posted here, so here they are in case someone finds it useful:

Walk Through Walls codes

Jungle Wars 2
7DB3-6407
7DBF-ADA7
7DB0-AF07
7DB1-AF67

SD Gundam Gaiden - Ooinaru Isan
9D36-6F0C
9D34-A7DC
9D3A-A7DC
9D35-DF08

Thanks a lot to that person for the help.  :thumbsup: