Commit Graph

20 Commits

Author SHA1 Message Date
Minty-Meeo cc858c63b8 Configurable MEM1 and MEM2 sizes at runtime via Dolphin.ini
Changed several enums from Memmap.h to be static vars and implemented Get functions to query them. This seems to have boosted speed a bit in some titles? The new variables and some previously statically initialized items are now initialized via Memory::Init() and the new AddressSpace::Init(). s_ram_size_real and the new s_exram_size_real in particular are initialized from new OnionConfig values "MAIN_MEM1_SIZE" and "MAIN_MEM2_SIZE", only if "MAIN_RAM_OVERRIDE_ENABLE" is true.

GUI features have been added to Config > Advanced to adjust the new OnionConfig values.

A check has been added to State::doState to ensure savestates with memory configurations different from the current settings aren't loaded. The STATE_VERSION is now 115.

FIFO Files have been updated from version 4 to version 5, now including the MEM1 and MEM2 sizes from the time of DFF creation. FIFO Logs not using the new features (OnionConfig MAIN_RAM_OVERRIDE_ENABLE is false) are still backwards compatible. FIFO Logs that do use the new features have a MIN_LOADER_VERSION of 5. Thanks to the order of function calls, FIFO logs are able to automatically configure the new OnionConfig settings to match what is needed. This is a bit hacky, though, so I also threw in a failsafe for if the conditions that allow this to work ever go away.

I took the liberty of adding a log message to explain why the core fails to initialize if the MIN_LOADER_VERSION is too great.

Some IOS code has had the function "RAMOverrideForIOSMemoryValues" appended to it to recalculate IOS Memory Values from retail IOSes/apploaders to fit the extended memory sizes. Worry not, if MAIN_RAM_OVERRIDE_ENABLE is false, this function does absolutely nothing.

A hotfix in DolphinQt/MenuBar.cpp has been implemented for RAM Override.
2020-04-28 12:10:50 -05:00
Jordan Woyak b9f34bc822 DolphinQt: setTabKeyNavigation(false) on QTableWidget and QTableView. 2020-02-06 20:48:45 -06:00
Connor McLaughlin 8be5ee9fe2
Merge pull request #8277 from lioncash/code
DolphinQt/Config/ARCodeWidget: Avoid unnecessary disk operations
2019-08-09 23:42:55 +10:00
Lioncash a07d19a2fd DolphinQt/Config/ARCodeWidget: Use forward declarations where applicable
Avoids propagating headers into scopes where they're not necessary.

Also uncovered reliance on an indirect inclusion within
CheatsManager.cpp, which is now fixed.
2019-07-31 09:48:45 -04: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
Roland Munsil 4ce7079098 CheatsManager: Improve performance of searching & add input validation
The previous implementation of cheat search would reconvert the input
string for every single memory value. Now we do it once and construct
a comparison lambda which we pass to the search code.

In addition, I also added input validation. So, for example, if you've
selected Decimal input and you try to compare against "FF",
it won't search and will instead let the user know they've entered an
invalid value. Similar logic for if you enter "1.2" in a search for
bytes. Before, it would just use 0 if it failed to convert the value.
2019-05-26 17:32:48 +02:00
spycrab a154c56815 Qt/CheatsManager: Use ActionReplay constants 2019-04-22 14:09:47 +02:00
spycrab 4f7ff76801 Qt/CheatsManager: Fix locking defaulting to the value zero 2019-04-21 19:45:58 +02:00
spycrab 05eb91691c Qt/CheatsManager: Fix value setting 2019-04-21 17:34:31 +02:00
spycrab 0b56d49d97 Qt/CheatsManager: Deduplicate code 2019-04-21 15:38:59 +02:00
spycrab a6ed1b644b Qt/CheatSearch: Fix locking being permanently disabled 2019-04-21 13:51:25 +02:00
Roland Munsil 54bd16e753 Fix typo causing "Remove from Watch" in Cheat Manager to crash Dolphin 2018-09-24 23:01:24 -05:00
Roland Munsil 04969f94b6 Fix some Cheat Manager comparisons being wrong 2018-09-24 21:34:48 -05:00
JosJuice fb6b31bba8 Re-add i18n comments that were lost in the DolphinWX removal 2018-09-08 15:58:15 +02:00
Techjar 3cee7d599b Qt/CheatsManager: Fix segfault in GenerateARCode 2018-07-18 17:56:31 -04:00
spycrab d81b63f403
Merge pull request #7245 from lioncash/internal
Qt/CheatsManager: Move concealable types into the cpp file
2018-07-11 10:55:42 +02:00
Lioncash 43bc3656eb
Qt/CheatsManager: Move concealable types into the cpp file
CompareType, DataType, and Result aren't directly used externally, so
these can have their definitions moved into the cpp file.
2018-07-10 14:34:24 -04:00
spycrab a22ffb6387 Qt: Remove ActionHelper 2018-07-09 10:02:10 +02:00
spycrab 13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00