Commit graph

1181 commits

Author SHA1 Message Date
Sonicadvance1
5dd49edaec Badaboom. Add in Memory include to CDUtils.cpp 2012-10-30 02:45:42 +00:00
Sonicadvance1
8fed3b76c8 If setting videobackend back to null strings, Just set it to the front of the list. Fixes loading game specific INI files that don't load back the "default" video backend which is nothing. 2012-09-25 00:47:37 +00:00
Ryan Houdek
b4ae200d0d This changes a mmap in MemArena so you don't need 786MB of memory free to actually allocate the 1GB memory space in Linux 32bit. I was also running in to this issue in my development. Kudos to plbl4ster to actually taking the time to research this. Closes issue 5625. 2012-09-23 10:08:13 -05:00
Pierre Bourdon
90af798d3d Partially revert be200074e9 for OS X systems
/dev/shm is not a tmpfs mountpoint on that operating system. Use /tmp but keep
the unlinking to avoid useless disk IO.
2012-08-25 03:30:37 +02:00
Ryan Houdek
be200074e9 [Linux] Change from using /tmp to /dev/shm in MemArena so we don't cause any disk IO, also unlink file while it is open to allow multiple instances running. This was discussed months ago, but was never implemented for whatever reason. 2012-08-22 23:39:50 -05:00
Pierre Bourdon
54fc4029dd Use do { ... } while (0) for the *_LOG macros
Without this patch, such code would not compile:

if (cond)
    WARN_LOG(FOO, "msg");
else
    WARN_LOG(FOO, "msg2");
2012-08-20 13:12:49 +02:00
NeoBrainX
08a9c66037 Revert the recent zcomploc changes including the Graphic_Fixes merge.
Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.

This reverts commit 0efd4e5c29.
This reverts commit b4ec836aca.
This reverts commit bb4c9e2205.
This reverts commit 146b02615c.
2012-08-10 20:12:02 +02:00
sktsqrl
8dd11bd1c0 fixes issue 5507 2012-07-11 20:54:50 -07:00
Pierre Bourdon
e550623b11 Added a button to dump the FakeVMEM from the memory debugger if the game uses it 2012-06-19 13:51:29 +02:00
Pierre Bourdon
988bd53b5f Support ANSI color codes in the console logger for Linux/Mac 2012-06-19 12:11:15 +02:00
skidau
b0d271db3c Changed MOVDDUP to use MOVSD on non-SSE3 CPU's.
Added DMA wait time under DSP HLE mode.

Fixes Knockout Kings 2003.
2012-06-02 10:06:47 +10:00
Pierre Bourdon
1efabea9b4 Fix compilation errors with g++4.7 2012-05-26 08:09:50 +02:00
skidau
146b02615c Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch) 2012-05-26 13:47:07 +10:00
nitsuja
99b202fd2e savestate vertexmanager (base) since it affects VertexLoader::RunVertices which affects g_pVideoData 2012-05-26 13:18:08 +10:00
nitsuja
a81631b58e made savestates synchronous and immediate. this allows saving or loading while the emulator is paused, fixes issues where savestate hotkeys would get ignored if pressed too close together, might speed up savestates in some cases, and hopefully makes savestates more stable too.
the intent is to replace the haphazard scheduling and finger-crossing associated with saving/loading with the correct and minimal necessary wait for each thread to reach a known safe location before commencing the savestate operation, and for any already-paused components to not need to be resumed to do so.
2012-05-26 13:09:38 +10:00
nitsuja
152351d96c implement PointerWrap::Do(std::map<unsigned int, T>) 2012-05-26 12:59:07 +10:00
nitsuja
aa674a65f1 implement PointerWrap::DoLinkedList and use it to simplify saving CoreTiming events 2012-05-26 12:59:06 +10:00
skidau
a54e72640f Merge branch 'misc-speedups'
* misc-speedups:
  fixed and reenabled and slightly optimized the JIT version of fcmpo/fcmpu.
  slightly more precise speed percent display (this is really minor)
  a small thread synchronization speedup for dual core mode. it's most noticeable in games where the CPU is running behind compared to the GPU.

Conflicts:
	Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp

The Fifo.cpp changes from rdaefb3b550e2 was not merged as there was no performance benefit.
2012-05-26 12:35:08 +10:00
Shawn Hoffman
26521aa66a force VolumeDirectory to align files to 32KB (only streaming audio files really need to be aligned...) 2012-04-23 00:50:44 -07:00
Matthew Parlane
0fc390b552 Modify state.dat before launching wads. Fixes Liight, maybe others. If in doubt, install the wad to the nand. 2012-04-21 16:21:13 +12:00
Jordan Woyak
722480cb2e Fix compilation with g++ 4.7 and some warnings. Fixes issue 5347. 2012-04-07 15:45:32 -05:00
rodolfoosvaldobogado
5650b3b5f6 more fixes. take in account when depth textures are used and alpha test fails :)( i really forgot that). 2012-04-03 15:08:58 -03:00
rodolfoosvaldobogado
4fafbd0700 Fix for my last commit thanks to Lolaker for pointing the error 2012-04-03 09:56:11 -03:00
rodolfoosvaldobogado
6a446efd5f Second Stage: re implement zcomplock and correct all the logic error in PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions.
please test for regressions
2012-04-03 00:08:36 -03:00
NeoBrainX
460610ea0e Revert Rodolfo's recent zcomploc commits until they actually work correctly.
This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
2012-03-30 01:57:53 +02:00
rodolfoosvaldobogado
402006a83a more fixes to zcomplock and opengl implementation 2012-03-29 18:26:58 -03:00
Shawn Hoffman
2ee5e5cebc Merge branch 'scons-removal' 2012-03-28 00:02:04 -07:00
rodolfoosvaldobogado
450dcc9d2c As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible.
please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev.
please as soon as yo find a bug let me know.
2012-03-27 15:44:58 -03:00
Shawn Hoffman
d15740daf1 Merge branch 'wxw3-update' 2012-03-25 12:27:38 -07:00
rodolfoosvaldobogado
9ed83765e6 long time no commits :)
a little code cleaning to avoid duplicated execution of AlphaPreTest and a little correction to some comments from the previous commits.
this change must behave exactly like last revision, if something is broken please let me know
2012-03-25 00:01:47 -03:00
Pierre Bourdon
c662b8ee2f Bump the shader cache version 2012-03-24 20:46:40 +01:00
NeoBrainX
7a1744575d D3D9: Fix texel to pixel mapping when sampling textures properly. 2012-03-24 17:23:03 +01:00
NeoBrainX
fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +01:00
Shawn Hoffman
36f3962551 small fix for last commit - didn't notice that was an #elif instead of #if 2012-03-22 18:57:30 -07:00
Shawn Hoffman
56b1373baf Remove scons-related files 2012-03-25 12:55:02 -07:00
Shawn Hoffman
f7423a0a4f Merge branch 'master' into wxw3-update
Conflicts:
	Source/Core/DolphinWX/Src/LogWindow.cpp
2012-03-22 17:57:38 -07:00
skidau
a60a0825a3 Merged 'FifoBusy' branch. Thanks
to marcosvitali.

Added an external exception check when the CPU writes to the FIFO.  This allows
the CPU time to service FIFO overflows.  Fixes random hangs caused by FIFO
overflows and desyncs like in "The Last Story" and "Battalion Wars 2".  Thanks
to marcosvitali for the research.

Added some code to unlink invalidated blocks so that the recompiled block can be
linked (speed-up).

This release still fixed the hangs produced by fifo overflow without sacrifice
performance. For example you can test Tutorial moves at the beginning of The last history now
is fluid 30/60.

Fixed possibles random hangs in DC mode.
Fixed hangs in DC mode in (Simpsons, Monkey Island, Pokemon XD, etc)
Implemented accurate management of Pixel Engine Interrupts.  Now the GPU loop
is stopped when a PE Interrupt needs to be managed and resumed when Pixel Engine
finish.

Fixed Metroid Prime 3 and 2 desync. And other games with desync because of
FIFO Reset. That happens because  FIFO_RW_DISTANCE_HI must be written first, for checking
fifo.CPReadWriteDistance == 0, so some fifo resets was not managed in the right
way.

Fixed Super Monkey Ball in some cases when the game write the
WriteReadDistance need to be safe like the SafeCPRead.

Improved the CheckException for the GatherPipe writes in JIT, now only the
External Exceptions are processed.

Fixed definitely Pokemon XD in dual core mode. This game is doing something
not allowed. It attach to CPU the same fifo attached to the GPU in multibuffer
mode. I added a check to prevent overwrite the GPU FIFO with the CPU FIFO. If
the game do that on breakpoint the solution can fail.

Fixed ReadWriteDistance calc when CPRead > CPWrite.

Added Token and Finish cause to GP Jit checking.

Additional cleanup in CommandProcessor.



Fixes issue 5209
Fixes issue 5055
Fixes issue 4889
Fixes issue 4061
Fixes issue 4010
Fixes issue 3902
2012-03-20 19:37:25 +11:00
Shawn Hoffman
483d15a9c3 fix Common lib re-linking all the time
rename wxBase28 project to wxWidgets
2012-03-18 05:47:55 -07:00
skidau
cfbcaa2cc6 Linux build fix 2012-03-18 23:37:38 +11:00
skidau
8ed6ea3b07 Sped up the Dolphin debugger in JIT mode by splitting a block only while stepping or when it contains a breakpoint. The block is invalidated when a breakpoint is set or cleared.
Fixed a bug in the JitCache where the JIT icache was not being invalidated when a block containing the instruction was destroyed.
2012-03-15 21:48:19 +11:00
marcosvitali
b0f75f17ae This release still fixed the hangs produced by fifo overflow without sacrifice performance.
For example you can test Tutorial moves at the beginning of The last history now is fluid 30/60.
Shuffle2: I've delete the hacky line, I think is not necessary anymore. Additional some clean in CommandProcessor.
Please test The Last Story and others games affected in the previous commits and give me a feedback.
2012-03-05 02:40:10 -03:00
Henrik Rydgard
f5d4fe0bfe Fix some minor bugs pointed out by PVS Studio (thanks!) 2012-03-03 20:07:20 +01:00
Jordan Woyak
ee09def802 Merge branch 'cpp11' 2012-02-28 00:28:13 -06:00
Jordan Woyak
38823b6371 Add comment here so people know what's up. 2012-02-28 00:27:16 -06:00
NeoBrainX
c3293b1a1c Improvement to revision b8bef29bcc .. :P 2012-02-25 10:59:00 +01:00
skidau
b8bef29bcc Fixed a divide by zero error in the hash functions 2012-02-25 20:36:49 +11:00
Jordan Woyak
8a8dc77ef1 enable c++11 compilation in cmakelists 2012-02-24 14:19:24 -06:00
Jordan Woyak
f15aeb26b3 Use an auto typed variable in IniFile.cpp 2012-02-24 19:20:17 -06:00
NeoBrainX
3a9fed0ba2 PixelShaderGen: Fix a bug introduced in revision 9adc119e3c.
D3D11: Fix shader constant mapping.
2012-02-21 12:51:41 +01:00
NeoBrainX
9adc119e3c PixelShaderGen: For custom textures and scaled EFB copies, use correct texel to pixel mapping when sampling textures
(D3D9 only)

This is basically the same as revision e58692653a, just for scaled textures and with a LOT more work...
2012-02-20 20:32:08 +01:00
NeoBrainX
e58692653a PixelShaderGen: Use correct texel to pixel mapping when sampling textures
(D3D9 only)

Fixes issue 2068.
Fixes issue 5158.
2012-02-17 17:09:17 +01:00
skidau
25eae39b7c Rearranged the SSE detection. Patch by lordlyhobo.
Fixes issue 5172.
2012-02-06 20:51:24 +11:00
LPFaint99
a0d6d68243 sysconf SetArayData use the minimum of the buffersize or the dataLength 2012-02-01 00:04:18 -08:00
calc84maniac
79ca43226c Added SHRD/SHLD x86 emitters, further optimized srawx 2012-01-09 00:10:13 -05:00
nitsuja
31ff1907a4 added an option to log to the attached Windows debugger (so e.g. NOTICE_LOG messages can show up in Visual Studio's output window) 2012-01-07 23:04:18 -08:00
nitsuja
9ab69febe5 fix for stack corruption caused by certain DSP LLE JIT ABI calls.
if you were getting crashes or freezes as a result of using the "DSP LLE on Thread" option, this might fix that.
2012-01-07 20:46:41 -08:00
nitsuja
daefb3b550 a small thread synchronization speedup for dual core mode.
it's most noticeable in games where the CPU is running behind compared to the GPU.
2012-01-07 20:22:48 -08:00
calc84maniac
5a15d58964 Added emitters for BT/BTR/BTS/BTC x86 instructions, optimized extended arithmetic PowerPC instructions 2012-01-05 22:36:27 -05:00
nitsuja
39613a95a8 initialize the uninitialized 2012-01-04 01:36:09 -08:00
nitsuja
81a1efab8e fixed an issue where the CPU sometimes single-steps an extra time after pausing 2012-01-04 01:33:38 -08:00
skidau
b9547a07f5 Updated the Gecko code handler to the latest version from Gecko OS 1.9.3.1.
Added a check to ensure that the number of codes fits in memory (maximum 231 codes).
Store a copy of codehandler.bin in the Sys directory.
2012-01-03 01:24:17 -05:00
skidau
69b2d4ddc1 Changed the Gecko code handling to the native code handler. This provides full compatibility with all Gecko codes.
To use the native code handler, place the kenobiwii.bin file into the Sys directory.  Dolphin will silently fall-back to the emulated code handler if the file is not there.

Fixes issue 4561.
2012-01-03 01:24:14 -05:00
Pierre Bourdon
59e93bff78 Fix a crash at startup with Dolphin on Linux compiled in debug mode
Use the clobber list instead of the stack to save rbx when executing the cpuid
instruction with inline assembly. This avoids breaking GCC assumptions about
the stack pointer location.
2012-01-02 00:59:37 +01:00
nitsuja
f0d7b8122f increased fault tolerance of shader cache files.
more specifically: if the emulator stops unexpectedly, it is quite possible that one of the shader cache files will have some bytes near the end that never got their values filled in. this change adds an index number at the end of each entry as extra verification that the entry is valid, so that invalid entries can be ignored (and eventually overwritten) instead of causing crashes.
2012-01-01 14:28:20 -08:00
skidau
1df7af35e9 Reset errno to zero before testing it after the strtoul call. Fixes issue 5078. 2011-12-29 12:05:36 +11:00
LPFaint99
de4e3e7462 add wstring name(s)/description to the cachefile, use when available in gamelist and properties window 2011-12-18 22:01:46 -08:00
nitsuja
c68c8c388c made savestate loads less fragile by adding some markers and rolling back on a mismatch.
This should make it so if you try to load an incompatible save, it simply doesn't load, instead of crashing dolphin. (I can't guarantee no crash but it's much less likely now)
2011-12-18 00:22:06 -08:00
Maarten ter Huurne
ed1bfdf293 Merge branch 'cmake-osx2' 2011-12-17 16:30:02 +01:00
Maarten ter Huurne
27bda2c054 Fixed range check on TryParse() for u32, again.
The code from 748be364e5 incorrectly accepted -0x100000000 on x86_64.

Also if ERANGE is returned by strtoul(), reject the parsed value regardless
of what that value is. This fixes invalid values being returned when compiling
with Visual C++. Thanks to "cotton" for testing this.
2011-12-13 02:08:34 +01:00
Maarten ter Huurne
ee5a29e6f2 For CPUID, save EBX on the stack instead of in a register.
This fixes GCC running out of registers when compiling for x86
in release mode.

Thanks to kiesel.
2011-12-12 02:14:56 +01:00
Maarten ter Huurne
7423c74deb Force the "ebx" argument to be mapped to a register (not necessarily EBX).
Fixes crash on x86 under OS X.
Thanks to kiesel for the fix and to shuffle2 for remembering the problem.
2011-12-12 00:43:23 +01:00
Shawn Hoffman
b0ffa72e37 Merge branch 'large-mram' 2011-12-10 18:48:35 -08:00
Maarten ter Huurne
748be364e5 Fixed range check on TryParse() for u32.
On x86-64, "unsigned long" is 64 bits wide, so it is possible for a number
to not trigger a range error on strtoul() but still not fit inside an u32.
An extra check is added to ensure that 32-bit and 64-bit builds will accept
the same numbers.
2011-12-02 02:24:43 +01:00
Maarten ter Huurne
29865e6366 Avoid virtual memory range collision between JIT and emulated RAM.
Passing MAP_FIXED to mmap causes already mapped pages in the requested
region to be replaced. On Mac OS X this caused pages for JIT-generatd
code to appear in the memory range previously auto-allocated for the RAM
of the emulated machine. This led to a hang at boot time. The same problem
can probably occur on FreeBSD, but not on Linux since MAP_32BIT is used
there instead of MAP_FIXED.

The solution is to not use MAP_FIXED, but instead rely on the OS honoring
the hinted address which is below 4 GB: we don't need an exact match,
just a low address.
2011-11-30 00:37:57 +01:00
Shawn Hoffman
b62cac2ca9 Allow modifying main ram size at compile time by changing Memory::REALRAM_SIZE. 2011-11-27 19:52:05 -08:00
Shawn Hoffman
d8def74dd1 add portaudio headers and windows static libs to Externals, enable by default in windows build. 2011-10-03 23:45:59 -07:00
Jordan Woyak
d3e639a397 fix build issue with intel compiler and fix some unsafe string usages, patch by FilthyMonkey 2011-10-01 21:31:43 -05:00
NeoBrainX
0e1383b788 Bump disk cache version. 2011-09-29 22:55:28 +02:00
NeoBrainX
81c614fa07 Clean up various things. 2011-09-29 23:32:39 +02:00
NeoBrainX
5dcb212fc7 Fix Windows build. 2011-09-29 23:32:38 +02:00
NeoBrainX
8c691767da Various changes which improve FreeBSD support.
Patches by martymac, all credits go to him ;)
2011-09-29 23:32:38 +02:00
NeoBrainX
b28348066e Improve the shader UID debugging stuff and merge it to VideoCommon, effectively enabling it in D3D9 and D3D11 as well. 2011-09-09 00:32:04 +02:00
NeoBrainX
349a3ae91d Merge remote-tracking branch 'remotes/origin/master' into new-shadercache-uids 2011-09-08 02:14:18 +02:00
NeoBrainX
6c7bda6851 Various fixes and cleanups. 2011-09-08 02:09:44 +02:00
NeoBrainX
3939f9595a Add runtime checks to make sure we aren't overoptimizing the pixel shader cache. 2011-09-07 21:15:09 +02:00
Shawn Hoffman
95517a9741 vs2010: Disable LTCG for realz 2011-09-05 09:43:23 -07:00
Shawn
7f56842a79 fixup scons (osx) to generate scmrev.h and build.
hopefully this will be the last code change committed directly to master for a while... :/
next is cmake to replace scons on osx hopefully. pointers anyone? (soren?)
2011-08-23 03:50:06 -07:00
Jordan Woyak
1528c95fe9 Remove hash from revision description for cmake and windows. 2011-08-22 20:06:17 -05:00
Jordan Woyak
6a80b9989a remove hash from rev description 2011-08-22 13:11:45 -05:00
Jordan Woyak
a910f97c39 minor cleanup of make_scmrev.h.js 2011-08-22 13:11:42 -05:00
Shawn Hoffman
cdaa5ea5d2 make sure the jscript is actually executed at build time 2011-08-21 20:00:30 -07:00
Shawn Hoffman
82dfee1642 make_scmrev.h.js needs to compare the full file instead of just the HEAD hash.
remove refs to deleted files from Common project
2011-08-21 19:53:09 -07:00
Shawn Hoffman
fc12633055 Make the jscript for writing out scmrev.h work on windows.
Add scmrev.h to .gitignore
Remove some SubWCRev.exe and it's template
2011-08-21 19:15:50 -07:00
Jordan Woyak
e8fe15c3f7 Make titlebar and about dialog fancy for cmake build.
Windows needs fixing.
2011-08-21 17:43:05 -05:00
Shawn Hoffman
6bc81f5ac4 git compat:
add git support to cmake and make_svnrev.h.js
add .gitignore
2011-08-14 13:17:57 -07:00
Shawn Hoffman
82b635b799 vs2010: build dsptool again
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7681 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-07-17 08:38:08 +00:00
Glenn Rice
b853d7de3d Oops. Forgot to add the CriticalAlert definitions for windows.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7679 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-07-15 16:50:54 +00:00
Glenn Rice
a5a45992ad Add a new type of message box (CRITICAL style) which can not be disabled. Then use that message box to display shader compilation errors in the OpenGL backend to maintain consistency with the behaviour of the DirectX backends.
Also fix the wxMessageAlert called from non-gui threads in the WXGTK build to use the passed caption.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7678 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-07-15 14:49:34 +00:00
Shawn Hoffman
2b9b4a3306 Make PatchAddEdit complain and not modify entry if fields are invalid instead of just filling in zeros. Fixes issue 4291.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7672 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-07-09 21:00:30 +00:00
pierre
383d12185f JIT: Use RAX instead of INVALID_REG for offsetOrBaseReg in MScaled
Fixes asserts triggering in WriteRex with 32bits.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7656 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-30 19:17:53 +00:00