Compare commits

..

12 Commits

Author SHA1 Message Date
lizzie 5bbda27016 LICENSE 2026-05-15 04:33:55 +02:00
lizzie 1d047bc63c fx 2026-05-15 04:33:55 +02:00
lizzie 9a30ce3a43 fx 2026-05-15 04:33:55 +02:00
lizzie b2177938ac [memory] nuke HeapTracker, use mprotect() for mappings instead
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-05-15 04:33:55 +02:00
lizzie d1ceeeca22 [cmake] use -mtls-dialect=gnu2 (#3948)
see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120933

we use TLS very sparingly (which is a good thing), some of our dependencies, in turn, may not
we should be aware of that fact

allegedly, there are minor glibc issues and such, but most distros should be fine
additionally, this is only enabled for FreeBSD and Linux, if it works on FreeBSD, naturally every Linux distro should support it as well

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3948
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
2026-05-14 00:17:13 +02:00
lizzie ee188168c1 [common] do not crash when don't have permissions to /tmp/eden directory due to unforessen circumstances (FreeBSD) (#3912)
instead of throwing, use std::error_code and such

due to reasons unberknownst to me, the UID of the /tmp/eden directory was set for another user, this inevitably caused a crash due to wrong permissions (which is a very user unfriendly thing to do generally)

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3912
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-13 19:14:59 +02:00
lizzie 1f558ce9b3 [vk, ogl] bump shader cache version to 17 (#3947)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3947
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-13 19:14:18 +02:00
smiRaphi 28a2ff1b94 [file_sys] fix romfs_ext mods (#3914)
Makes them show up in the menu & also let's them load from SDMC

Note: the android edit is totally untested and I've no clue of Kotlin but I don't see a reason why it shouldn't work

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3914
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-13 19:13:44 +02:00
Eden CI d8070c74c3 [dist, android] Update translations from Transifex for May 12 (#3949)
Automatic translation update for May 12

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3949
2026-05-13 19:13:16 +02:00
lizzie b89cd6903c [jit] fix Super Mario 64 in SM3D: All-Stars (#3950)
jit service had wrong check for module versions
missing handlers for some funcs
the page cache i added interfered with jit (gee who would've tought)

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3950
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-05-13 19:02:33 +02:00
John 7e84f9ef59 [common] Revert back Aync GPU default to true to fix flickering on Linux (#3946)
The cause of the flickering needs to be investigated but this will set it ON as default for desktop platforms.

Co-authored-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3946
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-05-11 22:03:19 +02:00
John 609756db30 [common] Revert default VIDS setting to true to fix AMD GPU and Windows (#3945)
Games such as bayonetta 3 or totk need VIDS on for some windows users or it results in broken graphics.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3945
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
2026-05-11 18:52:28 +02:00
37 changed files with 410 additions and 846 deletions
+96 -78
View File
@@ -119,12 +119,12 @@ li.checked::marker { content: &quot;\2612&quot;; }
<message>
<location filename="../../src/yuzu/multiplayer/chat_room.cpp" line="327"/>
<source>%1 has been banned</source>
<translation>%1 foi banido(a)</translation>
<translation>%1 foi banido</translation>
</message>
<message>
<location filename="../../src/yuzu/multiplayer/chat_room.cpp" line="330"/>
<source>%1 has been unbanned</source>
<translation>%1 foi desbanido(a)</translation>
<translation>%1 foi desbanido</translation>
</message>
<message>
<location filename="../../src/yuzu/multiplayer/chat_room.cpp" line="446"/>
@@ -782,13 +782,14 @@ Desabiltar essa opção só serve para propósitos de depuração.</translation>
<message>
<location filename="../../src/qt_common/config/shared_translation.cpp" line="168"/>
<source>Use asynchronous GPU emulation</source>
<translation type="unfinished"/>
<translation>Usar emulação assíncrona de GPU</translation>
</message>
<message>
<location filename="../../src/qt_common/config/shared_translation.cpp" line="169"/>
<source>Uses an extra CPU thread for rendering.
This option should always remain enabled.</source>
<translation type="unfinished"/>
<translation>Usa uma thread de CPU extra para renderização.
Esta opção deve estar sempre habilitada.</translation>
</message>
<message>
<location filename="../../src/qt_common/config/shared_translation.cpp" line="170"/>
@@ -2801,32 +2802,32 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="526"/>
<source>Bitmask for quick development toggles</source>
<translation type="unfinished"/>
<translation>Bitmask para rápida alternativa de desenvolvimento</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="529"/>
<source>Set debug knobs (bitmask)</source>
<translation type="unfinished"/>
<translation>Definir knobs de depuração (bitmask)</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="532"/>
<source>16-bit debug knob set for quick development toggles</source>
<translation type="unfinished"/>
<translation>Knob de depuração 16-bit definido para rápida alternativa de desenvolvimento</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="535"/>
<source> (bitmask)</source>
<translation type="unfinished"/>
<translation>(bitmask)</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="538"/>
<source>Debug Knobs: </source>
<translation type="unfinished"/>
<translation>Knobs de depuração:</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="572"/>
<source>Unit Serial:</source>
<translation type="unfinished"/>
<translation>Número de série:</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="601"/>
@@ -2841,7 +2842,7 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="611"/>
<source>Flush log output on each line</source>
<translation type="unfinished"/>
<translation>Liberar o log a cada linha</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="618"/>
@@ -2856,7 +2857,7 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="632"/>
<source>Censor username in logs</source>
<translation type="unfinished"/>
<translation>Censurar nome de usuário nos logs</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_debug.ui" line="668"/>
@@ -2960,7 +2961,7 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<message>
<location filename="../../src/yuzu/configuration/configure_dialog.cpp" line="77"/>
<source>GraphicsExtra</source>
<translation type="unfinished"/>
<translation>Gráficos Extra</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_dialog.cpp" line="78"/>
@@ -3040,7 +3041,7 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.ui" line="65"/>
<source>Save Data</source>
<translation type="unfinished"/>
<translation>Salvar dados</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.ui" line="101"/>
@@ -3116,7 +3117,7 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="111"/>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="159"/>
<source>Select Save Data Directory...</source>
<translation type="unfinished"/>
<translation>Selecionar o diretório de salvamento</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="114"/>
@@ -3136,22 +3137,22 @@ Quando um programa tenta abrir o applet, ele é imediatamente fechado.</translat
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="148"/>
<source>Save Data Directory</source>
<translation type="unfinished"/>
<translation>Salvar diretório de salvamento</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="149"/>
<source>Choose an action for the save data directory:</source>
<translation type="unfinished"/>
<translation>Escolha uma ação para o diretório de salvamento:</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="151"/>
<source>Set Custom Path</source>
<translation type="unfinished"/>
<translation>Definir caminho personalizado</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="152"/>
<source>Reset to NAND</source>
<translation type="unfinished"/>
<translation>Resetar a NAND</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="208"/>
@@ -3162,7 +3163,13 @@ New: %2
Would you like to migrate saves from the old location?
WARNING: This will overwrite any conflicting saves in the new location!</source>
<translation type="unfinished"/>
<translation>Salvamento existe tanto no antigo quanto nas novas locações.
Antigo: %1
Novo: %2
Você gostaria de migrar seu salvamento do antigo local?
ATENÇÃO: Isso irá sobrescrever qualquer salvamento conflitante no novo local!</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="216"/>
@@ -3170,51 +3177,57 @@ WARNING: This will overwrite any conflicting saves in the new location!</source>
From: %1
To: %2</source>
<translation type="unfinished"/>
<translation>Você gostaria de migrar seus salvamentos para o novo local?
De: %1
Para: %2</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="224"/>
<source>Migrate Save Data</source>
<translation type="unfinished"/>
<translation>Migrar salvamento</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="231"/>
<source>Migrating save data...</source>
<translation type="unfinished"/>
<translation>Migrando salvamento...</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="231"/>
<source>Cancel</source>
<translation type="unfinished"/>
<translation>Cancelar</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="239"/>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="252"/>
<source>Migration Failed</source>
<translation type="unfinished"/>
<translation>Migração Falhou</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="240"/>
<source>Failed to create destination directory.</source>
<translation type="unfinished"/>
<translation>Falha ao criar diretório de destino.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="253"/>
<source>Failed to migrate save data:
%1</source>
<translation type="unfinished"/>
<translation>Falha ao migrar salvamento:
1%</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="258"/>
<source>Migration Complete</source>
<translation type="unfinished"/>
<translation>Migração Completa</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_filesystem.cpp" line="259"/>
<source>Save data has been migrated successfully.
Would you like to delete the old save data?</source>
<translation type="unfinished"/>
<translation>Salvamento foi migrado com sucesso
Gostaria de deletar o salvamento antigo?</translation>
</message>
</context>
<context>
@@ -3363,27 +3376,27 @@ Would you like to delete the old save data?</source>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"/>
<translation>Formar</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.ui" line="17"/>
<source>Extras</source>
<translation type="unfinished"/>
<translation>Extras</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.ui" line="23"/>
<source>Hacks</source>
<translation type="unfinished"/>
<translation>Hacks</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.ui" line="29"/>
<source>Changing these options from their default may cause issues. Novitii cavete!</source>
<translation type="unfinished"/>
<translation>Alterar essas opções de seus padrões pode causar problemas. È una trappola, Bino!</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.ui" line="62"/>
<source>Vulkan Extensions</source>
<translation type="unfinished"/>
<translation>Extensões Vulkan</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.cpp" line="49"/>
@@ -3394,7 +3407,7 @@ Would you like to delete the old save data?</source>
<message>
<location filename="../../src/yuzu/configuration/configure_graphics_extensions.cpp" line="68"/>
<source>Extended Dynamic State is disabled on macOS due to MoltenVK compatibility issues that cause black screens.</source>
<translation type="unfinished"/>
<translation>Estado Dinâmico Extendido é desativado no MacOS, devido a problemas de compatibilidade com o MoltenVK, que causa telas pretas.</translation>
</message>
</context>
<context>
@@ -4709,7 +4722,7 @@ Os valores atuais são %1% e %2% respectivamente.</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_network.ui" line="41"/>
<source>Enable Airplane Mode</source>
<translation type="unfinished"/>
<translation>Habilitar Modo Avião</translation>
</message>
</context>
<context>
@@ -4792,7 +4805,7 @@ Os valores atuais são %1% e %2% respectivamente.</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game.cpp" line="82"/>
<source>Ext. Graphics</source>
<translation type="unfinished"/>
<translation>Gráficos Ext.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game.cpp" line="83"/>
@@ -4807,7 +4820,7 @@ Os valores atuais são %1% e %2% respectivamente.</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game.cpp" line="85"/>
<source>Network</source>
<translation type="unfinished"/>
<translation>Rede</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game.cpp" line="86"/>
@@ -4835,12 +4848,12 @@ Os valores atuais são %1% e %2% respectivamente.</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.ui" line="23"/>
<source>Import Mod from ZIP</source>
<translation type="unfinished"/>
<translation>Importar Mod a partir de ZIP</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.ui" line="30"/>
<source>Import Mod from Folder</source>
<translation type="unfinished"/>
<translation>Importar Mod a partir da Pasta</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="56"/>
@@ -4855,87 +4868,92 @@ Os valores atuais são %1% e %2% respectivamente.</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="153"/>
<source>Mod Install Succeeded</source>
<translation type="unfinished"/>
<translation>Instalação de Mod Concluída</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="154"/>
<source>Successfully installed all mods.</source>
<translation type="unfinished"/>
<translation>Todos os Mods foram instalados com sucesso.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="163"/>
<source>Mod Install Failed</source>
<translation type="unfinished"/>
<translation>Instalação de Mod Falhou</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="164"/>
<source>Failed to install the following mods:
%1
Check the log for details.</source>
<translation type="unfinished"/>
<translation>Falha ao instalar os seguintes Mods:
%1
Cheque o log para mais detalhes.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="183"/>
<source>Mod Folder</source>
<translation type="unfinished"/>
<translation>Pasta de Mods</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="194"/>
<source>Zipped Mod Location</source>
<translation type="unfinished"/>
<translation>Local de Mod Empacotado</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="196"/>
<source>Zipped Archives (*.zip)</source>
<translation type="unfinished"/>
<translation>Arquivos Empacotados (*.zip)</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="214"/>
<source>Invalid Selection</source>
<translation type="unfinished"/>
<translation>Seleção inválida</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="215"/>
<source>Only mods, cheats, and patches can be deleted.
To delete NAND-installed updates, right-click the game in the game list and click Remove -&gt; Remove Installed Update.</source>
<translation type="unfinished"/>
<translation>Apenas Mods, trapaças e correções podem ser deletadas.
Para deletar atualizações instaladas na NAND, pressione o botão direito no jogo na lista e clique em Remover -&gt; Remova Atualização Instalada.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="221"/>
<source>You are about to delete the following installed mods:
</source>
<translation type="unfinished"/>
<translation>Você está a prestes de deletar os seguintes Mods instalados:
</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="227"/>
<source>
Once deleted, these can NOT be recovered. Are you 100% sure you want to delete them?</source>
<translation type="unfinished"/>
<translation>
Uma vez deletado, esses NÃO podem ser recuperados. Você tem 100% de certeza que quer deletar eles?</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="232"/>
<source>Delete add-on(s)?</source>
<translation type="unfinished"/>
<translation>Deletar add-on(s)?</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="243"/>
<source>Successfully deleted</source>
<translation type="unfinished"/>
<translation>Deletado com sucesso</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="244"/>
<source>Successfully deleted all selected mods.</source>
<translation type="unfinished"/>
<translation>Todos os Mods selecionados foram deletados com sucesso.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="267"/>
<source>&amp;Delete</source>
<translation type="unfinished"/>
<translation>&amp;Deletar</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_per_game_addons.cpp" line="274"/>
<source>&amp;Open in File Manager</source>
<translation type="unfinished"/>
<translation>&amp;Abrir Gerenciador de Arquivos</translation>
</message>
</context>
<context>
@@ -5021,27 +5039,27 @@ Once deleted, these can NOT be recovered. Are you 100% sure you want to delete t
<message>
<location filename="../../src/yuzu/configuration/configure_profile_manager.cpp" line="217"/>
<source>Error saving user image</source>
<translation type="unfinished"/>
<translation>Erro ao salvar imagem de usuário</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_profile_manager.cpp" line="218"/>
<source>Unable to save image to file</source>
<translation type="unfinished"/>
<translation>Incapaz de salvar imagem para arquivo</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_profile_manager.cpp" line="230"/>
<source>&amp;Edit</source>
<translation type="unfinished"/>
<translation>&amp;Editar</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_profile_manager.cpp" line="231"/>
<source>&amp;Delete</source>
<translation type="unfinished"/>
<translation>&amp;Deletar</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_profile_manager.cpp" line="291"/>
<source>Edit User</source>
<translation type="unfinished"/>
<translation>Editar Usuário</translation>
</message>
</context>
<context>
@@ -5226,7 +5244,7 @@ UUID: %2</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_tas.ui" line="17"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reads controller input from scripts in the same format as TAS-nx scripts.&lt;br/&gt;For a more detailed explanation, please consult the user handbook.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"/>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt; as entradas do controle a partir de scripts no mesmo formato que o TAS-nx.&lt;br/&gt;Para uma explicação mais detalhada, por favor consulte o manual do usuário.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_tas.ui" line="27"/>
@@ -5261,7 +5279,7 @@ UUID: %2</translation>
<message>
<location filename="../../src/yuzu/configuration/configure_tas.ui" line="84"/>
<source>Show recording dialog</source>
<translation type="unfinished"/>
<translation>Mostrar gravações de diálogo</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_tas.ui" line="98"/>
@@ -5394,7 +5412,7 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/configuration/configure_touchscreen_advanced.ui" line="26"/>
<source>Warning: The settings in this page affect the inner workings of Eden&apos;s emulated touchscreen. Changing them may result in undesirable behavior, such as the touchscreen partially or not working. You should only use this page if you know what you are doing.</source>
<translation type="unfinished"/>
<translation>Atenção: As configurações desta página podem mudar o funcionamento interno do touchscreen emulado do Eden. Mudar elas pode causar problemas indesejados, como o touchscreen parando de funcionar parcialmente e até mesmo por completo. Você deverá apenas usar essa página se você sabe o que está fazendo.</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_touchscreen_advanced.ui" line="52"/>
@@ -5690,7 +5708,7 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/configuration/configure_web.ui" line="25"/>
<source>Eden Web Service</source>
<translation type="unfinished"/>
<translation>Serviço Web do Eden</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_web.ui" line="33"/>
@@ -5705,7 +5723,7 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/configuration/configure_web.ui" line="105"/>
<source>Generate</source>
<translation type="unfinished"/>
<translation>Gerar</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_web.ui" line="130"/>
@@ -5727,19 +5745,19 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<location filename="../../src/yuzu/configuration/configure_web.cpp" line="118"/>
<source>All Good</source>
<comment>Tooltip</comment>
<translation type="unfinished"/>
<translation>Tudo certo</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_web.cpp" line="113"/>
<source>Must be between 4-20 characters</source>
<comment>Tooltip</comment>
<translation type="unfinished"/>
<translation>Deve conter entre 4-20 caracteres</translation>
</message>
<message>
<location filename="../../src/yuzu/configuration/configure_web.cpp" line="122"/>
<source>Must be 48 characters, and lowercase a-z</source>
<comment>Tooltip</comment>
<translation type="unfinished"/>
<translation>Deve ser em 48 caracteres, e letras minúsculas de a-z</translation>
</message>
</context>
<context>
@@ -5760,12 +5778,12 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/data_dialog.ui" line="26"/>
<source>Data Manager</source>
<translation type="unfinished"/>
<translation>Gestor de Dados</translation>
</message>
<message>
<location filename="../../src/yuzu/data_dialog.ui" line="48"/>
<source>Deleting ANY data is IRREVERSABLE!</source>
<translation type="unfinished"/>
<translation>Deletar QUAISQUER dados é IRREVERSÍVEL!</translation>
</message>
<message>
<location filename="../../src/yuzu/data_dialog.cpp" line="31"/>
@@ -5775,12 +5793,12 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/data_dialog.cpp" line="32"/>
<source>User NAND</source>
<translation type="unfinished"/>
<translation>NAND de Usuário</translation>
</message>
<message>
<location filename="../../src/yuzu/data_dialog.cpp" line="33"/>
<source>System NAND</source>
<translation type="unfinished"/>
<translation>NAND do Sistema</translation>
</message>
<message>
<location filename="../../src/yuzu/data_dialog.cpp" line="34"/>
@@ -5790,7 +5808,7 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/data_dialog.cpp" line="35"/>
<source>Saves</source>
<translation type="unfinished"/>
<translation>Salvamentos</translation>
</message>
</context>
<context>
@@ -5798,17 +5816,17 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta
<message>
<location filename="../../src/yuzu/data_widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"/>
<translation>Formar</translation>
</message>
<message>
<location filename="../../src/yuzu/data_widget.ui" line="22"/>
<source>Tooltip</source>
<translation type="unfinished"/>
<translation>Dica de Ferramenta</translation>
</message>
<message>
<location filename="../../src/yuzu/data_widget.ui" line="70"/>
<source>Open with your system file manager</source>
<translation type="unfinished"/>
<translation>Abrir gerenciador de arquivos do sistema</translation>
</message>
<message>
<location filename="../../src/yuzu/data_widget.ui" line="106"/>
@@ -6063,7 +6081,7 @@ Please go to Configure -&gt; System -&gt; Network and make a selection.</source>
<message>
<location filename="../../src/yuzu/bootmanager.cpp" line="1064"/>
<source>Your GPU may not support OpenGL 4.6, or you do not have the latest graphics driver.&lt;br&gt;&lt;br&gt;GL Renderer:&lt;br&gt;%1</source>
<translation>O teu GPU pode não suportar OpenGL 4.6, ou não tem os drivers gráficos mais recentes.</translation>
<translation>A sua GPU não tem suporte a OpenGL 4.6, talvez você não esteja usando os drivers gráficos mais atuais.&lt;br&gt;&lt;br&gt;Renderizador GL:&lt;br&gt;%1</translation>
</message>
<message>
<location filename="../../src/yuzu/bootmanager.cpp" line="1072"/>
+4 -1
View File
@@ -159,7 +159,10 @@ else()
endif()
if (ARCHITECTURE_x86_64)
add_compile_options(-mcx16)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mcx16>)
if (PLATFORM_LINUX OR PLATFORM_FREEBSD)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mtls-dialect=gnu2>)
endif()
endif()
if (APPLE AND CXX_CLANG)
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
@@ -7,5 +7,5 @@
package org.yuzu.yuzu_emu.utils
object AddonUtil {
val validAddonDirectories = listOf("cheats", "exefs", "romfs", "romfslite")
val validAddonDirectories = listOf("cheats", "exefs", "romfs", "romfslite", "romfs_ext")
}
@@ -66,6 +66,8 @@
<string name="show_power_info_description">عرض استهلاك الطاقة الحالي والسعة المتبقية في البطارية</string>
<string name="show_shaders_building">عرض بناء التظليل</string>
<string name="show_shaders_building_description">عرض عدد التظليل التي يتم بناؤها</string>
<string name="pipeline_worker_cores">خيوط عامل خط الأنابيب</string>
<string name="pipeline_worker_cores_description">قم بإدارة عدد النوى المستخدمة لبناء خطوط أنابيب Vulkan، فالقيمة الأعلى ستحسن أداء تجميع خط الأنابيب ولكن درجات الحرارة سترتفع أيضًا.</string>
<string name="overlay_position">موضع الطبقة</string>
<string name="overlay_position_description">حدد مكان عرض الطبقة على الشاشة</string>
<string name="overlay_position_top_left">أعلى اليمين</string>
@@ -485,15 +487,15 @@
<string name="renderer_force_max_clock">إجبار السرعة القصوى (لأجهزة Adreno فقط)</string>
<string name="renderer_force_max_clock_description">يجبر وحدة معالجة الرسومات على العمل بأقصى سرعة ممكنة (سيظل يتم تطبيق القيود الحرارية).</string>
<string name="renderer_asynchronous_gpu_emulation">محاكاة غير متزامنة لوحدة معالجة الرسومات</string>
<string name="renderer_asynchronous_gpu_emulation_description">يُشغّل هذا الخيار محاكاة وحدة معالجة الرسومات بشكل غير متزامن لتقليل توقف وحدة المعالجة المركزية وتحسين الإنتاجية. عطّل هذا الخيار فقط في حال واجهت مشاكل متعلقة بالتوقيت.</string>
<string name="renderer_asynchronous_gpu_emulation_description">يمكن لهذه الحيلة أن تزيد الأداء عن طريق تشغيل محاكاة وحدة معالجة الرسومات بشكل غير متزامن على حساب مشاكل الرسومات وزيادة معدلات الأعطال بسبب العمليات المتعلقة بالتوقيت.</string>
<string name="renderer_async_presentation">عرض غير متزامن</string>
<string name="renderer_async_presentation_description">يحسّن الأداء بشكل طفيف عن طريق نقل عملية العرض إلى خيط معالجة منفصل لوحدة المعالجة المركزية.</string>
<string name="renderer_async_presentation_description">يمكن لهذه الحيلة أن تزيد من الأداء عن طريق نقل عملية العرض إلى خيط معالجة منفصل على حساب مشاكل الرسوميات.</string>
<string name="renderer_reactive_flushing">استخدم التنظيف التفاعلي</string>
<string name="renderer_reactive_flushing_description">يحسن دقة العرض في بعض الألعاب على حساب الأداء.</string>
<string name="enable_buffer_history">تمكين سجل التخزين المؤقت</string>
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
<string name="use_optimized_vertex_buffers_description">يتيح ربط مخزن الرؤوس المُحسّن لتحسين الأداء. يتطلب برامج تشغيل Turnip/QCOM من إصدار Mesa 26.0 أو أحدث. سيؤدي إلى تعطل النظام عند استخدام برامج تشغيل Turnip الأقدم.</string>
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Mesa 26.0+ Turnip/ برامج تشغيل QCOM. قد يتعطل على برامج تشغيل Turnip القديمة (25.3 وما دون).</string>
<string name="hacks">اختراقات</string>
@@ -505,6 +507,8 @@
<string name="fix_bloom_effects_description">يقلل من ضبابية التوهج في LA/EOW (Adreno A6XX - A7XX/ Turnip)، ويزيل التوهج في Burnout. تحذير: قد يسبب تشوهات رسومية في ألعاب أخرى.</string>
<string name="emulate_bgr565">محاكاة BGR565</string>
<string name="emulate_bgr565_description">يُصلح مشاكل انعكاس الألوان في الألعاب أو ظهور تشوهات غريبة أو ظلال غريبة.</string>
<string name="rescale_hack">تفعيل ميزة إعادة التحجيم القديمة</string>
<string name="rescale_hack_description">يُمكّن هذا الخيار من التعامل مع عملية إعادة تحجيم الألعاب بطريقة تقليدية باستخدام مسار إعادة التحجيم السريع</string>
<string name="renderer_asynchronous_shaders">استخدم تظليل غير متزامن</string>
<string name="renderer_asynchronous_shaders_description">يقوم بتجميع التظليل بشكل غير متزامن. قد يقلل ذلك من التقطعات ولكنه قد يؤدي أيضًا إلى حدوث أخطاء.</string>
<string name="gpu_unswizzle_settings">إعدادات إلغاء ترتيب بيانات وحدة معالجة الرسومات</string>
@@ -523,10 +527,10 @@
<string name="extensions">إضافات</string>
<string name="dyna_state">الحالة الديناميكية الموسعة</string>
<string name="dyna_state_description">يتحكم هذا الخيار في عدد الميزات التي يمكن استخدامها في حالة الديناميكية الموسعة. تسمح الأرقام الأعلى بمزيد من الميزات ويمكن أن تزيد من الأداء، ولكنها قد تسبب مشاكل مع بعض برامج التشغيل والأجهزة.</string>
<string name="dyna_state_description">يتحكم هذا الخيار في عدد الميزات التي يمكن استخدامها في ExtendedDynamicState (EDS). كلما زادت القيمة، قلّ عدد عمليات تجميع خط الأنابيب بناءً على الحالة الديناميكية التي يدعمها برنامج التشغيل.</string>
<string name="disabled">معطل</string>
<string name="vertex_input_dynamic_state">حالة ديناميكية لإدخال الرأس</string>
<string name="vertex_input_dynamic_state_description">يتيح ميزة الحالة الديناميكية لإدخال الرأس لتحسين الجودة والأداء.</string>
<string name="vertex_input_dynamic_state_description">يتيح تمكين هذه الميزة معالجة أكثر مرونة لمدخلات الرؤوس، مما قد يقلل من وقت تجميع خط الأنابيب في vertex/buffer.</string>
<string name="sample_shading_fraction">تظليل العينة</string>
<string name="sample_shading_fraction_description">يسمح هذا الخيار بتنفيذ مُظلل الأجزاء لكل عينة في جزء متعدد العينات بدلاً من تنفيذه مرة واحدة لكل جزء. يُحسّن هذا من جودة الرسومات على حساب بعض الأداء.</string>
@@ -478,10 +478,8 @@
<string name="extensions">Rozšíření</string>
<string name="dyna_state">Úroveň EDS</string>
<string name="dyna_state_description">Určuje počet funkcí využívaných v rámci rozšířeného dynamického stavu API Vulkan (Extended Dynamic State). Vyšší hodnoty umožňují využít více funkcí a mohou zvýšit výkon, ale u některých ovladačů a výrobců grafických karet mohou způsobovat problémy s kompatibilitou.</string>
<string name="disabled">Vypnuto</string>
<string name="vertex_input_dynamic_state">Dynamický stav vstupu vrcholů (Vertex Input)</string>
<string name="vertex_input_dynamic_state_description">Aktivuje funkci dynamického stavu vstupu vrcholů (Vertex Input Dynamic State) pro lepší kvalitu a výkon.</string>
<string name="display">Zobrazení</string>
<string name="renderer_screen_layout">Orientace</string>
@@ -476,10 +476,8 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die
<string name="extensions">Erweiterungen</string>
<string name="dyna_state">Erweiterter dynamischer Status</string>
<string name="dyna_state_description">Steuert die Anzahl der Funktionen, die im \"Vertex Input Dynamic State\" werden können. Höhere Werte ermöglichen mehr Funktionen und können die Leistung steigern, können aber bei einigen Treibern und Anbietern zu Problemen führen.</string>
<string name="disabled">Deaktiviert</string>
<string name="vertex_input_dynamic_state">Vertex Input Dynamic State</string>
<string name="vertex_input_dynamic_state_description">Aktiviert die Funktion \"Vertex Input Dynamic State\" für bessere Qualität und Leistung.</string>
<string name="sample_shading_fraction">Sample Shading</string>
<string name="sample_shading_fraction_description">Ermöglicht es dem Fragment-Shader, in einem Multisample-Fragment pro Sample anstatt einmal pro Fragment ausgeführt zu werden. Verbessert die Grafikqualität auf Kosten der Leistung.</string>
@@ -66,6 +66,8 @@
<string name="show_power_info_description">Muestra el consumo de energía actual y la capacidad restante de la batería</string>
<string name="show_shaders_building">Mostrar construcción de sombreadores</string>
<string name="show_shaders_building_description">Muestra el número actual de sombreadores que se están construyendo</string>
<string name="pipeline_worker_cores">Hilos de trabajo de canalización</string>
<string name="pipeline_worker_cores_description">Gestiona la cantidad de núcleos usados para la construcción de canalizaciones de Vulkan; un valor más alto mejorará el rendimiento de la contrucción de canalización, pero también aumentarán las temperaturas.</string>
<string name="overlay_position">Posición de la superposición</string>
<string name="overlay_position_description">Elige dónde se muestra la superposición en la pantalla</string>
<string name="overlay_position_top_left">Superior izquierda</string>
@@ -479,16 +481,14 @@
<string name="renderer_force_max_clock">Forzar velocidad al máximo (solo Adreno)</string>
<string name="renderer_force_max_clock_description">Fuerza a la GPU a ejecutarse a la velocidad máxima de reloj posible (se seguirán aplicando restricciones térmicas).</string>
<string name="renderer_asynchronous_gpu_emulation">Emulación de GPU asíncrona</string>
<string name="renderer_asynchronous_gpu_emulation_description">Ejecuta la emulación de la GPU de forma asíncrona para reducir los bloqueos de la CPU y mejorar el rendimiento. Desactiva esta opción solo si experimentas problemas de sincronización.</string>
<string name="renderer_asynchronous_gpu_emulation_description">Este hack puede aumentar el rendimiento ejecutando la emulación de la GPU de forma asíncrona, a costa de problemas gráficos y un aumento en la tasa de fallos debido a operaciones relacionadas con la sincronización.</string>
<string name="renderer_async_presentation">Presentación asíncrona</string>
<string name="renderer_async_presentation_description">Mejora ligeramente el rendimiento al mover la presentación a un hilo independiente de la CPU.</string>
<string name="renderer_async_presentation_description">Este hack puede aumentar el rendimiento al mover la presentación a un hilo independiente de la CPU a costa de problemas gráficos.</string>
<string name="renderer_reactive_flushing">Usar limpieza reactiva</string>
<string name="renderer_reactive_flushing_description">Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento.</string>
<string name="enable_buffer_history">Activar el historial del búfer</string>
<string name="enable_buffer_history_description">Permite el acceso al estado del búfer anterior. Esta opción puede mejorar la calidad de renderizado y la consistencia en el rendimiento de algunos juegos.</string>
<string name="use_optimized_vertex_buffers">Búferes de vértices optimizados</string>
<string name="use_optimized_vertex_buffers_description">Permite la optimización del enlace del búfer de vértices para un mejor rendimiento. Requiere controladores Mesa 26.0+ Turnip/ controladores QCOM. Causará fallos con controladores Turnip más antiguos.</string>
<string name="hacks">Hacks</string>
<string name="fast_gpu_time">Tiempo rápido de la GPU</string>
@@ -499,6 +499,7 @@
<string name="fix_bloom_effects_description">Reduce el efecto de resplandor en LA/EOW (Adreno A6XX - A7XX/ Turnip), elimina el resplandor en Burnout. Advertencia: puede causar artefactos gráficos en otros juegos.</string>
<string name="emulate_bgr565">Emular BGR565</string>
<string name="emulate_bgr565_description">Soluciona problemas con colores invertidos en juegos, artefactos o sombras extrañas.</string>
<string name="rescale_hack">Activar la pasada de reescalado heredada</string>
<string name="renderer_asynchronous_shaders">Usar sombreadores asíncronos</string>
<string name="renderer_asynchronous_shaders_description">Compila los sombreadores de forma asíncrona. Esto puede reducir los tirones, pero también puede introducir errores gráficos.</string>
<string name="gpu_unswizzle_settings">Ajustes de desentrelazado de la GPU</string>
@@ -517,10 +518,8 @@
<string name="extensions">Extensiones</string>
<string name="dyna_state">Estado dinámico extendido</string>
<string name="dyna_state_description">Controla la cantidad de funciones que se pueden usar en el Estado Dinámico Extendido. Un número mayor permite más funciones y puede aumentar el rendimiento, pero puede causar problemas con algunos controladores y proveedores.</string>
<string name="disabled">Desactivado</string>
<string name="vertex_input_dynamic_state">Estado dinámico de entrada de vértices</string>
<string name="vertex_input_dynamic_state_description">Activa la función de estado dinámico de entrada de vértices para una mejor calidad y rendimiento.</string>
<string name="sample_shading_fraction">Muestreo de sombreado</string>
<string name="sample_shading_fraction_description">Permite que el sombreador de fragmentos se ejecute por muestra en un fragmento multimuestreado, en lugar de una sola vez por fragmento. Mejora la calidad de los gráficos a coste de algo de rendimiento.</string>
@@ -483,7 +483,6 @@
<string name="dyna_state">État dynamique étendu</string>
<string name="disabled">Désactivé</string>
<string name="vertex_input_dynamic_state">État dynamique d\'entrée de sommet</string>
<string name="vertex_input_dynamic_state_description">Active la fonctionnalité d\'état dynamique des entrées de sommets pour une meilleure qualité et de meilleures performances.</string>
<string name="display">Affichage</string>
<string name="renderer_screen_layout">Orientation</string>
@@ -476,10 +476,8 @@
<string name="extensions">Rozszerzenia</string>
<string name="dyna_state">Rozszerzony stan dynamiczny</string>
<string name="dyna_state_description">Kontroluje liczbę funkcji, które mogą być używane w Extended Dynamic State. Wyższe wartości pozwalają na użycie większej liczby funkcji i mogą zwiększyć wydajność, ale mogą powodować problemy z niektórymi sterownikami i u niektórych producentów.</string>
<string name="disabled">Wyłączone</string>
<string name="vertex_input_dynamic_state">Dynamiczny stan wejścia wierzchołków</string>
<string name="vertex_input_dynamic_state_description">Włącza funkcję dynamicznego stanu wejścia wierzchołków, poprawiając jakość i wydajność.</string>
<string name="sample_shading_fraction">Cieniowanie próbkowane</string>
<string name="sample_shading_fraction_description">Pozwala uruchamiać shader fragmentów dla każdej próbki w wielopróbkowanym fragmencie zamiast raz na fragment. Poprawia jakość grafiki kosztem części wydajności.</string>
@@ -463,7 +463,6 @@
<string name="dyna_state">Extended Dynamic State</string>
<string name="disabled">Desativado</string>
<string name="vertex_input_dynamic_state">Vertex Input Dynamic State</string>
<string name="vertex_input_dynamic_state_description">Ativa o recurso de vertex input dynamic state para melhor qualidade e desempenho.</string>
<string name="display">Tela</string>
<string name="renderer_screen_layout">Orientação</string>
@@ -66,6 +66,8 @@
<string name="show_power_info_description">Показать текущее энергопотребление и оставшуюся емкость аккумулятора</string>
<string name="show_shaders_building">Показать компиляцию шейдеров</string>
<string name="show_shaders_building_description">Отображает текущее количество шейдеров, которые компилируются</string>
<string name="pipeline_worker_cores">Рабочие потоки конвейера</string>
<string name="pipeline_worker_cores_description">Позволяет настроить количество ядер, задействованных при построении конвейеров Vulkan. Чем выше значение, тем быстрее будет компиляция конвейеров, однако это приведёт к повышению температуры устройства.</string>
<string name="overlay_position">Позиция оверлея</string>
<string name="overlay_position_description">Расположение оверлея на экране</string>
<string name="overlay_position_top_left">Сверху слева</string>
@@ -481,15 +483,15 @@
<string name="renderer_force_max_clock">Принудительная максимальная тактовая частота (только для Adreno)</string>
<string name="renderer_force_max_clock_description">Заставляет ГПУ работать на максимально возможных тактовых частотах (тепловые ограничения все равно будут применяться).</string>
<string name="renderer_asynchronous_gpu_emulation">Асинхронная эмуляция ГПУ</string>
<string name="renderer_asynchronous_gpu_emulation_description">Выполняет эмуляцию ГПУ асинхронно для снижения задержек ЦП и увеличения производительности. Отключайте только при возникновении проблем с таймингами.</string>
<string name="renderer_asynchronous_gpu_emulation_description">Может повысить производительность за счёт асинхронного запуска эмуляции ГПУ, но ценой появления графических ошибок и увеличения частоты вылетов из-за операций, зависящих от синхронизации.</string>
<string name="renderer_async_presentation">Асинхронная презентация</string>
<string name="renderer_async_presentation_description">Немного улучшает производительность, перемещая презентацию в отдельный поток ЦП.</string>
<string name="renderer_async_presentation_description">Может повысить производительность за счёт перемещения вывода кадров в отдельный поток ЦП, но ценой возникновения графических проблем.</string>
<string name="renderer_reactive_flushing">Реактивная очистка</string>
<string name="renderer_reactive_flushing_description">Повышение точности рендеринга в некоторых играх за счет снижения производительности.</string>
<string name="enable_buffer_history">Включить историю буфера</string>
<string name="enable_buffer_history_description">Позволяет обращаться к предыдущим состояниям буфера. Эта опция может повысить качество рендеринга и стабильность производительности в некоторых играх.</string>
<string name="use_optimized_vertex_buffers">Оптимизированные вершинные буферы</string>
<string name="use_optimized_vertex_buffers_description">Включает оптимизированную привязку вершинного буфера для повышения производительности. Требует Mesa Turnip 26.0+ / QCOM драйверы. Приводит к вылету на старых версиях Turnip.</string>
<string name="use_optimized_vertex_buffers_description">Включает оптимизированную привязку вершинного буфера для повышения производительности. Требует Mesa Turnip 26.0+ / QCOM. Приводит к вылету на старых версиях драйверов Turnip (25.3 и ниже).</string>
<string name="hacks">Хаки</string>
@@ -501,6 +503,8 @@
<string name="fix_bloom_effects_description">Частично убирает размытие в LA/EOW (Adreno A6XX - A7XX/ Turnip), полностью отключает его в Burnout. Внимание: может вызывать графические артефакты в других играх.</string>
<string name="emulate_bgr565">Эмулировать BGR565</string>
<string name="emulate_bgr565_description">Исправляет проблемы с инвертированными цветами в играх, а также со странными артефактами или некорректными тенями.</string>
<string name="rescale_hack">Включить старый метод изменения разрешения</string>
<string name="rescale_hack_description">Включает старый метод обработки этапа перенастройки масштабирования для игр за счёт использования быстрого алгоритма перемасштабирования.</string>
<string name="renderer_asynchronous_shaders">Использовать асинхронные шейдеры</string>
<string name="renderer_asynchronous_shaders_description">Компилирует шейдеры асинхронно. Это может уменьшить подтормаживания, но также может вызвать графические артефакты.</string>
<string name="gpu_unswizzle_settings">Настройки распаковки текстур (Unswizzle)</string>
@@ -519,10 +523,10 @@
<string name="extensions">Расширения</string>
<string name="dyna_state">Расширенное динамическое состояние</string>
<string name="dyna_state_description">Управляет количеством функций, доступных в режиме «Расширенное динамическое состояние». Большее число позволяет задействовать больше функций и может повысить производительность, но способно вызывать проблемы с некоторыми драйверами и графикой.</string>
<string name="dyna_state_description">Управляет количеством функций, доступных для использования в расширенном динамическом состояние. Более высокое значение позволит сократить количество компиляций конвейеров за счёт поддержки динамического состояния драйвером.</string>
<string name="disabled">Отключено</string>
<string name="vertex_input_dynamic_state">Динамическое состояние ввода вершин</string>
<string name="vertex_input_dynamic_state_description">Включает функцию динамического состояния ввода вершин для повышения качества и производительности</string>
<string name="vertex_input_dynamic_state_description">Включение этой функции обеспечивает более гибкую обработку входных данных вершин, что потенциально сокращает время компиляции конвейера на этапе работы с вершинами и буферами.</string>
<string name="sample_shading_fraction">Сэмпловое затенение</string>
<string name="sample_shading_fraction_description">Позволяет шейдеру фрагментов выполняться для каждого сэмпла в многосэмпловом фрагменте, а не один раз на фрагмент. Улучшает качество графики ценой некоторого падения производительности.</string>
@@ -1155,4 +1159,6 @@
<string name="license_fidelityfx_fsr_description">Высококачественное масштабирование от AMD</string>
<string name="external_content">Дополнительный контент</string>
<string name="add_folders">Добавить папку</string>
</resources>
<string name="percent">%1$d %%</string>
</resources>
@@ -66,6 +66,8 @@
<string name="show_power_info_description">Показати поточне споживання енергії та залишкову ємність акумулятора</string>
<string name="show_shaders_building">Показати побудову шейдерів</string>
<string name="show_shaders_building_description">Показати поточну кількість шейдерів, які наразі компілюються</string>
<string name="pipeline_worker_cores">Потоки обробника конвеєра</string>
<string name="pipeline_worker_cores_description">Керує кількістю ядер, що використовуються для збірки конвеєрів Vulkan. Вище значення покращить продуктивність компіляції конвеєра, але також підвищить температуру.</string>
<string name="overlay_position">Позиція оверлею</string>
<string name="overlay_position_description">Обрати розташування виводу статистики на екрані</string>
<string name="overlay_position_top_left">Вгорі ліворуч</string>
@@ -481,15 +483,15 @@
<string name="renderer_force_max_clock">Максимальна тактова частота (тільки Adreno)</string>
<string name="renderer_force_max_clock_description">Змушує GPU працювати на максимальній тактовій частоті.</string>
<string name="renderer_asynchronous_gpu_emulation">Асинхронна емуляція ГП</string>
<string name="renderer_asynchronous_gpu_emulation_description">Емуляція ГП виконується асинхронно для зменшення затримок ЦП й покращення пропускної здатності. Вимкніть лише у випадку виникнення проблем із таймінгами.</string>
<string name="renderer_asynchronous_gpu_emulation_description">Це обхідне рішення може покращити продуктивність завдяки асинхронному виконанню емуляції ГП, але спричинить проблеми з графікою та збільшить частоту збоїв чутливих до таймінгів операцій.</string>
<string name="renderer_async_presentation">Асинхронне подання</string>
<string name="renderer_async_presentation_description">Трохи покращує продуктивність завдяки переміщенню подання на окремий потік ЦП.</string>
<string name="renderer_async_presentation_description">Це обхідне рішення може покращити продуктивність завдяки переміщенню подання на окремий потік ЦП, але спричинить проблеми з графікою.</string>
<string name="renderer_reactive_flushing">Реактивне очищення</string>
<string name="renderer_reactive_flushing_description">Покращує точність рендерингу в деяких іграх.</string>
<string name="enable_buffer_history">Увімкнути історію буфера</string>
<string name="enable_buffer_history_description">Вмикає доступ до попередніх станів буфера. Цей параметр може покращити якість візуалізації та стабільну продуктивність у деяких іграх.</string>
<string name="use_optimized_vertex_buffers">Оптимізовані буфери вершин</string>
<string name="use_optimized_vertex_buffers_description">Застосовує оптимізований буфер вершин, щоб покращити продуктивність. Потребує драйверів Mesa 26.0+ Turnip / QCOM. На старіших драйверах Turnip виникатиме збій.</string>
<string name="use_optimized_vertex_buffers_description">Застосовує оптимізований буфер вершин, щоб покращити продуктивність. Потребує драйверів Mesa 26.0+ Turnip / QCOM. На старіших драйверах Turnip виникатиме збій (25.3 і нижче).</string>
<string name="hacks">Обхідні рішення</string>
@@ -501,6 +503,8 @@
<string name="fix_bloom_effects_description">Зменшує розмиття світіння в LA/EOW (Adreno A6XXA7XX / Turnip), прибирає світіння в Burnout. Увага: може спричинити графічні артефакти в інших іграх.</string>
<string name="emulate_bgr565">Емулювати BGR565</string>
<string name="emulate_bgr565_description">Виправляє проблеми з інвертованими кольорами в іграх або дивними артефактами чи тінями.</string>
<string name="rescale_hack">Увімкнути застаріле масштабування</string>
<string name="rescale_hack_description">Вмикає застарілу обробку масштабування для ігор, використовуючи швидкий шлях масштабування</string>
<string name="renderer_asynchronous_shaders">Асинхронні шейдери</string>
<string name="renderer_asynchronous_shaders_description">Компілює шейдери асинхронно. Це може зменшити затримки, але також може спричинити графічні баги.</string>
<string name="gpu_unswizzle_settings">Налаштування розпакування за допомогою ГП</string>
@@ -519,10 +523,10 @@
<string name="extensions">Розширення</string>
<string name="dyna_state">Розширений динамічний стан</string>
<string name="dyna_state_description">Керує кількістю функцій, які можна використовувати в «Розширеному динамічному стані». Вище число дозволяє більше функцій і може покращити продуктивність, але може спричинити проблеми з деякими драйверами й виробниками.</string>
<string name="dyna_state_description">Керує кількістю функцій, які можна використовувати в ExtendedDynamicState (EDS). Вище значення дозволить зменшити кількість компіляцій конвеєра на основі динамічного стану, підтримуваного драйвером.</string>
<string name="disabled">Вимкнено</string>
<string name="vertex_input_dynamic_state">Динамічний стан введення вершин</string>
<string name="vertex_input_dynamic_state_description">Вмикає можливість динамічного стану введення вершин для кращих якості й продуктивності.</string>
<string name="vertex_input_dynamic_state_description">Увімкнення цієї функції дозволить гнучкішу обробку введення вершин. Може зменшити час компіляції конвеєра для вершин/буфера.</string>
<string name="sample_shading_fraction">Простий шейдинг</string>
<string name="sample_shading_fraction_description">Дозволяє виконувати фрагмент шейдера для кожного зразка в багатозразковому фрагменті замість одного разу для кожного фрагмента. Покращує якість графікі ціною втрати продуктивності.</string>
@@ -475,16 +475,12 @@
<string name="renderer_force_max_clock">强制最大时钟 (仅限 Adreno)</string>
<string name="renderer_force_max_clock_description">强制 GPU 以最大时钟运行 (仍被温控限制)。</string>
<string name="renderer_asynchronous_gpu_emulation">GPU 异步模拟</string>
<string name="renderer_asynchronous_gpu_emulation_description">异步运行 GPU 模拟,以减少 CPU 停顿并提高吞吐量。仅当遇到与时序相关的问题时才应禁用此功能。</string>
<string name="renderer_async_presentation">异步呈现</string>
<string name="renderer_async_presentation_description">通过将呈现操作移至单独的 CPU 线程来略微提升性能。</string>
<string name="renderer_reactive_flushing">启用反应性刷新</string>
<string name="renderer_reactive_flushing_description">通过牺牲性能来提高某些游戏的渲染精度。</string>
<string name="enable_buffer_history">启用缓冲区历史</string>
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动则会导致崩溃。</string>
<string name="hacks">Hacks</string>
<string name="fast_gpu_time">GPU 超频频率</string>
@@ -513,10 +509,8 @@
<string name="extensions">扩展</string>
<string name="dyna_state">扩展动态状态</string>
<string name="dyna_state_description">控制在扩展动态状态中可使用的函数数量。更高的数值允许启用更多功能,并可能提升性能,但同时也可能导致额外的图形问题。</string>
<string name="disabled">已禁用</string>
<string name="vertex_input_dynamic_state">顶点输入动态状态</string>
<string name="vertex_input_dynamic_state_description">开启顶点输入动态状态功能来获得更好的质量和性能。</string>
<string name="sample_shading_fraction">采样着色</string>
<string name="sample_shading_fraction_description">允许片段着色器在多采样片段中每个样本执行一次,而不是每个片段执行一次。以提高性能为代价改善图形质量。</string>
@@ -466,7 +466,6 @@
<string name="dyna_state">擴展動態狀態</string>
<string name="disabled">已停用</string>
<string name="vertex_input_dynamic_state">頂點輸入動態狀態</string>
<string name="vertex_input_dynamic_state_description">啟用頂點輸入動態狀態以取得更佳的品質及性能</string>
<string name="display">顯示</string>
<string name="renderer_screen_layout">方向</string>
-2
View File
@@ -66,8 +66,6 @@ add_library(
fs/path_util.cpp
fs/path_util.h
hash.h
heap_tracker.cpp
heap_tracker.h
hex_util.cpp
hex_util.h
host_memory.cpp
-282
View File
@@ -1,282 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <fstream>
#include "common/heap_tracker.h"
#include "common/logging.h"
#include "common/assert.h"
namespace Common {
namespace {
s64 GetMaxPermissibleResidentMapCount() {
// Default value.
s64 value = 65530;
// Try to read how many mappings we can make.
std::ifstream s("/proc/sys/vm/max_map_count");
s >> value;
// Print, for debug.
LOG_INFO(HW_Memory, "Current maximum map count: {}", value);
// Allow 20000 maps for other code and to account for split inaccuracy.
return std::max<s64>(value - 20000, 0);
}
} // namespace
HeapTracker::HeapTracker(Common::HostMemory& buffer)
: m_buffer(buffer), m_max_resident_map_count(GetMaxPermissibleResidentMapCount()) {}
HeapTracker::~HeapTracker() = default;
void HeapTracker::Map(size_t virtual_offset, size_t host_offset, size_t length,
MemoryPermission perm, bool is_separate_heap) {
// When mapping other memory, map pages immediately.
if (!is_separate_heap) {
m_buffer.Map(virtual_offset, host_offset, length, perm, false);
return;
}
{
// We are mapping part of a separate heap.
std::scoped_lock lk{m_lock};
auto* const map = new SeparateHeapMap{
.vaddr = virtual_offset,
.paddr = host_offset,
.size = length,
.tick = m_tick++,
.perm = perm,
.is_resident = false,
};
// Insert into mappings.
m_map_count++;
m_mappings.insert(*map);
}
// Finally, map.
this->DeferredMapSeparateHeap(virtual_offset);
}
void HeapTracker::Unmap(size_t virtual_offset, size_t size, bool is_separate_heap) {
// If this is a separate heap...
if (is_separate_heap) {
std::scoped_lock lk{m_lock};
const SeparateHeapMap key{
.vaddr = virtual_offset,
};
// Split at the boundaries of the region we are removing.
this->SplitHeapMapLocked(virtual_offset);
this->SplitHeapMapLocked(virtual_offset + size);
// Erase all mappings in range.
auto it = m_mappings.find(key);
while (it != m_mappings.end() && it->vaddr < virtual_offset + size) {
// Get underlying item.
auto* const item = std::addressof(*it);
// If resident, erase from resident map.
if (item->is_resident) {
ASSERT(--m_resident_map_count >= 0);
m_resident_mappings.erase(m_resident_mappings.iterator_to(*item));
}
// Erase from map.
ASSERT(--m_map_count >= 0);
it = m_mappings.erase(it);
// Free the item.
delete item;
}
}
// Unmap pages.
m_buffer.Unmap(virtual_offset, size, false);
}
void HeapTracker::Protect(size_t virtual_offset, size_t size, MemoryPermission perm) {
// Ensure no rebuild occurs while reprotecting.
std::shared_lock lk{m_rebuild_lock};
// Split at the boundaries of the region we are reprotecting.
this->SplitHeapMap(virtual_offset, size);
// Declare tracking variables.
const VAddr end = virtual_offset + size;
VAddr cur = virtual_offset;
while (cur < end) {
VAddr next = cur;
bool should_protect = false;
{
std::scoped_lock lk2{m_lock};
const SeparateHeapMap key{
.vaddr = next,
};
// Try to get the next mapping corresponding to this address.
const auto it = m_mappings.nfind(key);
if (it == m_mappings.end()) {
// There are no separate heap mappings remaining.
next = end;
should_protect = true;
} else if (it->vaddr == cur) {
// We are in range.
// Update permission bits.
it->perm = perm;
// Determine next address and whether we should protect.
next = cur + it->size;
should_protect = it->is_resident;
} else /* if (it->vaddr > cur) */ {
// We weren't in range, but there is a block coming up that will be.
next = it->vaddr;
should_protect = true;
}
}
// Clamp to end.
next = (std::min)(next, end);
// Reprotect, if we need to.
if (should_protect) {
m_buffer.Protect(cur, next - cur, perm);
}
// Advance.
cur = next;
}
}
bool HeapTracker::DeferredMapSeparateHeap(u8* fault_address) {
if (m_buffer.IsInVirtualRange(fault_address)) {
return this->DeferredMapSeparateHeap(fault_address - m_buffer.VirtualBasePointer());
}
return false;
}
bool HeapTracker::DeferredMapSeparateHeap(size_t virtual_offset) {
bool rebuild_required = false;
{
std::scoped_lock lk{m_lock};
// Check to ensure this was a non-resident separate heap mapping.
const auto it = this->GetNearestHeapMapLocked(virtual_offset);
if (it == m_mappings.end() || it->is_resident) {
return false;
}
// Update tick before possible rebuild.
it->tick = m_tick++;
// Check if we need to rebuild.
if (m_resident_map_count > m_max_resident_map_count) {
rebuild_required = true;
}
// Map the area.
m_buffer.Map(it->vaddr, it->paddr, it->size, it->perm, false);
// This map is now resident.
it->is_resident = true;
m_resident_map_count++;
m_resident_mappings.insert(*it);
}
if (rebuild_required) {
// A rebuild was required, so perform it now.
this->RebuildSeparateHeapAddressSpace();
}
return true;
}
void HeapTracker::RebuildSeparateHeapAddressSpace() {
std::scoped_lock lk{m_rebuild_lock, m_lock};
ASSERT(!m_resident_mappings.empty());
// Dump half of the mappings.
//
// Despite being worse in theory, this has proven to be better in practice than more
// regularly dumping a smaller amount, because it significantly reduces average case
// lock contention.
std::size_t const desired_count = (std::min)(m_resident_map_count, m_max_resident_map_count) / 2;
std::size_t const evict_count = m_resident_map_count - desired_count;
auto it = m_resident_mappings.begin();
for (size_t i = 0; i < evict_count && it != m_resident_mappings.end(); i++) {
// Unmark and unmap.
it->is_resident = false;
m_buffer.Unmap(it->vaddr, it->size, false);
// Advance.
ASSERT(--m_resident_map_count >= 0);
it = m_resident_mappings.erase(it);
}
}
void HeapTracker::SplitHeapMap(VAddr offset, size_t size) {
std::scoped_lock lk{m_lock};
this->SplitHeapMapLocked(offset);
this->SplitHeapMapLocked(offset + size);
}
void HeapTracker::SplitHeapMapLocked(VAddr offset) {
const auto it = this->GetNearestHeapMapLocked(offset);
if (it == m_mappings.end() || it->vaddr == offset) {
// Not contained or no split required.
return;
}
// Cache the original values.
auto* const left = std::addressof(*it);
const size_t orig_size = left->size;
// Adjust the left map.
const size_t left_size = offset - left->vaddr;
left->size = left_size;
// Create the new right map.
auto* const right = new SeparateHeapMap{
.vaddr = left->vaddr + left_size,
.paddr = left->paddr + left_size,
.size = orig_size - left_size,
.tick = left->tick,
.perm = left->perm,
.is_resident = left->is_resident,
};
// Insert the new right map.
m_map_count++;
m_mappings.insert(*right);
// If resident, also insert into resident map.
if (right->is_resident) {
m_resident_map_count++;
m_resident_mappings.insert(*right);
}
}
HeapTracker::AddrTree::iterator HeapTracker::GetNearestHeapMapLocked(VAddr offset) {
const SeparateHeapMap key{
.vaddr = offset,
};
return m_mappings.find(key);
}
} // namespace Common
-98
View File
@@ -1,98 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <atomic>
#include <mutex>
#include <set>
#include <shared_mutex>
#include "common/host_memory.h"
#include "common/intrusive_red_black_tree.h"
namespace Common {
struct SeparateHeapMap {
Common::IntrusiveRedBlackTreeNode addr_node{};
Common::IntrusiveRedBlackTreeNode tick_node{};
VAddr vaddr{};
PAddr paddr{};
size_t size{};
size_t tick{};
MemoryPermission perm{};
bool is_resident{};
};
struct SeparateHeapMapAddrComparator {
static constexpr int Compare(const SeparateHeapMap& lhs, const SeparateHeapMap& rhs) {
if (lhs.vaddr < rhs.vaddr) {
return -1;
} else if (lhs.vaddr <= (rhs.vaddr + rhs.size - 1)) {
return 0;
} else {
return 1;
}
}
};
struct SeparateHeapMapTickComparator {
static constexpr int Compare(const SeparateHeapMap& lhs, const SeparateHeapMap& rhs) {
if (lhs.tick < rhs.tick) {
return -1;
} else if (lhs.tick > rhs.tick) {
return 1;
} else {
return SeparateHeapMapAddrComparator::Compare(lhs, rhs);
}
}
};
class HeapTracker {
public:
explicit HeapTracker(Common::HostMemory& buffer);
~HeapTracker();
void Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perm,
bool is_separate_heap);
void Unmap(size_t virtual_offset, size_t size, bool is_separate_heap);
void Protect(size_t virtual_offset, size_t length, MemoryPermission perm);
u8* VirtualBasePointer() {
return m_buffer.VirtualBasePointer();
}
bool DeferredMapSeparateHeap(u8* fault_address);
bool DeferredMapSeparateHeap(size_t virtual_offset);
private:
using AddrTreeTraits =
Common::IntrusiveRedBlackTreeMemberTraitsDeferredAssert<&SeparateHeapMap::addr_node>;
using AddrTree = AddrTreeTraits::TreeType<SeparateHeapMapAddrComparator>;
using TickTreeTraits =
Common::IntrusiveRedBlackTreeMemberTraitsDeferredAssert<&SeparateHeapMap::tick_node>;
using TickTree = TickTreeTraits::TreeType<SeparateHeapMapTickComparator>;
AddrTree m_mappings{};
TickTree m_resident_mappings{};
private:
void SplitHeapMap(VAddr offset, size_t size);
void SplitHeapMapLocked(VAddr offset);
AddrTree::iterator GetNearestHeapMapLocked(VAddr offset);
void RebuildSeparateHeapAddressSpace();
private:
Common::HostMemory& m_buffer;
const s64 m_max_resident_map_count;
std::shared_mutex m_rebuild_lock{};
std::mutex m_lock{};
s64 m_map_count{};
s64 m_resident_map_count{};
size_t m_tick{};
};
} // namespace Common
+4 -5
View File
@@ -572,9 +572,8 @@ public:
if (True(perms & MemoryPermission::Execute))
prot_flags |= PROT_EXEC;
#endif
int flags = (fd >= 0 ? MAP_SHARED : MAP_PRIVATE) | MAP_FIXED;
void* ret = mmap(virtual_base + virtual_offset, length, prot_flags, flags, fd, host_offset);
ASSERT_MSG(ret != MAP_FAILED, "mmap: {} {}", strerror(errno), fd);
int ret = mprotect(virtual_base + virtual_offset, length, prot_flags);
ASSERT_MSG(ret == 0, "mprotect: {} {}", strerror(errno), fd);
}
void Unmap(size_t virtual_offset, size_t length) {
@@ -588,8 +587,8 @@ public:
auto [merged_pointer, merged_size] =
free_manager.FreeBlock(virtual_base + virtual_offset, length);
void* ret = mmap(merged_pointer, merged_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
ASSERT_MSG(ret != MAP_FAILED, "mmap: {}", strerror(errno));
int ret = mprotect(merged_pointer, merged_size, PROT_NONE);
ASSERT_MSG(ret == 0, "mmap: {}", strerror(errno));
}
void Protect(size_t virtual_offset, size_t length, bool read, bool write, bool execute) {
+8 -3
View File
@@ -388,8 +388,13 @@ struct Values {
true,
true};
SwitchableSetting<bool> use_asynchronous_gpu_emulation{
linkage, false, "use_asynchronous_gpu_emulation", Category::Renderer};
SwitchableSetting<bool> use_asynchronous_gpu_emulation{linkage,
#ifdef __ANDROID__
false,
#else
true,
#endif
"use_asynchronous_gpu_emulation", Category::Renderer};
// *nix platforms may have issues with the borderless windowed fullscreen mode.
// Default to exclusive fullscreen on these platforms for now.
SwitchableSetting<FullscreenMode, true> fullscreen_mode{linkage,
@@ -609,7 +614,7 @@ struct Values {
#if defined (ANDROID)
false,
#else
false,
true,
#endif
"vertex_input_dynamic_state", Category::RendererExtensions};
+2 -2
View File
@@ -36,7 +36,7 @@ public:
u64 MemoryRead64(u32 vaddr) override;
std::optional<u32> MemoryReadCode(u32 vaddr) override;
void InstructionSynchronizationBarrierRaised() override {
last_code_addr = 0; //reset back, force refetch
last_code_addr = u64(-1); //reset back, force refetch
}
void MemoryWrite8(u32 vaddr, u8 value) override;
void MemoryWrite16(u32 vaddr, u16 value) override;
@@ -54,7 +54,7 @@ public:
void ReturnException(u32 pc, Dynarmic::HaltReason hr);
//
Dynarmic::CodePage cached_code_page;
u64 last_code_addr = 0;
u64 last_code_addr = u64(-1);
ArmDynarmic32& m_parent;
Core::Memory::Memory& m_memory;
Kernel::KProcess* m_process{};
+2 -2
View File
@@ -45,7 +45,6 @@ Dynarmic::A64::Vector DynarmicCallbacks64::MemoryRead128(u64 vaddr) {
std::optional<u32> DynarmicCallbacks64::MemoryReadCode(u64 vaddr) {
if (!m_memory.IsValidVirtualAddressRange(vaddr, sizeof(u32)))
return std::nullopt;
// return m_memory.Read32(vaddr);
auto const aligned_vaddr = vaddr & ~Core::Memory::YUZU_PAGEMASK;
if (last_code_addr != aligned_vaddr) {
m_memory.ReadBlock(aligned_vaddr, &cached_code_page, sizeof(cached_code_page));
@@ -103,6 +102,7 @@ bool DynarmicCallbacks64::MemoryWriteExclusive128(u64 vaddr, Dynarmic::A64::Vect
}
void DynarmicCallbacks64::InstructionCacheOperationRaised(Dynarmic::A64::InstructionCacheOperation op, u64 value) {
last_code_addr = u64(-1); //invalidate cached page
switch (op) {
case Dynarmic::A64::InstructionCacheOperation::InvalidateByVAToPoU: {
static constexpr u64 ICACHE_LINE_SIZE = 64;
@@ -128,7 +128,7 @@ void DynarmicCallbacks64::ExceptionRaised(u64 pc, Dynarmic::A64::Exception excep
case Dynarmic::A64::Exception::SendEvent:
case Dynarmic::A64::Exception::SendEventLocal:
case Dynarmic::A64::Exception::Yield:
LOG_TRACE(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})", static_cast<std::size_t>(exception), pc, m_memory.Read32(pc));
LOG_TRACE(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X}, cached = {:08X})", std::size_t(exception), pc, m_memory.Read32(pc), MemoryReadCode(pc).value_or(0));
return;
case Dynarmic::A64::Exception::NoExecuteFault:
LOG_CRITICAL(Core_ARM, "Cannot execute instruction at unmapped address {:#016x}", pc);
+2 -2
View File
@@ -43,7 +43,7 @@ public:
Dynarmic::A64::Vector MemoryRead128(u64 vaddr) override;
std::optional<u32> MemoryReadCode(u64 vaddr) override;
void InstructionSynchronizationBarrierRaised() override {
last_code_addr = 0; //reset back, force refetch
last_code_addr = u64(-1); //reset back, force refetch
}
void MemoryWrite8(u64 vaddr, u8 value) override;
void MemoryWrite16(u64 vaddr, u16 value) override;
@@ -65,7 +65,7 @@ public:
void ReturnException(u64 pc, Dynarmic::HaltReason hr);
Dynarmic::CodePage cached_code_page;
u64 last_code_addr = 0;
u64 last_code_addr = u64(-1);
ArmDynarmic64& m_parent;
Core::Memory::Memory& m_memory;
u64 m_tpidrro_el0{};
+84 -87
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -13,117 +16,111 @@ using namespace Common::ELF;
namespace Core {
namespace Symbols {
template <typename Word, typename ELFSymbol, typename ByteReader>
static Symbols GetSymbols(ByteReader ReadBytes) {
const auto Read8{[&](u64 index) {
struct ModuleHeaderLocation {
u32 version;
u32 header_offset;
u32 version_offset;
};
static_assert(sizeof(ModuleHeaderLocation) == 0x0C);
struct ModuleHeader {
u32 signature;
u32 dynamic_offset;
u32 bss_start_offset;
u32 bss_end_offset;
u32 exception_info_start_offset;
u32 exception_info_end_offset;
u32 module_offset;
u32 relro_start_offset;
u32 full_relro_end_offset;
u32 nx_debug_link_start_offset;
u32 nx_debug_link_end_offset;
u32 note_gnu_build_id_start_offset;
u32 note_gnu_build_id_end_offset;
};
static_assert(sizeof(ModuleHeader) == 0x34);
struct Mod32 {
using Sym = Elf32_Sym;
using Dyn = Elf32_Dyn;
};
struct Mod64 {
using Sym = Elf64_Sym;
using Dyn = Elf64_Dyn;
};
template <typename M, typename F>
static Symbols GetSymbols(F&& ReadBytes) {
const auto Read8 = [&](u64 index) {
u8 ret;
ReadBytes(&ret, index, sizeof(u8));
return ret;
}};
const auto Read32{[&](u64 index) {
u32 ret;
ReadBytes(&ret, index, sizeof(u32));
return ret;
}};
const auto ReadWord{[&](u64 index) {
Word ret;
ReadBytes(&ret, index, sizeof(Word));
return ret;
}};
const u32 mod_offset = Read32(4);
if (Read32(mod_offset) != Common::MakeMagic('M', 'O', 'D', '0')) {
};
ModuleHeaderLocation loc{};
ReadBytes(&loc, 0, sizeof(ModuleHeaderLocation));
ModuleHeader hdr;
ReadBytes(&hdr, loc.header_offset, sizeof(ModuleHeader));
if (hdr.signature != Common::MakeMagic('M', 'O', 'D', '0')) {
return {};
}
VAddr string_table_offset{};
VAddr symbol_table_offset{};
u64 symbol_entry_size{};
const auto dynamic_offset = Read32(mod_offset + 0x4) + mod_offset;
VAddr dynamic_index = dynamic_offset;
VAddr strtab_offs{};
VAddr symtab_offs{};
u64 syment_size = sizeof(typename M::Sym);
VAddr dynamic_offset = loc.header_offset + hdr.dynamic_offset;
while (true) {
const Word tag = ReadWord(dynamic_index);
const Word value = ReadWord(dynamic_index + sizeof(Word));
dynamic_index += 2 * sizeof(Word);
if (tag == ElfDtNull) {
typename M::Dyn dyn;
ReadBytes(&dyn, dynamic_offset, sizeof(typename M::Dyn));
dynamic_offset += sizeof(typename M::Dyn);
if (dyn.d_tag == ElfDtNull) {
break;
}
if (tag == ElfDtStrtab) {
string_table_offset = value;
} else if (tag == ElfDtSymtab) {
symbol_table_offset = value;
} else if (tag == ElfDtSyment) {
symbol_entry_size = value;
if (dyn.d_tag == ElfDtStrtab) {
strtab_offs = dyn.d_un.d_ptr;
} else if (dyn.d_tag == ElfDtSymtab) {
symtab_offs = dyn.d_un.d_ptr;
} else if (dyn.d_tag == ElfDtSyment) {
syment_size = dyn.d_un.d_val;
}
}
if (string_table_offset == 0 || symbol_table_offset == 0 || symbol_entry_size == 0) {
return {};
}
Symbols out;
VAddr symbol_index = symbol_table_offset;
while (symbol_index < string_table_offset) {
ELFSymbol symbol{};
ReadBytes(&symbol, symbol_index, sizeof(ELFSymbol));
VAddr string_offset = string_table_offset + symbol.st_name;
std::string name;
for (u8 c = Read8(string_offset); c != 0; c = Read8(++string_offset)) {
name += static_cast<char>(c);
if (strtab_offs > 0 && symtab_offs > 0) {
Symbols out;
VAddr symbol_index = symtab_offs;
while (symbol_index < strtab_offs) {
typename M::Sym symbol{};
ReadBytes(&symbol, symbol_index, sizeof(typename M::Sym));
VAddr offs = strtab_offs + symbol.st_name;
std::string name{};
for (u8 c = Read8(offs); c != 0; c = Read8(++offs))
name += char(c);
symbol_index += syment_size;
out[name] = std::make_pair(symbol.st_value, symbol.st_size);
}
symbol_index += symbol_entry_size;
out[name] = std::make_pair(symbol.st_value, symbol.st_size);
return out;
}
return out;
return {};
}
Symbols GetSymbols(VAddr base, Core::Memory::Memory& memory, bool is_64) {
const auto ReadBytes{
[&](void* ptr, size_t offset, size_t size) { memory.ReadBlock(base + offset, ptr, size); }};
if (is_64) {
return GetSymbols<u64, Elf64_Sym>(ReadBytes);
} else {
return GetSymbols<u32, Elf32_Sym>(ReadBytes);
}
const auto f = [base, &memory](void* ptr, size_t offset, size_t size) {
memory.ReadBlock(base + offset, ptr, size);
};
return is_64 ? GetSymbols<Mod64>(f) : GetSymbols<Mod32>(f);
}
Symbols GetSymbols(std::span<const u8> data, bool is_64) {
const auto ReadBytes{[&](void* ptr, size_t offset, size_t size) {
const auto f = [data](void* ptr, size_t offset, size_t size) {
std::memcpy(ptr, data.data() + offset, size);
}};
if (is_64) {
return GetSymbols<u64, Elf64_Sym>(ReadBytes);
} else {
return GetSymbols<u32, Elf32_Sym>(ReadBytes);
}
};
return is_64 ? GetSymbols<Mod64>(f) : GetSymbols<Mod32>(f);
}
std::optional<std::string> GetSymbolName(const Symbols& symbols, VAddr addr) {
const auto iter = std::find_if(symbols.cbegin(), symbols.cend(), [addr](const auto& pair) {
const auto& [name, sym_info] = pair;
const auto& [start_address, size] = sym_info;
const auto end_address = start_address + size;
return addr >= start_address && addr < end_address;
const auto it = std::find_if(symbols.cbegin(), symbols.cend(), [addr](const auto& e) {
auto const [start, size] = e.second;
auto const end = start + size;
return addr >= start && addr < end;
});
if (iter == symbols.cend()) {
return std::nullopt;
}
return iter->first;
return it != symbols.cend() ? std::optional<std::string>{it->first} : std::nullopt;
}
} // namespace Symbols
+8 -7
View File
@@ -569,12 +569,11 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t
layers.emplace_back(std::move(extracted));
auto layered = LayeredVfsDirectory::MakeLayeredDirectory(std::move(layers));
if (layered == nullptr) {
auto layered_ext = LayeredVfsDirectory::MakeLayeredDirectory(std::move(layers_ext));
if (layered == nullptr && layered_ext == nullptr) {
return;
}
auto layered_ext = LayeredVfsDirectory::MakeLayeredDirectory(std::move(layers_ext));
auto packed = CreateRomFS(std::move(layered), std::move(layered_ext));
if (packed == nullptr) {
return;
@@ -943,6 +942,8 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const {
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "romfs")) ||
IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "romfslite")))
AppendCommaIfNotEmpty(types, "LayeredFS");
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "romfs_ext")))
AppendCommaIfNotEmpty(types, "ExtLayeredFS");
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "cheats")))
AppendCommaIfNotEmpty(types, "Cheats");
@@ -965,13 +966,13 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const {
const auto sdmc_mod_dir = fs_controller.GetSDMCModificationLoadRoot(title_id);
if (sdmc_mod_dir != nullptr) {
std::string types;
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "exefs"))) {
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "exefs")))
AppendCommaIfNotEmpty(types, "LayeredExeFS");
}
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfs")) ||
IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfslite"))) {
IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfslite")))
AppendCommaIfNotEmpty(types, "LayeredFS");
}
if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfs_ext")))
AppendCommaIfNotEmpty(types, "ExtLayeredFS");
if (!types.empty()) {
const auto mod_disabled =
+1 -2
View File
@@ -33,8 +33,7 @@ IScreenShotApplicationService::IScreenShotApplicationService(
IScreenShotApplicationService::~IScreenShotApplicationService() = default;
Result IScreenShotApplicationService::SetShimLibraryVersion(ShimLibraryVersion library_version,
ClientAppletResourceUserId aruid) {
Result IScreenShotApplicationService::SetShimLibraryVersion(ShimLibraryVersion library_version, ClientAppletResourceUserId aruid) {
LOG_WARNING(Service_Capture, "(STUBBED) called. library_version={}, applet_resource_user_id={}",
library_version, aruid.pid);
R_SUCCEED();
+15 -19
View File
@@ -1,6 +1,10 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/logging.h"
#include "core/arm/debug.h"
#include "core/arm/symbols.h"
#include "core/core.h"
@@ -111,10 +115,7 @@ public:
const VAddr input_ptr{context.AddHeap(in_data.data(), in_data.size())};
const VAddr output_ptr{context.AddHeap(out_data.data(), out_data.size())};
const u64 wrapper_value{context.CallFunction(callbacks.Control, ret_ptr, configuration_ptr,
command, input_ptr, in_data.size(), output_ptr,
out_data.size())};
const u64 wrapper_value = context.CallFunction(callbacks.Control, ret_ptr, configuration_ptr, command, input_ptr, in_data.size(), output_ptr, out_data.size());
*out_return_value = context.GetHeap<s32>(ret_ptr);
context.GetHeap(output_ptr, out_data.data(), out_data.size());
@@ -126,9 +127,7 @@ public:
R_THROW(ResultUnknown);
}
Result LoadPlugin(u64 tmem_size, InCopyHandle<Kernel::KTransferMemory> tmem,
InBuffer<BufferAttr_HipcMapAlias> nrr,
InBuffer<BufferAttr_HipcMapAlias> nro) {
Result LoadPlugin(u64 tmem_size, InCopyHandle<Kernel::KTransferMemory> tmem, InBuffer<BufferAttr_HipcMapAlias> nrr, InBuffer<BufferAttr_HipcMapAlias> nro) {
if (!tmem) {
LOG_ERROR(Service_JIT, "Invalid transfer memory handle!");
R_THROW(ResultUnknown);
@@ -139,9 +138,10 @@ public:
configuration.transfer_memory.size = tmem_size;
// Gather up all the callbacks from the loaded plugin
auto symbols{Core::Symbols::GetSymbols(nro, true)};
const auto GetSymbol{[&](const std::string& name) { return symbols[name].first; }};
auto symbols = Core::Symbols::GetSymbols(nro, true);
const auto GetSymbol = [&](const std::string& name) {
return symbols[name].first;
};
callbacks.rtld_fini = GetSymbol("_fini");
callbacks.rtld_init = GetSymbol("_init");
callbacks.Control = GetSymbol("nnjitpluginControl");
@@ -153,8 +153,7 @@ public:
callbacks.OnPrepared = GetSymbol("nnjitpluginOnPrepared");
callbacks.Keeper = GetSymbol("nnjitpluginKeeper");
if (callbacks.GetVersion == 0 || callbacks.Configure == 0 || callbacks.GenerateCode == 0 ||
callbacks.OnPrepared == 0) {
if (callbacks.GetVersion == 0 || callbacks.Configure == 0 || callbacks.GenerateCode == 0 || callbacks.OnPrepared == 0 || callbacks.Control == 0) {
LOG_ERROR(Service_JIT, "plugin does not implement all necessary functionality");
R_THROW(ResultUnknown);
}
@@ -164,12 +163,9 @@ public:
R_THROW(ResultUnknown);
}
context.MapProcessMemory(configuration.sys_ro_memory.offset,
configuration.sys_ro_memory.size);
context.MapProcessMemory(configuration.sys_rx_memory.offset,
configuration.sys_rx_memory.size);
context.MapProcessMemory(configuration.transfer_memory.offset,
configuration.transfer_memory.size);
context.MapProcessMemory(configuration.sys_ro_memory.offset, configuration.sys_ro_memory.size);
context.MapProcessMemory(configuration.sys_rx_memory.offset, configuration.sys_rx_memory.size);
context.MapProcessMemory(configuration.transfer_memory.offset, configuration.transfer_memory.size);
// Run ELF constructors, if needed
if (callbacks.rtld_init != 0) {
@@ -179,7 +175,7 @@ public:
// Function prototype:
// u64 GetVersion();
const auto version{context.CallFunction(callbacks.GetVersion)};
if (version != 1) {
if (version > 1) {
LOG_ERROR(Service_JIT, "unknown plugin version {}", version);
R_THROW(ResultUnknown);
}
+92 -99
View File
@@ -24,15 +24,25 @@ using namespace Common::ELF;
namespace Service::JIT {
enum HelperFn {
None,
Stop,
Resolve,
Panic,
Memcpy,
Memmove,
Memset,
// sm64
PanicForPlugin,
AbortImpl,
UnexpectedImpl,
Count
};
constexpr std::array<u8, 8> SVC0_ARM64 = {
0x01, 0x00, 0x00, 0xd4, // svc #0
0xc0, 0x03, 0x5f, 0xd6, // ret
};
constexpr std::array HELPER_FUNCTIONS{
"_stop", "_resolve", "_panic", "memcpy", "memmove", "memset",
};
constexpr size_t STACK_ALIGN = 16;
class JITContextImpl;
@@ -42,10 +52,12 @@ using IntervalType = boost::icl::interval_set<VAddr>::interval_type;
class DynarmicCallbacks64 : public Dynarmic::A64::UserCallbacks {
public:
explicit DynarmicCallbacks64(Core::Memory::Memory& memory_, std::vector<u8>& local_memory_,
IntervalSet& mapped_ranges_, JITContextImpl& parent_)
: memory{memory_}, local_memory{local_memory_},
mapped_ranges{mapped_ranges_}, parent{parent_} {}
explicit DynarmicCallbacks64(Core::Memory::Memory& memory_, std::vector<u8>& local_memory_, IntervalSet& mapped_ranges_, JITContextImpl& parent_)
: memory{memory_}
, local_memory{local_memory_}
, mapped_ranges{mapped_ranges_}
, parent{parent_}
{}
std::optional<std::uint32_t> MemoryReadCode(VAddr vaddr) override {
static_assert(Core::Memory::YUZU_PAGESIZE == Dynarmic::CODE_PAGE_SIZE);
@@ -57,7 +69,7 @@ public:
return cached_code_page.inst[(vaddr & Core::Memory::YUZU_PAGEMASK) / sizeof(u32)];
}
void InstructionSynchronizationBarrierRaised() override {
last_code_addr = 0; //reset back, force refetch
last_code_addr = u64(-1); //reset back, force refetch
}
u8 MemoryRead8(u64 vaddr) override {
return ReadMemory<u8>(vaddr);
@@ -75,13 +87,10 @@ public:
return ReadMemory<u128>(vaddr);
}
std::string MemoryReadCString(u64 vaddr) {
std::string result;
std::string result{};
u8 next;
while ((next = MemoryRead8(vaddr++)) != 0) {
result += next;
}
while ((next = MemoryRead8(vaddr++)) != 0)
result += char(next);
return result;
}
@@ -157,32 +166,26 @@ private:
std::vector<u8>& local_memory;
IntervalSet& mapped_ranges;
JITContextImpl& parent;
Dynarmic::CodePage cached_code_page;
u64 last_code_addr = 0;
u64 last_code_addr = u64(-1);
};
class JITContextImpl {
public:
explicit JITContextImpl(Core::Memory::Memory& memory_) : memory{memory_} {
callbacks =
std::make_unique<DynarmicCallbacks64>(memory, local_memory, mapped_ranges, *this);
user_config.callbacks = callbacks.get();
jit = std::make_unique<Dynarmic::A64::Jit>(user_config);
callbacks.emplace(memory, local_memory, mapped_ranges, *this);
user_config.callbacks = std::addressof(callbacks.value());
jit.emplace(user_config);
}
bool LoadNRO(std::span<const u8> data) {
local_memory.clear();
relocbase = local_memory.size();
local_memory.insert(local_memory.end(), data.begin(), data.end());
if (FixupRelocations()) {
InsertHelperFunctions();
InsertStack();
return true;
}
return false;
}
@@ -190,11 +193,9 @@ public:
// The loaded NRO file has ELF relocations that must be processed before it can run.
// Normally this would be processed by RTLD, but in HLE context, we don't have
// the linker available, so we have to do it ourselves.
const VAddr mod_offset{callbacks->MemoryRead32(4)};
if (callbacks->MemoryRead32(mod_offset) != Common::MakeMagic('M', 'O', 'D', '0')) {
if (callbacks->MemoryRead32(mod_offset) != Common::MakeMagic('M', 'O', 'D', '0'))
return false;
}
// For more info about dynamic entries, see the ELF ABI specification:
// https://refspecs.linuxbase.org/elf/gabi4+/ch5.dynamic.html
@@ -205,40 +206,33 @@ public:
while (true) {
const auto dyn{callbacks->ReadMemory<Elf64_Dyn>(dynamic_offset)};
dynamic_offset += sizeof(Elf64_Dyn);
if (!dyn.d_tag) {
break;
}
if (dyn.d_tag == ElfDtRela) {
} else if (dyn.d_tag == ElfDtRela) {
rela_dyn = dyn.d_un.d_ptr;
}
if (dyn.d_tag == ElfDtRelasz) {
} else if (dyn.d_tag == ElfDtRelasz) {
num_rela = dyn.d_un.d_val / sizeof(Elf64_Rela);
}
if (dyn.d_tag == ElfDtRelr) {
} else if (dyn.d_tag == ElfDtRelr) {
relr_dyn = dyn.d_un.d_ptr;
}
if (dyn.d_tag == ElfDtRelrsz) {
} else if (dyn.d_tag == ElfDtRelrsz) {
num_relr = dyn.d_un.d_val / sizeof(Elf64_Relr);
}
}
for (size_t i = 0; i < num_rela; i++) {
const auto rela{callbacks->ReadMemory<Elf64_Rela>(rela_dyn + i * sizeof(Elf64_Rela))};
if (Elf64RelType(rela.r_info) != ElfAArch64Relative) {
continue;
if (Elf64RelType(rela.r_info) == ElfAArch64Relative) {
const VAddr contents{callbacks->MemoryRead64(rela.r_offset)};
callbacks->MemoryWrite64(rela.r_offset, contents + rela.r_addend);
}
const VAddr contents{callbacks->MemoryRead64(rela.r_offset)};
callbacks->MemoryWrite64(rela.r_offset, contents + rela.r_addend);
}
VAddr relr_where = 0;
for (size_t i = 0; i < num_relr; i++) {
const auto relr{callbacks->ReadMemory<Elf64_Relr>(relr_dyn + i * sizeof(Elf64_Relr))};
const auto incr{[&](VAddr where) {
const auto relr = callbacks->ReadMemory<Elf64_Relr>(relr_dyn + i * sizeof(Elf64_Relr));
const auto incr = [&](VAddr where) {
callbacks->MemoryWrite64(where, callbacks->MemoryRead64(where) + relocbase);
}};
};
if ((relr & 1) == 0) {
// where pointer
relr_where = relocbase + relr;
@@ -254,13 +248,12 @@ public:
relr_where += 63 * sizeof(Elf64_Addr);
}
}
return true;
}
void InsertHelperFunctions() {
for (const auto& name : HELPER_FUNCTIONS) {
helpers[name] = local_memory.size();
for (size_t i = 0; i < size_t(HelperFn::Count); ++i) {
helpers[i] = local_memory.size();
local_memory.insert(local_memory.end(), SVC0_ARM64.begin(), SVC0_ARM64.end());
}
}
@@ -268,9 +261,8 @@ public:
void InsertStack() {
// Allocate enough space to avoid any reasonable risk of
// overflowing the stack during plugin execution
const u64 pad_amount{Common::AlignUp(local_memory.size(), STACK_ALIGN) -
local_memory.size()};
local_memory.insert(local_memory.end(), 0x10000 + pad_amount, 0);
const u64 pad_amount = Common::AlignUp(local_memory.size(), STACK_ALIGN) - local_memory.size();
local_memory.insert(local_memory.end(), (4096 * 32) + pad_amount, 0);
top_of_stack = local_memory.size();
heap_pointer = top_of_stack;
}
@@ -297,27 +289,21 @@ public:
//
// For more info, see the AArch64 ABI PCS:
// https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst
for (size_t i = 0; i < 8 && i < argument_stack.size(); i++) {
for (size_t i = 0; i < 8 && i < argument_stack.size(); i++)
jit->SetRegister(i, argument_stack[i]);
}
if (argument_stack.size() > 8) {
const VAddr new_sp = Common::AlignDown(
top_of_stack - (argument_stack.size() - 8) * sizeof(u64), STACK_ALIGN);
for (size_t i = 8; i < argument_stack.size(); i++) {
const VAddr new_sp = Common::AlignDown(top_of_stack - (argument_stack.size() - 8) * sizeof(u64), STACK_ALIGN);
for (size_t i = 8; i < argument_stack.size(); i++)
callbacks->MemoryWrite64(new_sp + (i - 8) * sizeof(u64), argument_stack[i]);
}
jit->SetSP(new_sp);
}
// Reset the call state for the next invocation
argument_stack.clear();
heap_pointer = top_of_stack;
}
u64 CallFunction(VAddr func) {
jit->SetRegister(30, helpers["_stop"]);
jit->SetRegister(30, helpers[size_t(HelperFn::Stop)]);
jit->SetSP(top_of_stack);
SetupArguments();
@@ -326,21 +312,14 @@ public:
return jit->GetRegister(0);
}
VAddr GetHelper(const std::string& name) {
return helpers[name];
}
VAddr AddHeap(const void* data, size_t size) {
// Require all heap data types to have the same alignment as the
// stack pointer, for compatibility
const size_t num_bytes{Common::AlignUp(size, STACK_ALIGN)};
const size_t num_bytes = Common::AlignUp(size, STACK_ALIGN);
// Make additional memory space if required
if (heap_pointer + num_bytes > local_memory.size()) {
local_memory.insert(local_memory.end(),
(heap_pointer + num_bytes) - local_memory.size(), 0);
local_memory.insert(local_memory.end(), (heap_pointer + num_bytes) - local_memory.size(), 0);
}
const VAddr location{heap_pointer};
std::memcpy(local_memory.data() + location, data, size);
heap_pointer += num_bytes;
@@ -351,13 +330,29 @@ public:
std::memcpy(data, local_memory.data() + location, size);
}
std::unique_ptr<DynarmicCallbacks64> callbacks;
VAddr GetHelper(const std::string& name) {
if (name == "_resolve") return helpers[HelperFn::Resolve];
else if (name == "_panic") return helpers[HelperFn::Panic];
else if (name == "_stop") return helpers[HelperFn::Stop];
else if (name == "memset") return helpers[HelperFn::Memset];
else if (name == "memcpy") return helpers[HelperFn::Memcpy];
else if (name == "memmove") return helpers[HelperFn::Memmove];
else if (name == "PanicForPlugin") return helpers[HelperFn::PanicForPlugin];
else if (name == "_ZN2nn4diag6detail9AbortImplEPKcS3_S3_i") return helpers[HelperFn::AbortImpl];
else if (name == "_ZN2nn6detail21UnexpectedDefaultImplEPKcS2_i") return helpers[HelperFn::UnexpectedImpl];
else {
LOG_CRITICAL(Service_JIT, "unresolved {}", name);
return helpers[HelperFn::Panic];
}
}
std::optional<DynarmicCallbacks64> callbacks;
std::optional<Dynarmic::A64::Jit> jit;
std::vector<u8> local_memory;
std::vector<u64> argument_stack;
std::vector<VAddr> argument_stack;
IntervalSet mapped_ranges;
Dynarmic::A64::UserConfig user_config;
std::unique_ptr<Dynarmic::A64::Jit> jit;
std::map<std::string, VAddr, std::less<>> helpers;
std::array<VAddr, size_t(HelperFn::Count)> helpers;
Core::Memory::Memory& memory;
VAddr top_of_stack;
VAddr heap_pointer;
@@ -383,44 +378,41 @@ void DynarmicCallbacks64::CallSVC(u32 swi) {
}
u64 pc{parent.jit->GetPC() - 4};
auto& helpers{parent.helpers};
if (pc == helpers["memcpy"] || pc == helpers["memmove"]) {
if (pc == parent.helpers[size_t(HelperFn::Memcpy)] || pc == parent.helpers[size_t(HelperFn::Memmove)]) {
const VAddr dest{parent.jit->GetRegister(0)};
const VAddr src{parent.jit->GetRegister(1)};
const size_t n{parent.jit->GetRegister(2)};
if (dest < src) {
for (size_t i = 0; i < n; i++) {
for (size_t i = 0; i < n; i++)
MemoryWrite8(dest + i, MemoryRead8(src + i));
}
} else {
for (size_t i = n; i > 0; i--) {
for (size_t i = n; i > 0; i--)
MemoryWrite8(dest + i - 1, MemoryRead8(src + i - 1));
}
}
} else if (pc == helpers["memset"]) {
} else if (pc == parent.helpers[size_t(HelperFn::Memset)]) {
const VAddr dest{parent.jit->GetRegister(0)};
const u64 c{parent.jit->GetRegister(1)};
const size_t n{parent.jit->GetRegister(2)};
for (size_t i = 0; i < n; i++) {
MemoryWrite8(dest + i, static_cast<u8>(c));
}
} else if (pc == helpers["_resolve"]) {
for (size_t i = 0; i < n; i++)
MemoryWrite8(dest + i, u8(c));
} else if (pc == parent.helpers[size_t(HelperFn::Resolve)]) {
// X0 contains a char* for a symbol to resolve
const auto name{MemoryReadCString(parent.jit->GetRegister(0))};
const auto helper{helpers[name]};
if (helper != 0) {
parent.jit->SetRegister(0, helper);
} else {
LOG_WARNING(Service_JIT, "plugin requested unknown function {}", name);
parent.jit->SetRegister(0, helpers["_panic"]);
}
} else if (pc == helpers["_stop"]) {
parent.jit->SetRegister(0, u64(parent.GetHelper(name)));
} else if (pc == parent.helpers[size_t(HelperFn::Stop)]) {
parent.jit->HaltExecution();
} else if (pc == helpers["_panic"]) {
} else if (pc == parent.helpers[size_t(HelperFn::Panic)]) {
LOG_CRITICAL(Service_JIT, "plugin panicked!");
parent.jit->HaltExecution();
// SM64
} else if (pc == parent.helpers[size_t(HelperFn::PanicForPlugin)]) {
LOG_CRITICAL(Service_JIT, "plugin panicked!");
parent.jit->HaltExecution();
} else if (pc == parent.helpers[size_t(HelperFn::AbortImpl)]) {
LOG_CRITICAL(Service_JIT, "plugin panicked!");
parent.jit->HaltExecution();
} else if (pc == parent.helpers[size_t(HelperFn::UnexpectedImpl)]) {
LOG_CRITICAL(Service_JIT, "plugin panicked!");
parent.jit->HaltExecution();
} else {
@@ -430,7 +422,8 @@ void DynarmicCallbacks64::CallSVC(u32 swi) {
}
void DynarmicCallbacks64::ExceptionRaised(u64 pc, Dynarmic::A64::Exception exception) {
LOG_CRITICAL(Service_JIT, "Illegal operation PC @ {:08x}", pc);
auto const inst = MemoryRead32(pc);
LOG_CRITICAL(Service_JIT, "{} PC @ {:08x}, data = {:08x}", exception, pc, inst);
parent.jit->HaltExecution();
}
+7 -42
View File
@@ -16,7 +16,6 @@
#include "common/assert.h"
#include "common/atomic_ops.h"
#include "common/common_types.h"
#include "common/heap_tracker.h"
#include "common/logging.h"
#include "common/page_table.h"
#include "common/scope_exit.h"
@@ -55,37 +54,24 @@ struct Memory::Impl {
} else {
current_page_table->fastmem_arena = nullptr;
}
#ifdef __ANDROID__
heap_tracker.emplace(system.DeviceMemory().buffer);
buffer = std::addressof(*heap_tracker);
#else
buffer = std::addressof(system.DeviceMemory().buffer);
#endif
}
void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size,
Common::PhysicalAddress target, Common::MemoryPermission perms,
bool separate_heap) {
void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, Common::PhysicalAddress target, Common::MemoryPermission perms, bool separate_heap) {
ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((base & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base));
ASSERT_MSG(target >= DramMemoryMap::Base, "Out of bounds target: {:016X}",
GetInteger(target));
MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, target,
Common::PageType::Memory);
ASSERT_MSG(target >= DramMemoryMap::Base, "Out of bounds target: {:016X}", GetInteger(target));
MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, target, Common::PageType::Memory);
if (current_page_table->fastmem_arena) {
buffer->Map(GetInteger(base), GetInteger(target) - DramMemoryMap::Base, size, perms,
separate_heap);
buffer->Map(GetInteger(base), GetInteger(target) - DramMemoryMap::Base, size, perms, separate_heap);
}
}
void UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size,
bool separate_heap) {
void UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, bool separate_heap) {
ASSERT_MSG((size & YUZU_PAGEMASK) == 0, "non-page aligned size: {:016X}", size);
ASSERT_MSG((base & YUZU_PAGEMASK) == 0, "non-page aligned base: {:016X}", GetInteger(base));
MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, 0,
Common::PageType::Unmapped);
MapPages(page_table, base / YUZU_PAGESIZE, size / YUZU_PAGESIZE, 0, Common::PageType::Unmapped);
if (current_page_table->fastmem_arena) {
buffer->Unmap(GetInteger(base), size, separate_heap);
@@ -857,12 +843,7 @@ struct Memory::Impl {
std::array<Common::ScratchBuffer<u32>, Core::Hardware::NUM_CPU_CORES> scratch_buffers{};
std::span<Core::GPUDirtyMemoryManager> gpu_dirty_managers;
std::mutex sys_core_guard;
#ifdef __ANDROID__
std::optional<Common::HeapTracker> heap_tracker;
Common::HeapTracker* buffer{};
#else
Common::HostMemory* buffer{};
#endif
};
Memory::Memory(Core::System& system_) : system{system_} {
@@ -1055,30 +1036,14 @@ bool Memory::InvalidateNCE(Common::ProcessAddress vaddr, size_t size) {
u8* const ptr = impl->GetPointerImpl(
GetInteger(vaddr),
[&] {
LOG_ERROR(HW_Memory, "Unmapped InvalidateNCE for {} bytes @ {:#x}", size,
GetInteger(vaddr));
LOG_ERROR(HW_Memory, "Unmapped InvalidateNCE for {} bytes @ {:#x}", size, GetInteger(vaddr));
mapped = false;
},
[&] { rasterizer = true; });
if (rasterizer) {
impl->InvalidateGPUMemory(ptr, size);
}
#ifdef __ANDROID__
if (!rasterizer && mapped) {
impl->buffer->DeferredMapSeparateHeap(GetInteger(vaddr));
}
#endif
return mapped && ptr != nullptr;
}
bool Memory::InvalidateSeparateHeap(void* fault_address) {
#ifdef __ANDROID__
return impl->buffer->DeferredMapSeparateHeap(static_cast<u8*>(fault_address));
#else
return false;
#endif
}
} // namespace Core::Memory
+1 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
@@ -490,13 +490,8 @@ public:
* marked as debug or non-debug.
*/
void MarkRegionDebug(Common::ProcessAddress vaddr, u64 size, bool debug);
void SetGPUDirtyManagers(std::span<Core::GPUDirtyMemoryManager> managers);
bool InvalidateNCE(Common::ProcessAddress vaddr, size_t size);
bool InvalidateSeparateHeap(void* fault_address);
private:
Core::System& system;
@@ -82,8 +82,6 @@ private:
std::thread thread;
mach_port_t server_port;
void MessagePump();
};
MachHandler::MachHandler() {
@@ -97,7 +95,30 @@ MachHandler::MachHandler() {
KCHECK(mach_port_request_notification(mach_task_self(), server_port, MACH_NOTIFY_PORT_DESTROYED, 0, server_port, MACH_MSG_TYPE_MAKE_SEND_ONCE, &prev));
#undef KCHECK
thread = std::thread(&MachHandler::MessagePump, this);
thread = std::thread([this] {
mach_msg_return_t mr;
MachMessage request;
MachMessage reply;
while (true) {
mr = mach_msg(&request.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof(request), server_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
if (mr != MACH_MSG_SUCCESS) {
fmt::print(stderr, "dynarmic: macOS MachHandler: Failed to receive mach message. error: {:#08x} ({})\n", mr, mach_error_string(mr));
return;
}
if (!mach_exc_server(&request.head, &reply.head)) {
fmt::print(stderr, "dynarmic: macOS MachHandler: Unexpected mach message\n");
return;
}
mr = mach_msg(&reply.head, MACH_SEND_MSG, reply.head.msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
if (mr != MACH_MSG_SUCCESS) {
fmt::print(stderr, "dynarmic: macOS MachHandler: Failed to send mach message. error: {:#08x} ({})\n", mr, mach_error_string(mr));
return;
}
}
});
thread.detach();
}
@@ -105,31 +126,6 @@ MachHandler::~MachHandler() {
mach_port_deallocate(mach_task_self(), server_port);
}
void MachHandler::MessagePump() {
mach_msg_return_t mr;
MachMessage request;
MachMessage reply;
while (true) {
mr = mach_msg(&request.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof(request), server_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
if (mr != MACH_MSG_SUCCESS) {
fmt::print(stderr, "dynarmic: macOS MachHandler: Failed to receive mach message. error: {:#08x} ({})\n", mr, mach_error_string(mr));
return;
}
if (!mach_exc_server(&request.head, &reply.head)) {
fmt::print(stderr, "dynarmic: macOS MachHandler: Unexpected mach message\n");
return;
}
mr = mach_msg(&reply.head, MACH_SEND_MSG, reply.head.msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
if (mr != MACH_MSG_SUCCESS) {
fmt::print(stderr, "dynarmic: macOS MachHandler: Failed to send mach message. error: {:#08x} ({})\n", mr, mach_error_string(mr));
return;
}
}
}
#if defined(ARCHITECTURE_x86_64)
kern_return_t MachHandler::HandleRequest(x86_thread_state64_t* ts) {
std::lock_guard<std::mutex> guard(code_block_infos_mutex);
@@ -47,22 +47,18 @@ class SigHandler {
});
}
static void SigAction(int sig, siginfo_t* info, void* raw_context);
bool supports_fast_mem = true;
void* signal_stack_memory = nullptr;
std::vector<u8> signal_stack_memory;
ankerl::unordered_dense::map<u64, CodeBlockInfo> code_block_infos;
std::shared_mutex code_block_infos_mutex;
struct sigaction old_sa_segv;
struct sigaction old_sa_bus;
std::size_t signal_stack_size;
bool supports_fast_mem = true;
public:
SigHandler() noexcept {
signal_stack_size = std::max<size_t>(SIGSTKSZ, 2 * 1024 * 1024);
signal_stack_memory = mmap(nullptr, signal_stack_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
signal_stack_memory.resize(std::max<std::size_t>(SIGSTKSZ, 2 * 1024 * 1024), 0);
stack_t signal_stack{};
signal_stack.ss_sp = signal_stack_memory;
signal_stack.ss_size = signal_stack_size;
signal_stack.ss_sp = signal_stack_memory.data();
signal_stack.ss_size = signal_stack_memory.size();
signal_stack.ss_flags = 0;
if (sigaltstack(&signal_stack, nullptr) != 0) {
fmt::print(stderr, "dynarmic: POSIX SigHandler: init failure at sigaltstack\n");
@@ -89,10 +85,6 @@ public:
#endif
}
~SigHandler() noexcept {
munmap(signal_stack_memory, signal_stack_size);
}
void AddCodeBlock(u64 offset, CodeBlockInfo cbi) noexcept {
std::unique_lock guard(code_block_infos_mutex);
code_block_infos.insert_or_assign(offset, cbi);
+3 -3
View File
@@ -46,10 +46,10 @@ const std::string GetDataDirString(DataDir dir, const std::string &user_id)
u64 ClearDir(DataDir dir, const std::string &user_id)
{
fs::path data_dir = GetDataDir(dir, user_id);
u64 result = fs::remove_all(data_dir);
std::error_code ec;
u64 result = fs::remove_all(data_dir, ec);
// mkpath at the end just so it actually exists
fs::create_directories(data_dir);
fs::create_directories(data_dir, ec);
return result;
}
+4 -6
View File
@@ -181,15 +181,13 @@ void InstallFirmware(const QString& location, bool recursive) {
QString UnzipFirmwareToTmp(const QString& location) {
namespace fs = std::filesystem;
fs::path tmp{fs::temp_directory_path()};
if (!fs::create_directories(tmp / "eden" / "firmware")) {
fs::path tmp{fs::temp_directory_path() / "eden" / "firmware"};
std::error_code ec;
fs::remove_all(tmp, ec);
if (!fs::create_directories(tmp, ec)) {
return QString();
}
tmp /= "eden";
tmp /= "firmware";
QString qCacheDir = QString::fromStdString(tmp.string());
QFile zip(location);
+6 -5
View File
@@ -83,8 +83,9 @@ QStringList GetModFolders(const QString& root, const QString& fallbackName) {
// now make a temp directory...
const auto mod_dir = fs::temp_directory_path() / "eden" / "mod" / name.toStdString();
const auto tmp = mod_dir / to_make;
fs::remove_all(mod_dir);
if (!fs::create_directories(tmp)) {
std::error_code ec;
fs::remove_all(mod_dir, ec);
if (!fs::create_directories(tmp, ec)) {
LOG_ERROR(Frontend, "Failed to create temporary directory {}", tmp.string());
return {};
}
@@ -116,9 +117,9 @@ QStringList GetModFolders(const QString& root, const QString& fallbackName) {
const QString ExtractMod(const QString& path) {
namespace fs = std::filesystem;
fs::path tmp{fs::temp_directory_path() / "eden" / "unzip_mod"};
fs::remove_all(tmp);
if (!fs::create_directories(tmp)) {
std::error_code ec;
fs::remove_all(tmp, ec);
if (!fs::create_directories(tmp, ec)) {
QtCommon::Frontend::Critical(tr("Mod Extract Failed"),
tr("Failed to create temporary directory %1")
.arg(QString::fromStdString(tmp.string())));
@@ -54,7 +54,7 @@ using VideoCommon::LoadPipelines;
using VideoCommon::SerializePipeline;
using Context = ShaderContext::Context;
constexpr u32 CACHE_VERSION = 14;
constexpr u32 CACHE_VERSION = 15;
template <typename Container>
auto MakeSpan(Container& container) {
@@ -62,7 +62,7 @@ using VideoCommon::FileEnvironment;
using VideoCommon::GenericEnvironment;
using VideoCommon::GraphicsEnvironment;
constexpr u32 CACHE_VERSION = 16;
constexpr u32 CACHE_VERSION = 17;
constexpr std::array<char, 8> VULKAN_CACHE_MAGIC_NUMBER{'y', 'u', 'z', 'u', 'v', 'k', 'c', 'h'};
template <typename Container>
+3 -13
View File
@@ -486,21 +486,11 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
CollectToolingInfo();
if (is_qualcomm) {
// Qualcomm doesn't handle scaled vertex attributes
// Qualcomm Adreno GPUs doesn't handle scaled vertex attributes; keep emulation enabled
must_emulate_scaled_formats = true;
LOG_WARNING(Render_Vulkan,
"Qualcomm drivers require scaled vertex format emulation");
LOG_WARNING(Render_Vulkan,
"Qualcomm has slow push descriptors, disabling VK_KHR_push_descriptor");
RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME);
if (!features.shader_float16_int8.shaderFloat16) {
LOG_WARNING(Render_Vulkan,
"Qualcomm has broken VK_EXT_sampler_filter_minmax");
RemoveExtension(extensions.sampler_filter_minmax,
VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME);
has_broken_cube_compatibility = true;
}
"Qualcomm drivers require scaled vertex format emulation; forcing fallback");
LOG_WARNING(Render_Vulkan,
"Disabling shader float controls and 64-bit integer features on Qualcomm proprietary drivers");
RemoveExtension(extensions.shader_float_controls, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME);