Commit Graph

248 Commits

Author SHA1 Message Date
daniel229 b1d9461779 Replace frame download in Narisokonai Eiyuutan 2014-09-09 14:33:15 +08:00
Unknown W. Brackets 420eb1bed3 Replace frame download in SD Gundam G Generation. 2014-09-08 22:44:27 -07:00
Unknown W. Brackets ee6960ff7a Hook the saveicon creation func in Growlanser IV. 2014-09-08 19:10:46 -07:00
daniel229 202f987e9b Replace function for Zero no Kiseki and Ao no Kiseki 2014-09-05 00:52:04 +08:00
Andrew Church 33264a6b8f Hook Brandish frame capture for menu fadeout and save screenshots. 2014-09-04 17:36:56 +09:00
Unknown W. Brackets d4ec7d8019 Add another memcpy variant.
Fixes #4324 (Marvel Ultimate Alliance 2 videos), thanks daniel229.
2014-08-23 08:45:25 -07:00
Unknown W. Brackets d52fdafa3c Note the location of a memset variant. 2014-08-18 23:20:44 -07:00
Unknown W. Brackets b03460c169 Improve function range detection.
This improves a pattern like this:

  j endOfLoop;
  li v0, 0;
  startOfLoop:
  addiu v0, v0, 1
endOfLoop:
  bne v0, a0, startOfLoop;
  nop
  jr ra
  nop

Where it jumps to the end of the loop, which only jumps back to the top of
the loop.  This might misdetect a few cases of tail recursion, but only
when the funcs are right next to each other.

Also, stops scanning at a jr ra, which was causing funcs to be incorrectly
long in cases.
2014-07-20 14:42:20 -07:00
Henrik Rydgård 0e5679c833 Revert "Detect Peace Walker's anti-cheat hash func" 2014-07-20 23:39:11 +02:00
Unknown W. Brackets a59d8b5c1f Override the codehashing func used in Peace Walker.
This makes the demo work fine even with jit enabled.  May help the full
game when fighting a certain boss.
2014-07-18 00:23:26 -07:00
Unknown W. Brackets 1fd6214945 Improve function range detection.
This improves a pattern like this:

  j endOfLoop;
  li v0, 0;
  startOfLoop:
  addiu v0, v0, 1
endOfLoop:
  bne v0, a0, startOfLoop;
  nop
  jr ra
  nop

Where it jumps to the end of the loop, which only jumps back to the top of
the loop.  This might misdetect a few cases of tail recursion, but only
when the funcs are right next to each other.

Also, stops scanning at a jr ra, which was causing funcs to be incorrectly
long in cases.
2014-07-18 00:22:19 -07:00
Unknown W. Brackets 81096f6bd0 Hook Dissidia's avi record func.
This makes it so replays can be recorded.  Though you could probably just
record separately anyway.
2014-07-13 08:36:34 -07:00
Unknown W. Brackets 0da972c548 Hook the FF1 battle effect func.
So that we can download the framebuffer.  At least, it seems like that's
what this function is doing.
2014-06-26 01:38:22 -07:00
Unknown W. Brackets ec94498342 When scanning or relocating, check replacements.
Just to make sure we don't wrongly detect the length or unresolve a var
wrong etc.
2014-06-23 08:18:56 -07:00
Unknown W. Brackets 561d0e5ef9 Check more ops for changing memory in debugger. 2014-06-19 00:48:33 -07:00
Unknown W. Brackets 0550b9372a Skip nop padding between functions.
Fixes graphical artifacts in Final Fantasy Tactics, recognizing memset and
memcpy.
2014-06-09 00:16:03 -07:00
Unknown W. Brackets a926b19c03 Hook Tales of Phantasia X save pictures.
Maybe other games will use the same func even.  This makes save pictures
work correctly the first time.
2014-06-08 16:38:43 -07:00
Unknown W. Brackets a7b9ce205b Enable function replacements by default.
So things like Star Ocean work, and game memcpy()'s to GPU work.

This will make game start on mobile a bit slower, though.  And there could
still be bugs so leaving as an option, but seems pretty stable.  Didn't
realize it wasn't enabled by default.
2014-06-07 00:13:45 -07:00
Unknown W. Brackets f6d4be1d49 Hook Star Ocean's function to upload stencil data.
Hurray, it seems to work properly.
2014-05-31 21:48:11 -07:00
Unknown W. Brackets b2dc92b942 Add a hook for Hexyz Force's "monoclome" thread.
This fixes missing graphics in some areas in GLES, due to direct framebuf
access.
2014-05-31 10:03:02 -07:00
Unknown W. Brackets 5dd8ebe2b4 Add a hook for Gods Eater Burst's swizzled copy. 2014-05-31 10:03:01 -07:00
Unknown W. Brackets f489694515 Add the option to hook, rather than replace, funcs.
This can be useful for debugging or developing translations/game hacks,
and also gives us options when dealing with GLES incompatibilities.
2014-05-31 10:03:00 -07:00
Unknown W. Brackets 72eb15f282 Speed up debug build hashfunc lookup. 2014-05-31 10:03:00 -07:00
Unknown W. Brackets b73c575418 Support swizzled framebuffer downloads.
Used in God Eater 2 when showing the load save screen.
2014-05-27 01:17:09 -07:00
Unknown W. Brackets 8afd1f028c Add a couple more memcpy() variants. 2014-05-26 11:20:34 -07:00
Unknown W. Brackets c3a6092e26 Upgrade symbolmaps with module address info.
This fixes some issues with jit replacement only if you had a map laying
around.
2014-05-04 01:24:18 -07:00
Unknown W. Brackets 97c18e7f0e Comment out a few unsafe replacement funcs. 2014-04-22 08:07:10 -07:00
Unknown W. Brackets 7326c6e716 Fix a race condition on shutdown with hashmap.
Also, always need to init the blocks, they are not zero initialized.
2014-04-20 21:44:10 -07:00
Henrik Rydgard f35168e0e0 Hardcode a bunch of function hashes so we can replace them.
Without needing an external file.
2014-04-18 19:00:08 +02:00
Unknown W. Brackets dde2f3ade6 Re-replace functions after loading a savestate.
Might need to clear before saving too... anyway, this makes testing a bit
easier for certain areas.

Also, correctly decrease downcount on x86.
2014-04-12 15:49:20 -07:00
Unknown W. Brackets 76e61e10a9 Fix hashmap crashes with games that load modules.
This should properly unload and reload the functions as necessary.
2014-04-12 01:16:32 -07:00
Unknown W. Brackets 05ab192c9c Reduce includes in Core/HLE/.
Especially templates.
2014-03-15 11:22:19 -07:00
Unknown W. Brackets c7437bbe8e Fix some minor warnings. 2014-03-03 00:08:32 -08:00
Unknown W. Brackets eca06c60c7 Spend a bit less time in Read_Instruction on load. 2014-03-02 10:20:40 -08:00
Unknown W. Brackets 8948990871 Optimize searching for existing symbols.
Checking every time is slow, we should just skip by the address.  Some is
just the locking overhead.
2014-02-14 22:26:35 -08:00
Unknown W. Brackets 7c2d36e802 Don't add to the symbol map what was found there.
Wasn't hurting anything, but slight hit on performance.
2014-02-14 22:13:32 -08:00
Unknown W. Brackets 26b4335637 Optimize symbol map in debug mode a bit more.
Avoid UpdateActiveSymbols().
2014-02-14 21:49:20 -08:00
Unknown W. Brackets d279dcd454 Fix renaming a function from disassembly. 2014-02-11 07:45:13 -08:00
Henrik Rydgård b1d6eefb8a Call UpdateActiveSymbols only once from MIPSAnalyst instead of for every recognized function.
Reduces startup slowdown when using a function signature file drastically.
2014-02-11 11:21:56 +01:00
Henrik Rydgård efd44a6933 Merge branch 'debugger2' of https://github.com/unknownbrackets/ppsspp into unknownbrackets-debugger2
Conflicts:
	Core/Debugger/Breakpoints.cpp
2014-01-26 23:10:37 +01:00
Unknown W. Brackets fe2b62c27d Make the "on change" checkbox for memchecks work.
But, for now, only on sw and similar instructions, the rest don't work
yet and just always break.
2014-01-26 11:57:39 -08:00
Unknown W. Brackets 76afb2a8d5 Avoid returning points from the symbol map.
Now that it uses a lookup, this is even more dangerous.  But, the maps
could be reordered while it's trying to print the pointer and cause that
data to become invalid.

This should be safe from race conditions.
2014-01-25 21:40:23 -08:00
pal1000 e7672655d3 Fix warning in MIPS/MIPSAnalyst.cpp 2014-01-06 10:48:52 +02:00
Unknown W. Brackets 1abb001e7f Don't hashmap functions smaller than 16 bytes.
Otherwise, small stub funcs "replicate" annoyingly.
2014-01-04 01:36:36 -08:00
Henrik Rydgård ce378b231f Delete CPU.cpp/h , cleanup 2013-12-30 00:11:29 +01:00
Unknown W. Brackets bde1d14f25 Update hashmap before deciding to abort.
Otherwise, if you delete it, it can never generate one.
2013-12-27 00:29:37 -08:00
Henrik Rydgard 455a73bba7 Bugfix replace function inlining (compilerPC needs to be increased). Misc. 2013-12-20 15:37:37 +01:00
Henrik Rydgard a53a032120 Prevent hashes from coming out differently after replacement. 2013-12-20 13:53:03 +01:00
Unknown W. Brackets 9bb03072e6 Increase the min size of an "interesting" func.
Seeing a bunch of forwarders and stuff that won't hash safely.
2013-12-18 23:58:45 -08:00
Henrik Rydgard 6937719c3b Minor fixes around function replacement, a couple of math funcs 2013-12-18 10:35:50 +01:00