* Smartened up the microprogram cache. Programs are (quite accurately) selected based on how often and how recently they have been used. Solves constant recompilation issues in games like FFXII and Tekken 5 [but not the SPS, sorry!].
* Changed memory allocation so that microprogram blocks are allocated *on demand* -- this saves a lot of memory and makes it possible to test 64-program caches (which would previously fail due to exceeding 2gb ram allocations!). Also fixed a few small memory bugs in Init/Alloc, and made it so mVU only allocates memory once instead of on every reset. :)
* Tweaked uses of progSize in microVU.h so that it's consistent [all instances of progSize are (vumem_size / 4) now]
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1180 96395faa-99c1-11dd-bbfe-3dabce05a288
- Implemented Nneeve's logical min/max algorithm. This should fix the problems with DaZ and mVU.
- Applied a patch by Gigaherz that more clearly distinguishes Immediate values in microProgram log files.
- Added a speedhack to disable the logical min/max code. (see below)
Note:
From my testing, using DaZ on mVU doesn't do much. However I have an AMD cpu, and they don't benefit as much as Intel C2D's from DaZ. So this could be effecting results.
The logical min/max code is SLOW, and the little-benefit I get with DaZ means I get better performance with DaZ off and the min/max speedhack (which disables the extra min/max code).
It would be nice is someone with an Intel C2D can compare the speed of:
-mVU normal without DaZ
-mVU normal with DaZ
-mVU min/max speedhack without DaZ
-mVU min/max speedhack with DaZ
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1177 96395faa-99c1-11dd-bbfe-3dabce05a288
Changed a few lines from cotton's idea of readability to mine, at least
until cotton reverts it.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1174 96395faa-99c1-11dd-bbfe-3dabce05a288
-increased rec-cache so GOW2 should be happy (untested)
-hacked-fixed some problems for now that I'll be working on properly fixing over the next few days.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1173 96395faa-99c1-11dd-bbfe-3dabce05a288
FFX's intro got a 8~10% speedup with the hack, and it should be safe for 90~95% of games.
It can be enabled in microVU_Misc.h
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1167 96395faa-99c1-11dd-bbfe-3dabce05a288
- Major flag algorithm rewrites (work in progress)
- Abused macros to create my tables, knocking off 800 lines of code.
- VU0 and VU1 have different dynarec cache sizes now (vu0's is 1/4 the size of vu1's)
- Minor changes...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1166 96395faa-99c1-11dd-bbfe-3dabce05a288
- mac flags now stored memory instead of in upper 16 bits of GPRs.
- minor changes...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1159 96395faa-99c1-11dd-bbfe-3dabce05a288
basically if you run an elf file now, the cdvd plugin will attempt to open once, and if it has an error (like loading no-game), it'll let you continue running the elf file, and it won't bug you again.
but if it did open successfully, it'll initiate the cdvd plugin normally (allowing elf files to read the cdvd contents, like the Snes emu for ps2...)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1154 96395faa-99c1-11dd-bbfe-3dabce05a288
- Fixed up some code so blocks are recompiled less often.
- Tweaked flag code.
- Minor changes...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1151 96395faa-99c1-11dd-bbfe-3dabce05a288
Emitter: Added xJcc8 / xJcc32 functions for doing modified jump targets.
Also: minor cleanup to recent counters fixes (nothing relevant, just reduced out some copy-paste jobs for clarity).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1143 96395faa-99c1-11dd-bbfe-3dabce05a288
- PCSX2 would repetitively call CDVDopen if loading an elf file and your cdvd plugin didn't have an ISO already pre-loaded. Basically I had to switch to CDVDnull whenever I wanted to load an elf... well not anymore xD
microVU:
- Implemented the VI regs thing where if an opcode tried to access vi regs 16~31, the VU's should return vi0~15 (viReg & 0xf); technically it should never happen, but from my tests the BIOS seems to do this... so maybe some rare games do it too...
- Our VIF code apparently uses VU cycles for some stuff, so I now update the cycles variable VIF relies on.
- Minor Optimizations
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1136 96395faa-99c1-11dd-bbfe-3dabce05a288