Guest memory is now mapped into a shared memory/file mapping, for use
with fastmem.
64-bit and 128-bit arguments are passed by register/value instead of by
reference/address.
LDL/LDR/SDL/SDR now use 64-bit GPRs instead of SSE.
These have no meaning in x64 (apart from throwing compiler warnings),
and we don't do 32-bit anymore. Also saves needing to include
`Pcsx2Defs.h` in files which don't otherwise need it.
Another small piece of #3451
Moves all VTLB pointer manipulation into dedicated classes for the purpose, which should allow the algorithm to be changed much more easily in the future (only have to change the class and recVTLB.cpp assembly since it obviously can't use the class)
Also some of the functions that manipulated the VTLB previously used POINTER_SIGN_BIT (which 1 << 63 on 64-bit) while others used a sign-extended 0x80000000. Now they all use the same one (POINTER_SIGN_BIT)
Note: recVTLB.cpp was updated to keep it compiling but the rest of the x86-64 compatibility changes were left out
Also, Cache.cpp seems to assume VTLB entries are both sides of the union at the same time, which is impossible. Does anyone know how this actually worked (and if this patch breaks it) or if it never worked properly in the first place?
Allocate memory in an x86-64-compatible way
Another part of #3451
Note: While this shouldn't change how anything works, it's been the #1 source of breakage of 32-bit builds in #3451 (it was the cause for the failure of win32 to allocate memory and the failure of linux-32 afterward) so we should definitely make sure it gets tested
see #3523 for more information
Add GoemonUnloadTlb function that invalidate TLB cache.
Currently the function is only used on the interpreter. It fixes TLB error after a reload of data.
Next step: porting to the recompiler
VTLB does some nonsense with signed integers for the pointers.
We've got to make sure to set the signed bit in the correct bit on 64bit pointers so it works.
This has no functional change on x86_32, it's mostly just changing a few pointer to u32 conversions to uptr and sptr.
I can not yet confirm if this runs on x86_64, but compiling is enough of an issue currently.
Tlb mapping is stored @0x3d5580 (GoemonTlb[150])
The function that will populate the tlb is around pc = 0x356250, ra = 0x33ad48
The idea is to add a callback on 0x33ad48 block that will populate the tlb based on
ee mem content.
Note: The hack is based on previous Virtual PS2 => Physical PS2 LUT
note: automatic gamefixes are done after done after the init that why code was splitted.
note2: The LUT is 4MB and only used for only 1 game. So I only allocate it when the gamefix is
enabled
* Added some bounds checking to debug builds for VTLB mappings.
* Fixed a VU mapping bug that caused boot crashing
* Fixed some startup, shutdown, and reset resource management.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4021 96395faa-99c1-11dd-bbfe-3dabce05a288
* Includes a minor tweak to DMAC.h - removed tDMA_TADR / tDMA_MADR / etc. and replaced them with a single tDMAC_ADDR class.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3644 96395faa-99c1-11dd-bbfe-3dabce05a288
* Now using SSE for all hardware register reads and writes (mainly MFIFO stuff) [don't expect a speedup, really -- its more of a code simplification in this case].
* [refactoring] Changed the EE Memory (vtlb) to use the u128 type instead of u64 for the 128-bit loads/stores (see mem128_t typedef)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3626 96395faa-99c1-11dd-bbfe-3dabce05a288
* Switched the SysCoreThread to a static (fully persistent) thread.
* Added some listeners for when the CoreThread status changes
* fixed some slowness in savestates, and the emu will now stall until savestates complete, if you try to exit too quick (avoids savestate corruption)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1993 96395faa-99c1-11dd-bbfe-3dabce05a288
Most things should be a bit faster with this new system. The system is more balanced than the previous one, in that it provides a better overall performance across most games, but some specific FMVs (like Disgaea 2's) will be a bit slower. On the other hand, others like DQ8 and Kingdom Hearts 2 FMVs get a big speedup. Almost all in-game stuff should be either the same or faster now.
Set a bunch of ignores for TortoiseSVN users, as suggested in Issue 166.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1083 96395faa-99c1-11dd-bbfe-3dabce05a288
Fixed a bug in the memorycard hotswapper. It wasn't reloading the cards correctly after changes.
Improved the new INTC hack slightly, and changed its description since it's not quite as universally awesome as Pseudonym and I had hoped when we worked on it last night. -_-
Added __fastcall and __forceinline to some of the VIF's unpack functions, where appropriate (very small speedup).
Removed some code I added to the MULT/DIV instructions, since it wasn't needed afterall, and fixed some typos in vtlb's API.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@538 96395faa-99c1-11dd-bbfe-3dabce05a288
Added interface.cpp (plugin/pcsx2 interface) and savestate.cpp to SPU2ghz, to help clean up SPU2.cpp.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@463 96395faa-99c1-11dd-bbfe-3dabce05a288