Commit Graph

163 Commits

Author SHA1 Message Date
mitaclaw b6ec8ddc20 Simplify `std::fill` with `std::fill_n` 2024-10-07 15:34:56 -07:00
Vincent Pelletier 12142c4fa8 DSPSpy: Add st3 BLOOP{,I} tests. 2022-09-30 11:07:41 +00:00
Vincent Pelletier 556d18f865 DSPSpy: Unhide stack registers
The screen real-estate is already reserved, the values are dumped and
restored by the on-DSP code, why not make something out of these values ?
Allows following:
- where exactly send_back was called from ($st1)
- the boundaries and progress of the innermost BLOOP{,I} ($st0, 2 and 3)
  up to send_back's call
2022-09-30 11:07:41 +00:00
Pokechu22 d03b277403 DSP LLE Recompiler: Fix LOOP and BLOOP when the counter is between 0x8001 and 0xFFFF 2022-06-05 19:34:31 -07:00
Mai M f7f47d3cd0
Merge pull request #10692 from Pokechu22/dsp-manual-set40-and-write-backlog
docs/DSP: Add sections on 16-bit and 40-bit modes and on main and extended opcode writing to the same register
2022-06-02 20:26:31 -04:00
Pokechu22 12d34eec9b DSPSpy: Add 40-bit mode tests 2022-06-01 22:25:59 -07:00
Pokechu22 00a5f99b6b DSPSpy: Fix incomplete result dumps
The current code expects new mail almost immediately after the last map was sent for it to be saved properly. However, I have a test program that ends up looping for 32768 iterations before it sends more mail; this resulted in an incomplete result dump. I've changed it to wait a frame between checking for mail, which solves that issue. This does slow down dumping, but the end speed matches the speed at which the UI updates the registers so this isn't a big deal (the UI waits a frame between mail normally). (Theoretically, it could take even longer for dumping to finish, so this is not a perfect solution. However, for tests that take that long to run, it would be better to save the existing results instead of re-running the test and saving that; that'd be something to do with later improvements.)
2022-06-01 21:55:56 -07:00
Tilka 3dbc18060b
Merge pull request #10694 from Pokechu22/dsp-assembler-error-messages-etc
DSPAssembler: Rework errors and warnings, and related cleanup
2022-05-29 00:16:23 +01:00
Pokechu22 8d880cd86e DSPSpy: Add CMPAXH test 2022-05-27 18:22:38 -07:00
Pokechu22 8b52c7315b DSP: Fix assembling x8/x9/xA/xB conditions
The assembler upper-cases the mnemonic internally, so it never would match the lower-case x.
2022-05-23 19:36:47 -07:00
Pokechu22 c34a738b4c DSPSpy: Add missing jumps to end_of_test
Without this, execution continues beyond the end of the function, into the great unknown (probably eventually falling into either code left from a previous test, or the start of the DSP ROM). end_of_test is just an infinite loop to stop executing until the DSP is reset.
2022-05-23 19:36:47 -07:00
Shawn Hoffman 64cd4cc86f msbuild: use default Project attrs
maybe it makes the xml less scary :D
2022-04-27 15:26:43 -07:00
Pokechu22 464575702b DSPSpy: Replace less_test with cond_test
This new test covers all conditions, and also tests overflow, carry, logical zero, and the behavior of NEG
2021-08-22 17:07:41 -07:00
Pokechu22 9b1d370478 DSPLLE: Implement conditional variants of RTI 2021-08-22 10:49:46 -07:00
Pokechu22 f9e36bfa67 DSPLLE: Split SRS into SRS and SRSH
Hardware testing indicated that SRS uses a different list of registers than LRS (specifically, acS.h can be used with SRSH but not LRS, and SRS does not support AX registers, and there are 2 encodings that do nothing).
2021-08-22 10:49:46 -07:00
Pokechu22 51c26d82a5 DSPSpy: Require user to specify a test_main label
This makes the point where execution starts more obvious compared to a start_of_test label at the end of the include, and allows putting other functions at the start of the file.  This change also modifies the existing tests to build with this change.
2021-08-22 10:49:46 -07:00
Pokechu22 5f7c852d22 DSPSpy: Split main dsp_base logic from interrupt handlers
This is so that interrupt handlers can be manually specified in tests that need them.
2021-08-21 20:10:42 -07:00
Pokechu22 87dc668522 DSPSpy: Fix hang when using the free DSP rom 2021-08-21 20:10:42 -07:00
Pokechu22 ddc2dd91d2 DSPSpy: Create README.md 2021-08-21 17:07:14 -07:00
Pokechu22 1ad8dd7634 DSPSpy: Remove build.sh and sbuild.sh
This also removes the emu folder from the Makefile, and the Config.h file.  I'm not entirely sure what build.sh was for, but my best guess is that it was some kind of tool to run emulated DSP code at the same time as the actual DSP code and compare the results.  I don't know if it ever worked, but it certainly doesn't work now.
2021-08-21 17:07:14 -07:00
Pokechu22 3eaf06d2e0 DSPSpy: Create .gitignore 2021-08-21 17:07:14 -07:00
Pokechu22 408623b6e9 docs/DSP: Document behavior of LRS/SRS/SI with CR 2021-08-21 17:07:14 -07:00
Pokechu22 858d0675b9 DSPLLE: Handle cr, sr, and prod.h masking 2021-08-16 15:09:20 -07:00
Pokechu22 3d6ff60a96 DSPSpy: Handle modified wr0 and cr registers correctly 2021-08-16 09:51:16 -07:00
Pokechu22 14119c86a4 DSPInterpreter: Fix IsLess
`IsLess` would incorrectly return true if both `SR_OVERFLOW` and `SR_SIGN` are set, as `(sr & SR_OVERFLOW) != (sr & SR_SIGN)` becomes `SR_OVERFLOW != SR_SIGN` which is true as the two masks are different.  This broke in e651592ef5.

This issue only affected the DSP LLE Interpreter, and not the DSP LLE JIT.

I've also included a simple test case for this.  `ax0.l` (on the top left) is set to 0 if the instruction following `IFL` does not execute and to 1 if it is executed.
2021-08-15 19:45:44 -07:00
Tillmann Karras a5dfd65eb4 DSPSpy: fix $prod printing 2021-07-25 15:15:15 +01:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Tillmann Karras a56e6be999 DSPSpy: sync Makefile with current devkitPro template 2020-06-08 04:21:41 +01:00
Tillmann Karras fb041f75e5 DSPSpy: save and restore $sr properly 2020-06-08 04:21:41 +01:00
Tillmann Karras 3118a68246 DSPSpy: show register names instead of numbers
also print summed $prod and individual $sr bits
2020-06-08 04:21:41 +01:00
Tillmann Karras ce1846e53f DSPSpy: fix register editing using GC pad on Wii 2020-05-31 15:21:19 +01:00
Léo Lam 8c3d8e0811 DSPSpy: Remove unused stubs
The whole thing was commented out, and nothing is actually using it
2019-12-30 13:33:43 +01:00
Léo Lam 7c01127ac6 DSPSpy: Add a test for accelerator loop
This adds a test ucode that can be used to check the accelerator loop
behaviour with various start/end addresses.

It's actually more of a test template than a ready to use test.
2017-09-22 20:17:38 +02:00
Léo Lam 99e36cd9d9 DSPSpy: Print ACCOV mails 2017-09-22 20:17:38 +02:00
Léo Lam e569d3bc4a DSPSpy/Base: Handle ACCOV exceptions
This allows dspspy to show that an ACCOV happened, and to resume
accelerator reads after an ACCOV (by refreshing the YN2 register).
2017-09-22 20:17:38 +02:00
Léo Lam 05cdbccc38 DSPSpy/Base: Clean up trailing whitespace 2017-09-22 20:17:38 +02:00
Léo Lam 09544d748f DSPSpy: Add test for accelerator masking behaviour 2017-09-04 00:30:23 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Streetwalrus Einstein bed35a323b DSPSpy: support dumping to SD Gecko in slot B on GameCube 2015-07-19 17:26:30 +03:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Tillmann Karras 6d9986846c Simplify some more license headers 2015-05-25 13:11:41 +02:00
Tillmann Karras b0bde31ac0 Fix include order of files outside of Source/Core 2015-03-01 14:54:22 +01:00
Stevoisiak f31b688cf5 More minor consistency changes 2015-01-12 22:28:12 -05:00
Stevoisiak cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
Bracket- bde072e0a9 DSPSpy: Fix build failures
- Remove dangling #endif include guard from #pragma once conversion
- Enable C++0x support for nullptr support
2015-01-06 19:54:12 -05:00
Benjamin Przybocki fba3c48ec4 Update Outdated Google Code References 2014-12-20 21:17:51 -06:00
Matthew Brennan Jones ad5d28af4e Fixed issue with DSP Dump not closing files.
When dumping the two DSP ROMs to file, if it failed to open one of them, neither will be closed. It should now close any that were opened.
2014-06-23 13:08:43 -07:00
Matthew Parlane 31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00