/fp:fast was introducing FP precision problems, and mixing it with some
/fp:precise code caused strange game behaviors, DSI exceptions and freezes.
This commit should fix most of the issues introduced by 3.0-73 (r95517a97).
Thanks to hatarumoroboshi@hotmail.com for tracking a lot of these Win32 bugs.
Fixes issue 4906.
Fixes issue 5138.
Probably fixes (not tested) issue 5067.
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
Don't use isascii() - just do it ourselves
Bump required wxw version (for shared libs)
There still seems to be linking issues on some linux distros, I can't reproduce it though...
(Just applied to FrameTools.cpp for now)
Allows one to properly restart Pokémon by hitting play :P
Ignore non-ASCII strings passed to DisplayMessage(). These strings would end up going to renderer display and statusbar/titlebar, which can't handle them properly.
Commit 9ddb67d4a9 seems to have
introduced a segfault on Mac. The issue is that it this change casts
wxConvCurrent (which is a wxMBConvLibc) to a wxCSConv. This is an
unsafe cast because wxCSConv has member variables, but wxMBConvLibc
does not.
In LogWindow.cpp, the constructor for m_SJISConv is dereferencing one
of those member variables, which is a dereference of uninitialized
memory!
This CL reverts to the older (non-crashing) constructor, but keeps the
behavior the same.
Fixed the JIT cache, invalidating one instruction length at a time.
Fixed a bug where the JIT cache did not get invalidated when stepping.
Disabled fused instructions in the debugger.
Sorry guys but I needed to disable stfs so that Pokepark 2 would not freeze(?). Feel free to put some effort in to finding out why, I do not understand Jit sorry.
We Didn't Check 0x0008000 in PowerPC::ppcState.msr this was killing the performance, this also fix a hang when this check is performed.
SMG for example.
Deleted the HiWatermark condition from GPFifo.
Please test games affected in this Revision 9e649ce798, and games affected in this Revision b0f75f17ae.
I do not want to excite the game players of 'The Las Story', but Could test again the random hangs with this rev?
Thanks
This fix is not related with the previous commits, but the previous commits help me to see that because in the new scenery SMB was hanging. May be in the past also doesn't boot some times because of that.
Please Test FZero boot also. Thanks.
The external exceptions in dolphin are checking frequently but is different to real HW, so sometime the game is in a loop checking GPU STATUS, the exceptions doesn't checked, and the game hang.\
For solve this I need a trick: still waiting for the exception handler be linked but if CommandProcecsor is reading the GPStatus, resume this.
This fixed "TimeSplitters: Future Perfect" broken in the Revision c2e6fdf09f and surely others games.
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.
I didn't test Metroid 2 desync reported in Issue 4336 but I think is the same.
About the flickering in MP2, I don't know for my is not related or yes, but you can test anyway.
Fixed Issue 3902
Well now the FIFO is 99.99% finished :)
- I've fixed hangs in DC mode in (Simpsons, Monkey Island, Pokemon XD, etc)
- I've implemented accurate manage of Pixel Engine Interrupts, now the GPU loop is stopped when a PE Interrupt needs to be managed and resume when Pixel Engine finish,
I think now, the Fifo in DC mode is more accurate than SC mode. :)
Time to close the big fifo Issue 3694 (snif), please if you have a possible fifo issue report this like a game issue.
I was working with Skid_AU together, especially thanks for him.
Test a lot all games, and compare the performance with the master maybe this accuracy has a cost (not a lot).
I think now the fifo is very stable, overflow fixed, random hang fixed, if you have a game with a hang with this rev and not in master please report this.
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.
return std::strings instead of filling a buffer,
move gci filename generation to a function inside gcmemcard instead of the gui code
change all functions that do not modify the object to const
Conflicts:
Source/Core/Core/Src/HW/GCMemcard.cpp
Source/Core/DolphinWX/Src/MemcardManager.cpp
Signed-off-by: LPFaint99 <lpfaint99@gmail.com>
memory cards that have gaps in the fst
Conflicts:
.gitignore
Source/Core/DolphinWX/Src/MemcardManager.cpp
Signed-off-by: LPFaint99 <lpfaint99@gmail.com>
This patch makes a few changes necessary for support for the new Wii
Remotes:
- For all OSes:
- Adds a new bool member variable m_motion_plus_inside to identify
the new Wii Remotes.
- If we have a new Wii Remote, use a head byte of 0xa2. We could
just change this behavior for all Wii Remotes, but an existing
comment suggests that would break 3rd party Wii Remotes.
- On Mac OS X:
- Expand the search criteria for the bluetooth scan. This is
necessary because the new Wii Remote identifies with minor class
kBluetoothDeviceClassMinorPeripheral2Gamepad, but the old Wii
Remotes use minor class
kBluetoothDeviceClassMinorPeripheral2Joystick (1).
- Send commands on the interrupt channel, not the control
channel. The new Wii Remotes require this; old ones are compatible
with this. Note: 3rd party Wii Remots are untested with this
change; the hope is they are still functional.
- Get the name of the bluetooth device and see if it ends in
"-TR". If so, set a member variable so we know it's the new kind
of Wii Remote.
This should fix issue 5011 for Mac OS X:
http://code.google.com/p/dolphin-emu/issues/detail?id=5011
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.
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.
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.
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.
This is arguably better then using the slot0 device for slot1, because it maps
the real hardware better (nothing can be mounted on slot1 on a Wii AFAICT).
This also makes Kirby: Return to Dreamland work properly and fixes some of the
SD card problems (libs do not expect to have the same SD card mounted two times
in RW...).
This reverts commit 9a627e89fb.
The attempted Kirby: Return to Dreamland fix does not work properly and while
it fixes this particular game, it completely breaks SD card support on Dolphin.
BTW, I've never head of /dev/sdio/slot2 before...
Also re - implement the emulation issues column that was reverted, make it a bit bigger since sentences need more words and delete the issues portion of the emustate tooltip since it is unnecessary now.
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)
The "Notes" column is gone and in it's place an "Emulation Notes" column is placed (it contains the emulationissues lines from the game inis). Notes that contain useful info about the game can be seen with just a glance this way.
Fixes issue 5043.
The "dsptool" executable is not included in the bundle.
The "tester" executable is not included in the bundle and it no longer
installed on other platforms, since it is neither expected nor useful
to install unit tests.
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.
The following changes were made:
Restricted the "-march=core2" option to i386 because the first Intel Macs
had Intel Core CPUs, not Core2.
Removed the "-mdynamic-no-pic" flag as GCC lists it as a PPC specific flag.
Removed "-Wl,-read_only_relocs,suppress" because it seems to be related
to "-mdynamic-no-pic" and I see no need for it.
Removed "-Wextra-tokens -Wnewline-eof" because they are GCC specific and
not OS X specific.
This allows us to add keys that don't exist in the CMake template.
I added the keys from the Info.plist that was generated by our SCons build
to the new template.
Previously, there was just one list of frameworks regardless of which part
of the code depended on which frameworks. Now we keep separate lists for
the Dolphin core, the Dolphin GUI and internal use by wxWidgets.
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.
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.