Commit graph

49 commits

Author SHA1 Message Date
Robin Kertels
2db74e7f21
OpcodeDecoding: Get vertex size from the loader 2022-09-19 01:14:53 +02:00
Pokechu22
698def66ff Fifo analyzer: Fix various XF mistakes
* 'hangle' was a typo
* Light colors include an alpha value, so they should be 8 characters, not 6
* The XF command format adds 1 to the count internally (so 0 is one word), but we need to subtract that back to produce a valid command
* XFMEM_POSTMATRICES was calculating the row by subtracting XFMEM_POSMATRICES (POS vs POST), resulting in incorrect row numbering
2022-08-29 11:10:05 -07:00
Pokechu22
46bcdc4372 Rename CP and XF normal component count enums and update their descriptions 2022-05-18 14:43:14 -07:00
Martin
a4d031cfda Add NonDefaultQPushButton to set autoDefault of buttons to false 2022-03-08 08:51:29 +01:00
Pokechu22
3b5faf90f3 FifoAnalyzer: Fix "enumeration value ‘NotPresent’ not handled in switch" warning 2022-02-13 14:38:59 -08:00
Pokechu22
75cdcd5ac2 FifoPlayer: Add missing call to LoadSettings()
This resulted in the loop checkbox appearing unchecked, even though loop was enabled.
2022-01-17 11:00:13 -08:00
Pokechu22
29df17d422 FifoPlayer: Allow changing loop option at runtime
This option has always existed since it's used by FifoCI, but now it can be changed at runtime.  Looping is something that should almost always be on, but it can be useful to turn it off when frame-dumping is enabled so that hundreds of copies of the same frame aren't created.  Before, turning it off required restarting Dolphin.
2022-01-06 19:08:16 -08:00
Pokechu22
575062a612 FifoPlayer: Store early memory updates option in the config
Now, early memory updates is persisted across runs, and can be toggled before starting a fifolog.
2022-01-06 19:02:13 -08:00
Pokechu22
f4f4dbbc63 Switch to the Play / Record tab when fifo playback stops 2021-12-18 15:21:48 -08:00
Pokechu22
f0f12ac8d7 Fifo analyzer: Decode floats in primitive data 2021-12-18 15:21:48 -08:00
Pokechu22
e4605fa399 Fifo analyzer: Create a new object for each EFB copy
Previously, EFB copies would be in the middle of other objects, as objects were only split on primitive data.  A distinct object for each EFB copy makes them easier to spot, but does also mean there are more objects that do nothing when disabled (as disabling an object only skips primitive data, and there is no primitive data for EFB copies).
2021-12-18 15:21:48 -08:00
Pokechu22
b5fd35f951 Refactor OpcodeDecoding and FIFO analyzer to use callbacks 2021-12-18 15:21:36 -08:00
Pokechu22
d5cfac71d0 Refactor object listing code
This also adds the commands after the last primitive data but before the next frame as a unique object; this is mainly just the XFB copy.  It's nice to have these visible, though disabling the object does nothing since only primitive data is disabled and there is no primitive data in this case.
2021-12-18 12:51:56 -08:00
Pokechu22
1914087998 Create and use CPArray enum class 2021-12-18 12:51:56 -08:00
Pokechu22
3aaeb2b9ef Convert OpcodeDecoder::Opcode and OpcodeDecoder::Primitive to enum class 2021-12-18 12:51:56 -08:00
sowens99
839b04014e Add wrapper function to disable hotkeys for QFileDialog
Previously, if you have "Hotkeys Require Window Focus" disabled, you could repeatedly use the "Open" hotkey, for example, to stack File Open windows over top of each other over and over.

This commit allows the hotkey manager to disable/enable on QFileDialog creation and destruction.
2021-10-09 22:43:56 -04: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
JosJuice
a29660a2c7 Fixes to translatable strings
Sending an empty string to the translation system will not
result in getting an empty string back, but rather a description
of the currently loaded translations file. So empty strings
should not be marked as translatable.

Also adding some i18n comments and rewording a string I thought
was hard to understand.
2021-05-20 11:35:01 +02:00
Pokechu22
77b1cca987 Separate vertex components by spaces 2021-05-07 15:42:26 -07:00
Pokechu22
73f4e57006 Add name and description for primitives 2021-05-07 15:42:26 -07:00
Pokechu22
df77a687e8 Add descriptions for GX_LOAD_INDX_A/B/C/D 2021-05-07 15:42:26 -07:00
Pokechu22
1a3d2c3211 Coalesce NOPs 2021-05-07 15:42:25 -07:00
Pokechu22
2ddf2c3ba2 Update and clear the description on each object change
Since the description updating is tied to the selection changing on the detail list, and the detail list is recreated on each object change, behavior was somewhat broken.  Clearing the list changed the current row to zero, but nothing else (particularly m_object_data_offsets) had been updated, so the description was not necessarily correct (this is easier to observe now since the vertex data is at the end, so it's easier to get different lengths of register updates).  Furthermore, subsequent clears did not update the current row since there was no visible selection, so it only changed the description once.  The current row is now always set to zero, which forces an update (and also scrolls the list back to the top).  The presence of FRAME_ROLE and OBJECT_ROLE are also checked so that the description is cleared if no object is selected.
2021-05-07 15:42:22 -07:00
Pokechu22
dbacf68b79 Improve FIFO analyzer search function
- Only one search result is generated per command/line, even if there are multiple matches in that line.
- Pressing enter on the edit field begins a search, just like clicking the begin button.
- The next and previous buttons are disabled until a search is begun.
- The search results are cleared when changing objects or frames.
- The previous button once again works (a regression from the previous commit), and the register updates and graphics data for the correct object are searched.
- currentRow() never returns -1, so checking that is unnecessary (and misleading).
- The 'Invalid search parameters (no object selected)' previously never showed up before because FRAME_ROLE is present if and only if OBJECT_ROLE is present.
2021-05-07 15:42:21 -07:00
Pokechu22
1dc3ff5879 Show register updates before primitive updates
This also shows the register updates for object 0, which were previously not visible(!)
2021-05-07 15:42:20 -07:00
Pokechu22
83f7c41e31 Make the FIFO Player a separate window
This way, it can be focused with the render window behind it, instead of having the main window show up and cover the render window.  This is useful for adjusting the object range, among other things.
2021-05-07 15:42:19 -07:00
Pokechu22
05bd15a928 Clear m_object_data_offsets first and require it before UpdateDescription
It still tries to update the description on clearing, potentially with bad data.
2021-05-07 15:42:19 -07:00
Pokechu22
28b71c65af Fix same object count being used for all frames in the FIFO analyzer
If the number of objects varied, this would result in either missing objects on some frames, or too many objects on some frames; the latter case could cause crashes.  Since it used the current frame to get the count, if the FIFO is started before the FIFO analyzer is opened, then the current frame is effectively random, making it hard to reproduce consistently.

This issue has existed since the FIFO analyzer was implemented for Qt.
2021-05-07 15:42:18 -07:00
Pokechu22
a557230dea Fix crash when attempting to analyze a FIFO after stopping playback 2021-05-07 15:42:18 -07:00
Pokechu22
58333d6feb Make FIFO frame count inclusive
The 'zero frames in the range' check can be removed because now there is always at least 1 frame; of course that might be the same frame over and over again, but that's still useful for e.g. Free Look (and the 1 frame repeating effect already occurred when frame count was exclusive).
2021-05-07 15:42:18 -07:00
Pokechu22
263ca79aae Adjust FIFO player object ranges
A single object can be selected instead of 2 (it was already inclusive internally), and the maximum value is the highest number of objects in any frame (minus 1) to reduce jank when multiple frames are being played back.
2021-05-07 15:42:17 -07:00
Pokechu22
5ebe63b175 Reset the from frame/object to 0 on starting FIFO playback
Now that this is only called when playback actually starts (and not on unpausing), this change makes the experience a bit better (no more missing objects from not having reset the from object after changing FIFOs).
2021-05-07 15:42:17 -07:00
Pokechu22
3436a92ea5 Don't reset the FIFO frame/object limit when unpausing 2021-05-07 15:42:17 -07:00
Pokechu22
df81210e96 Use formatters in GetBPRegInfo; add missing commands
BPMEM_TEV_COLOR_ENV + 6 (0xC6) was missing due to a typo.  BPMEM_BP_MASK (0xFE) does not lend itself well to documentation with the current FIFO analyzer implementation (since it requires remembering the values in BP memory) but still shouldn't be treated as unknown.  BPMEM_TX_SETMODE0_4 and BPMEM_TX_SETMODE1_4 (0xA4-0xAB) were missing entirely.
2021-03-06 19:27:20 -08:00
Pokechu22
2d6ec7457d Add names and descriptions for XF registers to the FIFO analyzer 2021-03-06 19:27:14 -08:00
Pokechu22
953e09428f Add names and descriptions for CP registers to the FIFO analyzer 2021-03-06 19:27:14 -08:00
Pokechu22
d55f9369c7 Use GX_CMD_UNKNOWN_METRICS instead of magic number 0x44 2021-01-11 12:41:04 -08:00
iwubcode
2bb7d207b7 DolphinQt: fix other widgets that use lambdas (capturing this) without setting the receiver 2020-09-12 17:53:17 -05:00
Lioncash
19115c84dd DolphinQt: Use qOverload where applicable
Provides the same behvaior, but in a much more concise manner.
2020-04-28 16:54:19 +02:00
Lioncash
fef1b84f0a DolphinQt: Replace QStringLiteral with alternatives where applicable
QStringLiterals generate a buffer so that during runtime there's very
little cost to constructing a QString. However, this also means that
duplicated strings cannot be optimized out into a single entry that gets
referenced everywhere, taking up space in the binary.

Rather than use QStringLiteral(""), we can just use QString{} (the
default constructor) to signify the empty string. This gets rid of an
unnecessary string buffer from being created, saving a tiny bit of
space.

While we're at it, we can just use the character overloads of particular
functions when they're available instead of using a QString overload.
The characters in this case are Latin-1 to begin with, so we can just
specify the characters as QLatin1Char instances to use those overloads.
These will automatically convert to QChar if needed, so this is safe.
2019-07-30 09:06:03 -04:00
Silent
3529dfd691
Connect numerous QPushButtons to use clicked signal instead of pressed. This unifies UI behaviour more. 2019-07-24 00:18:58 +02:00
chargeflux
cd5f42cee0 Qt: Fix add button not releasing 2019-04-22 20:32:01 -04:00
spycrab
70da86f1c3 Qt: Use ModalMessageBox everywhere 2019-03-04 21:53:02 +01:00
spycrab
326e2fb300 Qt/FIFOPlayerWindow: Make message box modal 2019-03-03 16:26:23 +01:00
Filip Gawin
49fe9f5db1 Use empty instead of size 2019-02-13 00:03:49 +01:00
Tillmann Karras
6714159660 FIFOAnalyzer: don't use misleading format strings 2018-11-03 14:37:22 +00:00
Tillmann Karras
09385b9542 FIFOAnalyzer: print BP registers without X suffix 2018-10-08 02:00:25 +01:00
Tillmann Karras
ec4c019a7b FIFOAnalyzer: fix printing of XF registers 2018-10-08 02:00:25 +01:00
spycrab
13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00