Commit Graph

55 Commits

Author SHA1 Message Date
Henrik Rydgård
d586ec0d5e Don't create Host objects except in headless/unittest 2023-03-25 10:47:01 +01:00
Henrik Rydgård
aa80659530 Memory exception: Add facility to track size
Might theoretically help in tracking some things down.

Not fully utilized yet, the fault handler needs to extract the
information from the faulting instruction. But we can use it for
GetPointerRange etc.
2023-01-01 20:30:29 +01:00
Henrik Rydgård
a4d3e0ead8
Add range checks in replaced memcpy/memset functions. (#16693)
* Add range checks in replaced memcpy/memset functions.

Keep seeing especially Replace_memcpy as a semi-rare crash in the
reports. Hopefully this will take care of it, though if games hit this,
they're probably on their way to failing somehow anyway.

* Alternate approach, correctly causing memory exceptions if not ignoring
2023-01-01 18:25:40 +00:00
Unknown W. Brackets
49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Henrik Rydgård
861d66a4d4 Separate logging for GetPointer/GetPointerWrite 2022-07-24 13:39:37 +02:00
Henrik Rydgård
e6403d7157 Split GetPointer into two versions, to help with const correctness 2022-07-24 13:26:19 +02:00
Unknown W. Brackets
2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets
744d17e13c Core: Correct ValidSize outside scratchpad.
And simplify all the scratchpad valid checks.
2021-04-21 19:32:22 -07:00
Henrik Rydgård
a22181df1c Partially fix Katamari (flicker due to choice of the wrong depth buffer still happening). 2020-09-01 22:54:36 +02:00
Henrik Rydgård
7208cf6900 Some code reformatting/renaming 2020-07-12 15:25:21 +02:00
Henrik Rydgård
8461ea19b1 Centralize handling of memory exceptions a bit 2020-07-12 15:25:20 +02:00
Henrik Rydgård
a9befb5496 Remove our custom atomics code entirely. 2020-05-17 13:11:36 +02:00
Unknown W. Brackets
b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Henrik Rydgard
b9b3a022fb Switch another enum to enum class 2017-03-02 12:36:54 +01:00
Henrik Rydgard
4e52f613f1 Additional fixes and buildfixes 2016-05-08 22:23:51 +02:00
Henrik Rydgard
492ea5fac4 Address a bunch of comments, thanks for the review 2016-05-08 21:38:03 +02:00
Henrik Rydgard
ce8aae5ed1 Make the IRJit core selectable in developer tools 2016-05-08 01:43:27 +02:00
Unknown W. Brackets
0c46d7c081 Correct scratchpad memory range checks. 2015-12-27 14:29:12 -08:00
Unknown W. Brackets
09b9d2ad81 Keep track of ranges that have emuhack ops.
So that we can invalidate them smarter.
2014-07-05 16:25:16 -07:00
Unknown W. Brackets
4b9229a5ba x86jit: Flush the PC before r/w in debug.
This way we get better log output.
2014-07-05 12:57:44 -07:00
Unknown W. Brackets
80cc9d8c0e Mirror memory for VRAM mirrors.
For a long time we've done this with GetPointer() only, but it's better if
it's the same for all methods of memory access.

Technically, we should do the swizzling (and also swizzle the depth data in
softgpu), but there's no indication games depend on this, and GetPointer
would need changes anyway.
2014-05-06 00:45:47 -07:00
Henrik Rydgård
ce378b231f Delete CPU.cpp/h , cleanup 2013-12-30 00:11:29 +01:00
Unknown W. Brackets
5b0ece85da Use additional memory map mirrors for 32-bit.
Well, use them always for simplicity, but this works around 32-bit
limitations on mmap() size for Android and Linux.
2013-12-10 23:40:37 -08:00
Henrik Rydgard
84f20a1cad Small optimizations 2013-11-12 14:05:50 +01:00
Henrik Rydgard
5bdb9e976b Track copies of framebuffers in ram created through sceDmacMemcpy, so that we can display them.
Fixes MotoGP while also, in effect, committing #3859.
Removes the horrifying ramDisplayFramebufferPtr hack.
2013-09-21 18:53:55 +02:00
Unknown W. Brackets
38e30e5a67 Fix bugs when memory size is 0x04C00000/etc.
Was experimenting with trying to match my non-phat's ram size.
2013-09-09 00:25:10 -07:00
Unknown W. Brackets
ad8da6e02f Report bad memory access (first time only.) 2013-08-21 08:40:30 -07:00
Unknown W. Brackets
5787a2b9f7 KISS and Android buildfix. 2013-08-16 23:48:08 -07:00
Ced2911
c332a4af58 Endian and PPC support 2013-08-16 14:34:15 +02:00
Henrik Rydgard
03c665173f Fix range of newui volume control. Delete some old junk. 2013-07-21 12:12:20 +02:00
The Dax
bd0944fc49 Remove a few more unneeded includes and change a loop to use ARRAY_SIZE instead of a variable. 2013-06-26 16:02:53 -04:00
The Dax
d11deba3cd Fix HD Remasters and tidy up. This should be the final commit for the preliminary support, no further coding style issues withstanding. 2013-06-26 16:02:53 -04:00
The Dax
8ab734d516 Restructure the hack to be more correct, and add support for double texture coordinates. Fixes #2314.
Also address various coding style issues.
2013-06-26 16:02:52 -04:00
The Dax
96401eae1e Make the hack less intrusive, but there's a chicken and egg problem: Memory::Init is called before LOAD_PSP_ISO, so I'm slightly perplexed on how to proceed at the moment. 2013-06-26 16:02:52 -04:00
The Dax
2da4c01ea9 Fix styling issues. 2013-06-26 16:02:52 -04:00
The Dax
f8d309ec99 Add HD Remaster support. It's a HUGE hack right now, and needs to be properly rewritten so that allocation and stuff work better. This is based off the work of BlackDaemon, and I added in the auto check to switch the code on/off depending on if the game is a remaster or not. It does not affect or break any games that I know of. 2013-06-26 16:02:52 -04:00
Sacha
8dd683f63f Fix name collision when building on Windows. Was preventing Blackberry from building. 2013-05-03 16:10:23 +10:00
Unknown W. Brackets
78d14ecd04 Remove some unused/undefined memmap funcs. 2013-03-16 19:46:24 -07:00
Unknown W. Brackets
0ec531587c Fix valid address checking.
Fastmem crashes if it hits these addresses, but they're not reported as
wrong.
2013-03-16 19:43:34 -07:00
Unknown W. Brackets
12e2a56ef2 Fix bIgnoreBadMemAccess ignored in GetPointer. 2013-02-23 12:55:05 -08:00
Henrik Rydgard
37f998407b Replace "Core" with "Jit" in ini. Don't show Open dialog by default (use Ctrl+A or Ctrl+O to open it).
Delete "Slightly Faster Interpreter".
2013-02-16 09:49:33 +01:00
Unknown W. Brackets
4bb515cab0 Don't log an incorrect pc for bad jit mem access. 2013-01-25 22:52:42 -08:00
Henrik Rydgard
7484ddfbbc Merge branch 'master' into armjit
Conflicts:
	Common/ArmEmitter.h
2013-01-13 12:14:32 +01:00
Sacha
f0bd526ca3 Fix physical VRAM memory ranges. BlazBlue is now playable again. 2013-01-13 03:52:49 +10:00
Henrik Rydgard
8c06edc47b It's getting close to the first totally unoptimized jit run. 2013-01-08 17:03:17 +01:00
Henrik Rydgard
b3fd1ff34c Lots of various work on the ARM jit. It executes a couple of blocks now. 2013-01-08 13:49:52 +01:00
Unknown W. Brackets
b8fcdc37e6 When not ignoring bad mem access, break to debug. 2012-12-24 22:12:52 -08:00
Henrik Rydgard
5fb8e6dfb0 DXT textures now mostly working-ish (work left to do on alpha for DXT3/5) 2012-11-28 16:12:29 +01:00
Henrik Rydgard
a97f66766d Add "slightly faster interpreter", optimizing the most common instrs. Not as helpful as I thought it would be on Android, really need a proper JIT. 2012-11-23 12:42:35 +01:00
Henrik Rydgard
f326c36220 Some cleanup, re-enable some apparently disabled jit ops 2012-11-18 23:14:22 +01:00