Hello!When i dissasemble konami megaroms and use the built in debugger of bluemsx there is this problem.
Let's assume that i take a konami megarom such as metal gear 1.
There is not way i can understand this area.
Metal gear area from location 4241 to 424f
4241: xor a
4242: ld (#f3db),a
4245: Ei
4246: jr #4246 <--------------------this is the instruction that causes me problems.
4248: di
4249: push af
424a: ld a,#01
424c: jr #4252
424e: di
424f: push af
Now i know that jr makes a jump in a area of 127 bytes forward or backwards.
Whenever i go to this instruction bluemsx step into instruction does not work.What happens is that R register always goes up by one till it is 0 again and so on.I cant make it move to next instruction.It stays to that one forever.If i press continue it goes one well,but if i pause (and i noticed that this instruction is often the one that the debugger stops in konami games),then the same thing.Step into does not work.
I noticed that almost all konami megaroms have a jr instruction in the sense like that
in metal gear 2 for example we have
40e6: xor a
40e7: ld (#f3db),a
40ea: call #013e
40ed: Ei
40ee: Jr #40ee <---problematic instruction that makes the debugger stay where it is
40f0: push af
40f1: ld a,#01
40f3: di
40f4: push hl
in nemesis 3 the same.I noticed that all these megaroms have a jr instruction pointing at the instruction memory location
eg 4040: jr #4040
or 4067: jr #4067 and so on.
What is wrong here?Shouldn't the debugger point me somewhere else?What i am doing wrong?
How is this instruction supposed to work?Making a jr #address where address is the same address as the pc?