Commit graph

187 commits

Author SHA1 Message Date
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
cottonvibes
4f573de6e8 Added a bunch of games to the database to have their gamefixes auto-enabled.
If you know a game that still needs you to manually select the gamefix in the gamefix panel, the please comment (or fill out an issue).


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3039 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-17 23:18:03 +00:00
cottonvibes
4de1b432c1 - Add "Enable Cheats" menu item.
Enable Cheats means enabling support from the files in "cheats\*.pnach"
Enable Patches means enabling support for the gamefixes/patches inside the game database...


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3033 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-17 05:37:32 +00:00
cottonvibes
5597a5e575 Cleanup patch.cpp...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3032 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-17 05:18:11 +00:00
cottonvibes
9c9769c380 Since we don't have a proper cheating system in pcsx2 yet, we're going back to the pnach system for game cheats.
This means you can put your cheats in "\cheats\*.pnach" and pcsx2 will read them from there.

Notes:
I have included some persona 4 cheats as an example in this commit...

Also note that currently the "Enable Patches" menu item also pertains to cheats (as well as database file patches).
I will add a separate "Enable Cheats" menu item in the future...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3030 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-17 01:56:54 +00:00
cottonvibes
16dfd5c9fc - Added eeRoundMode and vuRoundMode options to the game database (these options are only applied if patches are enabled)
- Rename game database to "GameIndex.dbf"


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3029 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-16 09:50:15 +00:00
cottonvibes
ed9b0a3715 - Console TitleBar mentions how much patches were loaded (if no patches loaded then it doesn't say anything)
- Database key searching is no-longer case-sensitive (so for example: [patch = A1B2C3D4] is the same as [Patch = a1b2c3d4])


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3024 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-16 03:51:49 +00:00
cottonvibes
7abc292cb2 Patches are now part of the game database.
They can be CRC specific, or just based on the game serial.

Examples:
[patches]
	// This patch is loaded regardless of crc
	patch=0,EE,002aa040,word,24020001
[/patches]

[patches = 84993903]
	// Patches go here
	// This is only loaded if crc = 84993903
	patch=0,EE,002bc040,word,24020341
[/patches]


notes:
- pcsx2 only loads the first [patches] block that matches the game.
- The [patches] block based on crc takes priority when pcsx2 searches for patches...
- Everything in-between the patches block gets fed to pcsx2's old patch parser; so currently the patch syntax is the same as before...
- A lot of patches weren't added to the database since they didn't include serial codes in their *.pnach files :/


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3007 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-15 03:11:00 +00:00
cottonvibes
70a247674d Get the console title-bar to say "Unknown Game" if the game wasn't found in the database...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3001 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-13 22:04:52 +00:00
cottonvibes
ae3df35369 Scratched the idea about having the compatibilities in increments of 100, and just made them increments of 1 instead.
There shouldn't be a reason to add more categories to the current list, and we will have a 'notes' field for additional information....

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2994 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-13 06:57:14 +00:00
cottonvibes
57206faa23 Took out crc code from title-bar so its not so crammed up... and changed "Compatibility" to "Status" to free up more space.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2993 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-13 05:50:14 +00:00
cottonvibes
46e08b6b8a - Added game compatibility info to database and added about ~50 more games (same info as pcsx2.net's compatibility list)
- Games now display their compatibility status on the console title-bar ^^
- Modifications to DataBase_Loader to write to the database and save changes

Note to pcsx2 team:
The compatibility info is numerically based.
000 ~ 099 = Unknown Compatibility status
100 ~ 199 = Nothing
200 ~ 299 = Intro
300 ~ 399 = Menu
400 ~ 499 = In-game
500 ~ 599 = Playable
600+      = Perfect
(Currently no game has the perfect status since the pcsx2.net compatibility list didn't have that as an option)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2992 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-13 04:59:31 +00:00
Jake.Stine
069d1d59b8 * Should fix iso hot-swapping.
* Fixed a startup crash by moving the game database initialization to cpuReset().  This is a temporary measure until we sort out a better system for it.  This is needed because initializing complex classes in C++ as globals is VERY dangerous and unpredictable.  The databse was being loaded before any wxWidgets/UI objects were being created themselves, so any errors, exceptions, or console logs generated by the database were likely to cause unpredictable behavior.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2989 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-12 18:27:01 +00:00
cottonvibes
36973bfb92 - Get pcsx2 to display "game name (region) [serial] [crc]" in the console title-bar based on info found in game database.
- Some work on the database_loader class... now loads all game data into memory, and you can switch the game who's data is being read by calling setGame().
- Made the database_loader class a global "GameDB" so that it can be referred to throughout pcsx2 code...


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2983 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-12 09:33:45 +00:00
ramapcsx2
575a56dc5c Changed the FFX speedhack to also set all EE timed events to happen near instantly.
This is now a multi purpose hack, which could potentially fix / break a lot of games.
It mostly affects FMV and PATH3 masking issues, but also stops games from booting, or makes them boot.
Use with caution :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2965 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-05-07 22:10:36 +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
refraction
35498e329f -Fixed Metal Saga video (which i seemed to have broken with voodoo!! maybe i should see the lady in the voodoo shop, last time i did that she told me i had to fight a fearsome pirate...) ahem, sorry.
-Fixed a Bitstream bug which was annoying me.
-Modified a silly long if check with multiple bit shifts, should be a tiny bit quicker.
-Various other IPU changes

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2926 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-29 00:10:15 +00:00
sudonim1
04cf8bcb0f Fix ELF loading.
Remove save/load of boot2 injection option (shouldn't be part of the configuration any more as it's determined by the boot type, but I'm not sure where to move it)
Added missing entry point trigger after ELF loading.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2922 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-28 00:05:41 +00:00
Jake.Stine
13e73db939 Add DECI2 state variables to savestates; fixes occasional crashes in some games when using savestates combined with the new skip bios hack. (future savestate changes will probably be versioned from here out!)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2917 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-27 16:23:08 +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
arcum42
bf1d011049 The usual batch of Linux fixes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2885 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-22 00:48:06 +00:00
sudonim1
36c9d63495 New less intrusive BIOS skip hack replacing the old BIOS skip hack. Works with Ico, Tekken 5, and probably any other games that were problematic with the old hack.
Changes to patch system required by this and fix for boot time (first field = 0) patches when booting through BIOS.
Store Sony part number for the game disc globally for future use in selecting game fixes, patches, providing information to the user, etc.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2874 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-19 23:46:12 +00:00
refraction
b1954edc3d - Better implementation of Reverse FIFO (Fatal Frame QWC Warning and more!)
- Improved handling of suspended DMA's, Also some traps in case DMA values are changed during suspend (please report if they don't start with 5 or 6)
- Better handling of GS Path priorities, this improves many Path3 Masked games such as Star Wars Episode 3, Gran Turismo 4 (slightly) and Videos like Digital Devil Saga/FFX
- Removed Voodoo Cycles
- Doesn't kill everything this time :P

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2853 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-04-15 00:32:58 +00:00
cottonvibes
3afa45d34b Delete sVU macro mode code (was obsolete and got broken somewhere along the way...)
Some more vu changes (no functional changes yet)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2631 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-02-24 07:20:33 +00:00
cottonvibes
227a651c17 VU interpreters/recompilers: Started working on a way where we can run the VU's based on how much time has actually passed, instead of constant fixed cycles.
Currently still using the fixed-cycle method... so should behave the same as before.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2628 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-02-23 09:22:40 +00:00
ramapcsx2
706c68c1cd PCSX2:
- Fix SPR interrupts to a delay of 4 cycles always. Makes sure they're handled first.
(Fixes Obscure2 and Alone in the Dark FMV.)
GSdx:
- One more CRC :p

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2584 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-02-10 18:44:58 +00:00
ramapcsx2
cf809cd1df Limit EESIF1 scheduled interrupts to a maximum of 384 cycles, stops a lot of timeouts and subsequent reschedules.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2476 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-22 16:02:09 +00:00
ramapcsx2
ca92c6f7b2 Fix some bad/flickering textures, caused by a too big GIF interrupt delay.
Fixes Drakan and a Tekken 5 game mode.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2465 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-01-21 23:25:54 +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
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
ramapcsx2
8d5caa300d Some more warnings enabled by default in devel builds.
It'll be good to know which games trigger these.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2290 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-12-03 12:06:39 +00:00
Jake.Stine
4828beb3c3 * Added toggles for game log output: EE StdOut, EE Deci2, and IOP StdOut. Toggles are provided via a menu in the Console Log.
Dev notes:
 * Renamed MtgsthreadObject to SysMtgsThread (matches naming pattern of other thread classes).
 * Added accessors for GetMtgs() and GetCoreThread() [rationale for them documented in source comments]
 * Removed wxHelpers namespace since we're using px name prefix instead for most stuff.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2238 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-11-23 06:54:24 +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
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
a6d716b351 Replace assert() with pxAssert() in pcsx2 core and recompilers.
Rationale: assert() is not thread safe on win32 (the modal popup can block user input or hang the program), and is neigh useless on Linux (just does a DebugBreak/Trap).  Furthermore, pxAssert() registers stack traces and supports more detailed textual descriptions.  I considered just #undef/#define on the assert macro, but MSVC's assert.h also does #undef/#define so it'd be too prone to accidentally calling MSVC's problematic version if some nested header included <assert.h> (which many do).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2077 96395faa-99c1-11dd-bbfe-3dabce05a288
2009-10-25 15:07:43 +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