Here is a quick guide I typed up for another site for someone with a similar problem:
WTW codes can be easy or difficult depending on the programmer's implementation. Some games will stop you at a position X or Y then attempt to force that position into your X or Y repeatedly, others will remove the ability to progress in a given direction if the above criteria is met, and then some have a set boundary of the amount of area within a given room your allowed to move.
You will most definitely need a debugger, also you will likely need a reference chart to the asm instruction set based on which system you are looking at. If you need a good reference chart for the snes check out
The 6502 Instruction Set DecodedForced Position:The first type will try to force values into your X position or Y position addresses, which will lock it to the value injected. What you want to do is find where your X position, Y position is stored. Next set a break on write (X, Y position address) to find what address is writing the forced value and then implement a standard NOP on the found address (Note: the address will be written to the whole time your moving, pay close attention to when you touch a wall if the address changes or alternates with another address as the new address/secondary address is the one your looking for). This basically gives the address forcing your position no operation stopping it from thwarting you any longer. Some games using this method will also have a secondary check which you can also NOP and should be found after the first address has been NOPed.
Removed Control (Given Direction):The second type is where the game takes away the ability progress further in given direction. This method is a bit tougher to hack in my opinion. Actually my best guess on how to hack it would be to find the value for when you have the ability to move in given direction and when you don't (against a wall). You could try 0 and 1 or try less than,equal to, and greater than. There may be a simpler way to overcome this implementation but as far as I know its about finding the flag for movement in a direction.
Allocated "Area":The third type is where the game sets a boundary of the "area" allocated for a given room and uses it as a boundary limitation for your character. To hack these you need to find the allocated area for each room. This can be found by moving from room to room and by using less than, equal to, greater than accordingly for each room. Once you have your allocated boundary number set the address value to 0. This will make the allocated "area" for each room 0 which will allow you to walk around freely since your considered outside the boundaries.
There may be other types but these are the 3 big ones I have encounted hacking the snes, nes, or pretty much any other 2d based game.