Commit Graph

125 Commits

Author SHA1 Message Date
Robert 5e460c57f8 psxmode: add all the rest on core side. psx mode works now.
- include a small game exe detection so pcsx2 doesn't believe it's running the bios
- cdrom.cpp has a hack to account for pcsx2's wrong iop dma timing when mixing mdec and cdrom dmas. This should be properly fixed for the benefit of all ps2 / psx software!
- dmasif2 is disabled since pgpu already handles it
2016-09-24 20:11:32 +02:00
Pseudonym c782b6222c More robust eeload hooking to monitor and interfere with bios and game loading.
Maybe some other cruft can go now this should be reliable.
2016-07-29 16:51:18 +01:00
NZJenkins ba706b6dab Check delay breakpoint condition
isBreakpointNeeded returns if breakpoints are needed for any combination
of the current pc and delay slot.
dynarecCheckBreakpoint checks conditions for each breakpoint slot.
2016-03-04 11:26:37 +13:00
Gregory Hainaut eaa211212d ee-fpu: upgrade the FPU to 3.0
properly return reserved register

Fix FCR test :)
2016-01-29 23:24:11 +01:00
Gregory Hainaut babb5480ce pcsx2: init some variables
Avoid gcc warning
2015-07-10 22:35:26 +02:00
Gregory Hainaut 7328e55ee9 pcsx2: disable tlb miss on the interpreter
Except on the debug build
2014-12-02 23:10:58 +01:00
Kingcom a95e55dc54 Add breakpoint support to R5900 interpreter 2014-09-18 16:31:44 +02:00
Sacha 7568f6f2ec Remove deprecated jASSUME from pcsx2 core. It is still used in some plugins 2014-08-15 14:32:56 +10:00
Gregory Hainaut fe30f2e48e pcsx2: tlb fix
* pc is incremented before execution of the instruction => must be
    decremented before exception

* PS2 support 48 tlb => mask need 6 bits
2014-06-20 13:52:05 +02:00
Gregory Hainaut 4d78b6be31 pcsx2/plugin: sign compare mismatch extra 2014-05-03 10:18:27 +02:00
ramapcsx2.code 8fd3fd7259 These logs never helped solve issues and they tend to spam in some games. Removing them.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5918 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-28 01:36:44 +00:00
gregory.hainaut ca3035fe07 pcsx2: on going work to better support tlb miss
Currenty code isn't activated because it will crash any game that do a tlb miss (with the recompiler)

However if you activate the code with the interpreter, the exception will be fired and new tlb setting
will be loaded => got nice picture with "Bouken Jidai Katsugeki"



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5911 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 16:23:31 +00:00
refraction d29a30c265 VIF: Reworked the VU delays in to scheduled events to simulate VU run time without killing Metal Saga or Fahrenheit. Adjusted the COP checks on the VU's to use the same method as the VPU_STAT is never set essentially so the VU is never "running".
Path3 Masking: Fixed a bug which caused persona 3 not to boot, previous a hack had been put in place to get around this.
VIF: Fixed a VIF error with the rare game Realta Nua, now goes through the prologue correctly. Game requires the EE timing hack to get rid of most of the noise (Path3 masking problem with new GIF unit, unfixable).

Expecting bugs, I will be monitoring this.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5147 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-07 01:48:34 +00:00
gigaherz 266f6fcd5d Made USBsetRAM work again. Required for the following commit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4897 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-09-04 01:49:34 +00:00
cottonvibes ac9bf45f98 pcsx2: Implemented Threaded VU1 :D
Threading VU1 took a lot of rewrites and new code to make possible (MTGS, microVU, gifUnit...), but we finally got to the point where it was feasible, and now we've done it! (so now everyone can stop complaining that pcsx2 only takes advantages of 2 cores :p).

The speedups in the games that benefit from it are great if you have a cpu with 3+ cores (generally a 10~45% speedup), however games that are GS limited can be a slowdown (especially on dual core cpu's).

The option can be found in the speedhacks section as "MTVU (Multi-Threaded microVU1)". And when enabled it should should show the VU thread-time percentage on the title bar window (Like we currently do for EE/GS/UI threads).

It is listed as a speedhack because in order for threading VU1 to have been a speedup, we need to assume that games will not send gif packets containing Signal/Finish/Label commands from path 1 (vu1's xgkick). The good news is very-few games ever do this, so the compatibility of MTVU is very high (a game that does do this will likely hang).

Note: vs2010 builds and Linux builds need to be updated to include "MTVU.h" and "MTVU.cpp".


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4865 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-08-12 02:31:49 +00:00
cottonvibes c05dc759e3 Big gif transfer code rewrite!
Pcsx2 now has a gifUnit class which acts like the ps2's gif and executes a single gif transfer at a time (and performs path arbitration according to priority and path3 slicing).

This new code is generally a speedup for most games. Particularly VU heavy games like GoW.
This revision breaks old saved state compatibility so don't update if you wish to keep playing with your old saved states.
Leave comments if this revision fixes or breaks anything...

Message to GS Plugin authors:
This new code now uses only 1 gif callback to transfer data to the gs plugin (GSgifTransfer).
pcsx2 also is garaunteed to send full GS primitives to the plugin. So you don't have to account for partial-transfers anymore.

Thanks goes out to shadowlady who tested around 500 games for me :D

Note 1: The old gif code is still in this revision, and can be enabled by the USE_OLD_GIF macro. The old code will be deleted soon.
Note 2: This revision also enables assertion dialogs in devel builds, and changed a lot of assume cases into assertions.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4821 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-24 13:02:50 +00:00
Jake.Stine f76e901c64 Minor cleanups for the new virtual memory alloc/reserve system:
* Moved VIF dynamic recompiler buffers to the recompilers section of PCSX2.
 * Using RecompiledCodeReserve for the VIF SSE functions.
 * Minor bugfixes to VirtualMemory class implementations.
 * Improved error handling and error message display.
 * [TODO] : implement a call to cpuShutdown() to clean up VIF unpack/SSE reserves.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4169 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-12-30 06:21:07 +00:00
Jake.Stine be1a590464 newHostVM: (WIP, may not run!) -- Applied host virtual memory mapping to the EE/IOP/VU main and on-chip memory banks. Added a new OO-based system allocator object for handling said virtual memory resources. Plus many code cleanups, and some added mess that needs to be cleaned up.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@4020 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-15 14:05:02 +00:00
Jake.Stine 5579350d22 newHostVM:
* Moved profiler management to the RecompiledCodeReserve class.
 * Improved error handling some more.
 * Numerous minor cleanups.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/newHostVM@3991 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-11-03 14:18:30 +00:00
Jake.Stine 7ad0ef4fb4 * Disable Ok/Apply/Cancel buttons on dialogs while settings are being applied, prevents potential deadlock when accidentally double-clicking the buttons.
* Add preliminary code for selectively disabling spam-heavy hardware registers


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3853 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-28 20:00:17 +00:00
Jake.Stine 3cfd0c68af * Rename cpuBranch[...] functions and vars to cpuEvent[...], which should be more clear and consistent as to their true purpose. (to clarify: events typically run during cpu branch instructions, but most branches don't actually have anything to do with whether or not there are events pending or events being run).
* Add some missing & ~0x0f address alignment stuff to odd-size FIFO reads/writes (thanks gregory)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3730 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-05 15:38:14 +00:00
Jake.Stine 1698382065 Simplified CPU-level exception behavior:
* Both INTC and DMAC exceptions are now issued together when possible (0x400 | 0x800 to the CAUSE register, respectively)
 * CPU exceptions are checked on every event now, instead of using scheduled interrupts on bits 30/31.  This removes the need to constantly reschedule events during interrupt-disabled states.
 * CPU exception test is moved to the top of the EE event test.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3728 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-05 15:11:19 +00:00
Jake.Stine 935159ed8e IPU: Split IPU DMA stuff out into its own file, and add missing region info (got left out AGAIN >_<) and a potentially important bit of IPU information to the savestate.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3726 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-05 00:36:03 +00:00
Jake.Stine 46b89abb72 * Move the GIF register handlers from dmac to hwRead/hwWrite (like the VIF registers they aren't actually DMA-related).
* Minor cleanups to trace logging and FastFormat string stuff.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3724 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-04 14:11:50 +00:00
Jake.Stine 003da7d287 MAJOR: All new hwRead and hwWrite handlers (expect regressions). Details:
* Writes via 16 and 8 bit ops now use 32-bit read/modify/write operations by default; which should enable nearly complete support for all such operations (instead of the formerly spotty coverage before).
 * Eliminated almost all former 8/16-bit specific register operations.  All code shares the same 32 bit handlers now.
 * Completely revamped the developer trace logs for hardware registers!  *ALL* registers are logged now, complete with address, name, and value being read/written (and nicely formatted!).
 * Handlers are now fully page-based using templated functions (minor speedup)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3704 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-31 05:22:26 +00:00
Jake.Stine a8e406523b Improved EE/VTLB memory management: Removes various psM/psR/psS/psH pointers and replaces them with a single unified eeMem pointer. Members of eeMem correspond to Main, Scratchpad, Hardware, etc. This simplifies the EE's memory allocation, improves compiler optimization, gets rid of some macro mess, and allows templated code to deduce the size of memory buffers automatically.
* 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
2010-08-16 15:57:01 +00:00
Jake.Stine 8375b0a989 Refactoring:
* Added __fi and __ri, which are abbreviations for __forceinline and __releaseinline.
 * Added some static qualifiers to functions in mVU, MMI ops, and others where appropriate.
 * Removed some unnecessary __fastcall qualifiers (since GCC gets funny sometimes when you combine __fastcall and inlining).
 * Made _1mb, _16mb, _1gb values common to all emulation code (moved from newVif/mvu to Common.h) -- they're useful! :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3624 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-09 04:10:38 +00:00
Jake.Stine bc849cc042 Merge const qualifiers and cleanups from ReorderingMTGS: Includes the VIF DIRECT changes, which seem to be stable this time. ;)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3549 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-22 12:20:11 +00:00
Jake.Stine d36bb19612 * Fix for Issue 493 -- non-standard SYSTEM.CNF contents are handled better now.
* Some minor exception/error handling fixes and improvements.

DevNote: the BOOT2 elf loader fix is still a hackfix.  I documented the proper fix for mimicking PS2 BOOT2 parsing, but not in a mood to do the full proper implementation right now.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3442 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-09 16:51:48 +00:00
refraction e035209623 Missed a little bit :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3348 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-29 19:34:44 +00:00
Jake.Stine 6d57e15615 * Likely fix for cpuIntsEnabled; I think this is the behavior Ref intended. :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3345 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-29 16:06:12 +00:00
Jake.Stine 1c7fc3e176 Mostly-new host exception system (host meaning the C++ / SEH exceptions, not the VM's PS2/MIPS exceptions). Main purpose is to make specifying diagnostic and end-user messages more sane. Secondary goal was to remove the need for C++ multiple and virtual inheritance, which are buggy in MSVC still, and problematic even when they aren't buggy.
I also re-implemented R5900 runtime exception handling for TLB Miss and such (devbuilds only, for now).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3335 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-28 18:03:54 +00:00
ramapcsx2 7dbbaf1c04 Small fix to the ee timing hack.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3325 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-27 12:56:35 +00:00
arcum42 26c497ceea pcsx2: Added back a few headers. A non POD-safe argument was fixed. Commented out some unused variables. And added a few helper functions for later.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3300 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-25 09:18:14 +00:00
Jake.Stine e96dbe443f Major header file house cleaning! Should speed up recompilation times by a few percents.
Linux note: There's a chance as usual that this might break something in Linux because Linux and Windows STL headers have different dependencies.  Namely <algorithm> might still be needed in on some of the PrecompiledHeaders.  If so, just re-add it and commit, and make a note:  // yes GCC really needs this one :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3295 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-25 02:35:27 +00:00
Jake.Stine 35b05e3836 * Fixing automatic patch application (again!) -- random crashes could occur on some games due to in-execution recompiler resets when gamefix options were changed by the GameDB.
* Implemented --gamefixes to the command line.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3289 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-24 16:04:27 +00:00
refraction 26fece9510 Summary of fixes
Games
- Resident Evil Dead Aim flickering graphics fixed.
- Flatout games should now boot everytime (instead of randomly)
- Sega Superstar Tennis flashing fixed
- Destruction Derby graphics fixed (NTSC confirmed, PAL unsure)
- Tenchu Fatal Shadows flickering textures fixed, Issue 748
- Spyro Hero's Tail should boot again, Issue 746

General Info
- General reworking of the GS paths with all paths prioritizing more correctly.
- XGKICK can stall if another GS transfer is in progress
- Major reworking of Path3 masking, could still be combined with normal Path3 transfers, but lets get it working first :P
- Taken in to account a few conditions which could have caused VIF to lock up/crash when stalling on ends.
- Unreversed GIF and SPR and VIF so its the normal way round
- all DMA paths should now resume correctly after being stopped by hardware
- GIF FIFO now actually transfers stuff :P
- VIF CMD's simulated by the length of the interrupts at the end.

Phew, i think that's everything :S

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3274 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-22 23:10:40 +00:00
Jake.Stine 24ae022a74 Fully implement hash-based database lookup. Fix some bugs that caused startup crashes in previous revisions of mine.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3273 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-22 18:57:48 +00:00
Jake.Stine 914474ebc9 GameDatabase / Patches:
* Made all database key comparisons case-insensitive, so that "patches" and "Patches" both work as expected, etc.
 * Applied patches should be remembered properly now when using suspend/resume and savestates (hopefully -- didn't test savestates yet).

DevNotes:
 * Reorganized all game database code into a generic interface used by the emulation core (IGameDatabase), and app-side implementation (AppGameDatabase) that loads the files and provides info in a thread-safe manner.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3223 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-18 14:27:13 +00:00
Jake.Stine 2300f972e4 Commandline, UI, and Game Database Work:
* Improved console window behavior during startup and shutdown (also fixes minor threading issues)
 * Added better failsafes for avoiding "rouge" pcsx2 processes left behind when wxWidgets would fail to "notice" window closures properly.
 * Database loader is now thread-safe and cleans itself up properly on exit.
 * Added some handy enumeration tools for the gamefixes (prep work for making them commandline controllable).
 * ... and more prelim commandline work!  (actual functional implementations coming very soon)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3212 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-15 14:13:23 +00:00
Jake.Stine ff1db14f9d Converted the GameDB to use wxWidgets classes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3188 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-09 17:37:11 +00:00
cottonvibes 2e6bda7c50 If any gamefixes are loaded by the db (including roundmode/clamping changes), then console titlebar will display [Fixes = n], where n is the number of gamefixes loaded.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3109 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-28 22:40:08 +00:00
cottonvibes d8b0ac03e5 Fixed patches/cheats still being applied on game reboot if they have been disabled.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3106 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-28 21:49:50 +00:00
Jake.Stine 81c35c9fcc Many small memoryleak fixes in PCSX2 (mostly related to newVIF's recompiler) and one memoryleak fixed in USBnull. Had to juggle around the initialization/reset code for VIF a bit to get it happy. This also removes quite a bit of redundant memory allocations and clears when starting/resetting the emulator; expect a small speedup on slower machines.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3103 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-28 16:54:42 +00:00
sudonim1 2c4101b78b Reload disc info as needed, gets some "codebreaker" ELF which switches to the normal boot sequence after a while closer to working.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3095 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-28 12:13:51 +00:00
sudonim1 276a78b14b Oops, games should boot again now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3093 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-28 10:52:04 +00:00
sudonim1 0fa3303be3 IOP: HLE ioman functions for paths starting with host[0-9]*:
Only open, close, read and lseek implemented for now.  Directories are not supported for now because of the need to match the dirent structure to the loaded ioman version.

To allow access the host filesystem from homebrew and games, enable the new option on the main menu.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3092 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-28 10:33:15 +00:00
cottonvibes e3cc848a72 Fixup drk's profiler to work again and also support mVU...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3053 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-21 02:49:14 +00:00
arcum42 0fb724295b Quick Linux fixes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3051 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-20 20:46:13 +00:00
ramapcsx2 7e924084e0 Fixed the EE timing hack.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3043 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-19 09:58:27 +00:00