<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/DiscIO/VolumeDisc.cpp, branch master</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>Core: Add `Volume::GetSimulatedMemorySize()`.</title>
<updated>2026-07-11T22:02:54+00:00</updated>
<author>
<name>cristian64</name>
<email>cristian64@gmail.com</email>
</author>
<published>2026-03-27T11:30:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=24ad5628717df1184fcbac027cd27618891afc40'/>
<id>24ad5628717df1184fcbac027cd27618891afc40</id>
<content type='text'>
The data structure of the `bi2.bin` file in which the simulated memory
size is set:

&gt; **13.2  Disk header Information**
&gt;
&gt; this is loaded to the Address in `0x800000f4` when a disc is initialized by the IPL
&gt;
&gt; |  offset  | end | size | Description           |
&gt; | :------: | --- | :--: | --------------------- |
&gt; | `0x0000` |     |   4  | Debug-monitor Size    |
&gt; | `0x0004` |     |   4  | Simulated Memory Size |
&gt; | `0x0008` |     |   4  | Argument offset       |
&gt; | `0x000c` |     |   4  | Debug flag            |
&gt; | `0x0010` |     |   4  | Track Location        |
&gt; | `0x0014` |     |   4  | Track size            |
&gt; | `0x0018` |     |   4  | Countrycode           |
&gt; | `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`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The data structure of the `bi2.bin` file in which the simulated memory
size is set:

&gt; **13.2  Disk header Information**
&gt;
&gt; this is loaded to the Address in `0x800000f4` when a disc is initialized by the IPL
&gt;
&gt; |  offset  | end | size | Description           |
&gt; | :------: | --- | :--: | --------------------- |
&gt; | `0x0000` |     |   4  | Debug-monitor Size    |
&gt; | `0x0004` |     |   4  | Simulated Memory Size |
&gt; | `0x0008` |     |   4  | Argument offset       |
&gt; | `0x000c` |     |   4  | Debug flag            |
&gt; | `0x0010` |     |   4  | Track Location        |
&gt; | `0x0014` |     |   4  | Track size            |
&gt; | `0x0018` |     |   4  | Countrycode           |
&gt; | `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`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Triforce: Check only first byte in region flag.</title>
<updated>2026-03-15T18:43:00+00:00</updated>
<author>
<name>cristian64</name>
<email>cristian64@gmail.com</email>
</author>
<published>2026-03-15T18:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=3eea3a90b5a6c3f337f1eb951c63b5ca3ab9b06d'/>
<id>3eea3a90b5a6c3f337f1eb951c63b5ca3ab9b06d</id>
<content type='text'>
In some Triforce games (e.g. _F-Zero AX_), the bytes that follow the
region flag in the `boot.id` file (at `0x38`) happen to be `0x00`.
However, in other games (e.g _Mario Kart Arcade GP 2_), it seems the
region flag is padded with `0xFF`.

_Mario Kart Arcade GP 2_ (`boot.id` in the USA version):
```
00000 0000:  42 54 49 44 00 00 01 E0  00 00 00 01 00 00 00 01  BTID.... ........
00000 0010:  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ........ ........
00000 0020:  47 43 41 4D 00 00 01 C0  07 D3 05 0F 00 00 00 07  GCAM.... ........
00000 0030:  53 42 4E 4C 00 00 00 00  0E FF FF FF FF FF FF FF  SBNL.... ........
                                      -----------
                                           ^
                                           |
                                      region flag
```

When the region flag was tested in `switch` statements (where a single
byte was expected in the `case`s), the test would fail, depending
on the game.

This issue would lead to the wrong calculation of the country in
`VolumeDisc::GetCountry()`, which was then used to build the game ID in
`VolumeDisc::GetGameID()`.

The solution is to test using only the least meaningful byte in the
region flag.

Unexpected game IDs were first noticed with USA version of _Mario Kart
Arcade GP 2_, which was wrongly assigned the same game ID that is given
to the Japan version (i.e. `GNLJ82`). The correct game ID for the USA
version is `GNLE82`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some Triforce games (e.g. _F-Zero AX_), the bytes that follow the
region flag in the `boot.id` file (at `0x38`) happen to be `0x00`.
However, in other games (e.g _Mario Kart Arcade GP 2_), it seems the
region flag is padded with `0xFF`.

_Mario Kart Arcade GP 2_ (`boot.id` in the USA version):
```
00000 0000:  42 54 49 44 00 00 01 E0  00 00 00 01 00 00 00 01  BTID.... ........
00000 0010:  FF FF FF FF FF FF FF FF  FF FF FF FF FF FF FF FF  ........ ........
00000 0020:  47 43 41 4D 00 00 01 C0  07 D3 05 0F 00 00 00 07  GCAM.... ........
00000 0030:  53 42 4E 4C 00 00 00 00  0E FF FF FF FF FF FF FF  SBNL.... ........
                                      -----------
                                           ^
                                           |
                                      region flag
```

When the region flag was tested in `switch` statements (where a single
byte was expected in the `case`s), the test would fail, depending
on the game.

This issue would lead to the wrong calculation of the country in
`VolumeDisc::GetCountry()`, which was then used to build the game ID in
`VolumeDisc::GetGameID()`.

The solution is to test using only the least meaningful byte in the
region flag.

Unexpected game IDs were first noticed with USA version of _Mario Kart
Arcade GP 2_, which was wrongly assigned the same game ID that is given
to the Japan version (i.e. `GNLJ82`). The correct game ID for the USA
version is `GNLE82`.
</pre>
</div>
</content>
</entry>
<entry>
<title>DiscIO: Only allow alphanumeric ASCII in game IDs</title>
<updated>2026-02-24T20:36:02+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2026-02-23T19:59:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=7b372db5593ddc92dd442e57170f13072b43ade8'/>
<id>7b372db5593ddc92dd442e57170f13072b43ade8</id>
<content type='text'>
We often use game IDs in paths, so we should try to make sure path
traversal is impossible in game IDs. Admittedly, doing any kind of real
attack using the six bytes available in game IDs is unrealistic, but no
game ID should contain non-alphanumeric or non-ASCII characters anyway.

Might also fix https://bugs.dolphin-emu.org/issues/13982 by skipping
converting between encodings for game IDs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We often use game IDs in paths, so we should try to make sure path
traversal is impossible in game IDs. Admittedly, doing any kind of real
attack using the six bytes available in game IDs is unrealistic, but no
game ID should contain non-alphanumeric or non-ASCII characters anyway.

Might also fix https://bugs.dolphin-emu.org/issues/13982 by skipping
converting between encodings for game IDs.
</pre>
</div>
</content>
</entry>
<entry>
<title>SI_DeviceAMBaseboard: Add missing bounds checks</title>
<updated>2026-02-16T02:14:15+00:00</updated>
<author>
<name>Sepalani</name>
<email>sepalani@hotmail.fr</email>
</author>
<published>2026-02-02T18:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=cbc7c2d3858aab404974a16be2b3cf54e98c923a'/>
<id>cbc7c2d3858aab404974a16be2b3cf54e98c923a</id>
<content type='text'>
VolumeDisc: Fix Triforce's GetGameID memcpy by checking MakerID's size
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VolumeDisc: Fix Triforce's GetGameID memcpy by checking MakerID's size
</pre>
</div>
</content>
</entry>
<entry>
<title>Triforce: Code fixes.</title>
<updated>2026-02-16T02:14:14+00:00</updated>
<author>
<name>crediar</name>
<email>crediar@rypp.net</email>
</author>
<published>2025-11-12T18:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=56ed7817de87736dc62d3c6725eb0779a9ee0c2e'/>
<id>56ed7817de87736dc62d3c6725eb0779a9ee0c2e</id>
<content type='text'>
Fixed a bug caused by static usage of Core::System::GetInstance()
Removed unused headers
Removed unneeded code
Optimised code
Added sanity checks
Added SafeCopyFromEmu/SafeCopyToEmu
Set Triforce buttons to be translatable
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed a bug caused by static usage of Core::System::GetInstance()
Removed unused headers
Removed unneeded code
Optimised code
Added sanity checks
Added SafeCopyFromEmu/SafeCopyToEmu
Set Triforce buttons to be translatable
</pre>
</div>
</content>
</entry>
<entry>
<title>Triforce: Code cleanups.</title>
<updated>2026-02-16T02:14:14+00:00</updated>
<author>
<name>Jordan Woyak</name>
<email>jordan.woyak@gmail.com</email>
</author>
<published>2025-10-27T02:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=be2da8dc7b79a4bee3d4ee5736e8619ed66a8c4d'/>
<id>be2da8dc7b79a4bee3d4ee5736e8619ed66a8c4d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added Triforce support</title>
<updated>2026-02-16T02:14:14+00:00</updated>
<author>
<name>crediar</name>
<email>crediar@rypp.net</email>
</author>
<published>2025-07-16T17:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=2c62214875e4d409136229421c44aa8b88fbb635'/>
<id>2c62214875e4d409136229421c44aa8b88fbb635</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused imports</title>
<updated>2026-01-25T15:12:15+00:00</updated>
<author>
<name>Martino Fontana</name>
<email>tinozzo123@gmail.com</email>
</author>
<published>2026-01-23T20:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a14c88ba67a51b0a563a5fc800cd089e82ffacaf'/>
<id>a14c88ba67a51b0a563a5fc800cd089e82ffacaf</id>
<content type='text'>
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
</pre>
</div>
</content>
</entry>
<entry>
<title>introduce wrapper for SHA1 functionality</title>
<updated>2022-07-27T05:16:37+00:00</updated>
<author>
<name>Shawn Hoffman</name>
<email>godisgovernment@gmail.com</email>
</author>
<published>2022-07-24T05:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=dd29a54cf6351e79d5c8040f86383eb585ea4aa2'/>
<id>dd29a54cf6351e79d5c8040f86383eb585ea4aa2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert GPLv2+ license info to SPDX tags</title>
<updated>2021-07-05T02:35:56+00:00</updated>
<author>
<name>Pierre Bourdon</name>
<email>delroth@gmail.com</email>
</author>
<published>2021-07-05T01:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e149ad4f0a9874f354221a7fc76d8f1841e47808'/>
<id>e149ad4f0a9874f354221a7fc76d8f1841e47808</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
