Update Android dependencies and build tools to their latest available versions.
Rename the GameCube save magic constant to avoid a collision with the NDK 30 ARM64 signal context header.
Dolphin now uses the simulated memory size defined in `bi2.bin` to
adjust the memory size in the emulated console automatically.
If **Enable Emulated Memory Size Override** has been enabled by the
user, the fixed memory size specified for **MEM1** and **MEM2** are
still used as they were before.
Most retail games do not define the simulated memory size (Wii or
Triforce games), or define it to a value that matches the default 24 MiB
(GameCube games), so, in the general case, there is no behavior change.
One game that sets the simulated memory to a non-default value is the
debug build of _Mario Kart: Double Dash!!_, where the value is set to
48 MiB.
This enhancement is focused mainly to the modding community. Prior to
these changes, modded games with extended memory requirements would
fail to launch in Dolphin [with no indication of what the problem is] if
the user failed to set the emulated memory override to the correct
value. Now, modding tools can specify the simulated memory size in the
`bi2.bin` file to produce extended games that _just work_ in Dolphin,
without cumbersome instructions that can be overlooked by the user.
This is the 32-bit unsigned integer that is seen at offset `0x04` in the
`bi2.bin` file.
The intent is to study what games define values that departure from the
norm. Common values are 0 MiB (Wii games) and 24 MiB (GameCube games),
with some debug and demo builds featuring 48 MiB (e.g. the debug build
of _Mario Kart: Double Dash!!_).
The data structure of the `bi2.bin` file in which the simulated memory
size is set:
> **13.2 Disk header Information**
>
> this is loaded to the Address in `0x800000f4` when a disc is initialized by the IPL
>
> | offset | end | size | Description |
> | :------: | --- | :--: | --------------------- |
> | `0x0000` | | 4 | Debug-monitor Size |
> | `0x0004` | | 4 | Simulated Memory Size |
> | `0x0008` | | 4 | Argument offset |
> | `0x000c` | | 4 | Debug flag |
> | `0x0010` | | 4 | Track Location |
> | `0x0014` | | 4 | Track size |
> | `0x0018` | | 4 | Countrycode |
> | `0x001c` | | 4 | ? |
See https://hitmen.c02.at/files/yagcd/yagcd/chap13.html#sec13.2.
Most GameCube games set the value to `24 MiB`, which matches the
physical memory size. Most Wii games set the value to `0 MiB` (unset).
The debug build of _Mario Kart: Double Dash!!_ is one game that sets the
value to `48 MiB`.
Some of the speed hacks were not approved for RetroAchievements, meaning that users had to choose between not getting hardcore achievements, or having poor performance.
Also, renamed the instances of `$Limit internal FPS to VPS (improves performance)` to `$Limit internal frame rate (speed hack)` for consistency. They are enabled by default, so unless the user disabled them, it won't break the configuration.
This lets rumble work even if the user has turned off the Android
setting Sound and vibration > Vibration and haptics > Interactive
haptics > Touch feedback. Rumble can still be disabled through Dolphin's
controller bindings and through in-game settings (GameCube) or SYSCONF
(Wii).
fb4ff3e put all the code for the show internal resolution setting right
next to the code for the show FPS setting, presumably because an earlier
version of that commit had them next to each other in the GUI. It makes
more conceptual sense to put the code next to the code for the show
statistics settings, matching what the GUI looks like now.
fb4ff3e added a statistics option to show the internal resolution, but
it just showed the total size of the EFB (which is always 640x528) times
the IR scale, so it didn't convey any useful information.
This commit instead makes the option use the size of the last XFB copy
(not multiplied by the IR scale), which changes based on the game's
rendering resolution.
Check if Dolphin already has a handle for stdout or stderr before trying
to attach to the console of the parent process.
Previously, running Dolphin via Git Bash with options like `--help` or
`--version` wouldn't produce any output. This was the result of the fix
(1ce75ce217) for
https://bugs.dolphin-emu.org/issues/11042, before which output did work
for `Git Bash` but didn't for `Command Prompt` or `PowerShell`.
We don't need to see Compose previews when making a release build, but
androidx.compose.ui.tooling.preview.Preview is referenced in the source
code nonetheless, so the build system needs to know what it is.