Commit graph

37123 commits

Author SHA1 Message Date
Pokechu22
f3c8e75666 DSPHLE: Move CDD1 constants to UCodes.h
These are used by *all* uCodes, though not all uCodes support MAIL_RESUME or MAIL_CONTINUE.
2022-06-22 22:01:13 -07:00
Pierre Bourdon
c8e716234e
Merge pull request #10732 from Pokechu22/dsp-init
Increase accuracy of DSP initialization process
2022-06-22 14:36:04 +02:00
Pierre Bourdon
6ddff87d42
Merge pull request #10755 from tellowkrinkle/DebugUID
VideoCommon: Don't add garbage to shader uids in debug builds
2022-06-22 14:33:23 +02:00
Pierre Bourdon
dc61f87fe4
Merge pull request #10772 from shuffle2/morepch
msbuild: add pch for dolphinqt
2022-06-22 14:27:44 +02:00
Pierre Bourdon
ceef02ed2a
Merge pull request #10750 from Pokechu22/hermes-test
Enhance DSPAssemblyTest, and fix various DSPTool bugs discovered while doing so
2022-06-22 14:26:50 +02:00
Pierre Bourdon
efcb9bec9c
Merge pull request #10774 from spotlightishere/bsd-determine-nameserver
IP/Top: Expand host nameserver usage
2022-06-22 13:02:05 +02:00
Pierre Bourdon
5151552a8e
Merge pull request #10773 from Zopolis4/clankerformat
Replace Cpp11 with Latest in .clang-format
2022-06-22 12:28:57 +02:00
Spotlight
430c58cf27
IOS: Use host nameserver on more BSDs 2022-06-21 21:49:02 -05:00
Spotlight
a2530e3b93
IOS: Use first available IPv4 nameserver 2022-06-21 21:49:02 -05:00
Zopolis4
0dfd9d4b43
Replace Cpp11 (A Deprecated alias for Latest) in .clang-format 2022-06-22 08:57:32 +10:00
Shawn Hoffman
b39a11e23b msbuild: add pch for dolphinqt
since this now includes Qt headers it's better than only using
the vanilla DolphinLib one alone (previous behavior before Qt6)
2022-06-21 13:35:14 -07:00
JosJuice
57750f3d8f Translation resources sync with Transifex 2022-06-21 21:51:57 +02:00
Admiral H. Curtiss
ab52c9dab6
Merge pull request #10770 from Pokechu22/memory-view-widget-elide
Qt/MemoryViewWidget: Don't elide text
2022-06-21 04:01:38 +02:00
Pokechu22
a334883c47 Qt/MemoryViewWidget: Don't elide text
Before, the Hex 32 display would get truncated on Linux.
2022-06-20 18:53:23 -07:00
Admiral H. Curtiss
f441e3ab98
Merge pull request #10723 from Pokechu22/dsp-lle-unsigned-loop-counter
DSP LLE Recompiler: Fix LOOP and BLOOP when the counter is between 0x8001 and 0xFFFF
2022-06-21 02:01:13 +02:00
Admiral H. Curtiss
d524a92963
Merge pull request #10767 from Pokechu22/dsp-lle-dirq-zero-log
DSPLLE: Don't log when DIRQ is set to 0
2022-06-21 01:31:03 +02:00
Admiral H. Curtiss
4e095582b3
Merge pull request #10769 from JosJuice/chipmunk-lint
Re-run code formatting after update to Android Studio 2022.2
2022-06-21 01:24:02 +02:00
JosJuice
fafc78b9b5 Re-run code formatting after update to Android Studio 2022.2
Android Studio 2022.2 "Chipmunk" changes the code formatting rules a
little. Let's apply the new formatting in this PR so that the lint bot
doesn't take it out on innocent PRs.
2022-06-20 17:41:41 +02:00
Pokechu22
c317f7fd22 DSPLLE: Don't log when DIRQ is set to 0
No interrupt is generated in this case. The homebrew liband uCode writes zero fairly frequently, so logging it results in spam.
2022-06-19 10:46:41 -07:00
Admiral H. Curtiss
8274886cc2
Merge pull request #10764 from shepgoba/master
Rename FPS_REFRESH_INTERVAL in VideoCommon/FPSCounter
2022-06-18 15:18:08 +02:00
Braxton Anderson
2b2b8e932d Rename FPS_REFRESH_INTERVAL in VideoCommon/FPSCounter 2022-06-17 20:11:53 -06:00
Admiral H. Curtiss
23ed611077
Merge pull request #10729 from Pokechu22/libusb-error-wrap
Improve libusb error logging
2022-06-17 16:01:46 +02:00
Admiral H. Curtiss
b199108964
Merge pull request #10520 from AdmiralCurtiss/resource-pack-init-crash
ResourcePack: Avoid crashes on invalid packs during Init().
2022-06-17 13:55:16 +02:00
Pierre Bourdon
f50db76426
Merge pull request #10759 from shuffle2/arm64-update
updater: use new platform id for win-arm64
2022-06-17 07:04:35 +02:00
Admiral H. Curtiss
efbf5a450b
ResourcePack: Avoid crashes on invalid packs during Init(). 2022-06-17 03:49:05 +02:00
Shawn Hoffman
896d5454f0 updater: use new platform id for win-arm64 2022-06-16 14:55:51 -07:00
Pokechu22
053b3e725b DSPHLE: More accurately handle initialization behavior
This improves timing, but does not fix Datel titles.
2022-06-16 12:18:05 -07:00
Pokechu22
072913bbad DSPLLE: More accurately handle initialization behavior 2022-06-16 12:18:05 -07:00
Pokechu22
c38c2b1aaa DSPLLE: Fix debug logging in ReadMailboxLow
The # option means that 0x is prepended already, so the old code resulted in 0x0xDEADBEEF instead of the intended 0xDEADBEEF. WriteMailboxLow was already correct.
2022-06-16 12:18:05 -07:00
Pokechu22
3ceda1df8c DSPLLE: Rename cr to control_reg
Before, there were two distinct fields called cr and r.cr, which is needlessly confusing (see the comment in DSPCore.h).
2022-06-16 12:18:05 -07:00
JosJuice
107a928452
Merge pull request #10748 from tellowkrinkle/SDL22Fun
InputCommon: SDL 2.0.22 init crash workaround
2022-06-15 18:02:59 +02:00
Admiral H. Curtiss
f73b14bb01
Merge pull request #10756 from AdmiralCurtiss/qt-memcard-change-hotfix
Qt/GameCubePane: Fix swapping memory cards mid-emulation.
2022-06-15 15:04:41 +02:00
Admiral H. Curtiss
ac3920a0da
Qt/GameCubePane: Fix swapping memory cards mid-emulation. 2022-06-15 10:42:14 +02:00
TellowKrinkle
3fe1a1a3d7 VideoCommon: Don't add garbage to shader uids in debug builds
There wasn't anything stopping compilers from doing it in release builds either, but most optimizations would make the padding zero
2022-06-14 21:51:58 -05:00
TellowKrinkle
994210e369 InputCommon: SDL 2.0.22 init crash workaround
See https://github.com/libsdl-org/SDL/pull/5598
2022-06-14 21:02:45 -05:00
JMC47
431d757151
Merge pull request #10743 from tellowkrinkle/LargeBlockRVZ
Fix creation of rvz with > 2mb chunk size
2022-06-14 16:17:24 -04:00
JMC47
8a8e9c5ef6
Merge pull request #10742 from tellowkrinkle/Xcode
Improve incremental build time for Xcode projects
2022-06-14 16:14:54 -04:00
Pokechu22
dec48ed7de UnitTests: Remove unused include from DSPAssemblyTest 2022-06-14 13:07:14 -07:00
Pokechu22
5ea3efaedf UnitTests: Fix license for HermesBinary.cpp
This is an assembled version of HermesText.cpp, so the same license applies to it.
2022-06-14 12:22:06 -07:00
Pokechu22
75ff89e8c7 UnitTests: Edit wait_for_dsp_mail in HermesText to match HermesBinary
I don't know what happened here, unfortunately.  The version of dsp_mixer.s added to libogc on Nov 14, 2008 in c76d8b851f uses andcf and jlz here, and the version we have matches the one from Feb 5, 2009 in ae5c3a5fb5 exactly (prior to the fixes in my previous commit).  I can't see any reason why wait_for_dsp_mail would be changed like this.

ANDCF and ANDF were previously swapped and JNE/JEQ/JZR/JNZ became JNZ/JZ/JLNZ/JLZ on Apr 3, 2009 in 7c4e654253, corresponding to a change Hermes made on Nov 10, 2008 in 2cea6d99ad. But these predate the test being added.

The only other information I can find is that ASNDLIB 1.0 released on November 11, 2008, at https://web.archive.org/web/20120326145022/http://www.entuwii.net/foro/viewtopic.php?f=6&t=87 (but there aren't any surviving links from there).
2022-06-14 12:22:06 -07:00
Pokechu22
36769017c0 UnitTests: Update DSP test text for old renames
This change makes assembling DSPTestText match DSPTestBinary, though HermesText doesn't yet match HermesBinary.

The test data was originally added on April 18, 2009 in e7e4ef4481.  Then, set16 and set40 were swapped on April 22, 2009 89178f411c, which updated the DSPSpy version of dsp_code, but not the version in DSPTool used for testing.  So, when the test was made, the assembled data matched the text, but a few days after it no longer did.

Similarly, on Jul 7, 2009 in 1654c582ab the conditional instructions were adjusted, and 0x1706 was changed from JRL to JRNC and 0x0297 was changed from JGE to JC.

For what it's worth, devkitPro made the same changes on May 31, 2010 in 8a65c85c9b and updated their version of the asnd ucode (which is this ucode) on June 11, 2011 in b1b8ecab3a (though this update also includes other feature changes). Note that at the time, they didn't reassemble the ucode unless they made changes to it; the assembled was stored in the repo until bfb705fe16~...d20f9bdcfb43260c6c759f4fb98d724931443f93.

This fixes the following failures with Hermes:

!! 0015 : 8e00 vs 8f00 - set16         vs  set40
!! 016f : 8e00 vs 8f00 - set16         vs  set40

and with Hermes:

!! 0014 : 8e00 vs 8f00 - set16         vs  set40
!! 0063 : 8e00 vs 8f00 - set16         vs  set40
!! 019b : 1706 vs 1701 - jrnc        $AR0  vs  jrl         $AR0
!! 01bf : 0297 vs 0290 - jc          0x01dc  vs  jge         0x01dc
!! 01d2 : 0297 vs 0290 - jc          0x01dc  vs  jge         0x01dc

Hermes has the remaining failures:

!! 027b : 03c0 vs 03a0 - andcf       $AC1.M, #0x8000  vs  andf        $AC1.M, #0x8000
!! 027d : 029d vs 0294 - jlz         0x027a  vs  jnz         0x027a
2022-06-14 12:22:06 -07:00
Pokechu22
d52528a6f0 UnitTests: Add tests for assembling DSP code to expected binary
We already have the data for this, so this seems like a useful thing to do.  However, neither of the new tests currently pass...
2022-06-14 12:22:06 -07:00
Pokechu22
41939eeaf9 DSPDisassembler: Fix disassembly of LSR and ASR
Before, both 1441 and 147f would disassemble as `lsr $acc0, #1`, when the second should be `lsr $acc0, #-1`, and both 14c1 and 14ff would be `asr $acc0, #1` when the second should be `asr $acc0, #-1`. I'm not entirely sure whether the minus signs actually make sense here, but this change is consistent with the assembler so that's an improvement at least.

devkitPro previously changed the formatting to not require negative signs for lsr and asr; this is probably something we should do in the future: 8a65c85c9b

This fixes the HermesText and HermesBinary tests (HermesText already wrote `lsr $ACC0, #-5`, so this is consistent with what it used before.)
2022-06-14 12:22:06 -07:00
Pokechu22
6a2ec825a2 UnitTests: Fail DSPAssemblyTest if the assembled code doesn't match the expected result
This reveals that both HermesText and HermesBinary fail.  HermesBinary would have failed on master, too, if this had been implemented.
2022-06-14 12:22:06 -07:00
Pokechu22
2d774010c3 DSPCodeUtil: Include the PC and hex in the "Extra code words" section
It's included in the section before, so it's helpful to supply here too.
2022-06-14 12:22:06 -07:00
Pokechu22
087d89225c DSPCodeUtil: Give better output when comparing instructions with large immediates 2022-06-14 12:22:06 -07:00
Pokechu22
cad9801ded DSPDisassembler: Fix out-of-bounds read when the last word is an instruction with a large immediate
For instance, ending with 0x009e (which you can do with CW 0x009e) indicates a LRI $ac0.m instruction, but there is no immediate value to load, so before whatever garbage in memory existed after the end of the file was used.

The bounds-checking also previously assumed that IRAM or IROM was being used, both of which were exactly 0x1000 long.
2022-06-14 12:22:06 -07:00
Pokechu22
dc353ed84d DSPTool: Exit with status 1 if binary comparison fails 2022-06-14 12:22:06 -07:00
Pokechu22
693a29f8ce DSPCodeUtil: Use fmt::print instead of logging in DSP::Compare 2022-06-14 12:22:05 -07:00
Pokechu22
d8803a1298 UnitTests: Use fmt::print in DSPAssemblyTest 2022-06-14 12:22:05 -07:00