drc: add a hack for f1 games
authornotaz <notasas@gmail.com>
Wed, 24 Nov 2021 19:17:47 +0000 (21:17 +0200)
committernotaz <notasas@gmail.com>
Wed, 24 Nov 2021 19:17:47 +0000 (21:17 +0200)
Quite fragile but maybe good enough.

What the games do seems to be deliberate to break emulators. It takes
the address of some internal function (let's call it f1) and calculates
an address add2 in such a way that f1 can't evict code at addr2. It then
writes a 4 instruction code piece f2 that just loads an address from
stack (which happens to be stacked ra) and jumps to it. f1 then gets
called, loads data (?) and overwrites f2 doing it and returns. Right
after that f2 gets called again.


No differences found