Commit Graph

67 Commits

Author SHA1 Message Date
Jake.Stine 02d5ed7f45 * Implemented GIF PATH/TAG logging option.
* Some other EE/Core logging additions and formatting tweaks.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3870 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-10-04 17:22:54 +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 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 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 4f9a5c6876 Remove all MMX and XMM register freeze code.
DevNote: I could have left the code for the freezes in, except I *really* don't want us to ever have to resort to using such a system ever again in the future.  For anything. (its just not safe on modern optimizing compilers)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3392 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-05 01:12:38 +00:00
Jake.Stine 87c80d6e2b * Add gRegionMode to the savestates; probably fixing a lot of unstable savestate behavior on PAL games (not sure how it managed to escape -- I explicitly remember adding the region info to the savestate in pcsx2-pg like 2 yrs ago).
* Make the new MTGS register packet during vsync not upload 0xf0->0x100.  This is technically GS internal register space that the GS plugin may update or modify as it processes GIFtags.  Thus, PCSX2 shouldn't touch it.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3331 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-28 03:09:51 +00:00
Jake.Stine c10e47739e git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3308 96395faa-99c1-11dd-bbfe-3dabce05a288 2010-06-26 07:26:43 +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
Jake.Stine 70d47bf240 Copyright 2010 : PCSX2 and plugins! (notable exception: didn't update copyright info in any Gabest plugins)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2937 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-03 14:08:02 +00:00
Jake.Stine 5d37925617 Major UI renovations!
* Added versioning info to savestates! (along with some other bugfixes)
 * Simplified the Boot and System menus -- removed the old Skip BIOS hack and replaced it with the new BOOT2 injection method (which is considered hack-free at this time).
 * Removed lots of UI deadlock gotchas.
 * Some new confirmation dialogs and better error handling.
 * Implemented an exclusive SysExecutor thread, which serves the purpose of executing system/VM commands and events in uninterrupted order (including suspend, resume, savestates, etc.)



 * ... and probably broke linux!

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2911 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-27 13:12:03 +00:00
sudonim1 4457fe40fc Removed all trailing whitespace in *.c *.cpp *.h because it irritates me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2897 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-25 00:31:27 +00:00
Jake.Stine 7cd07da2d7 Added some info to the GS window title (finally!). Includes an fps readout!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2425 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-11 08:02:17 +00:00
Jake.Stine f60ed711cc Skip Bios hack works in EE interpreters now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2343 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-14 14:36:13 +00:00
Jake.Stine c17455c702 User Interface code cleanups and bugfixes. some highlights:
* Configuration panels are all modal-less now, so that you can open the config panel and leave it open while running games.
 * Handful of thread sync improvements.
 * Fixed on-the-fly interpreter/recompiler configuration.
 * Fixed plugin hotswapping (mostly works, but still a little funny at times)
 * All new assertion dialogs and popup message handlers.
 * RecentIsoList defaults to 12 instead of 6

Dev Notes:
 * I had to create a new set of assertion functions called pxAssume*.  Originally I hoped to avoid that complexity, and just use a single one-assert-fits-all case, but turned out blanketly using __assume() for all assertion cases wasn't reliable.
 * wxGuiTools: Replaced the operator, with operator& -- the latter has proper order of precedence, the former required () to scope correctly. >_<

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2339 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-14 12:18:55 +00:00
Jake.Stine f52faead0c Re-did the VUmicro's "Cpu Provider" structs into classes, and split sVU and mVU into independent classes.
* Better error handling for when sVU fails allocating memory at a specific location (should fail less).
 * Partial support for detecting and handling non-SSE2 machines with some grace.
 * Improved sVU's allocation chances with a second try at another randomish address (and removed alloc fail spam from the console -- only logs on complete fail now).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2321 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-07 14:00:39 +00:00
Jake.Stine acbe1ed547 Cleanup for VsyncInThread, lots of source code comments. (it's fun reading! ...maybe)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2318 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-06 15:31:11 +00:00
Jake.Stine 1e431fb69a wtf? A working framelimiter? Turbo and slowmo hotkeys? Frameskipping?! Why it's all here! Rejoice! And then find lots of bugs, too, I'm sure. Note: Frameskipping has no gui stuff yet... I'll do that soon.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2294 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-03 15:51:39 +00:00
arcum42 ba37f31849 Trim and tweak a bunch of includes, and a few headers.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2197 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-14 12:02:56 +00:00
arcum42 0d68166b65 A few more changes to the patch code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2137 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-06 04:45:21 +00:00
arcum42 6a7c617a65 Misc changes to Patches.cpp. Unconst xSHUF for the moment, so Linux compiles.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2136 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-06 01:50:11 +00:00
arcum42 839ac9017b Enable patches, and fix Linux compilation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2125 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-03 21:29:45 +00:00
arcum42 35aac70cd1 Cause the gui to remember if 'Enable Patches' is checked. (Still not used, though.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2121 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-03 13:31:45 +00:00
Jake.Stine 7d458d583c Revamped some console log stuff.
* Added more colors!
 * VM's EE/IOP logs (the ones that come from the emulated games themselves) are colored accordingly: EE are faint cyan, IOP are faint yellow.  They're intentionally "hard to read" because 99% of the time they're meaningless trivia (but still cool since it's what the actual devs would have used for developing the games!).

Dev Notes:
 * Removed Console.Status (specify blue/green colors manually if you want them).
 * Renamed Console.Notice to Console.Warning.
 * I changed the overloads so that both char* and wxChar* versions work like printf now (no need to use wxsFormat when working with unicode strings).  I also removed wxString& versions of the overloads.  This should (I hope) also be an easier port to wx2.9 or 3.0, when that time comes.
 * Default log color is now black instead of gray; typically you'll want to manually specify Color_Gray when doing high volume logging (like the EErec's block tracking in debug builds).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2091 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-29 13:32:40 +00:00
Jake.Stine efc35405f8 Reorganized the exception/signal handlers, setjmp/longjmp, and SysCoreThread stuff:
* Exception/Signal handling now uses an EventSource, so that multiple handlers can be registered.  This is in preparation for (eventual) more complete MIPS TLB support in the VTLB memory model.
 * Improved code isolation, so that recompiler-specific code is primarily in iR5900-32.cpp (cleans up Counters.cpp and SysCoreThread.cpp)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2063 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-23 20:24:59 +00:00
Jake.Stine 00461fdac6 aligned_stack: synced with trunk, to bring in the new console code for additional testing under a (properly working!) linux.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2046 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-21 01:25:55 +00:00
Jake.Stine 27174c3f5b * Improved the framelimiter sleep mode more (less cpu used and more responsive to fps fluctuation near the 60fps line at the same time)
* Added timeBeginPeriod() to improve the Win32 kernel scheduler resolution (improves sleep accuracy and thread responsiveness)
 * hackfixed some code that made exiting pcsx2 "slow" sometimes.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2041 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 23:13:22 +00:00
Jake.Stine 2cb8e571cd Second half of __unused removal -- comment out (remove) names on unused parameters as per the guidelines of some C guideline that all compilers adhere to (this suppresses the same warnings __unused used to suppress).
Minor cleanups to Counters/Gif.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2038 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 11:53:18 +00:00
Jake.Stine e3a5229076 aligned_stack branch progress!
* Implemented setjmp/longjmp method of escaping recompiled code, circumventing the deadly pitfalls of the g++ exception mess.
 * Use longjmp to jump to a "safe" location (outside recompiled code) for suspending and canceling the SysCoreThread (see StateThreadCheck_LongJmp)
 * I'm the stack daddy mack.  That's right.  Uh huh.  Uh huh.
 * Test for m_detached in PersistentThread::IsSelf, since Linux likes to recycle thread handles in a hurry (like, as in, consecutively)
 * Fix a deadlock in the Consoole Log (seems to be GTK+ specific, and in fact I'm pretty sure wxApp->Yield() isn't thread safe and thinks it's recursive even when it's not)

git-svn-id: http://pcsx2.googlecode.com/svn/branches/aligned_stack@2035 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-19 01:50:52 +00:00
Jake.Stine 54f1409090 Gave the frame limiter some smarts so it can sleep the EEcore a bit if there's nothing to do for a while.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2033 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-18 17:12:02 +00:00
ramapcsx2 d87cc4d250 Hack in a frame limit toggle on F4 and TAB using a global int. :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2012 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-16 10:45:47 +00:00
Jake.Stine 1f2daa6459 User Interface:
* Fixed and added better Emulation/System menu updating.  Suspend/Resume is more consistent, and Reset grays itself out after being used.
 * Entering plugin configurations auto-suspends the emulator.
 * Changing plugins in the Configuration PAnel takes effect now without a restart.
 * Added preliminary support for an ExtensibleConfirmation Dialog box (contains a sizer you can add content to, and also has an optional "[x] Do not show this again" checkbox).

Bugfixes:
 * Added some mutex protection to cdvdNewDiskCB; "just in case."
 * Resolved several recursion and deadlock scenarios when (very!) rapidly suspending, resuming, and resetting the emu.

Developments / Code Cleanups:
 * Renamed SysCoreThread ExecutionModes:  Suspend/Resume are now Opened/Closed (which more accurately reflects the fact they opena nd close the plugins, and helps avoid ambiguity with the "Paused" state).
 * Added Exception::ThreadTimedOut, which is now thrown from Semaphore::Wait when recursive wxApp::Yield() calls are detected, and a deadlock occurs (basically cancels the current action which, most of the time, allows for full recovery).
 * Major Threading namespace cleanups, documentations, etc.
 * Removed wxScopedArray (scopedarray.h) and replaced it with a better implemeneted ScopedArray class.
 * Removed toUTF8 class, which I only added a couple weeks ago because I didn't realize wxCharBuffer had an implicit typecast to (char*).
 * Implemented more Source/Listener events for Pcsx2App.  CoreThread events are sourced properly now, and added SettingsApplied and SettingsLoadSave Sources.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2010 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-16 03:58:29 +00:00
arcum42 3d43e53928 Hack! Make Resets work in Linux by not throwing an exception that is supposed to be thrown, because gcc seems unable to catch it for some bizarre reason.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2004 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-13 12:49:05 +00:00
Jake.Stine e8e61a5cf8 Settings work again!
* 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
2009-10-09 15:17:53 +00:00
Jake.Stine 653d09e821 Lots of new code maintenance stuffs:
* Completely new assertion macros: pxAssert, pxAssertMsg, and pxFail, pxAssertDev (both which default to using a message).  These replace *all* wxASSERT, DevAssert, and jASSUME varieties of macros.  New macros borrow the best of all assertion worlds: MSVCRT, wxASSERT, and AtlAssume. :)
 * Rewrote the Console namespace as a structure called IConsoleWriter, and created several varieties of ConsoleWriters for handling different states of log and console availability (should help reduce overhead of console logging nicely).
 * More improvements to the PersistentThread model, using safely interlocked "Do*" style callbacks for starting and cleaning up threads.
 * Fixed console logs so that they're readable in Win32 notepad again (the log writer adds CRs to naked LFs).
 * Added AppInit.cpp -- contains constructor, destructor, OnInit, and command line parsing mess.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1950 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-04 08:27:27 +00:00
Jake.Stine 893fcebf52 Implemented 64-bit writes for Counter registers -- Fixes uLaunchELF!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1928 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-29 17:15:34 +00:00
Jake.Stine 6b9ffd8132 Renamed memzero_obj to memzero. Been meaning to do that for a while. Also, Savestates *almost* work, but it's just not going to happen. See everyone in 5 days or so. -_-
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1913 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-23 12:53:32 +00:00
Jake.Stine fd7e17b5df Fix compilation errors from my prev commit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1910 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-23 11:51:41 +00:00
Jake.Stine aaa3b773c6 Improved MTGS (added better suspend/resume support), and work on savestates a bit (still not working tho)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1908 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-23 09:53:21 +00:00
Jake.Stine 0f259e62d5 Implemented keyboard accelerator tables and a hashed global command table (should be ideal for eventual GUI extensions via plugin, and toolbars and other fanciness). Removed Pause menu and replaced it with a Suspend/Resume menu. Closing GS window behaves more nicely.
Projects: Removed FrameworkVersion descriptor, don't think it matters for C++ code.  Removed all translation files, since they're grossly out-dated and need to be remade anyway.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1894 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-20 20:54:45 +00:00
Jake.Stine c9c924fe35 Yay, craploads of fixups for the new gui:
* Lots of crashfixes and threading rules compliance (like using wxYield instead of ProcessPendingEvents)
 * Killed off some memory corruption
 * Better error handling and reporting
 * Much speedier suspend/resume during emulation
 * Revamped entire savestate system to use a RIFF-style file format (untested, will work on it soon)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1832 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-16 17:23:02 +00:00
Jake.Stine d2fbb22076 Upgraded PCSX2 core and utilities to GPLv3.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1783 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-08 12:08:10 +00:00
Jake.Stine 3b10771c36 Got rid of that old 'params' mess on console logs. Not needed anymore since wxwidgets has nicer built in formatting options (never liked it anyway)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1782 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-08 05:37:40 +00:00
Jake.Stine 976d5ec539 * Implemented Skip Bios (settings still not saved tho)
* Fixed a bug in how I was (not) handling pthreads return codes.  It's errno you need to check, *not* the function's return value. ;)
 * Changed MTGS over to use the pthread_cleanup api.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1779 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-09-08 03:44:35 +00:00
Jake.Stine 980afabc30 wxgui:
* Moved some files around in an attempt to improve CoreEmu and UI separation.
 * Major upgrade to the UI's handling of savestates
 * Maintenance work to the C++ exception handling
 * Some improved error handling and message popups here or there

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1714 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-08-31 03:47:05 +00:00
Jake.Stine 9303bc5bf2 wxgui: Prepped the R5900 recompiler for the new wxWidgets-enhanced dedicated emulation thread design, and removed the old boolean-based re-entrant event checking mess.
Note: Nearly have a successfully booting branch! (bios crashes when it reaches CDVD api callbacks, should be a simple fix but it'll have to wait until later >_<)

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1680 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-08-25 15:38:48 +00:00
Jake.Stine 4836aac1f5 wxgui: separated core emulation options from user interface options (mostly! some interdependencies remain), and stripped out some of the old framelimiting toggle/cycle code, which will be replaced with a better framelimiter system soon.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1602 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-08-04 08:21:10 +00:00
refraction 7266dd12d2 Fixed up Soul Calibur 3 regression in r1400. It was a test bit of code, which is obviously wrong :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1410 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-06-20 13:26:52 +00:00
refraction 0f30bf62b5 COP0.cpp: Updated the commented out Perf counter code to work on the newer builds, also removed the line which stopped them updating at all if the interrupt wasnt on.
Others: Fixed a couple of unpack bugs, tried to tackle an MFIFO bug with Tekken Tag. Also re-jiggled a few bits on my recent changed, please negative if it breaks anything.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1400 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-06-19 03:13:03 +00:00
refraction 5278275dd4 Big fixes just for my friend Ferrarinews cos im sick of him
GT4: Loading screen corruption + Freezing ingame fixed
GT3: Freezing ingame fixed
Soul Calibur 3: Now loads again
Soul Calibur 2: Now loads again and should no longer have the Timeout issue.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1382 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-06-18 00:13:50 +00:00
refraction 78746f0d3a Modified how the GS interrupts work, solves the issue of the picture flashing on and off in some games (Street Fighter EX3). Needs some testing possibly, but should be better.
Developer note: The reason for this is the event can only generate an interrupt if it is enabled (via CSRw). the CSRw has to also reflect the IMR status else it could give false readings.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1380 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-06-17 20:58:03 +00:00