From 466e0c5efac74515a4c153c8fe9d2bedaae72389 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 1 Jan 2021 18:54:54 -0800 Subject: [PATCH 01/40] Utils: Clean up duplicated clamping code --- include/mgba-util/math.h | 27 +++ src/platform/opengl/gl.c | 14 +- src/platform/opengl/gles2.c | 14 +- src/platform/qt/DisplayQt.cpp | 22 +- src/platform/qt/VideoView.cpp | 7 +- src/platform/qt/Window.cpp | 21 +- src/platform/qt/ts/mgba-de.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-en.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-es.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-fr.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-it.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-ja.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-ko.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-nl.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-pt_BR.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-ru.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-template.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-tr.ts | 308 ++++++++++++++-------------- src/platform/qt/ts/mgba-zh_CN.ts | 308 ++++++++++++++-------------- src/platform/qt/utils.h | 31 +++ 20 files changed, 2072 insertions(+), 2068 deletions(-) diff --git a/include/mgba-util/math.h b/include/mgba-util/math.h index 4cc1d7195..05a5c1bb9 100644 --- a/include/mgba-util/math.h +++ b/include/mgba-util/math.h @@ -74,6 +74,33 @@ static inline int reduceFraction(int* num, int* den) { return n; } +#define TYPE_GENERICIZE(MACRO) \ + MACRO(int, Int) \ + MACRO(unsigned, UInt) + +#define LOCK_ASPECT_RATIO(T, t) \ + static inline void lockAspectRatio ## t(T refW, T refH, T* w, T* h) { \ + if (*w * refH > *h * refW) { \ + *w = *h * refW / refH; \ + } else if (*w * refH < *h * refW) { \ + *h = *w * refH / refW; \ + } \ + } + +TYPE_GENERICIZE(LOCK_ASPECT_RATIO) +#undef LOCK_ASPECT_RATIO + +#define LOCK_INTEGER_RATIO(T, t) \ + static inline void lockIntegerRatio ## t(T ref, T* val) { \ + if (*val >= ref) { \ + *val -= *val % ref; \ + } \ + } + +TYPE_GENERICIZE(LOCK_INTEGER_RATIO) +#undef LOCK_INTEGER_RATIO + +#undef TYPE_GENERICIZE CXX_GUARD_END #endif diff --git a/src/platform/opengl/gl.c b/src/platform/opengl/gl.c index 4cc2a8c6c..76089c4c0 100644 --- a/src/platform/opengl/gl.c +++ b/src/platform/opengl/gl.c @@ -86,19 +86,11 @@ static void mGLContextResized(struct VideoBackend* v, unsigned w, unsigned h) { unsigned drawW = w; unsigned drawH = h; if (v->lockAspectRatio) { - if (w * v->height > h * v->width) { - drawW = h * v->width / v->height; - } else if (w * v->height < h * v->width) { - drawH = w * v->height / v->width; - } + lockAspectRatioUInt(v->width, v->height, &drawW, &drawH); } if (v->lockIntegerScaling) { - if (drawW >= v->width) { - drawW -= drawW % v->width; - } - if (drawH >= v->height) { - drawH -= drawH % v->height; - } + lockIntegerRatioUInt(v->width, &drawW); + lockIntegerRatioUInt(v->height, &drawH); } glMatrixMode(GL_MODELVIEW); glLoadIdentity(); diff --git a/src/platform/opengl/gles2.c b/src/platform/opengl/gles2.c index a8052cab1..d9f6705e5 100644 --- a/src/platform/opengl/gles2.c +++ b/src/platform/opengl/gles2.c @@ -221,19 +221,11 @@ static void mGLES2ContextResized(struct VideoBackend* v, unsigned w, unsigned h) unsigned drawW = w; unsigned drawH = h; if (v->lockAspectRatio) { - if (w * v->height > h * v->width) { - drawW = h * v->width / v->height; - } else if (w * v->height < h * v->width) { - drawH = w * v->height / v->width; - } + lockAspectRatioUInt(v->width, v->height, &drawW, &drawH); } if (v->lockIntegerScaling) { - if (drawW >= v->width) { - drawW -= drawW % v->width; - } - if (drawH >= v->height) { - drawH -= drawH % v->height; - } + lockIntegerRatioUInt(v->width, &drawW); + lockIntegerRatioUInt(v->height, &drawH); } size_t n; for (n = 0; n < context->nShaders; ++n) { diff --git a/src/platform/qt/DisplayQt.cpp b/src/platform/qt/DisplayQt.cpp index 337e601aa..8d5c2ffe9 100644 --- a/src/platform/qt/DisplayQt.cpp +++ b/src/platform/qt/DisplayQt.cpp @@ -6,6 +6,7 @@ #include "DisplayQt.h" #include "CoreController.h" +#include "utils.h" #include @@ -97,26 +98,7 @@ void DisplayQt::paintEvent(QPaintEvent*) { if (isFiltered()) { painter.setRenderHint(QPainter::SmoothPixmapTransform); } - // TODO: Refactor this code out (since it's copied in like 3 places) - QSize s = size(); - QSize ds = s; - if (isAspectRatioLocked()) { - if (s.width() * m_height > s.height() * m_width) { - ds.setWidth(s.height() * m_width / m_height); - } else if (s.width() * m_height < s.height() * m_width) { - ds.setHeight(s.width() * m_height / m_width); - } - } - if (isIntegerScalingLocked()) { - if (ds.width() >= m_width) { - ds.setWidth(ds.width() - ds.width() % m_width); - } - if (ds.height() >= m_height) { - ds.setHeight(ds.height() - ds.height() % m_height); - } - } - QPoint origin = QPoint((s.width() - ds.width()) / 2, (s.height() - ds.height()) / 2); - QRect full(origin, ds); + QRect full(clampSize(QSize(m_width, m_height), size(), isAspectRatioLocked(), isIntegerScalingLocked())); if (hasInterframeBlending()) { painter.drawImage(full, m_oldBacking, QRect(0, 0, m_width, m_height)); diff --git a/src/platform/qt/VideoView.cpp b/src/platform/qt/VideoView.cpp index da09fc150..6ca0921fb 100644 --- a/src/platform/qt/VideoView.cpp +++ b/src/platform/qt/VideoView.cpp @@ -9,6 +9,7 @@ #include "GBAApp.h" #include "LogController.h" +#include "utils.h" #include @@ -518,11 +519,7 @@ void VideoView::setPreset(const Preset& preset) { QSize VideoView::maintainAspect(const QSize& size) { QSize ds = size; - if (ds.width() * m_nativeHeight > ds.height() * m_nativeWidth) { - ds.setWidth(ds.height() * m_nativeWidth / m_nativeHeight); - } else if (ds.width() * m_nativeHeight < ds.height() * m_nativeWidth) { - ds.setHeight(ds.width() * m_nativeHeight / m_nativeWidth); - } + lockAspectRatio(QSize(m_nativeWidth, m_nativeHeight), ds); return ds; } diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 14f8e23d5..eab93078b 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -55,6 +55,7 @@ #include "TileView.h" #include "VideoProxy.h" #include "VideoView.h" +#include "utils.h" #ifdef USE_DISCORD_RPC #include "DiscordCoordinator.h" @@ -1988,24 +1989,6 @@ void WindowBackground::paintEvent(QPaintEvent* event) { QPainter painter(this); painter.setRenderHint(QPainter::SmoothPixmapTransform, m_filter); painter.fillRect(QRect(QPoint(), size()), Qt::black); - QSize s = size(); - QSize ds = s; - if (m_lockAspectRatio) { - if (ds.width() * m_aspectHeight > ds.height() * m_aspectWidth) { - ds.setWidth(ds.height() * m_aspectWidth / m_aspectHeight); - } else if (ds.width() * m_aspectHeight < ds.height() * m_aspectWidth) { - ds.setHeight(ds.width() * m_aspectHeight / m_aspectWidth); - } - } - if (m_lockIntegerScaling) { - if (ds.width() >= m_aspectWidth) { - ds.setWidth(ds.width() - ds.width() % m_aspectWidth); - } - if (ds.height() >= m_aspectHeight) { - ds.setHeight(ds.height() - ds.height() % m_aspectHeight); - } - } - QPoint origin = QPoint((s.width() - ds.width()) / 2, (s.height() - ds.height()) / 2); - QRect full(origin, ds); + QRect full(clampSize(QSize(m_aspectWidth, m_aspectHeight), size(), m_lockAspectRatio, m_lockIntegerScaling)); painter.drawPixmap(full, logo); } diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index 930c01af7..c5326c75a 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -3864,17 +3864,17 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 Fehler beim Öffnen der Ausgabe-Videodatei: %1 - + Native (%0x%1) Nativ (%0x%1) - + Select output file Ausgabedatei auswählen @@ -3882,103 +3882,103 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance-ROMs (%1) - + Game Boy ROMs (%1) Game Boy-ROMs (%1) - + All ROMs (%1) Alle ROMs (%1) - + %1 Video Logs (*.mvl) %1 Video-Logs (*.mvl) - + Archives (%1) Archive (%1) - - - + + + Select ROM ROM auswählen - + Game Boy Advance save files (%1) Game Boy Advance-Speicherdateien (%1) - - - + + + Select save Speicherdatei wählen - + mGBA savestate files (%1) mGBA Savestate-Dateien (%1) - - + + Select savestate Savestate auswählen - + Select patch Patch wählen - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select image Bild auswählen - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Bild-Datei (*.png *.gif *.jpg *.jpeg);;Alle Dateien (*) - - + + GameShark saves (*.sps *.xps) GameShark-Speicherdaten (*.sps *.xps) - + Select video log Video-Log auswählen - + Video logs (*.mvl) Video-Logs (*.mvl) - + Crash Absturz - + The game has crashed with the following error: %1 @@ -3987,613 +3987,613 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. - + Unimplemented BIOS call Nicht implementierter BIOS-Aufruf - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Dieses Spiel verwendet einen BIOS-Aufruf, der nicht implementiert ist. Bitte verwenden Sie für die beste Spielerfahrung das offizielle BIOS. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. Es konnte kein geeignetes Ausgabegerät erstellt werden, stattdessen wird Software-Rendering als Rückfalloption genutzt. Spiele laufen möglicherweise langsamer, besonders innerhalb großer Fenster. - + Really make portable? Portablen Modus wirklich aktivieren? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Diese Einstellung wird den Emulator so konfigurieren, dass er seine Konfiguration aus dem gleichen Verzeichnis wie die Programmdatei lädt. Möchten Sie fortfahren? - + Restart needed Neustart benötigt - + Some changes will not take effect until the emulator is restarted. Einige Änderungen werden erst übernommen, wenn der Emulator neu gestartet wurde. - + - Player %1 of %2 - Spieler %1 von %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 Bilder/Sekunde) - %4 - + &File &Datei - + Load &ROM... &ROM laden... - + Load ROM in archive... ROM aus Archiv laden... - + Load alternate save... Alternative Speicherdatei laden... - + Load temporary save... Temporäre Speicherdatei laden... - + Load &patch... &Patch laden... - + Boot BIOS BIOS booten - + Replace ROM... ROM ersetzen... - + ROM &info... ROM-&Informationen... - + Recent Zuletzt verwendet - + Make portable Portablen Modus aktivieren - + &Load state Savestate (aktueller Zustand) &laden - + Load state file... Savestate-Datei laden... - + &Save state Savestate (aktueller Zustand) &speichern - + Save state file... Savestate-Datei speichern... - + Quick load Schnell laden - + Quick save Schnell speichern - + Load recent Lade zuletzt gespeicherten Savestate - + Save recent Speichere aktuellen Zustand - + Undo load state Laden des Savestate rückgängig machen - + Undo save state Speichern des Savestate rückgängig machen - - + + State &%1 Savestate &%1 - + Load camera image... Lade Kamerabild... - + New multiplayer window Neues Multiplayer-Fenster - + Report bug... Fehler melden... - + E&xit &Beenden - + &Emulation &Emulation - + &Reset Zu&rücksetzen - + Sh&utdown Schli&eßen - + Yank game pak Spielmodul herausziehen - + &Pause &Pause - + &Next frame &Nächstes Bild - + Fast forward (held) Schneller Vorlauf (gehalten) - + &Fast forward Schneller &Vorlauf - + Fast forward speed Vorlauf-Geschwindigkeit - + Unbounded Unbegrenzt - + %0x %0x - + Rewind (held) Zurückspulen (gehalten) - + Re&wind Zur&ückspulen - + Step backwards Schrittweiser Rücklauf - + Sync to &video Mit &Video synchronisieren - + Sync to &audio Mit &Audio synchronisieren - + Solar sensor Sonnen-Sensor - + Increase solar level Sonnen-Level erhöhen - + Decrease solar level Sonnen-Level verringern - + Brightest solar level Hellster Sonnen-Level - + Darkest solar level Dunkelster Sonnen-Level - + Brightness %1 Helligkeit %1 - + BattleChip Gate... BattleChip Gate... - + Audio/&Video Audio/&Video - + Frame size Bildgröße - + Toggle fullscreen Vollbildmodus umschalten - + Lock aspect ratio Seitenverhältnis korrigieren - + Force integer scaling Pixelgenaue Skalierung (Integer scaling) - + Interframe blending Interframe-Überblendung - + Frame&skip Frame&skip - + Mute Stummschalten - + FPS target Bildwiederholrate - + Take &screenshot &Screenshot erstellen - + F12 F12 - + Clear Leeren - + Game Boy Printer... Game Boy Printer... - + Video layers Video-Ebenen - + Audio channels Audio-Kanäle - + Adjust layer placement... Lage der Bildebenen anpassen... - + &Tools &Werkzeuge - + View &logs... &Logs ansehen... - + Game &overrides... Spiel-&Überschreibungen... - + &Cheats... &Cheats... - + Open debugger console... Debugger-Konsole öffnen... - + Start &GDB server... &GDB-Server starten... - + Settings... Einstellungen... - + Select folder Ordner auswählen - + Select e-Reader dotcode e-Reader-Code auswählen - + e-Reader card (*.raw *.bin *.bmp) e-Reader-Karte (*.raw *.bin *.bmp) - + Couldn't Start Konnte nicht gestartet werden - + Could not start game. Spiel konnte nicht gestartet werden. - + Add folder to library... Ordner zur Bibliothek hinzufügen... - + Scan e-Reader dotcodes... e-Reader-Code einlesen... - + Import GameShark Save... GameShare-Speicherstand importieren... - + Export GameShark Save... GameShark-Speicherstand exportieren... - + About... Über... - + %1× %1x - + Bilinear filtering Bilineare Filterung - + Native (59.7275) Nativ (59.7275) - + Record A/V... Audio/Video aufzeichnen... - + Record GIF/WebP/APNG... GIF/WebP/APNG aufzeichnen... - + Game Pak sensors... Spielmodul-Sensoren... - + View &palette... &Palette betrachten... - + View &sprites... &Sprites betrachten... - + View &tiles... &Tiles betrachten... - + View &map... &Map betrachten... - + &Frame inspector... &Bildbetrachter... - + View memory... Speicher betrachten... - + Search memory... Speicher durchsuchen... - + View &I/O registers... &I/O-Register betrachten... - + Record debug video log... Video-Protokoll aufzeichnen... - + Stop debug video log Aufzeichnen des Video-Protokolls beenden - + Exit fullscreen Vollbildmodus beenden - + GameShark Button (held) GameShark-Taste (gehalten) - + Autofire Autofeuer - + Autofire A Autofeuer A - + Autofire B Autofeuer B - + Autofire L Autofeuer L - + Autofire R Autofeuer R - + Autofire Start Autofeuer Start - + Autofire Select Autofeuer Select - + Autofire Up Autofeuer nach oben - + Autofire Right Autofeuer rechts - + Autofire Down Autofeuer nach unten - + Autofire Left Autofeuer links @@ -4601,17 +4601,17 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-en.ts b/src/platform/qt/ts/mgba-en.ts index dc53acb0a..d7bed7078 100644 --- a/src/platform/qt/ts/mgba-en.ts +++ b/src/platform/qt/ts/mgba-en.ts @@ -3863,17 +3863,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 - + Native (%0x%1) - + Select output file @@ -3881,716 +3881,716 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - + Game Boy Advance save files (%1) - - - + + + Select save - + mGBA savestate files (%1) - - + + Select savestate - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Load alternate save... - + Load temporary save... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - + Import GameShark Save... - + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index f28e12c20..a187082aa 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -3864,17 +3864,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 Error al abrir el archivo de video de salida: %1 - + Native (%0x%1) Native (%0x%1) - + Select output file Seleccionar archivo de salida @@ -3882,118 +3882,118 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROMs de Game Boy Advance (%1) - + Game Boy ROMs (%1) ROMs de Game Boy (%1) - + All ROMs (%1) Todas las ROMs (%1) - + %1 Video Logs (*.mvl) Video-registros de %1 (*.mvl) - + Archives (%1) Contenedores (%1) - - - + + + Select ROM Seleccionar ROM - + Select folder Seleccionar carpeta - + Game Boy Advance save files (%1) Archivos de guardado de Game Boy Advance (%1) - - - + + + Select save Seleccionar guardado - + mGBA savestate files (%1) Archivos de estado de guardado de mGBA (%1) - - + + Select savestate Elegir estado de guardado - + Select patch Seleccionar parche - + Patches (*.ips *.ups *.bps) Parches (*.ips *.ups *.bps) - + Select e-Reader dotcode Seleccionar dotcode del e-Reader - + e-Reader card (*.raw *.bin *.bmp) Tarjeta e-Reader (*.raw *.bin *.bmp) - + Select image Seleccionar imagen - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Archivo de imagen (*.png *.gif *.jpg *.jpeg);;Todos los archivos (*) - - + + GameShark saves (*.sps *.xps) Guardados de GameShark (*.sps *.xps) - + Select video log Seleccionar video-registro - + Video logs (*.mvl) Video-registros (*.mvl) - + Crash Error fatal - + The game has crashed with the following error: %1 @@ -4002,598 +4002,598 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. %1 - + Unimplemented BIOS call Llamada a BIOS no implementada - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Este juego utiliza una llamada al BIOS que no se ha implementado. Utiliza el BIOS oficial para obtener la mejor experiencia. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. No se pudo crear un dispositivo de pantalla apropiado, recurriendo a software. Los juegos pueden funcionar lentamente, especialmente con ventanas grandes. - + Really make portable? ¿Hacer "portable"? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Esto hará que el emulador cargue su configuración desde el mismo directorio que el ejecutable. ¿Quieres continuar? - + Restart needed Reinicio necesario - + Some changes will not take effect until the emulator is restarted. Algunos cambios no surtirán efecto hasta que se reinicie el emulador. - + - Player %1 of %2 - Jugador %1 de %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &Archivo - + Load &ROM... Cargar &ROM... - + Load ROM in archive... Cargar ROM desde contenedor... - + Add folder to library... Agregar carpeta a la biblioteca... - + Load alternate save... Cargar guardado alternativo... - + Load temporary save... Cargar guardado temporal... - + Load &patch... Cargar &parche... - + Boot BIOS Arrancar BIOS - + Replace ROM... Reemplazar ROM... - + ROM &info... &Información de la ROM... - + Recent Recientes - + Make portable Hacer "portable" - + &Load state Ca&rgar estado - + Report bug... Reportar bug... - + About... Acerca de... - + Game Pak sensors... Sensores del cartucho... - + Clear Limpiar - + Load state file... Cargar archivo de estado... - + &Save state Guardar e&stado - + Save state file... Guardar archivo de estado... - + Quick load Cargado rápido - + Quick save Guardado rápido - + Load recent Cargar reciente - + Save recent Guardar reciente - + Undo load state Deshacer cargar estado - + Undo save state Deshacer guardar estado - - + + State &%1 Estado &%1 - + Load camera image... Cargar imagen para la cámara... - + New multiplayer window Nueva ventana multijugador - + E&xit Salir (&X) - + &Emulation &Emulación - + &Reset &Reinicializar - + Sh&utdown Apagar (&U) - + Yank game pak Tirar del cartucho - + &Pause &Pausar - + &Next frame Cuadro siguie&nte - + Fast forward (held) Avance rápido (mantener) - + &Fast forward &Avance rápido - + Fast forward speed Velocidad de avance rápido - + Unbounded Sin límite - + %0x %0x - + Rewind (held) Rebobinar (mantener) - + Re&wind Re&bobinar - + Step backwards Paso hacia atrás - + Sync to &video Sincronizar a &video - + Sync to &audio Sincronizar a au&dio - + Solar sensor Sensor solar - + Increase solar level Subir nivel - + Decrease solar level Bajar nivel - + Brightest solar level Más claro - + Darkest solar level Más oscuro - + Brightness %1 Brillo %1 - + Audio/&Video Audio/&video - + Frame size Tamaño del cuadro - + Toggle fullscreen Pantalla completa - + Lock aspect ratio Bloquear proporción de aspecto - + Force integer scaling Forzar escala a enteros - + Bilinear filtering Filtro bilineal - + Frame&skip &Salto de cuadros - + Mute Silenciar - + FPS target Objetivo de FPS - + Native (59.7275) Nativo (59,7275) - + Take &screenshot Tomar pan&tallazo - + F12 F12 - + Game Boy Printer... Game Boy Printer... - + BattleChip Gate... BattleChip Gate... - + %1× %1× - + Interframe blending Mezcla entre cuadros - + Record A/V... Grabar A/V... - + Video layers Capas de video - + Audio channels Canales de audio - + Adjust layer placement... Ajustar ubicación de capas... - + &Tools Herramien&tas - + View &logs... Ver re&gistros... - + Game &overrides... Ajustes específic&os por juego... - + Couldn't Start No se pudo iniciar - + Could not start game. No se pudo iniciar el juego. - + Scan e-Reader dotcodes... Escanear dotcodes del e-Reader... - + Import GameShark Save... Importar desde GameShark... - + Export GameShark Save... Exportar a GameShark... - + Record GIF/WebP/APNG... Grabar GIF/WebP/APNG... - + &Cheats... Tru&cos... - + Settings... Ajustes... - + Open debugger console... Abrir consola de depuración... - + Start &GDB server... Iniciar servidor &GDB... - + View &palette... Ver &paleta... - + View &sprites... Ver &sprites... - + View &tiles... Ver &tiles... - + View &map... Ver &mapa... - + &Frame inspector... Inspec&tor de cuadros... - + View memory... Ver memoria... - + Search memory... Buscar memoria... - + View &I/O registers... Ver registros &I/O... - + Record debug video log... Grabar registro de depuración de video... - + Stop debug video log Detener registro de depuración de video - + Exit fullscreen Salir de pantalla completa - + GameShark Button (held) Botón GameShark (mantener) - + Autofire Disparo automático - + Autofire A Disparo automático A - + Autofire B Disparo automático B - + Autofire L Disparo automático L - + Autofire R Disparo automático R - + Autofire Start Disparo automático Start - + Autofire Select Disparo automático Select - + Autofire Up Disparo automático Arriba - + Autofire Right Disparo automático Derecha - + Autofire Down Disparo automático Abajo - + Autofire Left Disparo automático Izquierda @@ -4601,17 +4601,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-fr.ts b/src/platform/qt/ts/mgba-fr.ts index bf6821b58..fb249c2c4 100644 --- a/src/platform/qt/ts/mgba-fr.ts +++ b/src/platform/qt/ts/mgba-fr.ts @@ -3883,17 +3883,17 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 Impossible d'ouvrir le fichier vidéo de sortie : %1 - + Native (%0x%1) Natif (%0x%1) - + Select output file Choisir le fichier de sortie @@ -3901,118 +3901,118 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROMs de Game Boy Advance (%1) - + Game Boy ROMs (%1) ROMs de Game Boy (%1) - + All ROMs (%1) Toutes les ROM (%1) - + %1 Video Logs (*.mvl) %1 Journaux vidéo (*.mvl) - + Archives (%1) Archives (%1) - - - + + + Select ROM Choisir une ROM - + Select folder Choisir un dossier - + Game Boy Advance save files (%1) Fichiers de sauvegarde Game Boy Advance (%1) - - - + + + Select save Choisir une sauvegarde - + mGBA savestate files (%1) mGBA fichiers d'état (%1) - - + + Select savestate Sélectionner un fichier d'état - + Select patch Sélectionner un correctif - + Patches (*.ips *.ups *.bps) Correctifs/Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode Sélectionnez le numéro de point du e-Reader - + e-Reader card (*.raw *.bin *.bmp) e-Reader carte (*.raw *.bin *.bmp) - + Select image Choisir une image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Image (*.png *.gif *.jpg *.jpeg);;Tous les fichiers (*) - - + + GameShark saves (*.sps *.xps) Sauvegardes GameShark (*.sps *.xps) - + Select video log Sélectionner un journal vidéo - + Video logs (*.mvl) Journaux vidéo (*.mvl) - + Crash Plantage - + The game has crashed with the following error: %1 @@ -4021,598 +4021,598 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. - + Unimplemented BIOS call Requête au BIOS non supporté - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Ce jeu utilise un appel BIOS qui n'est pas implémenté. Veuillez utiliser le BIOS officiel pour une meilleure expérience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. Échec de la création d'un périphérique d'affichage approprié, retour à l'affichage du logiciel. Les jeux peuvent fonctionner lentement, en particulier avec des fenêtres plus grandes. - + Really make portable? Vraiment rendre portable ? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Cela amènera l'émulateur à charger sa configuration depuis le même répertoire que l'exécutable. Souhaitez vous continuer ? - + Restart needed Un redémarrage est nécessaire - + Some changes will not take effect until the emulator is restarted. Certains changements ne prendront effet qu'après le redémarrage de l'émulateur. - + - Player %1 of %2 - Joueur %1 of %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &Fichier - + Load &ROM... Charger une &ROM… - + Load ROM in archive... Charger la ROM d'une archive… - + Add folder to library... Ajouter un dossier à la bibliothèque… - + Load alternate save... Charger une sauvegarde alternative… - + Load temporary save... Charger une sauvegarde temporaire… - + Load &patch... Charger un c&orrectif… - + Boot BIOS Démarrer le BIOS - + Replace ROM... Remplacer la ROM… - + ROM &info... &Infos sur la ROM… - + Recent Récent - + Make portable Rendre portable - + &Load state &Charger un état - + &Save state &Sauvegarder un état - + Quick load Chargement rapide - + Quick save Sauvegarde rapide - + Load recent Charger un fichier récent - + Save recent Sauvegarder un fichier récent - + Undo load state Annuler le chargement de l'état - + Undo save state Annuler la sauvegarde de l'état - - + + State &%1 État &%1 - + Load camera image... Charger une image de la caméra… - + New multiplayer window Nouvelle fenêtre multijoueur - + Report bug... Signalement de l'erreur… - + E&xit &Quitter - + &Emulation &Émulation - + &Reset &Réinitialiser - + Sh&utdown Extin&ction - + Yank game pak Yank game pak - + &Pause &Pause - + &Next frame &Image suivante - + Fast forward (held) Avance rapide (maintenir) - + &Fast forward A&vance rapide - + Fast forward speed Vitesse de l'avance rapide - + Unbounded Sans limites - + %0x %0x - + Rewind (held) Rembobiner (maintenir) - + Re&wind Rem&bobiner - + Step backwards Retour en arrière - + Sync to &video Synchro &vidéo - + Sync to &audio Synchro &audio - + Solar sensor Capteur solaire - + Increase solar level Augmenter le niveau solaire - + Decrease solar level Diminuer le niveau solaire - + Brightest solar level Tester le niveau solaire - + Darkest solar level Assombrir le niveau solaire - + Brightness %1 Luminosité %1 - + Audio/&Video Audio/&Vidéo - + Frame size Taille de l'image - + Toggle fullscreen Basculer en plein écran - + Lock aspect ratio Bloquer les proportions - + Force integer scaling Forcer la mise à l'échelle par des nombres entiers - + Bilinear filtering Filtrage bilinèaire - + Frame&skip &Saut d'image - + Mute Muet - + FPS target FPS ciblé - + Take &screenshot Prendre une ca&pture d'écran - + F12 F12 - + Game Boy Printer... Imprimante GameBoy… - + Video layers Couches vidéo - + Audio channels Canaux audio - + Adjust layer placement... Ajuster la disposition… - + &Tools Ou&tils - + View &logs... Voir les &journaux… - + Game &overrides... - + Couldn't Start N'a pas pu démarrer - + Could not start game. Impossible de démarrer le jeu. - + Scan e-Reader dotcodes... Scanner les dotcodes e-Reader... - + Load state file... Charger le fichier d'état... - + Save state file... Enregistrer le fichier d'état... - + Import GameShark Save... Importer la sauvegarde de GameShark... - + Export GameShark Save... Exporter la sauvegarde de GameShark... - + About... À propos de… - + BattleChip Gate... - + %1× %1× - + Interframe blending Mélange d'images - + Native (59.7275) Natif (59.7275) - + Record A/V... Enregistrer A/V... - + Record GIF/WebP/APNG... Enregistrer GIF/WebP/APNG... - + Game Pak sensors... Capteurs de la Game Pak... - + &Cheats... &Cheats… - + Settings... Paramètres… - + Open debugger console... Ouvrir la console de débug… - + Start &GDB server... Démarrer le serveur &GDB… - + View &palette... Voir la &palette… - + View &sprites... Voir les &sprites… - + View &tiles... Voir les &tiles… - + View &map... Voir la &map… - + &Frame inspector... Inspecteur de &frame... - + View memory... Voir la mémoire… - + Search memory... Recherche dans la mémoire… - + View &I/O registers... Voir les registres d'&E/S... - + Record debug video log... Enregistrer le journal vidéo de débogage... - + Stop debug video log Arrêter le journal vidéo de débogage - + Exit fullscreen Quitter le plein écran - + GameShark Button (held) Bouton GameShark (maintenir) - + Autofire Tir automatique - + Autofire A Tir automatique A - + Autofire B Tir automatique B - + Autofire L Tir automatique L - + Autofire R Tir automatique R - + Autofire Start Tir automatique Start - + Autofire Select Tir automatique Select - + Autofire Up Tir automatique Up - + Autofire Right Tir automatique Right - + Autofire Down Tir automatique Down - + Autofire Left Tir automatique Gauche - + Clear Vider @@ -4620,17 +4620,17 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index 8284cb409..fadd8556a 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -3864,17 +3864,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 Errore durante l'archiviazione del video: %1 - + Native (%0x%1) Nativo (%0x%1) - + Select output file Seleziona file di uscita @@ -3882,113 +3882,113 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROM per Game Boy Advance (%1) - + Game Boy ROMs (%1) ROM per Game Boy (%1) - + All ROMs (%1) Tutte le ROM (%1) - + %1 Video Logs (*.mvl) %1 log Video (*.mvl) - + Archives (%1) Archivi (%1) - - - + + + Select ROM Seleziona ROM - + Game Boy Advance save files (%1) Game Boy Advance file di salvataggio (%1) - - - + + + Select save Seleziona salvataggio - + mGBA savestate files (%1) mGBA file stato (%1) - - + + Select savestate Seleziona stato di salvataggio - + Select patch Seleziona patch - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode Selezione e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) e-Reader card (*.raw *.bin *.bmp) - + Select image Seleziona immagine - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) File immagine (*.png *.gif *.jpg *.jpeg);;Tutti i file (*) - - + + GameShark saves (*.sps *.xps) Salvataggi GameShark (*.sps *.xps) - + Select video log Seleziona log video - + Video logs (*.mvl) Log video (*.mvl) - + Crash Errore fatale - + The game has crashed with the following error: %1 @@ -3997,603 +3997,603 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. %1 - + Unimplemented BIOS call BIOS non implementato - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Questo gioco utilizza una chiamata BIOS non implementata. Utilizza il BIOS ufficiale per una migliore esperienza - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? Vuoi davvero rendere portatile l'applicazione? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? In questo modo l'emulatore carica la propria configurazione dalla stessa cartella dell'eseguibile. Vuoi continuare? - + Restart needed È necessario riavviare - + Some changes will not take effect until the emulator is restarted. Alcune modifiche non avranno effetto finché l'emulatore non verrà riavviato. - + - Player %1 of %2 - Giocatore %1 di %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File File - + Load &ROM... Carica ROM... - + Load ROM in archive... Carica la ROM in archivio... - + Load alternate save... Carica il salvataggio alternativo... - + Load temporary save... Carica il salvataggio temporaneo.. - + Load &patch... Carica patch... - + Boot BIOS Avvia BIOS - + Replace ROM... Sostituisci la ROM... - + Scan e-Reader dotcodes... Scansiona e-Reader dotcode... - + ROM &info... Informazioni ROM... - + Recent Recente - + Make portable Rendi portatile - + &Load state Carica stato - + &Save state Salva stato - + Quick load Caricamento rapido - + Quick save Salvataggio rapido - + Load recent Carica recente - + Save recent Salva recente - + Undo load state Annulla il caricamento dello stato - + Undo save state Annulla salvataggio stato - - + + State &%1 Stato %1 - + Load camera image... Carica immagine camera... - + New multiplayer window Nuova finestra multigiocatore - + Report bug... - + E&xit Esci (&X) - + &Emulation Emulazione - + &Reset Reset - + Sh&utdown Spegni (&U) - + Yank game pak Yank game pak - + &Pause Pausa - + &Next frame Salta il prossimo frame (&N) - + Fast forward (held) Avanzamento rapido (tieni premuto) - + &Fast forward Avanzamento rapido (&F) - + Fast forward speed Velocità di avanzamento rapido - + Unbounded Illimitata - + %0x %0x - + Rewind (held) Riavvolgimento (tieni premuto) - + Re&wind Riavvolgimento (&W) - + Step backwards Torna indietro - + Sync to &video Sincronizza con il video - + Sync to &audio Sincronizza con l'audio - + Solar sensor Sensore solare - + Increase solar level Aumenta il livello solare - + Decrease solar level Riduce il livello solare - + Brightest solar level Livello solare brillante - + Darkest solar level Livello solare più scuro - + Brightness %1 Luminosità %1 - + Audio/&Video Audio/Video - + Frame size Dimensioni Frame - + Toggle fullscreen Abilita Schermo Intero - + Lock aspect ratio Blocca rapporti aspetto - + Frame&skip Salto frame - + Mute Muto - + FPS target FPS finali - + Take &screenshot Acquisisci screenshot - + F12 F12 - + Record GIF/WebP/APNG... - + Video layers Layers video - + Audio channels Canali audio - + &Tools Strumenti - + View &logs... Visualizza registri... (&L) - + Game &overrides... Valore specifico per il gioco... - + &Cheats... Trucchi... - + Open debugger console... Apri debugger console... - + Start &GDB server... Avvia server GDB... - + Settings... Impostazioni... - + Select folder Seleziona cartella - + Couldn't Start Non è stato possibile avviare - + Could not start game. NOn è stato possibile avviare il gioco - + Add folder to library... Aggiungi cartella alla libreria... - + Load state file... Carica stato di salvataggio... - + Save state file... Salva stato di salvataggio... - + Import GameShark Save... Importa Salvataggio GameShark... - + Export GameShark Save... Esporta Salvataggio GameShark... - + About... Informazioni… - + Force integer scaling Forza l'integer scaling - + Bilinear filtering Filtro bilineare - + Game Boy Printer... Stampante Game Boy... - + BattleChip Gate... BattleChip Gate... - + %1× %1x - + Interframe blending Interframe blending - + Native (59.7275) Nativo (59.7) - + Record A/V... Registra A/V - + Adjust layer placement... Regola posizionamento layer... - + Game Pak sensors... Sensori Game Pak... - + View &palette... Mostra palette... - + View &sprites... Mostra sprites... - + View &tiles... Mostra tiles... - + View &map... Mostra mappa... - + &Frame inspector... &Frame inspector... - + View memory... Mostra memoria... - + Search memory... Ricerca memoria... - + View &I/O registers... Mostra registri I/O... - + Record debug video log... Registra debug video log... - + Stop debug video log Ferma debug video log... - + Exit fullscreen Esci da Schermo Intero - + GameShark Button (held) Pulsante GameShark (tieni premuto) - + Autofire Pulsanti Autofire - + Autofire A Autofire A - + Autofire B Autofire B - + Autofire L Autofire L - + Autofire R Autofire R - + Autofire Start Autofire Start - + Autofire Select Autofire Select - + Autofire Up Autofire Su - + Autofire Right AAutofire Destra - + Autofire Down Autofire Giù - + Autofire Left Autofire Sinistra - + Clear Pulisci @@ -4601,17 +4601,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-ja.ts b/src/platform/qt/ts/mgba-ja.ts index 897936a18..c2e55ee70 100644 --- a/src/platform/qt/ts/mgba-ja.ts +++ b/src/platform/qt/ts/mgba-ja.ts @@ -3864,17 +3864,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 出力ビデオファイルを開けませんでした: %1 - + Native (%0x%1) ネイティブ(%0x%1) - + Select output file 出力ファイルを選択 @@ -3882,118 +3882,118 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ゲームボーイアドバンスファイル (%1) - + Game Boy ROMs (%1) ゲームボーイファイル (%1) - + All ROMs (%1) すべてのファイル (%1) - + %1 Video Logs (*.mvl) %1ビデオログ (*.mvl) - + Archives (%1) アーカイブファイル (%1) - - - + + + Select ROM ROMを開く - + Select folder フォルダを開く - + Game Boy Advance save files (%1) ゲームボーイアドバンスセーブファイル (%1) - - - + + + Select save セーブを開く - + mGBA savestate files (%1) mGBAセーブステートファイル (%1) - - + + Select savestate セーブステートを開く - + Select patch パッチを開く - + Patches (*.ips *.ups *.bps) パッチファイル (*.ips *.ups *.bps) - + Select e-Reader dotcode カードeを開く - + e-Reader card (*.raw *.bin *.bmp) カードe (*.raw *.bin *.bmp) - + Select image 画像を開く - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) 画像ファイル (*.png *.gif *.jpg *.jpeg);;すべてのファイル (*) - - + + GameShark saves (*.sps *.xps) GameSharkセーブファイル (*.sps *.xps) - + Select video log ビデオログを開く - + Video logs (*.mvl) ビデオログ (*.mvl) - + Crash クラッシュ - + The game has crashed with the following error: %1 @@ -4002,598 +4002,598 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. %1 - + Couldn't Start 起動失敗 - + Could not start game. ゲームを起動できませんでした。 - + Unimplemented BIOS call 未実装のBIOS呼び出し - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. このゲームは実装されていないBIOS呼び出しを使用します。最高のエクスペリエンスを得るには公式のBIOSを使用してください。 - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. 適切なディスプレイデバイスの作成に失敗し、ソフトディスプレイにフォールバックしました。特に大きなウィンドウでは、ゲームの実行が遅い場合があります。 - + Really make portable? 本当にポータブルにしますか? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? これによりエミュレータは実行ファイルと同じディレクトリにある設定ファイルをロードします。続けますか? - + Restart needed 再起動が必要 - + Some changes will not take effect until the emulator is restarted. 一部の変更は、エミュレータを再起動するまで有効になりません。 - + - Player %1 of %2 - プレーヤー %1 of %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &ファイル (&F) - + Load &ROM... ROMをロード... - + Load ROM in archive... アーカイブにROMをロード... - + Add folder to library... ライブリーにフォルダを追加... - + Load alternate save... 別のセーブをロード... - + Load temporary save... 一時セーブをロード... - + Load &patch... パッチをロード... (&P) - + Boot BIOS BIOSを起動 - + Replace ROM... ROMを交換... - + Scan e-Reader dotcodes... カードeをスキャン... - + ROM &info... ROM情報... (&I) - + Recent 最近開いたROM - + Make portable ポータブル化 - + &Load state ステートをロード (&L) - + Report bug... バグ報告 - + About... バージョン情報... - + Record GIF/WebP/APNG... GIF/WebP/APNGを記録 - + Game Pak sensors... カートリッジセンサー... - + Clear 消去 - + Load state file... ステートファイルをロード... - + &Save state ステートをセーブ (&S) - + Save state file... ステートファイルをセーブ... - + Quick load クイックロード - + Quick save クイックセーブ - + Load recent 最近使ったクイックロットからロード - + Save recent 最近使ったクイックロットにセーブ - + Undo load state クイックロードを元に戻す - + Undo save state クイックセーブを元に戻す - - + + State &%1 クイックスロット &%1 - + Load camera image... カメラ画像をロード... - + Import GameShark Save... GameSharkスナップショットを読み込む - + Export GameShark Save... GameSharkスナップショットを書き出す - + New multiplayer window 新しいウィンドウ(マルチプレイ) - + E&xit 終了 (&X) - + &Emulation エミュレーション (&E) - + &Reset リセット (&R) - + Sh&utdown 閉じる (&U) - + Yank game pak ゲームパックをヤンク - + &Pause 一時停止 (&P) - + &Next frame 次のフレーム (&N) - + Fast forward (held) 早送り(押し) - + &Fast forward 早送り (&F) - + Fast forward speed 早送り速度 - + Unbounded 制限なし - + %0x %0x - + Rewind (held) 巻戻し(押し) - + Re&wind 巻戻し (&R) - + Step backwards 後退 - + Sync to &video ビデオ同期 (&V) - + Sync to &audio オーディオ同期 (&A) - + Solar sensor 太陽センサー - + Increase solar level 明るさを上げる - + Decrease solar level 明るさを下げる - + Brightest solar level 明るさ最高 - + Darkest solar level 明るさ最低 - + Brightness %1 明るさ %1 - + Audio/&Video オーディオ/ビデオ (&V) - + Frame size 画面サイズ - + Toggle fullscreen 全画面表示 - + Lock aspect ratio 縦横比を固定 - + Force integer scaling 整数スケーリングを強制 - + Bilinear filtering バイリニアフィルタリング - + Frame&skip フレームスキップ (&S) - + Mute ミュート - + FPS target FPS - + Native (59.7275) ネイティブ(59.7275) - + Take &screenshot スクリーンショット (&S) - + F12 F12 - + Game Boy Printer... ポケットプリンタ... - + BattleChip Gate... チップゲート... - + %1× %1× - + Interframe blending フレーム間混合 - + Record A/V... ビデオ録画... - + Video layers ビデオレイヤー - + Audio channels オーディオチャンネル - + Adjust layer placement... レイヤーの配置を調整... - + &Tools ツール (&T) - + View &logs... ログビューアー... (&L) - + Game &overrides... ゲーム別設定... (&O) - + &Cheats... チート... (&C) - + Settings... 設定... - + Open debugger console... デバッガコンソールを開く... - + Start &GDB server... GDBサーバを起動... (&G) - + View &palette... パレットビューアー... (&P) - + View &sprites... スプライトビューアー... (&S) - + View &tiles... タイルビューアー... (&T) - + View &map... マップビューアー... (&M) - + &Frame inspector... フレームインスペクタ... (&F) - + View memory... メモリビューアー... - + Search memory... メモリ検索... - + View &I/O registers... IOビューアー... (&I) - + Record debug video log... デバッグビデオログ... - + Stop debug video log デバッグビデオログを停止 - + Exit fullscreen 全画面表示を終了 - + GameShark Button (held) GameSharkボタン(押し) - + Autofire 連打 - + Autofire A 連打 A - + Autofire B 連打 B - + Autofire L 連打 L - + Autofire R 連打 R - + Autofire Start 連打 Start - + Autofire Select 連打 Select - + Autofire Up 連打 上 - + Autofire Right 連打 右 - + Autofire Down 連打 下 - + Autofire Left 連打 左 @@ -4601,17 +4601,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-ko.ts b/src/platform/qt/ts/mgba-ko.ts index 684d9a4db..d7866424c 100644 --- a/src/platform/qt/ts/mgba-ko.ts +++ b/src/platform/qt/ts/mgba-ko.ts @@ -3864,17 +3864,17 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::VideoView - + Failed to open output video file: %1 출력 비디오 파일을 열지 못했습니다: %1 - + Native (%0x%1) 기본 (%0x%1) - + Select output file 출력 파일 선택 @@ -3882,113 +3882,113 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::Window - + Game Boy Advance ROMs (%1) 게임 보이 어드밴스 롬 (%1) - + Game Boy ROMs (%1) 게임 보이 (%1) - + All ROMs (%1) 모든 롬 (%1) - + %1 Video Logs (*.mvl) %1 비디오 로그 (*.mvl) - + Archives (%1) 아카이브 (%1) - - - + + + Select ROM 롬 선택 - + Game Boy Advance save files (%1) 게임 보이 어드밴스 저장 파일 (%1) - - - + + + Select save 저장 파일 선택 - + mGBA savestate files (%1) - - + + Select savestate - + Select patch 패치 선택 - + Patches (*.ips *.ups *.bps) 패치 (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image 이미지 선택 - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) 이미지 파일 (*.png *.gif *.jpg *.jpeg);;모든 파일 (*) - - + + GameShark saves (*.sps *.xps) 게임샤크 저장 파일 (*.sps *.xps) - + Select video log 비디오 로그 선택 - + Video logs (*.mvl) 비디오 로그 (*.mvl) - + Crash 치명적인 오류 - + The game has crashed with the following error: %1 @@ -3997,603 +3997,603 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. %1 - + Unimplemented BIOS call 구현되지 않은 바이오스 호출 - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. 이 게임은 구현되지 않은 바이오스 호출을 사용합니다. 최상의 성능을 얻으려면 공식 바이오스를 사용하십시오. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? 정말로 휴대용을 만듭니까? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? 이렇게하면 에뮬레이터가 실행 파일과 동일한 디렉토리에서 구성을 로드하게됩니다. 계속 하시겠습니까? - + Restart needed 재시작 필요 - + Some changes will not take effect until the emulator is restarted. 일부 변경 사항은 에뮬레이터가 다시 시작될 때까지 적용되지 않습니다. - + - Player %1 of %2 - 플레이어 %1 의 %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &파일 - + Load &ROM... 로드 &롬... - + Load ROM in archive... 롬을 아카이브에 로드... - + Load alternate save... 대체 저장 로드... - + Load temporary save... 임시 저장 로드... - + Load &patch... 로드 &패치... - + Boot BIOS BIOS 부팅 - + Replace ROM... 롬 교체... - + Scan e-Reader dotcodes... - + ROM &info... 롬 &정보... - + Recent 최근 실행 - + Make portable 휴대용 만들기 - + &Load state &로드 파일 상태 - + &Save state &저장 파일 상태 - + Quick load 빠른 로드 - + Quick save 빠른 저장 - + Load recent 최근 실행 로드 - + Save recent 최근 실행 저장 - + Undo load state 로드 파일 상태 복원 - + Undo save state 저장 파일 상태 복원 - - + + State &%1 상태 &%1 - + Load camera image... 카메라 이미지 로드... - + New multiplayer window 새로운 멀티 플레이어 창 - + E&xit 종&료 - + &Emulation &에뮬레이션 - + &Reset &재설정 - + Sh&utdown 종&료 - + Yank game pak 양키 게임 팩 - + &Pause &정지 - + &Next frame &다음 프레임 - + Fast forward (held) 빨리 감기 (누름) - + &Fast forward &빨리 감기 - + Fast forward speed 빨리 감기 속도 - + Unbounded 무제한 - + %0x %0x - + Rewind (held) 되김기 (누름) - + Re&wind 리&와인드 - + Step backwards 돌아가기 - + Sync to &video 비디오 &동기화 - + Sync to &audio 오디오 &동기화 - + Brightest solar level 가장 밝은 태양 수준 - + Darkest solar level 가장 어두운 태양 수준 - + Brightness %1 밝기 %1 - + Audio/&Video 오디오/&비디오 - + Frame size 프레임 크기 - + Toggle fullscreen 전체화면 전환 - + Lock aspect ratio 화면비 잠금 - + Frame&skip 프레임&건너뛰기 - + Mute 무음 - + FPS target FPS 대상 - + Take &screenshot 스크린샷 &찍기 - + F12 F12 - + Video layers 비디오 레이어 - + Audio channels 오디오 채널 - + &Tools &도구 - + View &logs... 로그 &보기... - + Game &overrides... 게임 &오버라이드... - + &Cheats... &치트.. - + Open debugger console... 디버거 콘솔 열기... - + Start &GDB server... GDB 서버 &시작... - + Settings... 설정... - + Select folder 폴더 선택 - + Couldn't Start - + Could not start game. - + Add folder to library... 라이브러리에 폴더 추가... - + Load state file... - + Save state file... - + Import GameShark Save... - + Export GameShark Save... - + Report bug... - + About... - + Solar sensor - + Increase solar level - + Decrease solar level - + Force integer scaling 정수 스케일링 강제 수행 - + Bilinear filtering 이중선형 필터링 - + Game Boy Printer... 게임 보이 프린터... - + BattleChip Gate... - + %1× %1x {1×?} - + Interframe blending - + Native (59.7275) Nativo (59.7) {59.7275)?} - + Record A/V... - + Record GIF/WebP/APNG... - + Adjust layer placement... 레이어 배치 조정... - + Game Pak sensors... - + View &palette... 팔레트 &보기... - + View &sprites... 스프라이트 &보기... - + View &tiles... 타일 &보기... - + View &map... 지도 &보기... - + &Frame inspector... - + View memory... 메모리 보기... - + Search memory... 메모리 검색... - + View &I/O registers... I/O 레지스터 &보기... - + Record debug video log... - + Stop debug video log - + Exit fullscreen 전체화면 종료 - + GameShark Button (held) 게임샤크 버튼 (누름) - + Autofire 연사 - + Autofire A 연사 A - + Autofire B 연사 B - + Autofire L 연사 L - + Autofire R 연사 R - + Autofire Start 연사 시작 - + Autofire Select - + Clear 정리 - + Autofire Up 연사 위쪽 - + Autofire Right 연사 오른쪽 - + Autofire Down 연사 아래쪽 - + Autofire Left 연사 왼쪽 @@ -4601,17 +4601,17 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-nl.ts b/src/platform/qt/ts/mgba-nl.ts index fd69523df..522ebe7dd 100644 --- a/src/platform/qt/ts/mgba-nl.ts +++ b/src/platform/qt/ts/mgba-nl.ts @@ -3863,17 +3863,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 - + Native (%0x%1) - + Select output file @@ -3881,716 +3881,716 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - + Game Boy Advance save files (%1) - - - + + + Select save - + mGBA savestate files (%1) - - + + Select savestate - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Load alternate save... - + Load temporary save... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - + Import GameShark Save... - + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-pt_BR.ts b/src/platform/qt/ts/mgba-pt_BR.ts index af881d2c3..670a0299c 100644 --- a/src/platform/qt/ts/mgba-pt_BR.ts +++ b/src/platform/qt/ts/mgba-pt_BR.ts @@ -3864,17 +3864,17 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 Falha ao abrir arquivo de vídeo de saída: %1 - + Native (%0x%1) Nativo (%0x%1) - + Select output file Selecione o arquivo de saída @@ -3882,118 +3882,118 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROMs de Game Boy Advance (%1) - + Game Boy ROMs (%1) ROMs de Game Boy (%1) - + All ROMs (%1) Todas as ROMs (%1) - + %1 Video Logs (*.mvl) %1 Logs de Vídeo (*.mvl) - + Archives (%1) Arquivos (%1) - - - + + + Select ROM Selecionar ROM - + Select folder Selecionar pasta - + Game Boy Advance save files (%1) Arquivos salvos de Game Boy Advance (%1) - - - + + + Select save Selecionar salvamento - + mGBA savestate files (%1) Arquivos de savestate do mGBA (%1) - - + + Select savestate Selecionar savestate - + Select patch Selecione correção - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode Selecione dotcode do e-Reader - + e-Reader card (*.raw *.bin *.bmp) e-Reader card (*.raw *.bin *.bmp) - + Select image Selecionar imagem - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Arquivo de imagem (*.png *.gif *.jpg *.jpeg);;Todos os arquivos (*) - - + + GameShark saves (*.sps *.xps) GameShark saves (*.sps *.xps) - + Select video log Selecionar registro de vídeo - + Video logs (*.mvl) Video logs (*.mvl) - + Crash Travamento - + The game has crashed with the following error: %1 @@ -4002,598 +4002,598 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. %1 - + Unimplemented BIOS call Chamada de BIOS não implementada - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Este jogo usa uma chamada de BIOS que não está implementada. Por favor, use a BIOS oficial para uma melhor experiência. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? Quer mesmo tornar portátil? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Isto fará com que o emulador carregue sua configuração a partir do mesmo diretório que o executável. Você quer continuar? - + Restart needed É necessário reiniciar - + Some changes will not take effect until the emulator is restarted. Algumas alterações não terão efeito até que o emulador seja reiniciado. - + - Player %1 of %2 - Jogador %1 de %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &Arquivo - + Load &ROM... Carregar &ROM... - + Load ROM in archive... Carregar ROM em arquivo... - + Add folder to library... Adicionar pasta à biblioteca... - + Load alternate save... Carregar salvamento alternativo... - + Load temporary save... Carregar salvamento temporário... - + Load &patch... Carregar &patch... - + Boot BIOS Rodar BIOS - + Replace ROM... Substituir ROM... - + ROM &info... &Informações da ROM... - + Recent Recente - + Make portable Tornar portátil - + &Load state &Carregar Estado - + Report bug... - + About... Sobre... - + Game Pak sensors... Sensores de Game Pak... - + Clear Limpar - + Load state file... Carregar arquivo de estado... - + &Save state &Salvar Estado - + Save state file... Salvar arquivo de estado... - + Quick load Carregamento rápido - + Quick save Salvamento rápido - + Load recent Carregar recente - + Save recent Salvar recente - + Undo load state Desfazer carregar estado - + Undo save state Desfazer salvar estado - - + + State &%1 Estado &%1 - + Load camera image... Carregar imagem da câmera... - + New multiplayer window Nova janela multijogador - + E&xit &Sair - + &Emulation &Emulação - + &Reset &Resetar - + Sh&utdown &Desligar - + Yank game pak Remover game pak - + &Pause &Pausar - + &Next frame &Próximo quadro - + Fast forward (held) Avançar rápido (segurado) - + &Fast forward Avanço &Rápido - + Fast forward speed Velocidade de avanço - + Unbounded Ilimitado - + %0x %0x - + Rewind (held) Retroceder (segurado) - + Re&wind Re&troceder - + Step backwards Voltar um passo - + Sync to &video Sincronizar para &vídeo - + Sync to &audio Sincronizar para &áudio - + Solar sensor Sensor solar - + Increase solar level Aumentar nível solar - + Decrease solar level Diminuir nível solar - + Brightest solar level Nível solar mais brilhante - + Darkest solar level Nível solar mais escuro - + Brightness %1 Brilho %1 - + Audio/&Video Áudio/&Vídeo - + Frame size Tamanho do quadro - + Toggle fullscreen Alternar tela cheia - + Lock aspect ratio Fixar proporção - + Force integer scaling Forçar dimensionamento inteiro - + Bilinear filtering Filtragem bilinear - + Frame&skip &Salto de quadro - + Mute Mudo - + FPS target Meta de FPS - + Native (59.7275) Nativo (59,7275) - + Take &screenshot Capturar &tela - + F12 F12 - + Game Boy Printer... Game Boy Printer... - + BattleChip Gate... BattleChip Gate... - + %1× %1× - + Interframe blending Interframe blending - + Record A/V... Gravar A/V... - + Video layers Camadas de vídeo - + Audio channels Canais de áudio - + Adjust layer placement... Ajustar posicionamento da camada... - + &Tools &Ferramentas - + View &logs... Visualizar &registros... - + Game &overrides... Game &overrides... - + Couldn't Start Não foi possível Iniciar - + Could not start game. Não foi possível iniciar o jogo. - + Scan e-Reader dotcodes... Escanear dotcode do e-Reader... - + Import GameShark Save... Importar salvamento do GameShark... - + Export GameShark Save... Exportar salvamento do GameShark... - + Record GIF/WebP/APNG... Gravar GIF/WebP/APNG... - + &Cheats... &Cheats... - + Settings... Configurações... - + Open debugger console... Abrir console de depuração... - + Start &GDB server... Iniciar servidor &GDB... - + View &palette... Visualizar &paleta... - + View &sprites... Visualizar &sprites... - + View &tiles... Visualizar &blocos... - + View &map... Visualizar &mapa... - + &Frame inspector... Inspetor de &quadro... - + View memory... Visualizar memória... - + Search memory... Pesquisar memória... - + View &I/O registers... Visualizar registros de &E/S... - + Record debug video log... Gravar log de vídeo de depuração... - + Stop debug video log Parar log de vídeo de depuração - + Exit fullscreen Sair da tela cheia - + GameShark Button (held) Botão de GameShark (segurado) - + Autofire Disparo automático - + Autofire A Disparo automático A - + Autofire B Disparo automático B - + Autofire L Disparo automático L - + Autofire R Disparo automático R - + Autofire Start Disparo automático Start - + Autofire Select Disparo automático Select - + Autofire Up Disparo automático Cima - + Autofire Right Disparo automático Direita - + Autofire Down Disparo automático Baixo - + Autofire Left Disparo automático Esquerda @@ -4601,17 +4601,17 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-ru.ts b/src/platform/qt/ts/mgba-ru.ts index b20b53633..5647816cc 100644 --- a/src/platform/qt/ts/mgba-ru.ts +++ b/src/platform/qt/ts/mgba-ru.ts @@ -3863,17 +3863,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 - + Native (%0x%1) - + Select output file @@ -3881,716 +3881,716 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - + Game Boy Advance save files (%1) - - - + + + Select save - + mGBA savestate files (%1) - - + + Select savestate - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Load alternate save... - + Load temporary save... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - + Import GameShark Save... - + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-template.ts b/src/platform/qt/ts/mgba-template.ts index 18acc6273..3b9950248 100644 --- a/src/platform/qt/ts/mgba-template.ts +++ b/src/platform/qt/ts/mgba-template.ts @@ -3863,17 +3863,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::VideoView - + Failed to open output video file: %1 - + Native (%0x%1) - + Select output file @@ -3881,716 +3881,716 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - + Game Boy Advance save files (%1) - - - + + + Select save - + mGBA savestate files (%1) - - + + Select savestate - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Load alternate save... - + Load temporary save... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - + Import GameShark Save... - + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-tr.ts b/src/platform/qt/ts/mgba-tr.ts index 0647bed4b..c68317b66 100644 --- a/src/platform/qt/ts/mgba-tr.ts +++ b/src/platform/qt/ts/mgba-tr.ts @@ -3864,17 +3864,17 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::VideoView - + Failed to open output video file: %1 Çıkış video dosyası açılamadı:%1 - + Native (%0x%1) - + Select output file Çıkış dosyasını seç @@ -3882,118 +3882,118 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance ROMları (%1) - + Game Boy ROMs (%1) Game Boy ROMları (%1) - + All ROMs (%1) Bütün ROMlar (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) Arşivler (%1) - - - + + + Select ROM ROM seç - + Select folder Klasör seç - + Game Boy Advance save files (%1) Game Boy Advance kayıt dosyaları (%1) - - - + + + Select save Kayıt seç - + mGBA savestate files (%1) mGBA kaydedilmiş konu kayıtları (%1) - - + + Select savestate Konumkaydedici seç - + Select patch Yama seç - + Patches (*.ips *.ups *.bps) Yamalar (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image Resim seç - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Resim dosyası (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) GameShark kayıtları (*.sps *.xps) - + Select video log Video günlüğü seç - + Video logs (*.mvl) Video günlükleri (*.mvl) - + Crash Çökme - + The game has crashed with the following error: %1 @@ -4002,598 +4002,598 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. - + Unimplemented BIOS call Uygulanmamış BIOS girişi - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Oyun BIOS dosyasına ihtiyacı var. Lütfen en iyi deneyim için resmi BIOS'u kullanın. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? Taşınabilir yapılsın mı? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Emülatörün yapılandırmasını yürütülebilir dosya ile aynı dizinden yüklemesini sağlar. Devam etmek istiyor musun? - + Restart needed Yeniden başlatma gerekli - + Some changes will not take effect until the emulator is restarted. Bazı değişiklikler emülatör yeniden başlatılıncaya kadar etkili olmaz. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... &ROM yükle... - + Load ROM in archive... ROM'u arşivden yükle ... - + Add folder to library... Kütüphaneye klasör ekle ... - + Load alternate save... Alternatif kaydetme yükle ... - + Load temporary save... Geçici kaydetmeyi yükle ... - + Load &patch... &Patch yükle... - + Boot BIOS BIOS boot et - + Replace ROM... ROM değişti... - + ROM &info... ROM &info... - + Recent Son kullanılanlar - + Make portable Portatif yap - + &Load state &Kaydedilmiş konum yükle - + Load state file... Kaydedilmiş konum dosyası yükle... - + &Save state &Konumu kaydet - + Save state file... Konum dosyasını kaydet... - + Quick load Hızlı Yükle - + Quick save Hızlı kaydet - + Load recent En son yükle - + Save recent Hızlı kaydet - + Undo load state Kaydedilen konum yüklemeyi geri al - + Undo save state Konum kaydetmeyi geri al - - + + State &%1 Konum &%1 - + Load camera image... Kamera resmini yükle ... - + New multiplayer window Yeni çokoyunculu ekranı - + Report bug... - + About... Hakkında... - + E&xit Çıkış - + &Emulation Emülasyon - + &Reset &Reset - + Sh&utdown Kapat - + Yank game pak - + &Pause &Durdur - + &Next frame &Sonraki kare - + Fast forward (held) İleriye sar(basılı tutun) - + &Fast forward &İleriye sar - + Fast forward speed İleriye sarma hızı - + Unbounded - + %0x - + Rewind (held) Geri sar (basılı tutun) - + Re&wind Geri sar - + Step backwards Geriye doğru adım - + Sync to &video &Videoya eşitle - + Sync to &audio &Sese eşitle - + Solar sensor - + Increase solar level Solar seviyesini arttır - + Decrease solar level Solar seviyesini düşür - + Brightest solar level En parlak solar seviyesi - + Darkest solar level En karanlık solar seviyesi - + Brightness %1 Parlaklık:%1 - + Game Boy Printer... Game Boy yazıcısı... - + BattleChip Gate... - + Audio/&Video Ses/&Video - + Frame size Çerçeve boyutu - + Toggle fullscreen Tamekranı aç/kapa - + Lock aspect ratio En boy oranını kilitle - + Force integer scaling Tamsayılı ölçeklendirmeyi zorla - + Bilinear filtering Bilinear filtreleme - + Frame&skip Kare atlama - + Mute Sessiz - + FPS target FPS hedefi - + Native (59.7275) - + Take &screenshot Ekran görüntüsü al - + F12 - + Video layers - + Audio channels Ses kanalları - + Adjust layer placement... Katman yerleşimini ayarlayın... - + &Tools &Araçlar - + View &logs... Kayıtları görüntüle... - + Game &overrides... Oyunların üzerine yazılanlar - + Couldn't Start - + Could not start game. - + Scan e-Reader dotcodes... - + Import GameShark Save... - + Export GameShark Save... - + %1× - + Interframe blending - + Record A/V... - + Record GIF/WebP/APNG... - + Game Pak sensors... - + &Cheats... &Hileler... - + Settings... Ayarlar... - + Open debugger console... Hata ayıklayıcı konsolunu aç ... - + Start &GDB server... &GDB sunucusunu başlat... - + View &palette... &Renk Paletini gör... - + View &sprites... &Spriteları gör... - + View &tiles... &Desenleri gör... - + View &map... &Haritayı gör - + &Frame inspector... - + View memory... Hafıza gör... - + Search memory... Hafızada ara... - + View &I/O registers... &I/O kayıtlarını görüntüle - + Record debug video log... - + Stop debug video log - + Exit fullscreen Tam ekrandan çık - + GameShark Button (held) GameShark Butonu (basılı tutun) - + Autofire Otomatik basma - + Autofire A Otomatik basma A - + Autofire B Otomatik basma B - + Autofire L Otomatik basma L - + Autofire R Otomatik basma R - + Autofire Start Otomatik basma Start - + Autofire Select Otomatik basma Select - + Autofire Up Otomatik basma Up - + Autofire Right Otomatik basma Right - + Autofire Down Otomatik basma Down - + Autofire Left Otomatik basma Sol - + Clear Temizle @@ -4601,17 +4601,17 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-zh_CN.ts b/src/platform/qt/ts/mgba-zh_CN.ts index 51dfca93b..711b88afc 100644 --- a/src/platform/qt/ts/mgba-zh_CN.ts +++ b/src/platform/qt/ts/mgba-zh_CN.ts @@ -3864,17 +3864,17 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::VideoView - + Failed to open output video file: %1 打开输出视频文件失败: %1 - + Native (%0x%1) 原生 (%0x%1) - + Select output file 选择输出文件 @@ -3882,118 +3882,118 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance ROM (%1) - + Game Boy ROMs (%1) Game Boy ROM (%1) - + All ROMs (%1) 所有 ROM (%1) - + %1 Video Logs (*.mvl) %1 视频日志 (*.mvl) - + Archives (%1) 压缩文件 (%1) - - - + + + Select ROM 选择 ROM - + Select folder 选择文件夹 - + Game Boy Advance save files (%1) Game Boy Advance 存档文件 (%1) - - - + + + Select save 选择存档 - + mGBA savestate files (%1) mGBA 即时存档文件 (%1) - - + + Select savestate 选择即时存档 - + Select patch 选择补丁 - + Patches (*.ips *.ups *.bps) 补丁 (*.ips *.ups *.bps) - + Select e-Reader dotcode 选择 e-Reader 点码 - + e-Reader card (*.raw *.bin *.bmp) e-Reader 卡 (*.raw *.bin *.bmp) - + Select image 选择图片 - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) 图像文件 (*.png *.gif *.jpg *.jpeg);;所有文件 (*) - - + + GameShark saves (*.sps *.xps) GameShark 存档 (*.sps *.xps) - + Select video log 选择视频日志 - + Video logs (*.mvl) 视频日志文件 (*.mvl) - + Crash 崩溃 - + The game has crashed with the following error: %1 @@ -4002,598 +4002,598 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 %1 - + Couldn't Start 无法启动 - + Could not start game. 无法启动游戏。 - + Unimplemented BIOS call 未实现的 BIOS 调用 - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. 此游戏使用尚未实现的 BIOS 调用。请使用官方 BIOS 以获得最佳体验。 - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. 无法创建适合的显示设备,正在回滚到软件显示。游戏的运行速度(特别在大窗口的情况下)可能会变慢。 - + Really make portable? 确定进行程序便携化? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? 进行此操作后,模拟器将从其可执行文件所在目录中载入模拟器配置。您想继续吗? - + Restart needed 需要重新启动 - + Some changes will not take effect until the emulator is restarted. 更改将在模拟器下次重新启动时生效。 - + - Player %1 of %2 - 玩家 %1 共 %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File 文件(&F) - + Load &ROM... 载入 ROM(&R)... - + Load ROM in archive... 从压缩文件中载入 ROM... - + Add folder to library... 将文件夹添加到库中... - + Load alternate save... 载入其他存档... - + Load temporary save... 载入临时存档... - + Load &patch... 载入补丁(&P)... - + Boot BIOS 引导 BIOS - + Replace ROM... 替换 ROM... - + Scan e-Reader dotcodes... 扫描 e-Reader 点码... - + ROM &info... ROM 信息(&I)... - + Recent 最近打开 - + Make portable 程序便携化 - + &Load state 载入即时存档(&L) - + Load state file... 载入即时存档文件... - + &Save state 保存即时存档(&S) - + Save state file... 保存即时存档文件... - + Quick load 快速读档 - + Quick save 快速存档 - + Load recent 载入最近存档 - + Save recent 保存最近存档 - + Undo load state 撤消读档 - + Undo save state 撤消存档 - - + + State &%1 即时存档 (&%1) - + Load camera image... 载入相机图片... - + Import GameShark Save... 导入 GameShark 存档... - + Export GameShark Save... 导出 GameShark 存档... - + New multiplayer window 新建多人游戏窗口 - + Report bug... 报告错误... - + About... 关于... - + E&xit 退出(&X) - + &Emulation 模拟(&E) - + &Reset 重置(&R) - + Sh&utdown 关机(&U) - + Yank game pak 快速抽出游戏卡带 - + &Pause 暂停(&P) - + &Next frame 下一帧(&N) - + Fast forward (held) 快进 (长按) - + &Fast forward 快进(&F) - + Fast forward speed 快进速度 - + Unbounded 不限制 - + %0x %0x - + Rewind (held) 倒带 (长按) - + Re&wind 倒带(&W) - + Step backwards 步退 - + Sync to &video 视频同步(&V) - + Sync to &audio 音频同步(&A) - + Solar sensor 太阳光传感器 - + Increase solar level 增加太阳光等级 - + Decrease solar level 降低太阳光等级 - + Brightest solar level 太阳光等级为最亮 - + Darkest solar level 太阳光等级为最暗 - + Brightness %1 亮度 %1 - + Game Boy Printer... Game Boy 打印机... - + BattleChip Gate... BattleChip Gate... - + Audio/&Video 音频/视频(&V) - + Frame size 画面大小 - + %1× %1× - + Toggle fullscreen 切换全屏 - + Lock aspect ratio 锁定纵横比 - + Force integer scaling 强制整数缩放 - + Interframe blending 帧间混合 - + Bilinear filtering 双线性过滤 - + Frame&skip 跳帧(&S) - + Mute 静音 - + FPS target 目标 FPS - + Native (59.7275) 原生 (59.7275) - + Take &screenshot 截图(&S) - + F12 F12 - + Record A/V... 录制音频/视频... - + Record GIF/WebP/APNG... 录制 GIF/WebP/APNG... - + Video layers 视频图层 - + Audio channels 音频声道 - + Adjust layer placement... 调整图层布局... - + &Tools 工具(&T) - + View &logs... 查看日志(&L)... - + Game &overrides... 覆写游戏(&O)... - + Game Pak sensors... 游戏卡带传感器... - + &Cheats... 作弊码(&C)... - + Settings... 设置... - + Open debugger console... 打开调试器控制台... - + Start &GDB server... 打开 GDB 服务器(&G)... - + View &palette... 查看调色板(&P)... - + View &sprites... 查看精灵图(&S)... - + View &tiles... 查看图块(&T)... - + View &map... 查看映射(&M)... - + &Frame inspector... 框架检查器(&F)... - + View memory... 查看内存... - + Search memory... 搜索内存... - + View &I/O registers... 查看 I/O 寄存器(&I)... - + Record debug video log... 记录调试视频日志... - + Stop debug video log 停止记录调试视频日志 - + Exit fullscreen 退出全屏 - + GameShark Button (held) GameShark 键 (长按) - + Autofire 连发 - + Autofire A 连发 A - + Autofire B 连发 B - + Autofire L 连发 L - + Autofire R 连发 R - + Autofire Start 连发 Start - + Autofire Select 连发 Select - + Autofire Up 连发 上 - + Autofire Right 连发 右 - + Autofire Down 连发 下 - + Autofire Left 连发 左 - + Clear 清除 @@ -4601,17 +4601,17 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/utils.h b/src/platform/qt/utils.h index 5dda75dd5..31a883a51 100644 --- a/src/platform/qt/utils.h +++ b/src/platform/qt/utils.h @@ -7,6 +7,8 @@ #include +#include +#include #include namespace QGBA { @@ -14,4 +16,33 @@ namespace QGBA { QString niceSizeFormat(size_t filesize); QString nicePlatformFormat(mPlatform platform); +inline void lockAspectRatio(const QSize& ref, QSize& size) { + if (size.width() * ref.height() > size.height() * ref.width()) { + size.setWidth(size.height() * ref.width() / ref.height()); + } else if (size.width() * ref.height() < size.height() * ref.width()) { + size.setHeight(size.width() * ref.height() / ref.width()); + } +} + +inline void lockIntegerScaling(const QSize& ref, QSize& size) { + if (size.width() >= ref.width()) { + size.setWidth(size.width() - size.width() % ref.width()); + } + if (size.height() >= ref.height()) { + size.setHeight(size.height() - size.height() % ref.height()); + } +} + +inline QRect clampSize(const QSize& ref, const QSize& size, bool aspectRatio, bool integerScaling) { + QSize ds = size; + if (aspectRatio) { + lockAspectRatio(ref, ds); + } + if (integerScaling) { + QGBA::lockIntegerScaling(ref, ds); + } + QPoint origin = QPoint((size.width() - ds.width()) / 2, (size.height() - ds.height()) / 2); + return QRect(origin, ds); +} + } From b527b7ff9bd48c48158028d2110668e445d8f12c Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 2 Jan 2021 20:39:58 -0800 Subject: [PATCH 02/40] Qt: Ensure non-present MRU items are removed (fixes #2000) --- src/platform/qt/ConfigController.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platform/qt/ConfigController.cpp b/src/platform/qt/ConfigController.cpp index dd2464e4b..6b9670553 100644 --- a/src/platform/qt/ConfigController.cpp +++ b/src/platform/qt/ConfigController.cpp @@ -272,6 +272,9 @@ void ConfigController::setMRU(const QList& mru) { break; } } + for (; i < MRU_LIST_SIZE; ++i) { + m_settings->remove(QString::number(i)); + } m_settings->endGroup(); } From 8361d56683bf5078701e1a4392d08b9b765392bd Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 2 Jan 2021 20:40:37 -0800 Subject: [PATCH 03/40] Qt: Update ts files --- src/platform/qt/ts/mgba-de.ts | 6 +++--- src/platform/qt/ts/mgba-en.ts | 6 +++--- src/platform/qt/ts/mgba-es.ts | 6 +++--- src/platform/qt/ts/mgba-fr.ts | 6 +++--- src/platform/qt/ts/mgba-it.ts | 6 +++--- src/platform/qt/ts/mgba-ja.ts | 6 +++--- src/platform/qt/ts/mgba-ko.ts | 6 +++--- src/platform/qt/ts/mgba-nl.ts | 6 +++--- src/platform/qt/ts/mgba-pt_BR.ts | 6 +++--- src/platform/qt/ts/mgba-ru.ts | 6 +++--- src/platform/qt/ts/mgba-template.ts | 6 +++--- src/platform/qt/ts/mgba-tr.ts | 6 +++--- src/platform/qt/ts/mgba-zh_CN.ts | 6 +++--- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index c5326c75a..fc4616ec5 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -4601,17 +4601,17 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-en.ts b/src/platform/qt/ts/mgba-en.ts index d7bed7078..db19be534 100644 --- a/src/platform/qt/ts/mgba-en.ts +++ b/src/platform/qt/ts/mgba-en.ts @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index a187082aa..40a79abd2 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -4601,17 +4601,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-fr.ts b/src/platform/qt/ts/mgba-fr.ts index fb249c2c4..1351e21e1 100644 --- a/src/platform/qt/ts/mgba-fr.ts +++ b/src/platform/qt/ts/mgba-fr.ts @@ -4620,17 +4620,17 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index fadd8556a..73da03da6 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -4601,17 +4601,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-ja.ts b/src/platform/qt/ts/mgba-ja.ts index c2e55ee70..5753cb623 100644 --- a/src/platform/qt/ts/mgba-ja.ts +++ b/src/platform/qt/ts/mgba-ja.ts @@ -4601,17 +4601,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-ko.ts b/src/platform/qt/ts/mgba-ko.ts index d7866424c..7d6ec0cca 100644 --- a/src/platform/qt/ts/mgba-ko.ts +++ b/src/platform/qt/ts/mgba-ko.ts @@ -4601,17 +4601,17 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-nl.ts b/src/platform/qt/ts/mgba-nl.ts index 522ebe7dd..ec248b91a 100644 --- a/src/platform/qt/ts/mgba-nl.ts +++ b/src/platform/qt/ts/mgba-nl.ts @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-pt_BR.ts b/src/platform/qt/ts/mgba-pt_BR.ts index 670a0299c..f9a7866fa 100644 --- a/src/platform/qt/ts/mgba-pt_BR.ts +++ b/src/platform/qt/ts/mgba-pt_BR.ts @@ -4601,17 +4601,17 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QObject - + GBA GBA - + GB GB - + ? ? diff --git a/src/platform/qt/ts/mgba-ru.ts b/src/platform/qt/ts/mgba-ru.ts index 5647816cc..c141f6b74 100644 --- a/src/platform/qt/ts/mgba-ru.ts +++ b/src/platform/qt/ts/mgba-ru.ts @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-template.ts b/src/platform/qt/ts/mgba-template.ts index 3b9950248..be535a197 100644 --- a/src/platform/qt/ts/mgba-template.ts +++ b/src/platform/qt/ts/mgba-template.ts @@ -4598,17 +4598,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-tr.ts b/src/platform/qt/ts/mgba-tr.ts index c68317b66..96f22f4f4 100644 --- a/src/platform/qt/ts/mgba-tr.ts +++ b/src/platform/qt/ts/mgba-tr.ts @@ -4601,17 +4601,17 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QObject - + GBA - + GB - + ? diff --git a/src/platform/qt/ts/mgba-zh_CN.ts b/src/platform/qt/ts/mgba-zh_CN.ts index 711b88afc..bfd02c4df 100644 --- a/src/platform/qt/ts/mgba-zh_CN.ts +++ b/src/platform/qt/ts/mgba-zh_CN.ts @@ -4601,17 +4601,17 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QObject - + GBA GBA - + GB GB - + ? ? From bda43168394b3edf785ef916186d131f871e4029 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 28 Dec 2020 03:32:43 -0800 Subject: [PATCH 04/40] GB: Redo double speed emulation (closes #1515) --- CHANGES | 1 + include/mgba/internal/sm83/sm83.h | 1 + src/gb/audio.c | 13 +++----- src/gb/gb.c | 4 +-- src/gb/io.c | 6 ++-- src/gb/memory.c | 9 ++---- src/gb/serialize.c | 2 -- src/gb/sio.c | 4 +-- src/gb/sio/lockstep.c | 4 +-- src/gb/timer.c | 29 ++++++++--------- src/gb/video.c | 22 ++++++------- src/sm83/sm83.c | 52 ++++++++++++++----------------- 12 files changed, 69 insertions(+), 78 deletions(-) diff --git a/CHANGES b/CHANGES index 8d6af7566..af4a2d7d7 100644 --- a/CHANGES +++ b/CHANGES @@ -96,6 +96,7 @@ Misc: - Core: Improve support for ROM patch cheats, supporting disabling overlapping patches - GB: Allow pausing event loop while CPU is blocked - GB: Add support for sleep and shutdown callbacks + - GB: Redo double speed emulation (closes mgba.io/i/1515) - GB Core: Return the current number of banks for ROM/SRAM, not theoretical max - GB I/O: Implement preliminary support for PCM12/PCM34 (closes mgba.io/i/1468) - GBA: Allow pausing event loop while CPU is blocked diff --git a/include/mgba/internal/sm83/sm83.h b/include/mgba/internal/sm83/sm83.h index 10bbf8bc4..86b4d374b 100644 --- a/include/mgba/internal/sm83/sm83.h +++ b/include/mgba/internal/sm83/sm83.h @@ -133,6 +133,7 @@ struct SM83Core { uint16_t index; + int tMultiplier; int32_t cycles; int32_t nextEvent; enum SM83ExecutionState executionState; diff --git a/src/gb/audio.c b/src/gb/audio.c index 126f4bf17..f20fa3fac 100644 --- a/src/gb/audio.c +++ b/src/gb/audio.c @@ -65,7 +65,7 @@ void GBAudioInit(struct GBAudio* audio, size_t samples, uint8_t* nr52, enum GBAu if (style == GB_AUDIO_GBA) { audio->timingFactor = 4; } else { - audio->timingFactor = 1; + audio->timingFactor = 2; } audio->frameEvent.context = audio; @@ -339,7 +339,7 @@ void GBAudioWriteNR34(struct GBAudio* audio, uint8_t value) { if (audio->playingCh3) { audio->ch3.readable = audio->style != GB_AUDIO_DMG; // TODO: Where does this cycle delay come from? - mTimingSchedule(audio->timing, &audio->ch3Event, audio->timingFactor * 4 + 2 * (2048 - audio->ch3.rate)); + mTimingSchedule(audio->timing, &audio->ch3Event, audio->timingFactor * (4 + 2 * (2048 - audio->ch3.rate))); } *audio->nr52 &= ~0x0004; *audio->nr52 |= audio->playingCh3 << 2; @@ -477,11 +477,8 @@ void GBAudioWriteNR52(struct GBAudio* audio, uint8_t value) { audio->skipFrame = false; audio->frame = 7; - if (audio->p) { - unsigned timingFactor = 0x400 >> !audio->p->doubleSpeed; - if (audio->p->timer.internalDiv & timingFactor) { - audio->skipFrame = true; - } + if (audio->p && audio->p->timer.internalDiv & 0x400) { + audio->skipFrame = true; } } } @@ -914,7 +911,7 @@ static void _updateChannel3(struct mTiming* timing, void* user, uint32_t cyclesL audio->ch3.readable = true; if (audio->style == GB_AUDIO_DMG) { mTimingDeschedule(audio->timing, &audio->ch3Fade); - mTimingSchedule(timing, &audio->ch3Fade, 2 - cyclesLate); + mTimingSchedule(timing, &audio->ch3Fade, 4 - cyclesLate); } int cycles = 2 * (2048 - ch->rate); mTimingSchedule(timing, &audio->ch3Event, audio->timingFactor * cycles - cyclesLate); diff --git a/src/gb/gb.c b/src/gb/gb.c index fdc30724b..00eae92c0 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -742,7 +742,7 @@ void GBSetInterrupts(struct SM83Core* cpu, bool enable) { gb->memory.ime = false; GBUpdateIRQs(gb); } else { - mTimingSchedule(&gb->timing, &gb->eiPending, 4); + mTimingSchedule(&gb->timing, &gb->eiPending, 4 * cpu->tMultiplier); } } @@ -796,7 +796,7 @@ void GBStop(struct SM83Core* cpu) { struct GB* gb = (struct GB*) cpu->master; if (gb->model >= GB_MODEL_CGB && gb->memory.io[GB_REG_KEY1] & 1) { gb->doubleSpeed ^= 1; - gb->audio.timingFactor = gb->doubleSpeed + 1; + gb->cpu->tMultiplier = 2 - gb->doubleSpeed; gb->memory.io[GB_REG_KEY1] = 0; gb->memory.io[GB_REG_KEY1] |= gb->doubleSpeed << 7; } else { diff --git a/src/gb/io.c b/src/gb/io.c index 0e3a70eca..6cf77e4c8 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -417,15 +417,15 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) { } return; case GB_REG_TIMA: - if (value && mTimingUntil(&gb->timing, &gb->timer.irq) > 1) { + if (value && mTimingUntil(&gb->timing, &gb->timer.irq) > 2 - (int) gb->doubleSpeed) { mTimingDeschedule(&gb->timing, &gb->timer.irq); } - if (mTimingUntil(&gb->timing, &gb->timer.irq) == -1) { + if (mTimingUntil(&gb->timing, &gb->timer.irq) == (int) gb->doubleSpeed - 2) { return; } break; case GB_REG_TMA: - if (mTimingUntil(&gb->timing, &gb->timer.irq) == -1) { + if (mTimingUntil(&gb->timing, &gb->timer.irq) == (int) gb->doubleSpeed - 2) { gb->memory.io[GB_REG_TIMA] = value; } break; diff --git a/src/gb/memory.c b/src/gb/memory.c index b7bd9c9d3..a65ea0e89 100644 --- a/src/gb/memory.c +++ b/src/gb/memory.c @@ -531,10 +531,7 @@ void GBMemoryDMA(struct GB* gb, uint16_t base) { base &= 0xDFFF; } mTimingDeschedule(&gb->timing, &gb->memory.dmaEvent); - mTimingSchedule(&gb->timing, &gb->memory.dmaEvent, 8); - if (gb->cpu->cycles + 8 < gb->cpu->nextEvent) { - gb->cpu->nextEvent = gb->cpu->cycles + 8; - } + mTimingSchedule(&gb->timing, &gb->memory.dmaEvent, 8 * (2 - gb->doubleSpeed)); gb->memory.dmaSource = base; gb->memory.dmaDest = 0; gb->memory.dmaRemaining = 0xA0; @@ -580,7 +577,7 @@ void _GBMemoryDMAService(struct mTiming* timing, void* context, uint32_t cyclesL ++gb->memory.dmaDest; gb->memory.dmaRemaining = dmaRemaining - 1; if (gb->memory.dmaRemaining) { - mTimingSchedule(timing, &gb->memory.dmaEvent, 4 - cyclesLate); + mTimingSchedule(timing, &gb->memory.dmaEvent, 4 * (2 - gb->doubleSpeed) - cyclesLate); } } @@ -594,7 +591,7 @@ void _GBMemoryHDMAService(struct mTiming* timing, void* context, uint32_t cycles --gb->memory.hdmaRemaining; if (gb->memory.hdmaRemaining) { mTimingDeschedule(timing, &gb->memory.hdmaEvent); - mTimingSchedule(timing, &gb->memory.hdmaEvent, 2 - cyclesLate); + mTimingSchedule(timing, &gb->memory.hdmaEvent, 4 - cyclesLate); } else { gb->cpuBlocked = false; gb->memory.io[GB_REG_HDMA1] = gb->memory.hdmaSource >> 8; diff --git a/src/gb/serialize.c b/src/gb/serialize.c index 056d1fd77..f9c37b48f 100644 --- a/src/gb/serialize.c +++ b/src/gb/serialize.c @@ -175,8 +175,6 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) { gb->cpu->halted = GBSerializedCpuFlagsGetHalted(flags); gb->cpuBlocked = GBSerializedCpuFlagsGetBlocked(flags); - gb->audio.timingFactor = gb->doubleSpeed + 1; - LOAD_32LE(gb->cpu->cycles, 0, &state->cpu.cycles); LOAD_32LE(gb->cpu->nextEvent, 0, &state->cpu.nextEvent); gb->timing.root = NULL; diff --git a/src/gb/sio.c b/src/gb/sio.c index 78e3a92e1..d327b606d 100644 --- a/src/gb/sio.c +++ b/src/gb/sio.c @@ -77,7 +77,7 @@ void _GBSIOProcessEvents(struct mTiming* timing, void* context, uint32_t cyclesL sio->pendingSB = 0xFF; } } else { - mTimingSchedule(timing, &sio->event, sio->period); + mTimingSchedule(timing, &sio->event, sio->period * (2 - sio->p->doubleSpeed)); } } @@ -93,7 +93,7 @@ void GBSIOWriteSC(struct GBSIO* sio, uint8_t sc) { if (GBRegisterSCIsEnable(sc)) { mTimingDeschedule(&sio->p->timing, &sio->event); if (GBRegisterSCIsShiftClock(sc)) { - mTimingSchedule(&sio->p->timing, &sio->event, sio->period); + mTimingSchedule(&sio->p->timing, &sio->event, sio->period * (2 - sio->p->doubleSpeed)); sio->remainingBits = 8; } } diff --git a/src/gb/sio/lockstep.c b/src/gb/sio/lockstep.c index a9b3ed8fd..d739140e5 100644 --- a/src/gb/sio/lockstep.c +++ b/src/gb/sio/lockstep.c @@ -128,7 +128,7 @@ static int32_t _masterUpdate(struct GBSIOLockstepNode* node) { case TRANSFER_FINISHING: // Finish the transfer // We need to make sure the other GBs catch up so they don't get behind - node->nextEvent += node->d.p->period - 8; // Split the cycles to avoid waiting too long + node->nextEvent += node->d.p->period * (2 - node->d.p->p->doubleSpeed) - 8; // Split the cycles to avoid waiting too long #ifndef NDEBUG ATOMIC_ADD(node->p->d.transferId, 1); #endif @@ -208,7 +208,7 @@ static void _GBSIOLockstepNodeProcessEvents(struct mTiming* timing, void* user, struct GBSIOLockstepNode* node = user; mLockstepLock(&node->p->d); if (node->p->d.attached < 2) { - mTimingSchedule(timing, &node->event, (GBSIOCyclesPerTransfer[0] >> 1) - cyclesLate); + mTimingSchedule(timing, &node->event, (GBSIOCyclesPerTransfer[0] >> 1) * (2 - node->d.p->p->doubleSpeed) - cyclesLate); mLockstepUnlock(&node->p->d); return; } diff --git a/src/gb/timer.c b/src/gb/timer.c index 1a99a06fd..0be048139 100644 --- a/src/gb/timer.c +++ b/src/gb/timer.c @@ -20,17 +20,18 @@ void _GBTimerIRQ(struct mTiming* timing, void* context, uint32_t cyclesLate) { } static void _GBTimerDivIncrement(struct GBTimer* timer, uint32_t cyclesLate) { - while (timer->nextDiv >= GB_DMG_DIV_PERIOD) { - timer->nextDiv -= GB_DMG_DIV_PERIOD; + int tMultiplier = 2 - timer->p->doubleSpeed; + while (timer->nextDiv >= GB_DMG_DIV_PERIOD * tMultiplier) { + timer->nextDiv -= GB_DMG_DIV_PERIOD * tMultiplier; // Make sure to trigger when the correct bit is a falling edge if (timer->timaPeriod > 0 && (timer->internalDiv & (timer->timaPeriod - 1)) == timer->timaPeriod - 1) { ++timer->p->memory.io[GB_REG_TIMA]; if (!timer->p->memory.io[GB_REG_TIMA]) { - mTimingSchedule(&timer->p->timing, &timer->irq, 7 - ((timer->p->cpu->executionState - cyclesLate) & 3)); + mTimingSchedule(&timer->p->timing, &timer->irq, 7 * tMultiplier - ((timer->p->cpu->executionState * tMultiplier - cyclesLate) & (3 * tMultiplier))); } } - unsigned timingFactor = 0x3FF >> !timer->p->doubleSpeed; + unsigned timingFactor = 0x1FF; if ((timer->internalDiv & timingFactor) == timingFactor) { GBAudioUpdateFrame(&timer->p->audio, &timer->p->timing); } @@ -52,7 +53,7 @@ void _GBTimerUpdate(struct mTiming* timing, void* context, uint32_t cyclesLate) if (timaToGo < divsToGo) { divsToGo = timaToGo; } - timer->nextDiv = GB_DMG_DIV_PERIOD * divsToGo; + timer->nextDiv = GB_DMG_DIV_PERIOD * divsToGo * (2 - timer->p->doubleSpeed); mTimingSchedule(timing, &timer->event, timer->nextDiv - cyclesLate); } @@ -66,7 +67,7 @@ void GBTimerReset(struct GBTimer* timer) { timer->irq.callback = _GBTimerIRQ; timer->event.priority = 0x21; - timer->nextDiv = GB_DMG_DIV_PERIOD; // TODO: GBC differences + timer->nextDiv = GB_DMG_DIV_PERIOD * 2; timer->timaPeriod = 1024 >> 4; } @@ -74,27 +75,27 @@ void GBTimerDivReset(struct GBTimer* timer) { timer->nextDiv -= mTimingUntil(&timer->p->timing, &timer->event); mTimingDeschedule(&timer->p->timing, &timer->event); _GBTimerDivIncrement(timer, 0); - if (((timer->internalDiv << 1) | ((timer->nextDiv >> 3) & 1)) & timer->timaPeriod) { + int tMultiplier = 2 - timer->p->doubleSpeed; + if (((timer->internalDiv << 1) | ((timer->nextDiv >> (4 - timer->p->doubleSpeed)) & 1)) & timer->timaPeriod) { ++timer->p->memory.io[GB_REG_TIMA]; if (!timer->p->memory.io[GB_REG_TIMA]) { - mTimingSchedule(&timer->p->timing, &timer->irq, 7 - (timer->p->cpu->executionState & 3)); + mTimingSchedule(&timer->p->timing, &timer->irq, (7 - (timer->p->cpu->executionState & 3)) * tMultiplier); } } - unsigned timingFactor = 0x400 >> !timer->p->doubleSpeed; - if (timer->internalDiv & timingFactor) { + if (timer->internalDiv & 0x200) { GBAudioUpdateFrame(&timer->p->audio, &timer->p->timing); } timer->p->memory.io[GB_REG_DIV] = 0; timer->internalDiv = 0; - timer->nextDiv = GB_DMG_DIV_PERIOD; - mTimingSchedule(&timer->p->timing, &timer->event, timer->nextDiv - ((timer->p->cpu->executionState + 1) & 3)); + timer->nextDiv = GB_DMG_DIV_PERIOD * (2 - timer->p->doubleSpeed); + mTimingSchedule(&timer->p->timing, &timer->event, timer->nextDiv - ((timer->p->cpu->executionState + 1) & 3) * tMultiplier); } uint8_t GBTimerUpdateTAC(struct GBTimer* timer, GBRegisterTAC tac) { if (GBRegisterTACIsRun(tac)) { timer->nextDiv -= mTimingUntil(&timer->p->timing, &timer->event); mTimingDeschedule(&timer->p->timing, &timer->event); - _GBTimerDivIncrement(timer, (timer->p->cpu->executionState + 2) & 3); + _GBTimerDivIncrement(timer, ((timer->p->cpu->executionState + 2) & 3) * (2 - timer->p->doubleSpeed)); switch (GBRegisterTACGetClock(tac)) { case 0: @@ -111,7 +112,7 @@ uint8_t GBTimerUpdateTAC(struct GBTimer* timer, GBRegisterTAC tac) { break; } - timer->nextDiv += GB_DMG_DIV_PERIOD; + timer->nextDiv += GB_DMG_DIV_PERIOD * (2 - timer->p->doubleSpeed); mTimingSchedule(&timer->p->timing, &timer->event, timer->nextDiv); } else { timer->timaPeriod = 0; diff --git a/src/gb/video.c b/src/gb/video.c index 9826b601f..ccaae7717 100644 --- a/src/gb/video.c +++ b/src/gb/video.c @@ -253,7 +253,7 @@ void GBVideoSkipBIOS(struct GBVideo* video) { GBUpdateIRQs(video->p); video->p->memory.io[GB_REG_STAT] = video->stat; mTimingDeschedule(&video->p->timing, &video->modeEvent); - mTimingSchedule(&video->p->timing, &video->modeEvent, next); + mTimingSchedule(&video->p->timing, &video->modeEvent, next << 1); } void _endMode0(struct mTiming* timing, void* context, uint32_t cyclesLate) { @@ -297,7 +297,7 @@ void _endMode0(struct mTiming* timing, void* context, uint32_t cyclesLate) { GBUpdateIRQs(video->p); video->p->memory.io[GB_REG_STAT] = video->stat; - mTimingSchedule(timing, &video->modeEvent, (next << video->p->doubleSpeed) - cyclesLate); + mTimingSchedule(timing, &video->modeEvent, (next << 1) - cyclesLate); } void _endMode1(struct mTiming* timing, void* context, uint32_t cyclesLate) { @@ -334,14 +334,14 @@ void _endMode1(struct mTiming* timing, void* context, uint32_t cyclesLate) { GBUpdateIRQs(video->p); } video->p->memory.io[GB_REG_STAT] = video->stat; - mTimingSchedule(timing, &video->modeEvent, (next << video->p->doubleSpeed) - cyclesLate); + mTimingSchedule(timing, &video->modeEvent, (next << 1) - cyclesLate); } void _endMode2(struct mTiming* timing, void* context, uint32_t cyclesLate) { struct GBVideo* video = context; _cleanOAM(video, video->ly); video->x = -(video->p->memory.io[GB_REG_SCX] & 7); - video->dotClock = mTimingCurrentTime(timing) - cyclesLate + 5 - (video->x << video->p->doubleSpeed); + video->dotClock = mTimingCurrentTime(timing) - cyclesLate + 10 - (video->x << 1); int32_t next = GB_VIDEO_MODE_3_LENGTH_BASE + video->objMax * 6 - video->x; video->mode = 3; video->modeEvent.callback = _endMode3; @@ -352,7 +352,7 @@ void _endMode2(struct mTiming* timing, void* context, uint32_t cyclesLate) { GBUpdateIRQs(video->p); } video->p->memory.io[GB_REG_STAT] = video->stat; - mTimingSchedule(timing, &video->modeEvent, (next << video->p->doubleSpeed) - cyclesLate); + mTimingSchedule(timing, &video->modeEvent, (next << 1) - cyclesLate); } void _endMode3(struct mTiming* timing, void* context, uint32_t cyclesLate) { @@ -375,18 +375,18 @@ void _endMode3(struct mTiming* timing, void* context, uint32_t cyclesLate) { video->p->memory.io[GB_REG_STAT] = video->stat; // TODO: Cache SCX & 7 in case it changes int32_t next = GB_VIDEO_MODE_0_LENGTH_BASE - video->objMax * 6 - (video->p->memory.io[GB_REG_SCX] & 7); - mTimingSchedule(timing, &video->modeEvent, (next << video->p->doubleSpeed) - cyclesLate); + mTimingSchedule(timing, &video->modeEvent, (next << 1) - cyclesLate); } void _updateFrameCount(struct mTiming* timing, void* context, uint32_t cyclesLate) { UNUSED(cyclesLate); struct GBVideo* video = context; if (video->p->cpu->executionState != SM83_CORE_FETCH) { - mTimingSchedule(timing, &video->frameEvent, 4 - ((video->p->cpu->executionState + 1) & 3)); + mTimingSchedule(timing, &video->frameEvent, (4 - ((video->p->cpu->executionState + 1) & 3)) * (2 - video->p->doubleSpeed)); return; } if (!GBRegisterLCDCIsEnable(video->p->memory.io[GB_REG_LCDC])) { - mTimingSchedule(timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH); + mTimingSchedule(timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH << 1); } --video->frameskipCounter; @@ -424,7 +424,7 @@ void GBVideoProcessDots(struct GBVideo* video, uint32_t cyclesLate) { return; } int oldX = video->x; - video->x = (int32_t) (mTimingCurrentTime(&video->p->timing) - cyclesLate - video->dotClock) >> video->p->doubleSpeed; + video->x = ((int32_t) (mTimingCurrentTime(&video->p->timing) - cyclesLate - video->dotClock)) >> 1; if (video->x > GB_VIDEO_HORIZONTAL_PIXELS) { video->x = GB_VIDEO_HORIZONTAL_PIXELS; } else if (video->x < 0) { @@ -444,7 +444,7 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) { video->modeEvent.callback = _endMode2; int32_t next = GB_VIDEO_MODE_2_LENGTH - 5; // TODO: Why is this fudge factor needed? Might be related to T-cycles for load/store differing mTimingDeschedule(&video->p->timing, &video->modeEvent); - mTimingSchedule(&video->p->timing, &video->modeEvent, next << video->p->doubleSpeed); + mTimingSchedule(&video->p->timing, &video->modeEvent, next << 1); video->ly = 0; video->p->memory.io[GB_REG_LY] = 0; @@ -471,7 +471,7 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) { mTimingDeschedule(&video->p->timing, &video->modeEvent); mTimingDeschedule(&video->p->timing, &video->frameEvent); - mTimingSchedule(&video->p->timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH); + mTimingSchedule(&video->p->timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH << 1); } video->p->memory.io[GB_REG_STAT] = video->stat; } diff --git a/src/sm83/sm83.c b/src/sm83/sm83.c index 28e9e4bd3..b8c9287ec 100644 --- a/src/sm83/sm83.c +++ b/src/sm83/sm83.c @@ -61,6 +61,7 @@ void SM83Reset(struct SM83Core* cpu) { cpu->instruction = 0; + cpu->tMultiplier = 2; cpu->cycles = 0; cpu->nextEvent = 0; cpu->executionState = SM83_CORE_FETCH; @@ -102,7 +103,7 @@ static void _SM83InstructionIRQ(struct SM83Core* cpu) { } static void _SM83Step(struct SM83Core* cpu) { - ++cpu->cycles; + cpu->cycles += cpu->tMultiplier; enum SM83ExecutionState state = cpu->executionState; cpu->executionState = SM83_CORE_IDLE_0; switch (state) { @@ -147,23 +148,31 @@ static void _SM83Step(struct SM83Core* cpu) { } } +static inline bool _SM83TickInternal(struct SM83Core* cpu) { + bool running = true; + _SM83Step(cpu); + int t = cpu->tMultiplier; + if (cpu->cycles + t * 2 >= cpu->nextEvent) { + int32_t diff = cpu->nextEvent - cpu->cycles; + cpu->cycles = cpu->nextEvent; + cpu->executionState += diff >> (t - 1); // NB: This assumes tMultiplier is either 1 or 2 + cpu->irqh.processEvents(cpu); + cpu->cycles += (SM83_CORE_EXECUTE - cpu->executionState) * t; + running = false; + } else { + cpu->cycles += t * 2; + } + cpu->executionState = SM83_CORE_FETCH; + cpu->instruction(cpu); + cpu->cycles += t; + return running; +} + void SM83Tick(struct SM83Core* cpu) { while (cpu->cycles >= cpu->nextEvent) { cpu->irqh.processEvents(cpu); } - _SM83Step(cpu); - if (cpu->cycles + 2 >= cpu->nextEvent) { - int32_t diff = cpu->nextEvent - cpu->cycles; - cpu->cycles = cpu->nextEvent; - cpu->executionState += diff; - cpu->irqh.processEvents(cpu); - cpu->cycles += SM83_CORE_EXECUTE - cpu->executionState; - } else { - cpu->cycles += 2; - } - cpu->executionState = SM83_CORE_FETCH; - cpu->instruction(cpu); - ++cpu->cycles; + _SM83TickInternal(cpu); } void SM83Run(struct SM83Core* cpu) { @@ -173,19 +182,6 @@ void SM83Run(struct SM83Core* cpu) { cpu->irqh.processEvents(cpu); break; } - _SM83Step(cpu); - if (cpu->cycles + 2 >= cpu->nextEvent) { - int32_t diff = cpu->nextEvent - cpu->cycles; - cpu->cycles = cpu->nextEvent; - cpu->executionState += diff; - cpu->irqh.processEvents(cpu); - cpu->cycles += SM83_CORE_EXECUTE - cpu->executionState; - running = false; - } else { - cpu->cycles += 2; - } - cpu->executionState = SM83_CORE_FETCH; - cpu->instruction(cpu); - ++cpu->cycles; + running = _SM83TickInternal(cpu) && running; } } From 527f2359347213a4e7614ee75a567437c9a9a921 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 5 Jan 2021 00:23:52 -0800 Subject: [PATCH 05/40] Core: Adding to library is now recursive --- CHANGES | 1 + include/mgba/core/library.h | 2 +- src/core/library.c | 69 +++++++++++-------- src/platform/qt/library/LibraryController.cpp | 12 ++-- src/platform/qt/library/LibraryController.h | 4 +- 5 files changed, 50 insertions(+), 38 deletions(-) diff --git a/CHANGES b/CHANGES index af4a2d7d7..413f1c41e 100644 --- a/CHANGES +++ b/CHANGES @@ -94,6 +94,7 @@ Misc: - Core: Add shutdown callback - Core: Rework thread state synchronization - Core: Improve support for ROM patch cheats, supporting disabling overlapping patches + - Core: Adding to library is now recursive - GB: Allow pausing event loop while CPU is blocked - GB: Add support for sleep and shutdown callbacks - GB: Redo double speed emulation (closes mgba.io/i/1515) diff --git a/include/mgba/core/library.h b/include/mgba/core/library.h index d55ad4094..d12aa0411 100644 --- a/include/mgba/core/library.h +++ b/include/mgba/core/library.h @@ -35,7 +35,7 @@ void mLibraryDestroy(struct mLibrary*); struct VDir; struct VFile; -void mLibraryLoadDirectory(struct mLibrary* library, const char* base); +void mLibraryLoadDirectory(struct mLibrary* library, const char* base, bool recursive); void mLibraryClear(struct mLibrary* library); size_t mLibraryCount(struct mLibrary* library, const struct mLibraryEntry* constraints); diff --git a/src/core/library.c b/src/core/library.c index 530ad6cb9..eeb7794de 100644 --- a/src/core/library.c +++ b/src/core/library.c @@ -42,7 +42,7 @@ struct mLibrary { static void _mLibraryDeleteEntry(struct mLibrary* library, struct mLibraryEntry* entry); static void _mLibraryInsertEntry(struct mLibrary* library, struct mLibraryEntry* entry); -static void _mLibraryAddEntry(struct mLibrary* library, const char* filename, const char* base, struct VFile* vf); +static bool _mLibraryAddEntry(struct mLibrary* library, const char* filename, const char* base, struct VFile* vf); static void _bindConstraints(sqlite3_stmt* statement, const struct mLibraryEntry* constraints) { if (!constraints) { @@ -212,7 +212,7 @@ void mLibraryDestroy(struct mLibrary* library) { free(library); } -void mLibraryLoadDirectory(struct mLibrary* library, const char* base) { +void mLibraryLoadDirectory(struct mLibrary* library, const char* base, bool recursive) { struct VDir* dir = VDirOpenArchive(base); if (!dir) { dir = VDirOpen(base); @@ -248,44 +248,55 @@ void mLibraryLoadDirectory(struct mLibrary* library, const char* base) { dir->rewind(dir); struct VDirEntry* dirent = dir->listNext(dir); while (dirent) { - struct VFile* vf = dir->openFile(dir, dirent->name(dirent), O_RDONLY); - if (!vf) { - dirent = dir->listNext(dir); - continue; + const char* name = dirent->name(dirent); + struct VFile* vf = dir->openFile(dir, name, O_RDONLY); + bool wasAdded = false; + + if (vf) { + wasAdded = _mLibraryAddEntry(library, name, base, vf); + } + if (!wasAdded && name[0] != '.') { + char newBase[PATH_MAX]; + snprintf(newBase, sizeof(newBase), "%s" PATH_SEP "%s", base, name); + + if (recursive) { + mLibraryLoadDirectory(library, newBase, recursive); + } else if (dirent->type(dirent) == VFS_FILE) { + mLibraryLoadDirectory(library, newBase, true); // This will add as an archive + } } - _mLibraryAddEntry(library, dirent->name(dirent), base, vf); dirent = dir->listNext(dir); } dir->close(dir); sqlite3_exec(library->db, "COMMIT;", NULL, NULL, NULL); } -void _mLibraryAddEntry(struct mLibrary* library, const char* filename, const char* base, struct VFile* vf) { - struct mCore* core; +bool _mLibraryAddEntry(struct mLibrary* library, const char* filename, const char* base, struct VFile* vf) { if (!vf) { - return; + return false; } - core = mCoreFindVF(vf); - if (core) { - struct mLibraryEntry entry; - memset(&entry, 0, sizeof(entry)); - core->init(core); - core->loadROM(core, vf); - - core->getGameTitle(core, entry.internalTitle); - core->getGameCode(core, entry.internalCode); - core->checksum(core, &entry.crc32, mCHECKSUM_CRC32); - entry.platform = core->platform(core); - entry.title = NULL; - entry.base = base; - entry.filename = filename; - entry.filesize = vf->size(vf); - _mLibraryInsertEntry(library, &entry); - // Note: this destroys the VFile - core->deinit(core); - } else { + struct mCore* core = mCoreFindVF(vf); + if (!core) { vf->close(vf); + return false; } + struct mLibraryEntry entry; + memset(&entry, 0, sizeof(entry)); + core->init(core); + core->loadROM(core, vf); + + core->getGameTitle(core, entry.internalTitle); + core->getGameCode(core, entry.internalCode); + core->checksum(core, &entry.crc32, mCHECKSUM_CRC32); + entry.platform = core->platform(core); + entry.title = NULL; + entry.base = base; + entry.filename = filename; + entry.filesize = vf->size(vf); + _mLibraryInsertEntry(library, &entry); + // Note: this destroys the VFile + core->deinit(core); + return true; } static void _mLibraryInsertEntry(struct mLibrary* library, struct mLibraryEntry* entry) { diff --git a/src/platform/qt/library/LibraryController.cpp b/src/platform/qt/library/LibraryController.cpp index 51fa6d619..2c8c37741 100644 --- a/src/platform/qt/library/LibraryController.cpp +++ b/src/platform/qt/library/LibraryController.cpp @@ -108,10 +108,10 @@ QPair LibraryController::selectedPath() { return e ? qMakePair(e->base(), e->filename()) : qMakePair("", ""); } -void LibraryController::addDirectory(const QString& dir) { +void LibraryController::addDirectory(const QString& dir, bool recursive) { // The worker thread temporarily owns the library std::shared_ptr library = m_library; - m_libraryJob = GBAApp::app()->submitWorkerJob(std::bind(&LibraryController::loadDirectory, this, dir), this, [this, library]() { + m_libraryJob = GBAApp::app()->submitWorkerJob(std::bind(&LibraryController::loadDirectory, this, dir, recursive), this, [this, library]() { m_libraryJob = -1; refresh(); }); @@ -181,10 +181,10 @@ void LibraryController::selectLastBootedGame() { } } -void LibraryController::loadDirectory(const QString& dir) { - // This class can get delted during this function (sigh) so we need to hold onto this +void LibraryController::loadDirectory(const QString& dir, bool recursive) { + // This class can get deleted during this function (sigh) so we need to hold onto this std::shared_ptr library = m_library; - mLibraryLoadDirectory(library.get(), dir.toUtf8().constData()); + mLibraryLoadDirectory(library.get(), dir.toUtf8().constData(), recursive); } void LibraryController::freeLibrary() { @@ -192,4 +192,4 @@ void LibraryController::freeLibrary() { mLibraryEntryFree(mLibraryListingGetPointer(&m_listing, i)); } mLibraryListingClear(&m_listing); -} \ No newline at end of file +} diff --git a/src/platform/qt/library/LibraryController.h b/src/platform/qt/library/LibraryController.h index 9f88cdff5..2b5a595ee 100644 --- a/src/platform/qt/library/LibraryController.h +++ b/src/platform/qt/library/LibraryController.h @@ -84,7 +84,7 @@ public: void selectLastBootedGame(); - void addDirectory(const QString& dir); + void addDirectory(const QString& dir, bool recursive = true); public slots: void clear(); @@ -97,7 +97,7 @@ private slots: void refresh(); private: - void loadDirectory(const QString&); // Called on separate thread + void loadDirectory(const QString&, bool recursive = true); // Called on separate thread void freeLibrary(); ConfigController* m_config = nullptr; From aa435d1cea90f1f17bdc170654157adc15604c2b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 5 Jan 2021 00:24:12 -0800 Subject: [PATCH 06/40] README: Mention translations, update copyright --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d6e4c473..c6943e434 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ mGBA is an emulator for running Game Boy Advance games. It aims to be faster and Up-to-date news and downloads can be found at [mgba.io](https://mgba.io/). -[![Build status](https://travis-ci.org/mgba-emu/mgba.svg?branch=master)](https://travis-ci.org/mgba-emu/mgba) +[![Build status](https://buildbot.mgba.io/badges/build-win32.svg)](https://buildbot.mgba.io) +[![Translation status](https://hosted.weblate.org/widgets/mgba/-/svg-badge.svg)](https://hosted.weblate.org/engage/mgba) Features -------- @@ -36,6 +37,7 @@ Features - Configurable emulation rewinding. - Support for loading and exporting GameShark and Action Replay snapshots. - Cores available for RetroArch/Libretro and OpenEmu. +- Community-provided translations for several languages via [Weblate](https://hosted.weblate.org/engage/mgba). - Many, many smaller things. #### Game Boy mappers @@ -240,7 +242,7 @@ Footnotes Copyright --------- -mGBA is Copyright © 2013 – 2020 Jeffrey Pfau. It is distributed under the [Mozilla Public License version 2.0](https://www.mozilla.org/MPL/2.0/). A copy of the license is available in the distributed LICENSE file. +mGBA is Copyright © 2013 – 2021 Jeffrey Pfau. It is distributed under the [Mozilla Public License version 2.0](https://www.mozilla.org/MPL/2.0/). A copy of the license is available in the distributed LICENSE file. mGBA contains the following third-party libraries: From adb3dd5270f77d794441a0b3f93256735951e71b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 5 Jan 2021 00:26:08 -0800 Subject: [PATCH 07/40] Qt: Update About screen copyright --- src/platform/qt/AboutScreen.cpp | 6 ++++++ src/platform/qt/AboutScreen.ui | 2 +- src/platform/qt/ts/mgba-en.ts | 10 +++++++++- src/platform/qt/ts/mgba-es.ts | 8 ++++++++ src/platform/qt/ts/mgba-ko.ts | 8 ++++++++ src/platform/qt/ts/mgba-nl.ts | 10 +++++++++- src/platform/qt/ts/mgba-ru.ts | 10 +++++++++- src/platform/qt/ts/mgba-template.ts | 10 +++++++++- src/platform/qt/ts/mgba-tr.ts | 8 ++++++++ 9 files changed, 67 insertions(+), 5 deletions(-) diff --git a/src/platform/qt/AboutScreen.cpp b/src/platform/qt/AboutScreen.cpp index 0dce32d2b..e3ca55d95 100644 --- a/src/platform/qt/AboutScreen.cpp +++ b/src/platform/qt/AboutScreen.cpp @@ -71,4 +71,10 @@ AboutScreen::AboutScreen(QWidget* parent) patrons.replace("{patrons}", patronList.join(" • ")); m_ui.patrons->setText(patrons); } + + { + QString copyright = m_ui.copyright->text(); + copyright.replace("{year}", tr("2021")); + m_ui.copyright->setText(copyright); + } } diff --git a/src/platform/qt/AboutScreen.ui b/src/platform/qt/AboutScreen.ui index fc41b83ad..99a604d99 100644 --- a/src/platform/qt/AboutScreen.ui +++ b/src/platform/qt/AboutScreen.ui @@ -83,7 +83,7 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. diff --git a/src/platform/qt/ts/mgba-en.ts b/src/platform/qt/ts/mgba-en.ts index db19be534..15adfbe26 100644 --- a/src/platform/qt/ts/mgba-en.ts +++ b/src/platform/qt/ts/mgba-en.ts @@ -25,7 +25,7 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. @@ -1134,6 +1134,14 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + QGBA::AboutScreen + + + 2021 + + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index 40a79abd2..628025487 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -1135,6 +1135,14 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Ampliación + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-ko.ts b/src/platform/qt/ts/mgba-ko.ts index 7d6ec0cca..062027d48 100644 --- a/src/platform/qt/ts/mgba-ko.ts +++ b/src/platform/qt/ts/mgba-ko.ts @@ -1135,6 +1135,14 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-nl.ts b/src/platform/qt/ts/mgba-nl.ts index ec248b91a..73b12156a 100644 --- a/src/platform/qt/ts/mgba-nl.ts +++ b/src/platform/qt/ts/mgba-nl.ts @@ -25,7 +25,7 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. @@ -1134,6 +1134,14 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + QGBA::AboutScreen + + + 2021 + + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-ru.ts b/src/platform/qt/ts/mgba-ru.ts index c141f6b74..957060c4f 100644 --- a/src/platform/qt/ts/mgba-ru.ts +++ b/src/platform/qt/ts/mgba-ru.ts @@ -25,7 +25,7 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. @@ -1134,6 +1134,14 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + QGBA::AboutScreen + + + 2021 + + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-template.ts b/src/platform/qt/ts/mgba-template.ts index be535a197..e3a414611 100644 --- a/src/platform/qt/ts/mgba-template.ts +++ b/src/platform/qt/ts/mgba-template.ts @@ -25,7 +25,7 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. @@ -1134,6 +1134,14 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + QGBA::AboutScreen + + + 2021 + + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-tr.ts b/src/platform/qt/ts/mgba-tr.ts index 96f22f4f4..ef6f2340b 100644 --- a/src/platform/qt/ts/mgba-tr.ts +++ b/src/platform/qt/ts/mgba-tr.ts @@ -1135,6 +1135,14 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. + + QGBA::AboutScreen + + + 2021 + + + QGBA::AssetTile From 02b794456063677cfa78707074d2ae5d01db3ba4 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 5 Jan 2021 00:32:43 -0800 Subject: [PATCH 08/40] Qt: Make save game/save state terminology consistent --- src/platform/qt/SettingsView.ui | 8 +-- src/platform/qt/Window.cpp | 14 ++--- src/platform/qt/ts/mgba-de.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-en.ts | 66 +++++++++++---------- src/platform/qt/ts/mgba-es.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-fr.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-it.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-ja.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-ko.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-nl.ts | 74 +++++++++++++----------- src/platform/qt/ts/mgba-pt_BR.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-ru.ts | 74 +++++++++++++----------- src/platform/qt/ts/mgba-template.ts | 66 +++++++++++---------- src/platform/qt/ts/mgba-tr.ts | 90 +++++++++++++++-------------- src/platform/qt/ts/mgba-zh_CN.ts | 72 ++++++++++++----------- 15 files changed, 573 insertions(+), 521 deletions(-) diff --git a/src/platform/qt/SettingsView.ui b/src/platform/qt/SettingsView.ui index 3d08407d0..750eec352 100644 --- a/src/platform/qt/SettingsView.ui +++ b/src/platform/qt/SettingsView.ui @@ -883,7 +883,7 @@ - Savestate extra data: + Save state extra data: @@ -900,7 +900,7 @@ - Save data + Save game true @@ -927,7 +927,7 @@ - Load extra data: + Load state extra data: @@ -944,7 +944,7 @@ - Save data + Save game diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index eab93078b..bac7f29b0 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -369,8 +369,8 @@ void Window::replaceROM() { void Window::selectSave(bool temporary) { QStringList formats{"*.sav"}; - QString filter = tr("Game Boy Advance save files (%1)").arg(formats.join(QChar(' '))); - QString filename = GBAApp::app()->getOpenFileName(this, tr("Select save"), filter); + QString filter = tr("Save games (%1)").arg(formats.join(QChar(' '))); + QString filename = GBAApp::app()->getOpenFileName(this, tr("Select save game"), filter); if (!filename.isEmpty()) { m_controller->loadSave(filename, temporary); } @@ -378,14 +378,14 @@ void Window::selectSave(bool temporary) { void Window::selectState(bool load) { QStringList formats{"*.ss0", "*.ss1", "*.ss2", "*.ss3", "*.ss4", "*.ss5", "*.ss6", "*.ss7", "*.ss8", "*.ss9"}; - QString filter = tr("mGBA savestate files (%1)").arg(formats.join(QChar(' '))); + QString filter = tr("mGBA save state files (%1)").arg(formats.join(QChar(' '))); if (load) { - QString filename = GBAApp::app()->getOpenFileName(this, tr("Select savestate"), filter); + QString filename = GBAApp::app()->getOpenFileName(this, tr("Select save state"), filter); if (!filename.isEmpty()) { m_controller->loadState(filename); } } else { - QString filename = GBAApp::app()->getSaveFileName(this, tr("Select savestate"), filter); + QString filename = GBAApp::app()->getSaveFileName(this, tr("Select save state"), filter); if (!filename.isEmpty()) { m_controller->saveState(filename); } @@ -1118,10 +1118,10 @@ void Window::setupMenu(QMenuBar* menubar) { m_actions.addAction(tr("Add folder to library..."), "addDirToLibrary", this, &Window::addDirToLibrary, "file"); #endif - addGameAction(tr("Load alternate save..."), "loadAlternateSave", [this]() { + addGameAction(tr("Load alternate save game..."), "loadAlternateSave", [this]() { this->selectSave(false); }, "file"); - addGameAction(tr("Load temporary save..."), "loadTemporarySave", [this]() { + addGameAction(tr("Load temporary save game..."), "loadTemporarySave", [this]() { this->selectSave(true); }, "file"); diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index fc4616ec5..cb46971d9 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -3914,28 +3914,11 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.ROM auswählen - - Game Boy Advance save files (%1) - Game Boy Advance-Speicherdateien (%1) - - - Select save Speicherdatei wählen - - - mGBA savestate files (%1) - mGBA Savestate-Dateien (%1) - - - - - Select savestate - Savestate auswählen - Select patch @@ -4056,16 +4039,6 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Load ROM in archive... ROM aus Archiv laden... - - - Load alternate save... - Alternative Speicherdatei laden... - - - - Load temporary save... - Temporäre Speicherdatei laden... - Load &patch... @@ -4407,6 +4380,27 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Select folder Ordner auswählen + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + Select e-Reader dotcode @@ -4432,6 +4426,16 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Add folder to library... Ordner zur Bibliothek hinzufügen... + + + Load alternate save game... + + + + + Load temporary save game... + + Scan e-Reader dotcodes... @@ -5047,6 +5051,22 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Show FPS in title bar Bildwiederholrate in der Titelleiste anzeigen + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Enable Game Boy Player features by default @@ -5306,12 +5326,6 @@ wenn vorhanden Screenshot Screenshot - - - - Save data - Speicherdaten - @@ -5338,16 +5352,6 @@ wenn vorhanden Idle loops: Leerlaufprozesse: - - - Savestate extra data: - Zusätzliche Savestate-Daten: - - - - Load extra data: - Lade zusätzliche Daten: - Autofire interval: diff --git a/src/platform/qt/ts/mgba-en.ts b/src/platform/qt/ts/mgba-en.ts index 15adfbe26..9b13dbabb 100644 --- a/src/platform/qt/ts/mgba-en.ts +++ b/src/platform/qt/ts/mgba-en.ts @@ -3926,28 +3926,11 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - - Game Boy Advance save files (%1) - - - - Select save - - - mGBA savestate files (%1) - - - - - - Select savestate - - Select patch @@ -4091,14 +4074,35 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Add folder to library... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + - Load alternate save... + Load alternate save game... - Load temporary save... + Load temporary save game... @@ -5189,7 +5193,18 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - Savestate extra data: + Save state extra data: + + + + + + Save game + + + + + Load state extra data: @@ -5198,23 +5213,12 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Screenshot - - - - Save data - - Cheat codes - - - Load extra data: - - Enable Game Boy Player features by default diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index 628025487..557274646 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -3927,28 +3927,11 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Seleccionar carpeta - - Game Boy Advance save files (%1) - Archivos de guardado de Game Boy Advance (%1) - - - Select save Seleccionar guardado - - - mGBA savestate files (%1) - Archivos de estado de guardado de mGBA (%1) - - - - - Select savestate - Elegir estado de guardado - Select patch @@ -4084,16 +4067,6 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Add folder to library... Agregar carpeta a la biblioteca... - - - Load alternate save... - Cargar guardado alternativo... - - - - Load temporary save... - Cargar guardado temporal... - Load &patch... @@ -4154,6 +4127,37 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Load state file... Cargar archivo de estado... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + + + + Load alternate save game... + + + + + Load temporary save game... + + &Save state @@ -5044,6 +5048,22 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Show OSD messages Mostrar mensajes en el OSD + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Super Game Boy/Game Boy Color model: @@ -5220,34 +5240,18 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Detect and remove Detectar y eliminar - - - Savestate extra data: - Guardar datos extra: - Screenshot Pantallazo - - - - Save data - Datos de guardado - Cheat codes Trucos - - - Load extra data: - Cargar datos extra: - Preload entire ROM into memory diff --git a/src/platform/qt/ts/mgba-fr.ts b/src/platform/qt/ts/mgba-fr.ts index 1351e21e1..84cb4ebeb 100644 --- a/src/platform/qt/ts/mgba-fr.ts +++ b/src/platform/qt/ts/mgba-fr.ts @@ -3938,28 +3938,11 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Choisir un dossier - - Game Boy Advance save files (%1) - Fichiers de sauvegarde Game Boy Advance (%1) - - - Select save Choisir une sauvegarde - - - mGBA savestate files (%1) - mGBA fichiers d'état (%1) - - - - - Select savestate - Sélectionner un fichier d'état - Select patch @@ -4095,16 +4078,6 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Add folder to library... Ajouter un dossier à la bibliothèque… - - - Load alternate save... - Charger une sauvegarde alternative… - - - - Load temporary save... - Charger une sauvegarde temporaire… - Load &patch... @@ -4406,11 +4379,42 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Couldn't Start N'a pas pu démarrer + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + Could not start game. Impossible de démarrer le jeu. + + + Load alternate save game... + + + + + Load temporary save game... + + Scan e-Reader dotcodes... @@ -5036,6 +5040,22 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Dynamically update window title + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Enable Game Boy Player features by default @@ -5232,34 +5252,18 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Detect and remove Détecter et supprimer - - - Savestate extra data: - Enregistrer des données supplémentaires : - Screenshot Capture d'écran - - - - Save data - Sauvegarder les données - Cheat codes Codes de triches - - - Load extra data: - Chargez des données supplémentaires : - Preload entire ROM into memory diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index 73da03da6..4484e8999 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -3914,28 +3914,11 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Seleziona ROM - - Game Boy Advance save files (%1) - Game Boy Advance file di salvataggio (%1) - - - Select save Seleziona salvataggio - - - mGBA savestate files (%1) - mGBA file stato (%1) - - - - - Select savestate - Seleziona stato di salvataggio - Select patch @@ -4066,16 +4049,6 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Load ROM in archive... Carica la ROM in archivio... - - - Load alternate save... - Carica il salvataggio alternativo... - - - - Load temporary save... - Carica il salvataggio temporaneo.. - Load &patch... @@ -4442,6 +4415,37 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Game Boy Printer... Stampante Game Boy... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + + + + Load alternate save game... + + + + + Load temporary save game... + + BattleChip Gate... @@ -5026,6 +5030,22 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Enable Discord Rich Presence Abilita Discord Rich Presence + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Super Game Boy/Game Boy Color model: @@ -5251,12 +5271,6 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Screenshot Screenshot - - - - Save data - Salva dati - @@ -5333,16 +5347,6 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Idle loops: Idle loops: - - - Savestate extra data: - Dati extra salvataggio stato: - - - - Load extra data: - Carica dati extra: - Preload entire ROM into memory diff --git a/src/platform/qt/ts/mgba-ja.ts b/src/platform/qt/ts/mgba-ja.ts index 5753cb623..a4ece0fe8 100644 --- a/src/platform/qt/ts/mgba-ja.ts +++ b/src/platform/qt/ts/mgba-ja.ts @@ -3919,28 +3919,11 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. フォルダを開く - - Game Boy Advance save files (%1) - ゲームボーイアドバンスセーブファイル (%1) - - - Select save セーブを開く - - - mGBA savestate files (%1) - mGBAセーブステートファイル (%1) - - - - - Select savestate - セーブステートを開く - Select patch @@ -4086,16 +4069,6 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Add folder to library... ライブリーにフォルダを追加... - - - Load alternate save... - 別のセーブをロード... - - - - Load temporary save... - 一時セーブをロード... - Load &patch... @@ -4166,6 +4139,37 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Load state file... ステートファイルをロード... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + + + + Load alternate save game... + + + + + Load temporary save game... + + &Save state @@ -5041,6 +5045,22 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Fast forward (held) speed: 早送り(押し)速度: + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Enable Game Boy Player features by default @@ -5217,34 +5237,18 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Detect and remove 検出して削除 - - - Savestate extra data: - セーブステートの追加データ: - Screenshot スクリーンショット - - - - Save data - セーブデータ - Cheat codes チートコード - - - Load extra data: - 追加データをロード: - Preload entire ROM into memory diff --git a/src/platform/qt/ts/mgba-ko.ts b/src/platform/qt/ts/mgba-ko.ts index 062027d48..da218fc18 100644 --- a/src/platform/qt/ts/mgba-ko.ts +++ b/src/platform/qt/ts/mgba-ko.ts @@ -3922,28 +3922,11 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. 롬 선택 - - Game Boy Advance save files (%1) - 게임 보이 어드밴스 저장 파일 (%1) - - - Select save 저장 파일 선택 - - - mGBA savestate files (%1) - - - - - - Select savestate - - Select patch @@ -4074,16 +4057,6 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. Load ROM in archive... 롬을 아카이브에 로드... - - - Load alternate save... - 대체 저장 로드... - - - - Load temporary save... - 임시 저장 로드... - Load &patch... @@ -4445,6 +4418,37 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. Game Boy Printer... 게임 보이 프린터... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + + + + Load alternate save game... + + + + + Load temporary save game... + + BattleChip Gate... @@ -5049,6 +5053,22 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. Fast forward (held) speed: + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Enable Game Boy Player features by default @@ -5259,12 +5279,6 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. Screenshot 스크린샷 - - - - Save data - 저장 데이터 - @@ -5341,16 +5355,6 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. Idle loops: Idle loops: - - - Savestate extra data: - 추가 데이터 저장상태: - - - - Load extra data: - 추가 데이터 로드: - Preload entire ROM into memory diff --git a/src/platform/qt/ts/mgba-nl.ts b/src/platform/qt/ts/mgba-nl.ts index 73b12156a..94a279126 100644 --- a/src/platform/qt/ts/mgba-nl.ts +++ b/src/platform/qt/ts/mgba-nl.ts @@ -3926,28 +3926,11 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - - Game Boy Advance save files (%1) - - - - Select save - - - mGBA savestate files (%1) - - - - - - Select savestate - - Select patch @@ -4091,14 +4074,35 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Add folder to library... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + - Load alternate save... + Load alternate save game... - Load temporary save... + Load temporary save game... @@ -5096,6 +5100,22 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Show FPS in title bar + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Super Game Boy/Game Boy Color model: @@ -5192,34 +5212,18 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Preload entire ROM into memory - - - Savestate extra data: - - Screenshot - - - - Save data - - Cheat codes - - - Load extra data: - - Enable Game Boy Player features by default diff --git a/src/platform/qt/ts/mgba-pt_BR.ts b/src/platform/qt/ts/mgba-pt_BR.ts index f9a7866fa..51bc94bb2 100644 --- a/src/platform/qt/ts/mgba-pt_BR.ts +++ b/src/platform/qt/ts/mgba-pt_BR.ts @@ -3919,28 +3919,11 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Selecionar pasta - - Game Boy Advance save files (%1) - Arquivos salvos de Game Boy Advance (%1) - - - Select save Selecionar salvamento - - - mGBA savestate files (%1) - Arquivos de savestate do mGBA (%1) - - - - - Select savestate - Selecionar savestate - Select patch @@ -4076,16 +4059,6 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Add folder to library... Adicionar pasta à biblioteca... - - - Load alternate save... - Carregar salvamento alternativo... - - - - Load temporary save... - Carregar salvamento temporário... - Load &patch... @@ -4146,6 +4119,37 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Load state file... Carregar arquivo de estado... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + + + + Load alternate save game... + + + + + Load temporary save game... + + &Save state @@ -5036,6 +5040,22 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Show OSD messages Exibir mensagens OSD + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Super Game Boy/Game Boy Color model: @@ -5212,34 +5232,18 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Detect and remove Detectar e remover - - - Savestate extra data: - Savestate extra data: - Screenshot Captura de tela - - - - Save data - Salvar dados - Cheat codes Códigos de cheat - - - Load extra data: - Carregar dados extras: - Preload entire ROM into memory diff --git a/src/platform/qt/ts/mgba-ru.ts b/src/platform/qt/ts/mgba-ru.ts index 957060c4f..5eef97cbc 100644 --- a/src/platform/qt/ts/mgba-ru.ts +++ b/src/platform/qt/ts/mgba-ru.ts @@ -3926,28 +3926,11 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - - Game Boy Advance save files (%1) - - - - Select save - - - mGBA savestate files (%1) - - - - - - Select savestate - - Select patch @@ -4091,14 +4074,35 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Add folder to library... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + - Load alternate save... + Load alternate save game... - Load temporary save... + Load temporary save game... @@ -5096,6 +5100,22 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Show FPS in title bar + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Super Game Boy/Game Boy Color model: @@ -5192,34 +5212,18 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Preload entire ROM into memory - - - Savestate extra data: - - Screenshot - - - - Save data - - Cheat codes - - - Load extra data: - - Enable Game Boy Player features by default diff --git a/src/platform/qt/ts/mgba-template.ts b/src/platform/qt/ts/mgba-template.ts index e3a414611..58d774fc4 100644 --- a/src/platform/qt/ts/mgba-template.ts +++ b/src/platform/qt/ts/mgba-template.ts @@ -3926,28 +3926,11 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - - Game Boy Advance save files (%1) - - - - Select save - - - mGBA savestate files (%1) - - - - - - Select savestate - - Select patch @@ -4091,14 +4074,35 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Add folder to library... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + - Load alternate save... + Load alternate save game... - Load temporary save... + Load temporary save game... @@ -5189,7 +5193,18 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - Savestate extra data: + Save state extra data: + + + + + + Save game + + + + + Load state extra data: @@ -5198,23 +5213,12 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. Screenshot - - - - Save data - - Cheat codes - - - Load extra data: - - Enable Game Boy Player features by default diff --git a/src/platform/qt/ts/mgba-tr.ts b/src/platform/qt/ts/mgba-tr.ts index ef6f2340b..e29bc2e72 100644 --- a/src/platform/qt/ts/mgba-tr.ts +++ b/src/platform/qt/ts/mgba-tr.ts @@ -3927,28 +3927,11 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır.Klasör seç - - Game Boy Advance save files (%1) - Game Boy Advance kayıt dosyaları (%1) - - - Select save Kayıt seç - - - mGBA savestate files (%1) - mGBA kaydedilmiş konu kayıtları (%1) - - - - - Select savestate - Konumkaydedici seç - Select patch @@ -4084,16 +4067,6 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır.Add folder to library... Kütüphaneye klasör ekle ... - - - Load alternate save... - Alternatif kaydetme yükle ... - - - - Load temporary save... - Geçici kaydetmeyi yükle ... - Load &patch... @@ -4420,11 +4393,42 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır.Couldn't Start + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + Could not start game. + + + Load alternate save game... + + + + + Load temporary save game... + + Scan e-Reader dotcodes... @@ -5099,6 +5103,22 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır.Show FPS in title bar FPS'i başlık çubuğunda göster + + + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + + Super Game Boy/Game Boy Color model: @@ -5195,34 +5215,18 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır.Preload entire ROM into memory Tüm ROM'u belleğe önceden yükle - - - Savestate extra data: - Konum kaydedici kaydeder: - Screenshot Ekran görüntüsü - - - - Save data - Verileri kaydet - Cheat codes Hile kodları - - - Load extra data: - Ekstra veri yükle: - Enable Game Boy Player features by default diff --git a/src/platform/qt/ts/mgba-zh_CN.ts b/src/platform/qt/ts/mgba-zh_CN.ts index bfd02c4df..9f43e015c 100644 --- a/src/platform/qt/ts/mgba-zh_CN.ts +++ b/src/platform/qt/ts/mgba-zh_CN.ts @@ -3919,28 +3919,11 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 选择文件夹 - - Game Boy Advance save files (%1) - Game Boy Advance 存档文件 (%1) - - - Select save 选择存档 - - - mGBA savestate files (%1) - mGBA 即时存档文件 (%1) - - - - - Select savestate - 选择即时存档 - Select patch @@ -4086,15 +4069,36 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Add folder to library... 将文件夹添加到库中... + + + Save games (%1) + + + + + Select save game + + + + + mGBA save state files (%1) + + + + + + Select save state + + - Load alternate save... - 载入其他存档... + Load alternate save game... + - Load temporary save... - 载入临时存档... + Load temporary save game... + @@ -5184,8 +5188,19 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 - Savestate extra data: - 即时存档额外数据: + Save state extra data: + + + + + + Save game + + + + + Load state extra data: + @@ -5193,23 +5208,12 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Screenshot 截图 - - - - Save data - 保存数据 - Cheat codes 作弊码 - - - Load extra data: - 载入额外数据: - Enable Game Boy Player features by default From 027b6f09079ff3058866e7bb5010d96edef629ed Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Tue, 5 Jan 2021 22:51:42 +0100 Subject: [PATCH 09/40] Qt: Update German GUI translation --- src/platform/qt/ts/mgba-de.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index cb46971d9..37a26a410 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -3783,7 +3783,7 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. Select directory - + Verzeichnis auswählen @@ -4383,23 +4383,23 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. Save games (%1) - + Spielstände (%1) Select save game - + Spielstand auswählen mGBA save state files (%1) - + mGBA-Savestates (%1) Select save state - + Savestate auswählen @@ -4429,12 +4429,12 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. Load alternate save game... - + Alternativen Spielstand laden... Load temporary save game... - + Temporären Spielstand laden... @@ -5054,18 +5054,18 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. Save state extra data: - + Zusätzliche Savestate-Daten: Save game - + Spielstand Load state extra data: - + Zusätzliche Savestate-Daten laden: From ecdf9bec3d285485d7dddd87b3223bddcf58b1d6 Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Tue, 5 Jan 2021 22:56:22 +0100 Subject: [PATCH 10/40] Doc: Update German README file --- README_DE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README_DE.md b/README_DE.md index f69477ebf..310ee7193 100644 --- a/README_DE.md +++ b/README_DE.md @@ -6,6 +6,7 @@ mGBA ist ein Emulator für Game Boy Advance-Spiele. Das Ziel von mGBA ist, schne Aktuelle Neuigkeiten und Downloads findest Du auf [mgba.io](https://mgba.io). [![Build-Status](https://travis-ci.org/mgba-emu/mgba.svg?branch=master)](https://travis-ci.org/mgba-emu/mgba) +[![Status der Übersetzungen](https://hosted.weblate.org/widgets/mgba/-/svg-badge.svg)](https://hosted.weblate.org/engage/mgba) Features -------- @@ -36,6 +37,7 @@ Features - Einstellbare Rücklauf-Funktion. - Unterstützung für das Laden und Exportieren von GameShark- und Action Replay-Abbildern. - Verfügbare Cores für RetroArch/Libretro und OpenEmu. +- Übersetzungen für mehrere Sprachen über [Weblate](https://hosted.weblate.org/engage/mgba). - Viele, viele kleinere Dinge. ### Game Boy-Mapper @@ -240,7 +242,7 @@ Fußnoten Copyright --------- -Copyright für mGBA © 2013 – 2020 Jeffrey Pfau. mGBA wird unter der [Mozilla Public License version 2.0](https://www.mozilla.org/MPL/2.0/) veröffentlicht. Eine Kopie der Lizenz ist in der mitgelieferten Datei LICENSE verfügbar. +Copyright für mGBA © 2013 – 2021 Jeffrey Pfau. mGBA wird unter der [Mozilla Public License version 2.0](https://www.mozilla.org/MPL/2.0/) veröffentlicht. Eine Kopie der Lizenz ist in der mitgelieferten Datei LICENSE verfügbar. mGBA beinhaltet die folgenden Bibliotheken von Drittanbietern: From 3d4faa41e281ff042451032190b3191af2737d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=B3pez=20Brante?= Date: Tue, 5 Jan 2021 18:49:40 -0300 Subject: [PATCH 11/40] README: Update Spanish translation --- README_ES.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README_ES.md b/README_ES.md index 7003a14aa..681ed5556 100644 --- a/README_ES.md +++ b/README_ES.md @@ -5,7 +5,8 @@ mGBA es un emulador para juegos de Game Boy Advance. Su objetivo es ser más rá Las noticias actualizadas y las descargas se encuentran en [mgba.io](https://mgba.io/). -[![Estado de compilación](https://travis-ci.org/mgba-emu/mgba.svg?branch=master)](https://travis-ci.org/mgba-emu/mgba) +[![Estado de la compilación](https://travis-ci.org/mgba-emu/mgba.svg?branch=master)](https://travis-ci.org/mgba-emu/mgba) +[![Estado de la traducción](https://hosted.weblate.org/widgets/mgba/-/svg-badge.svg)](https://hosted.weblate.org/engage/mgba) Características -------- @@ -36,6 +37,7 @@ Características - Retroceso configurable. - Soporte para cargar y exportar instantáneas de GameShark y Action Replay. - Núcleos disponibles para RetroArch/Libretro y OpenEmu. +- Traducciones de la comunidad a través de [Weblate](https://hosted.weblate.org/engage/mgba). - Otras cosas más pequeñas. #### Mappers (controladores de memoria) soportados @@ -240,7 +242,7 @@ Notas a pie Copyright --------- -mGBA es Copyright © 2013 – 2020 Jeffrey Pfau. Es distribuído bajo la [licencia pública de Mozilla (Mozilla Public License) version 2.0](https://www.mozilla.org/MPL/2.0/). Una copia de la licencia está disponible en el archivo LICENSE. +mGBA es Copyright © 2013 – 2021 Jeffrey Pfau. Es distribuído bajo la [licencia pública de Mozilla (Mozilla Public License) version 2.0](https://www.mozilla.org/MPL/2.0/). Una copia de la licencia está disponible en el archivo LICENSE. mGBA contiene las siguientes bibliotecas de terceros: From fe4d4f986f2809c58dad0988929363daa5072e74 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 14 Jan 2021 23:13:35 -0800 Subject: [PATCH 12/40] Qt: Fix some frame viewer memory leaks --- src/platform/qt/FrameView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/platform/qt/FrameView.cpp b/src/platform/qt/FrameView.cpp index 6635dabfe..530e8a2e5 100644 --- a/src/platform/qt/FrameView.cpp +++ b/src/platform/qt/FrameView.cpp @@ -83,7 +83,12 @@ FrameView::FrameView(std::shared_ptr controller, QWidget* parent FrameView::~FrameView() { QMutexLocker locker(&m_mutex); *m_callbackLocker = false; + + if (m_nextFrame) { + m_controller->endVideoLog(true); + } if (m_vl) { + mCoreConfigDeinit(&m_vl->config); m_vl->deinit(m_vl); } } @@ -517,6 +522,9 @@ bool FrameView::eventFilter(QObject*, QEvent* event) { void FrameView::refreshVl() { QMutexLocker locker(&m_mutex); + if (m_currentFrame) { + m_currentFrame->close(m_currentFrame); + } m_currentFrame = m_nextFrame; m_nextFrame = VFileDevice::openMemory(); if (m_currentFrame) { @@ -536,6 +544,7 @@ void FrameView::newVl() { return; } if (m_vl) { + mCoreConfigDeinit(&m_vl->config); m_vl->deinit(m_vl); } m_vl = mCoreFindVF(m_currentFrame); From ca3050d76be99f4d635f4c45d790a199befc2f6c Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 14 Jan 2021 00:06:59 -0800 Subject: [PATCH 13/40] Core: Add mCoreCreate function for making a core based on platform type --- include/mgba/core/core.h | 1 + src/core/core.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/mgba/core/core.h b/include/mgba/core/core.h index fcd302279..3475c393d 100644 --- a/include/mgba/core/core.h +++ b/include/mgba/core/core.h @@ -186,6 +186,7 @@ void mCoreTakeScreenshot(struct mCore* core); struct mCore* mCoreFindVF(struct VFile* vf); enum mPlatform mCoreIsCompatible(struct VFile* vf); +struct mCore* mCoreCreate(enum mPlatform); bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags); bool mCoreLoadStateNamed(struct mCore* core, struct VFile* vf, int flags); diff --git a/src/core/core.c b/src/core/core.c index 082d547e2..fb706eb02 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -73,6 +73,19 @@ enum mPlatform mCoreIsCompatible(struct VFile* vf) { return mPLATFORM_NONE; } +struct mCore* mCoreCreate(enum mPlatform platform) { + const struct mCoreFilter* filter; + for (filter = &_filters[0]; filter->filter; ++filter) { + if (filter->platform == platform) { + break; + } + } + if (filter->open) { + return filter->open(); + } + return NULL; +} + #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 #include From 82e3b814b496052891b41393c62b540403db66ed Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Fri, 15 Jan 2021 22:23:48 +0100 Subject: [PATCH 14/40] Qt: Update German GUI translation --- src/platform/qt/ts/mgba-de.ts | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index 37a26a410..b07a782c6 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -20,10 +20,10 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – 2020 Jeffrey Pfau, lizenziert unter der Mozilla Public License, Version 2.0 -Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. + © 2013 – {year} Jeffrey Pfau, lizenziert unter der Mozilla Public License, Version 2.0 +Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. @@ -1135,6 +1135,14 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Kopieren + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile @@ -1242,52 +1250,52 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::FrameView - + Export frame Bild exportieren - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - + None Keine - + Background Hintergrund - + Window Fenster - + Objwin Objwin - + Sprite Sprite - + Backdrop Hintergrund - + Frame Frame - + %1 %2 %1 %2 From 8947b80a1cefc78458f447b6583c17d084998f8c Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Fri, 15 Jan 2021 22:24:17 +0100 Subject: [PATCH 15/40] Qt: Update German GUI translation --- src/platform/qt/ts/mgba-de.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index b07a782c6..90a24f691 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -22,7 +22,7 @@ © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – {year} Jeffrey Pfau, lizenziert unter der Mozilla Public License, Version 2.0 + © 2013 – {year} Jeffrey Pfau, lizenziert unter der Mozilla Public License, Version 2.0 Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. From b6dbbb14abc159b9378353df2d978527f3414389 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 16 Jan 2021 00:47:41 -0800 Subject: [PATCH 16/40] Qt: Add clamp function, using stl if available --- src/platform/qt/InputController.cpp | 3 ++- src/platform/qt/MemoryModel.cpp | 7 ++----- src/platform/qt/SensorView.cpp | 3 ++- src/platform/qt/utils.h | 11 +++++++++++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/platform/qt/InputController.cpp b/src/platform/qt/InputController.cpp index 481465c0e..134dfbe17 100644 --- a/src/platform/qt/InputController.cpp +++ b/src/platform/qt/InputController.cpp @@ -10,6 +10,7 @@ #include "GamepadButtonEvent.h" #include "InputProfile.h" #include "LogController.h" +#include "utils.h" #include #include @@ -733,7 +734,7 @@ void InputController::decreaseLuminanceLevel() { void InputController::setLuminanceLevel(int level) { int value = 0x16; - level = std::max(0, std::min(10, level)); + level = clamp(level, 0, 10); if (level > 0) { value += GBA_LUX_LEVELS[level - 1]; } diff --git a/src/platform/qt/MemoryModel.cpp b/src/platform/qt/MemoryModel.cpp index ab21408d0..e58ec4574 100644 --- a/src/platform/qt/MemoryModel.cpp +++ b/src/platform/qt/MemoryModel.cpp @@ -9,6 +9,7 @@ #include "CoreController.h" #include "LogController.h" #include "VFileDevice.h" +#include "utils.h" #include #include @@ -628,11 +629,7 @@ void MemoryModel::keyPressEvent(QKeyEvent* event) { } void MemoryModel::boundsCheck() { - if (m_top < 0) { - m_top = 0; - } else if (m_top > (m_size >> 4) + 1 - viewport()->size().height() / m_cellHeight) { - m_top = (m_size >> 4) + 1 - viewport()->size().height() / m_cellHeight; - } + m_top = clamp(m_top, 0, static_cast(m_size >> 4) + 1 - viewport()->size().height() / m_cellHeight); } bool MemoryModel::isInSelection(uint32_t address) { diff --git a/src/platform/qt/SensorView.cpp b/src/platform/qt/SensorView.cpp index 54c49cc2c..ba8f87da2 100644 --- a/src/platform/qt/SensorView.cpp +++ b/src/platform/qt/SensorView.cpp @@ -8,6 +8,7 @@ #include "CoreController.h" #include "GamepadAxisEvent.h" #include "InputController.h" +#include "utils.h" #include #include @@ -129,7 +130,7 @@ void SensorView::updateSensors() { } void SensorView::setLuminanceValue(int value) { - value = std::max(0, std::min(value, 255)); + value = clamp(value, 0, 255); if (m_input) { m_input->setLuminanceValue(value); } diff --git a/src/platform/qt/utils.h b/src/platform/qt/utils.h index 31a883a51..dfab510ed 100644 --- a/src/platform/qt/utils.h +++ b/src/platform/qt/utils.h @@ -11,6 +11,8 @@ #include #include +#include + namespace QGBA { QString niceSizeFormat(size_t filesize); @@ -45,4 +47,13 @@ inline QRect clampSize(const QSize& ref, const QSize& size, bool aspectRatio, bo return QRect(origin, ds); } +#if __cplusplus >= 201703L +using std::clamp; +#else +template +constexpr const T& clamp(const T& v, const T& lo, const T& hi) { + return std::max(lo, std::min(hi, v)); +} +#endif + } From ffa5e65856c5950a26b3aedd2cc35d7f2f5041dc Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 16 Jan 2021 01:04:56 -0800 Subject: [PATCH 17/40] Qt: Clean up sign warnings --- src/platform/qt/AudioDevice.cpp | 14 ++++++------- src/platform/qt/AudioProcessorSDL.cpp | 2 +- src/platform/qt/LoadSaveState.cpp | 2 +- src/platform/qt/MapView.cpp | 4 ++-- src/platform/qt/MemoryModel.cpp | 29 ++++++++++++++------------- src/platform/qt/MemoryView.cpp | 2 +- src/platform/qt/ObjView.cpp | 6 +++--- src/platform/qt/PaletteView.cpp | 2 +- 8 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/platform/qt/AudioDevice.cpp b/src/platform/qt/AudioDevice.cpp index af6bc6e01..9baf12712 100644 --- a/src/platform/qt/AudioDevice.cpp +++ b/src/platform/qt/AudioDevice.cpp @@ -40,20 +40,18 @@ void AudioDevice::setInput(mCoreThread* input) { } qint64 AudioDevice::readData(char* data, qint64 maxSize) { - if (maxSize > 0xFFFFFFFFLL) { - maxSize = 0xFFFFFFFFLL; - } - if (!m_context->core) { LOG(QT, WARN) << tr("Audio device is missing its core"); return 0; } + maxSize /= sizeof(GBAStereoSample); mCoreSyncLockAudio(&m_context->impl->sync); - int available = blip_samples_avail(m_context->core->getAudioChannel(m_context->core, 0)); - if (available > maxSize / sizeof(GBAStereoSample)) { - available = maxSize / sizeof(GBAStereoSample); - } + int available = std::min({ + blip_samples_avail(m_context->core->getAudioChannel(m_context->core, 0)), + maxSize, + std::numeric_limits::max() + }); blip_read_samples(m_context->core->getAudioChannel(m_context->core, 0), &reinterpret_cast(data)->left, available, true); blip_read_samples(m_context->core->getAudioChannel(m_context->core, 1), &reinterpret_cast(data)->right, available, true); mCoreSyncConsumeAudio(&m_context->impl->sync); diff --git a/src/platform/qt/AudioProcessorSDL.cpp b/src/platform/qt/AudioProcessorSDL.cpp index 8682ded58..bf0a5dbdd 100644 --- a/src/platform/qt/AudioProcessorSDL.cpp +++ b/src/platform/qt/AudioProcessorSDL.cpp @@ -52,7 +52,7 @@ void AudioProcessorSDL::pause() { void AudioProcessorSDL::setBufferSamples(int samples) { AudioProcessor::setBufferSamples(samples); - if (m_audio.samples != samples) { + if (m_audio.samples != static_cast(samples)) { m_audio.samples = samples; if (m_audio.core) { mSDLDeinitAudio(&m_audio); diff --git a/src/platform/qt/LoadSaveState.cpp b/src/platform/qt/LoadSaveState.cpp index 78c58c2d4..4bcae6175 100644 --- a/src/platform/qt/LoadSaveState.cpp +++ b/src/platform/qt/LoadSaveState.cpp @@ -200,7 +200,7 @@ void LoadSaveState::loadState(int slot) { unsigned width, height; thread->core->desiredVideoDimensions(thread->core, &width, &height); mStateExtdataItem item; - if (mStateExtdataGet(&extdata, EXTDATA_SCREENSHOT, &item) && item.size >= width * height * 4) { + if (mStateExtdataGet(&extdata, EXTDATA_SCREENSHOT, &item) && item.size >= static_cast(width * height * 4)) { stateImage = QImage((uchar*) item.data, width, height, QImage::Format_ARGB32).rgbSwapped(); } diff --git a/src/platform/qt/MapView.cpp b/src/platform/qt/MapView.cpp index ec89a2dfc..be709a8f9 100644 --- a/src/platform/qt/MapView.cpp +++ b/src/platform/qt/MapView.cpp @@ -109,10 +109,10 @@ MapView::MapView(std::shared_ptr controller, QWidget* parent) } void MapView::selectMap(int map) { - if (map >= mMapCacheSetSize(&m_cacheSet->maps)) { + if (map == m_map || map < 0) { return; } - if (map == m_map) { + if (static_cast(map) >= mMapCacheSetSize(&m_cacheSet->maps)) { return; } m_map = map; diff --git a/src/platform/qt/MemoryModel.cpp b/src/platform/qt/MemoryModel.cpp index e58ec4574..b8793a1e1 100644 --- a/src/platform/qt/MemoryModel.cpp +++ b/src/platform/qt/MemoryModel.cpp @@ -347,7 +347,7 @@ void MemoryModel::paintEvent(QPaintEvent*) { int height = (viewport()->size().height() - m_cellHeight) / m_cellHeight; for (int y = 0; y < height; ++y) { int yp = m_cellHeight * y + m_margins.top(); - if ((y + m_top) * 16 >= m_size) { + if ((y + m_top) * 16U >= m_size) { break; } QString data; @@ -673,34 +673,35 @@ void MemoryModel::adjustCursor(int adjust, bool shift) { } int cursorPosition = m_top; if (shift) { + uint32_t absolute; if (m_selectionAnchor == m_selection.first) { if (adjust < 0 && m_base - adjust > m_selection.second) { - adjust = m_base - m_selection.second + m_align; + absolute = m_base - m_selection.second + m_align; } else if (adjust > 0 && m_selection.second + adjust >= m_base + m_size) { - adjust = m_base + m_size - m_selection.second; + absolute = m_base + m_size - m_selection.second; } - adjust += m_selection.second; - if (adjust <= m_selection.first) { + absolute += m_selection.second; + if (absolute <= m_selection.first) { m_selection.second = m_selection.first + m_align; - m_selection.first = adjust - m_align; + m_selection.first = absolute - m_align; cursorPosition = m_selection.first; } else { - m_selection.second = adjust; + m_selection.second = absolute; cursorPosition = m_selection.second - m_align; } } else { if (adjust < 0 && m_base - adjust > m_selection.first) { - adjust = m_base - m_selection.first; + absolute = m_base - m_selection.first; } else if (adjust > 0 && m_selection.first + adjust >= m_base + m_size) { - adjust = m_base + m_size - m_selection.first - m_align; + absolute = m_base + m_size - m_selection.first - m_align; } - adjust += m_selection.first; - if (adjust >= m_selection.second) { + absolute += m_selection.first; + if (absolute >= m_selection.second) { m_selection.first = m_selection.second - m_align; - m_selection.second = adjust + m_align; - cursorPosition = adjust; + m_selection.second = absolute + m_align; + cursorPosition = absolute; } else { - m_selection.first = adjust; + m_selection.first = absolute; cursorPosition = m_selection.first; } } diff --git a/src/platform/qt/MemoryView.cpp b/src/platform/qt/MemoryView.cpp index cf111c9c3..c740b4dca 100644 --- a/src/platform/qt/MemoryView.cpp +++ b/src/platform/qt/MemoryView.cpp @@ -256,7 +256,7 @@ void MemoryView::updateSelection(uint32_t start, uint32_t end) { } void MemoryView::updateStatus() { - int align = m_ui.hexfield->alignment(); + unsigned align = m_ui.hexfield->alignment(); mCore* core = m_controller->thread()->core; QByteArray selection(m_ui.hexfield->serialize()); QString text(m_ui.hexfield->decodeText(selection)); diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index 1dfc70935..7b04523ae 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -133,8 +133,8 @@ void ObjView::updateTilesGBA(bool force) { mTileCache* tileCache = mTileCacheSetGetPointer(&m_cacheSet->tiles, newInfo.paletteSet); int i = 0; - for (int y = 0; y < newInfo.height; ++y) { - for (int x = 0; x < newInfo.width; ++x, ++i, ++tile, ++tileBase) { + for (unsigned y = 0; y < newInfo.height; ++y) { + for (unsigned x = 0; x < newInfo.width; ++x, ++i, ++tile, ++tileBase) { const color_t* data = mTileCacheGetTileIfDirty(tileCache, &m_tileStatus[16 * tileBase], tile, newInfo.paletteId); if (data) { m_ui.tiles->setTile(i, data); @@ -224,7 +224,7 @@ void ObjView::updateTilesGB(bool force) { int i = 0; m_ui.tile->setPalette(newInfo.paletteId); - for (int y = 0; y < newInfo.height; ++y, ++i) { + for (unsigned y = 0; y < newInfo.height; ++y, ++i) { unsigned t = tile + i; const color_t* data = mTileCacheGetTileIfDirty(tileCache, &m_tileStatus[8 * t], t, newInfo.paletteId); if (data) { diff --git a/src/platform/qt/PaletteView.cpp b/src/platform/qt/PaletteView.cpp index f72507ea6..d5776eac6 100644 --- a/src/platform/qt/PaletteView.cpp +++ b/src/platform/qt/PaletteView.cpp @@ -69,7 +69,7 @@ void PaletteView::updatePalette() { return; } const uint16_t* palette; - size_t count; + int count; switch (m_controller->platform()) { #ifdef M_CORE_GBA case mPLATFORM_GBA: From 79c40d9359dae14defd753caf4068bf3798052ec Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Jan 2021 14:45:13 -0800 Subject: [PATCH 18/40] Core: Fix portable working directory on Windows (fixes #2009) --- src/core/config.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/core/config.c b/src/core/config.c index b25ba9317..5a9599c4e 100644 --- a/src/core/config.c +++ b/src/core/config.c @@ -212,14 +212,20 @@ void mCoreConfigDirectory(char* out, size_t outLength) { } } #ifdef _WIN32 - wchar_t wpath[MAX_PATH]; - wchar_t wprojectName[MAX_PATH]; - wchar_t* home; + WCHAR wpath[MAX_PATH]; + WCHAR wprojectName[MAX_PATH]; + WCHAR* home; MultiByteToWideChar(CP_UTF8, 0, projectName, -1, wprojectName, MAX_PATH); SHGetKnownFolderPath(&FOLDERID_RoamingAppData, 0, NULL, &home); StringCchPrintfW(wpath, MAX_PATH, L"%ws\\%ws", home, wprojectName); CoTaskMemFree(home); CreateDirectoryW(wpath, NULL); + if (PATH_SEP[0] != '\\') { + WCHAR* pathSep; + for (pathSep = wpath; pathSep = wcschr(pathSep, L'\\');) { + pathSep[0] = PATH_SEP[0]; + } + } WideCharToMultiByte(CP_UTF8, 0, wpath, -1, out, outLength, 0, 0); #elif defined(PSP2) snprintf(out, outLength, "ux0:data/%s", projectName); @@ -256,8 +262,14 @@ void mCoreConfigPortablePath(char* out, size_t outLength) { HMODULE hModule = GetModuleHandleW(NULL); GetModuleFileNameW(hModule, wpath, MAX_PATH); PathRemoveFileSpecW(wpath); + if (PATH_SEP[0] != '\\') { + WCHAR* pathSep; + for (pathSep = wpath; pathSep = wcschr(pathSep, L'\\');) { + pathSep[0] = PATH_SEP[0]; + } + } WideCharToMultiByte(CP_UTF8, 0, wpath, -1, out, outLength, 0, 0); - StringCchCatA(out, outLength, "\\portable.ini"); + StringCchCatA(out, outLength, PATH_SEP "portable.ini"); #elif defined(PSP2) || defined(GEKKO) || defined(__SWITCH__) || defined(_3DS) out[0] = '\0'; #else From 3b1b890f3e6790adc9e3ef987cd3db7b1e3d78b4 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Jan 2021 19:06:04 -0800 Subject: [PATCH 19/40] GBA Memory: Fix Matrix memory bounding --- src/gba/matrix.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gba/matrix.c b/src/gba/matrix.c index c9c12ff9a..fb72e052f 100644 --- a/src/gba/matrix.c +++ b/src/gba/matrix.c @@ -11,6 +11,8 @@ #include #include +#define MAPPING_MASK (GBA_MATRIX_MAPPINGS_MAX - 1) + static void _remapMatrix(struct GBA* gba) { if (gba->memory.matrix.vaddr & 0xFFFFE1FF) { mLOG(GBA_MEM, ERROR, "Invalid Matrix mapping: %08X", gba->memory.matrix.vaddr); @@ -24,11 +26,11 @@ static void _remapMatrix(struct GBA* gba) { mLOG(GBA_MEM, ERROR, "Invalid Matrix mapping end: %08X", gba->memory.matrix.vaddr + gba->memory.matrix.size); return; } - int start = (gba->memory.matrix.vaddr >> 9) & 0x1F; - int size = (gba->memory.matrix.size >> 9) & 0x1F; + int start = gba->memory.matrix.vaddr >> 9; + int size = (gba->memory.matrix.size >> 9) & MAPPING_MASK; int i; for (i = 0; i < size; ++i) { - gba->memory.matrix.mappings[start + i] = gba->memory.matrix.paddr + (i << 9); + gba->memory.matrix.mappings[(start + i) & MAPPING_MASK] = gba->memory.matrix.paddr + (i << 9); } gba->romVf->seek(gba->romVf, gba->memory.matrix.paddr, SEEK_SET); From 561c253ff8b670ab48d94403041718d043e915cb Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Jan 2021 20:25:19 -0800 Subject: [PATCH 20/40] Qt: Clean up memory model in ConfigController --- src/platform/qt/ConfigController.cpp | 19 +++++++++---------- src/platform/qt/ConfigController.h | 9 +++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/platform/qt/ConfigController.cpp b/src/platform/qt/ConfigController.cpp index 6b9670553..74861027d 100644 --- a/src/platform/qt/ConfigController.cpp +++ b/src/platform/qt/ConfigController.cpp @@ -23,7 +23,7 @@ ConfigOption::ConfigOption(const QString& name, QObject* parent) void ConfigOption::connect(std::function slot, QObject* parent) { m_slots[parent] = slot; - QObject::connect(parent, &QObject::destroyed, [this, slot, parent]() { + QObject::connect(parent, &QObject::destroyed, this, [this, parent]() { m_slots.remove(parent); }); } @@ -37,10 +37,10 @@ Action* ConfigOption::addValue(const QString& text, const QVariant& value, Actio if (actions) { action = actions->addAction(text, name, function, menu); } else { - action = new Action(function, name, text); + action = new Action(function, name, text, this); } action->setExclusive(); - QObject::connect(action, &QObject::destroyed, [this, action, value]() { + QObject::connect(action, &QObject::destroyed, this, [this, action, value]() { m_actions.removeAll(std::make_pair(action, value)); }); m_actions.append(std::make_pair(action, value)); @@ -59,10 +59,10 @@ Action* ConfigOption::addBoolean(const QString& text, ActionMapper* actions, con if (actions) { action = actions->addBooleanAction(text, m_name, function, menu); } else { - action = new Action(function, m_name, text); + action = new Action(function, m_name, text, this); } - QObject::connect(action, &QObject::destroyed, [this, action]() { + QObject::connect(action, &QObject::destroyed, this, [this, action]() { m_actions.removeAll(std::make_pair(action, 1)); }); m_actions.append(std::make_pair(action, 1)); @@ -103,7 +103,7 @@ ConfigController::ConfigController(QObject* parent) QString fileName = configDir(); fileName.append(QDir::separator()); fileName.append("qt.ini"); - m_settings = new QSettings(fileName, QSettings::IniFormat, this); + m_settings = std::make_unique(fileName, QSettings::IniFormat); mCoreConfigInit(&m_config, PORT); @@ -150,7 +150,7 @@ ConfigOption* ConfigController::addOption(const char* key) { } ConfigOption* newOption = new ConfigOption(optionName, this); m_optionSet[optionName] = newOption; - connect(newOption, &ConfigOption::valueChanged, [this, key](const QVariant& value) { + connect(newOption, &ConfigOption::valueChanged, this, [this, key](const QVariant& value) { setOption(key, value); }); return newOption; @@ -292,12 +292,11 @@ void ConfigController::makePortable() { QString fileName(configDir()); fileName.append(QDir::separator()); fileName.append("qt.ini"); - QSettings* settings2 = new QSettings(fileName, QSettings::IniFormat, this); + auto settings2 = std::make_unique(fileName, QSettings::IniFormat); for (const auto& key : m_settings->allKeys()) { settings2->setValue(key, m_settings->value(key)); } - delete m_settings; - m_settings = settings2; + m_settings = std::move(settings2); } bool ConfigController::isPortable() { diff --git a/src/platform/qt/ConfigController.h b/src/platform/qt/ConfigController.h index 7f2943fad..df7cb816d 100644 --- a/src/platform/qt/ConfigController.h +++ b/src/platform/qt/ConfigController.h @@ -7,12 +7,13 @@ #include "Override.h" -#include +#include #include #include #include #include +#include #include #include @@ -53,7 +54,7 @@ signals: void valueChanged(const QVariant& value); private: - QMap> m_slots; + QHash> m_slots; QList> m_actions; QString m_name; }; @@ -110,8 +111,8 @@ private: mCoreConfig m_config; mCoreOptions m_opts{}; - QMap m_optionSet; - QSettings* m_settings; + QHash m_optionSet; + std::unique_ptr m_settings; static QString s_configDir; }; From 302b1570fa81ffea0243a71abd51ac67d54d37ae Mon Sep 17 00:00:00 2001 From: Moucalune Date: Wed, 6 Jan 2021 04:06:35 +0000 Subject: [PATCH 21/40] Translated using Weblate (Portuguese (Brazil)) Currently translated at 97.4% (910 of 934 strings) Translation: mGBA/mGBA Qt Translate-URL: https://hosted.weblate.org/projects/mgba/mgba-qt/pt_BR/ --- src/platform/qt/ts/mgba-pt_BR.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/qt/ts/mgba-pt_BR.ts b/src/platform/qt/ts/mgba-pt_BR.ts index 51bc94bb2..be8de3974 100644 --- a/src/platform/qt/ts/mgba-pt_BR.ts +++ b/src/platform/qt/ts/mgba-pt_BR.ts @@ -1127,7 +1127,7 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Copy - Copiar + Copiar @@ -3718,7 +3718,7 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. ZIP archive (*.zip) - + Arquivo ZIP (*.zip) @@ -4721,7 +4721,7 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Save - Salvar + Salvar From b60bb5776b882e20ccc29874afa592babae80c4a Mon Sep 17 00:00:00 2001 From: StarFang208 Date: Mon, 18 Jan 2021 14:38:48 +0000 Subject: [PATCH 22/40] Translated using Weblate (Italian) Currently translated at 99.4% (929 of 934 strings) Translation: mGBA/mGBA Qt Translate-URL: https://hosted.weblate.org/projects/mgba/mgba-qt/it/ --- src/platform/qt/ts/mgba-it.ts | 93 ++++++++++++++++++++--------------- 1 file changed, 54 insertions(+), 39 deletions(-) diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index 4484e8999..6fb781bd2 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -269,7 +269,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Record GIF/WebP/APNG - + Registra GIF/WebP/APNG @@ -284,7 +284,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. WebP - + WebP @@ -330,12 +330,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Location - + Posizione Platform - + Piattaforma @@ -345,7 +345,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. CRC32 - CRC32: {32?} + CRC32 @@ -983,7 +983,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. VBA bug compatibility mode - + Modalità compatibilità bug VBA @@ -1208,7 +1208,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Can't yank pack in unexpected platform! - + Non riesco a strappare il pacchetto in una piattaforma inaspettata! @@ -1236,7 +1236,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Failed to open save file. Is the save directory writable? - + Impossibile aprire il file di salvataggio. La directory di salvataggio è scrivibile? @@ -1269,7 +1269,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Objwin - + Objwin @@ -1284,7 +1284,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Frame - + Inquadratura @@ -1381,7 +1381,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Graphics Interchange Format (*.gif);;WebP ( *.webp);;Animated Portable Network Graphics (*.png *.apng) - + Formato di intercambio delle grafiche (*.gif);; WebP ( *.webp);; Grafica di rete portatile animata (*.png *.apng) @@ -3232,6 +3232,21 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. OAM order + + + 4.19MHz + 4,19 MHz + + + + 8.38MHz + 8,38 MHz + + + + 16.78MHz + 16,78 MHz + x coordinate sorting @@ -3636,17 +3651,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Official MBCs - + MBC ufficiali Licensed MBCs - + MBC con licenza Unlicensed MBCs - + MBC senza licenza @@ -3713,12 +3728,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Bug report archive - + Archivio delle segnalazioni di bug ZIP archive (*.zip) - + Archivio ZIP (*.zip) @@ -3987,12 +4002,12 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - Questo gioco utilizza una chiamata BIOS non implementata. Utilizza il BIOS ufficiale per una migliore esperienza + Questo gioco utilizza una chiamata BIOS non implementata. Utilizza il BIOS ufficiale per una migliore esperienza. Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Impossibile creare un dispositivo di visualizzazione appropriato, tornando alla visualizzazione software. I giochi possono funzionare lentamente, specialmente con finestre più grandi. @@ -4143,7 +4158,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Report bug... - + Segnala bug... @@ -4308,7 +4323,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Record GIF/WebP/APNG... - + Registra GIF / WebP / APNG ... @@ -4328,7 +4343,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. View &logs... - Visualizza registri... (&L) + Visualizza (&Logs) &registri... @@ -4368,7 +4383,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Could not start game. - NOn è stato possibile avviare il gioco + Non è stato possibile avviare il gioco. @@ -4469,7 +4484,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Record A/V... - Registra A/V + Registra A/V... @@ -4529,7 +4544,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Stop debug video log - Ferma debug video log... + Ferma debug video log @@ -4706,17 +4721,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Generate Bug Report - + Genera segnalazione bug <html><head/><body><p>To file a bug report, please first generate a report file to attach to the bug report you're about to file. It is recommended that you include the save files, as these often help with debugging issues. This will collect some information about the version of {projectName} you're running, your configuration, your computer, and the game you currently have open (if any). Once this collection is completed you can review all of the information gathered below and save it to a zip file. The collection will automatically attempt to redact any personal information, such as your username if it's in any of the paths gathered, but just in case you can edit it afterwards. After you have generated and saved it, please click the button below or go to <a href="https://mgba.io/i/"><span style=" text-decoration: underline; color:#2980b9;">mgba.io/i</span></a> to file the bug report on GitHub. Make sure to attach the report you generated!</p></body></html> - + <html> <head/> <body> <p> Per presentare una segnalazione di bug, generare innanzitutto un file di report da allegare alla segnalazione di bug che si sta per presentare. Si consiglia di includere i file di salvataggio, poiché spesso aiutano con i problemi di debug. Verranno raccolte alcune informazioni sulla versione di {projectName} in esecuzione, sulla configurazione, sul computer e sul gioco attualmente aperto (se presente). Una volta completata questa raccolta è possibile esaminare tutte le informazioni raccolte di seguito e salvarle in un file zip. La raccolta tenterà automaticamente di redigere qualsiasi informazione personale, ad esempio il tuo nome utente se si trova in uno dei percorsi raccolti, ma nel caso in cui tu possa modificarla in seguito. Dopo averlo generato e salvato, fare clic sul pulsante sottostante o passare a <a href="https://mgba.io/i/"><span style=" text-decoration: underline; color:#2980b9;">mgba.io/i</span></a> per presentare la segnalazione di bug su GitHub. Assicurarsi di allegare il report generato! </p> </body> </html> Generate report - + Genera rapporto @@ -4726,17 +4741,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Open issue list in browser - + Apri l'elenco dei problemi nel browser Include save file - + Includi file di salvataggio Create and include savestate - + Creare e includere lo stato di salvataggio @@ -4952,7 +4967,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Fast forward volume: - Volume modalità accelerata + Volume modalità accelerata: @@ -5023,7 +5038,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Dynamically update window title - + Aggiorna dinamicamente il titolo della finestra @@ -5049,7 +5064,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Super Game Boy/Game Boy Color model: - + Modello Super Game Boy / Game Boy Color: @@ -5059,7 +5074,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Show filename instead of ROM name in title bar - + Mostra nome file anziché nome ROM nella barra del titolo @@ -5069,7 +5084,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Enable Game Boy Player features by default - + Abilitare le funzionalità di Game Boy Player per impostazione predefinita @@ -5129,7 +5144,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Super Game Boy model: - Modello Super GameBoy + Modello Super GameBoy: @@ -5164,17 +5179,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Game Boy-only model: - + Modello solo per Game Boy: Game Boy Color-only model: - + Modello solo per Game Boy Color: Game Boy/Game Boy Color model: - + Modello Game Boy / Game Boy Color: From 40c3fc63ccad3ab59b6b37399cd6fe8ea1de3f3e Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 23 Jan 2021 20:45:06 -0800 Subject: [PATCH 23/40] Qt: Fix mgba-it translation --- src/platform/qt/ts/mgba-it.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index 6fb781bd2..0553f6f27 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -3232,21 +3232,6 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. OAM order - - - 4.19MHz - 4,19 MHz - - - - 8.38MHz - 8,38 MHz - - - - 16.78MHz - 16,78 MHz - x coordinate sorting From 6154ed91cb48a8ad25b9986ea03553f1e27351c1 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 26 Jan 2021 02:14:53 -0800 Subject: [PATCH 24/40] Qt: Don't use a static QFont --- src/platform/qt/AssetInfo.cpp | 2 +- src/platform/qt/AssetTile.cpp | 2 +- src/platform/qt/CheatsModel.cpp | 2 +- src/platform/qt/GBAApp.cpp | 4 +--- src/platform/qt/GBAApp.h | 4 ++-- src/platform/qt/IOViewer.cpp | 2 +- src/platform/qt/MemoryModel.cpp | 2 +- src/platform/qt/MessagePainter.cpp | 2 +- src/platform/qt/ObjView.cpp | 2 +- src/platform/qt/PaletteView.cpp | 2 +- src/platform/qt/RegisterView.cpp | 2 +- 11 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/platform/qt/AssetInfo.cpp b/src/platform/qt/AssetInfo.cpp index aaab59a42..22f1a464e 100644 --- a/src/platform/qt/AssetInfo.cpp +++ b/src/platform/qt/AssetInfo.cpp @@ -20,7 +20,7 @@ void AssetInfo::addCustomProperty(const QString& id, const QString& visibleName) QHBoxLayout* newLayout = new QHBoxLayout; newLayout->addWidget(new QLabel(visibleName)); QLabel* value = new QLabel; - value->setFont(GBAApp::monospaceFont()); + value->setFont(GBAApp::app()->monospaceFont()); value->setAlignment(Qt::AlignRight); newLayout->addWidget(value); m_customProperties[id] = value; diff --git a/src/platform/qt/AssetTile.cpp b/src/platform/qt/AssetTile.cpp index cfc9ea56f..d7bc30c14 100644 --- a/src/platform/qt/AssetTile.cpp +++ b/src/platform/qt/AssetTile.cpp @@ -31,7 +31,7 @@ AssetTile::AssetTile(QWidget* parent) connect(m_ui.preview, &Swatch::indexPressed, this, &AssetTile::selectColor); - const QFont font = GBAApp::monospaceFont(); + const QFont font = GBAApp::app()->monospaceFont(); m_ui.tileId->setFont(font); m_ui.paletteId->setFont(font); diff --git a/src/platform/qt/CheatsModel.cpp b/src/platform/qt/CheatsModel.cpp index 419e3cc26..3694424d8 100644 --- a/src/platform/qt/CheatsModel.cpp +++ b/src/platform/qt/CheatsModel.cpp @@ -20,7 +20,7 @@ CheatsModel::CheatsModel(mCheatDevice* device, QObject* parent) : QAbstractItemModel(parent) , m_device(device) { - m_font = GBAApp::monospaceFont(); + m_font = GBAApp::app()->monospaceFont(); } QVariant CheatsModel::data(const QModelIndex& index, int role) const { diff --git a/src/platform/qt/GBAApp.cpp b/src/platform/qt/GBAApp.cpp index f6a0f96e8..19b6010fd 100644 --- a/src/platform/qt/GBAApp.cpp +++ b/src/platform/qt/GBAApp.cpp @@ -36,14 +36,12 @@ static GBAApp* g_app = nullptr; mLOG_DEFINE_CATEGORY(QT, "Qt", "platform.qt"); -QFont GBAApp::s_monospace; - GBAApp::GBAApp(int& argc, char* argv[], ConfigController* config) : QApplication(argc, argv) , m_configController(config) + , m_monospace(QFontDatabase::systemFont(QFontDatabase::FixedFont)) { g_app = this; - s_monospace = QFontDatabase::systemFont(QFontDatabase::FixedFont); #ifdef BUILD_SDL SDL_Init(SDL_INIT_NOPARACHUTE); diff --git a/src/platform/qt/GBAApp.h b/src/platform/qt/GBAApp.h index 8f2f1dd6f..84779fca0 100644 --- a/src/platform/qt/GBAApp.h +++ b/src/platform/qt/GBAApp.h @@ -57,7 +57,7 @@ public: static QString dataDir(); - static QFont monospaceFont() { return s_monospace; } + QFont monospaceFont() { return m_monospace; } QList windows() { return m_windows; } Window* newWindow(); @@ -114,7 +114,7 @@ private: QThreadPool m_workerThreads; qint64 m_nextJob = 1; - static QFont s_monospace; + QFont m_monospace; NoIntroDB* m_db = nullptr; }; diff --git a/src/platform/qt/IOViewer.cpp b/src/platform/qt/IOViewer.cpp index 3729df2f2..07f5438fb 100644 --- a/src/platform/qt/IOViewer.cpp +++ b/src/platform/qt/IOViewer.cpp @@ -1594,7 +1594,7 @@ IOViewer::IOViewer(std::shared_ptr controller, QWidget* parent) m_ui.regSelect->addItem("0x" + QString("%1: %2").arg((i << m_width) + m_base, 4, 16, QChar('0')).toUpper().arg(reg), i << m_width); } - const QFont font = GBAApp::monospaceFont(); + const QFont font = GBAApp::app()->monospaceFont(); m_ui.regValue->setFont(font); connect(m_ui.buttonBox, &QDialogButtonBox::clicked, this, &IOViewer::buttonPressed); diff --git a/src/platform/qt/MemoryModel.cpp b/src/platform/qt/MemoryModel.cpp index b8793a1e1..d0f3df1f6 100644 --- a/src/platform/qt/MemoryModel.cpp +++ b/src/platform/qt/MemoryModel.cpp @@ -28,7 +28,7 @@ using namespace QGBA; MemoryModel::MemoryModel(QWidget* parent) : QAbstractScrollArea(parent) { - m_font = GBAApp::monospaceFont(); + m_font = GBAApp::app()->monospaceFont(); #ifdef Q_OS_MAC m_font.setPointSize(12); #else diff --git a/src/platform/qt/MessagePainter.cpp b/src/platform/qt/MessagePainter.cpp index fecff4917..15ab748aa 100644 --- a/src/platform/qt/MessagePainter.cpp +++ b/src/platform/qt/MessagePainter.cpp @@ -16,7 +16,7 @@ using namespace QGBA; MessagePainter::MessagePainter(QObject* parent) : QObject(parent) { - m_messageFont = GBAApp::monospaceFont(); + m_messageFont = GBAApp::app()->monospaceFont(); m_messageFont.setPixelSize(13); connect(&m_messageTimer, &QTimer::timeout, this, &MessagePainter::clearMessage); m_messageTimer.setSingleShot(true); diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index 7b04523ae..39e38892a 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -33,7 +33,7 @@ ObjView::ObjView(std::shared_ptr controller, QWidget* parent) m_ui.setupUi(this); m_ui.tile->setController(controller); - const QFont font = GBAApp::monospaceFont(); + const QFont font = GBAApp::app()->monospaceFont(); m_ui.x->setFont(font); m_ui.y->setFont(font); diff --git a/src/platform/qt/PaletteView.cpp b/src/platform/qt/PaletteView.cpp index d5776eac6..60b67a90a 100644 --- a/src/platform/qt/PaletteView.cpp +++ b/src/platform/qt/PaletteView.cpp @@ -47,7 +47,7 @@ PaletteView::PaletteView(std::shared_ptr controller, QWidget* pa m_ui.selected->setDimensions(QSize(1, 1)); updatePalette(); - const QFont font = GBAApp::monospaceFont(); + const QFont font = GBAApp::app()->monospaceFont(); m_ui.hexcode->setFont(font); m_ui.value->setFont(font); diff --git a/src/platform/qt/RegisterView.cpp b/src/platform/qt/RegisterView.cpp index e712bf95a..49b44870b 100644 --- a/src/platform/qt/RegisterView.cpp +++ b/src/platform/qt/RegisterView.cpp @@ -74,7 +74,7 @@ RegisterView::RegisterView(std::shared_ptr controller, QWidget* void RegisterView::addRegisters(const QStringList& names) { QFormLayout* form = static_cast(layout()); - const QFont font = GBAApp::monospaceFont(); + const QFont font = GBAApp::app()->monospaceFont(); for (const auto& reg : names) { QLabel* value = new QLabel; value->setTextInteractionFlags(Qt::TextSelectableByMouse); From b1a06ed52bd8f9db00dcd722198deedd8a184f69 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 27 Jan 2021 20:24:26 -0800 Subject: [PATCH 25/40] Cheats: Fix indirect write cheats (fixes #2026) --- CHANGES | 1 + src/core/cheats.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 413f1c41e..8623265ce 100644 --- a/CHANGES +++ b/CHANGES @@ -58,6 +58,7 @@ Emulation fixes: Other fixes: - 3DS: Fix thread cleanup - All: Improve export headers (fixes mgba.io/i/1738) + - Cheats: Fix indirect write cheats (fixes mgba.io/i/2026) - CMake: Fix build with downstream minizip that exports incompatible symbols - CMake: Link with correct OpenGL library (fixes mgba.io/i/1872) - Core: Ensure ELF regions can be written before trying diff --git a/src/core/cheats.c b/src/core/cheats.c index 8e2e43b05..090883ac2 100644 --- a/src/core/cheats.c +++ b/src/core/cheats.c @@ -666,7 +666,7 @@ void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) { break; case CHEAT_ASSIGN_INDIRECT: value = operand; - address = _readMem(device->p, address + cheat->addressOffset, 4); + address = _readMem(device->p, address, 4) + cheat->addressOffset; performAssignment = true; break; case CHEAT_AND: From 5b8d64b0b5e5b3aa1edac7a98be6cbf471869dd0 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 27 Jan 2021 21:23:45 -0800 Subject: [PATCH 26/40] Qt: Better initial shortcut editor column sizes --- CHANGES | 1 + src/platform/qt/ShortcutView.cpp | 10 ++++++++++ src/platform/qt/ShortcutView.h | 1 + src/platform/qt/ShortcutView.ui | 3 +++ 4 files changed, 15 insertions(+) diff --git a/CHANGES b/CHANGES index 8623265ce..e0c8e9eec 100644 --- a/CHANGES +++ b/CHANGES @@ -124,6 +124,7 @@ Misc: - Qt: Unify monospace font usage - Qt: Add button to jump to log settings - Qt: Use relative paths in portable mode when applicable (fixes mgba.io/i/838) + - Qt: Better initial shortcut editor column sizes - SDL: Fall back to sw blit if OpenGL init fails - Util: Reset vector size on deinit - VFS: Change semantics of VFile.sync on mapped files (fixes mgba.io/i/1730) diff --git a/src/platform/qt/ShortcutView.cpp b/src/platform/qt/ShortcutView.cpp index cf0826006..badd7d5af 100644 --- a/src/platform/qt/ShortcutView.cpp +++ b/src/platform/qt/ShortcutView.cpp @@ -10,6 +10,7 @@ #include "ShortcutController.h" #include "ShortcutModel.h" +#include #include using namespace QGBA; @@ -134,6 +135,15 @@ void ShortcutView::closeEvent(QCloseEvent*) { } } +void ShortcutView::showEvent(QShowEvent*) { + QString longString("Ctrl+Alt+Shift+Tab"); + int width = QFontMetrics(QFont()).width(longString); + QHeaderView* header = m_ui.shortcutTable->header(); + header->resizeSection(0, header->length() - width * 2); + header->resizeSection(1, width); + header->resizeSection(2, width); +} + bool ShortcutView::event(QEvent* event) { if (m_input) { QEvent::Type type = event->type(); diff --git a/src/platform/qt/ShortcutView.h b/src/platform/qt/ShortcutView.h index 340541640..903d365c8 100644 --- a/src/platform/qt/ShortcutView.h +++ b/src/platform/qt/ShortcutView.h @@ -30,6 +30,7 @@ public: protected: virtual bool event(QEvent*) override; virtual void closeEvent(QCloseEvent*) override; + virtual void showEvent(QShowEvent*) override; private slots: void load(const QModelIndex&); diff --git a/src/platform/qt/ShortcutView.ui b/src/platform/qt/ShortcutView.ui index 8b28e4d52..aa20f9a2e 100644 --- a/src/platform/qt/ShortcutView.ui +++ b/src/platform/qt/ShortcutView.ui @@ -16,6 +16,9 @@ + + Qt::ScrollBarAlwaysOn + 120 From 80fb86a930f9f97f339f69e0f960863850176b51 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 30 Jan 2021 16:01:06 -0800 Subject: [PATCH 27/40] Qt: Flesh out VFileDevice more, to avoid leak --- src/platform/qt/VFileDevice.cpp | 11 +++++++++++ src/platform/qt/VFileDevice.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/platform/qt/VFileDevice.cpp b/src/platform/qt/VFileDevice.cpp index 331720fa8..c2eff887c 100644 --- a/src/platform/qt/VFileDevice.cpp +++ b/src/platform/qt/VFileDevice.cpp @@ -91,6 +91,10 @@ VFileDevice::VFileDevice(const QString& filename, QIODevice::OpenMode mode, QObj } } +VFileDevice::~VFileDevice() { + close(); +} + void VFileDevice::close() { if (!m_vf) { return; @@ -117,6 +121,13 @@ VFileDevice& VFileDevice::operator=(VFile* vf) { return *this; } +VFile* VFileDevice::take() { + VFile* vf = m_vf; + m_vf = nullptr; + QIODevice::close(); + return vf; +} + qint64 VFileDevice::readData(char* data, qint64 maxSize) { return m_vf->read(m_vf, data, maxSize); } diff --git a/src/platform/qt/VFileDevice.h b/src/platform/qt/VFileDevice.h index 72f3f1379..b230d14ae 100644 --- a/src/platform/qt/VFileDevice.h +++ b/src/platform/qt/VFileDevice.h @@ -20,6 +20,7 @@ Q_OBJECT public: VFileDevice(VFile* vf = nullptr, QObject* parent = nullptr); VFileDevice(const QString&, QIODevice::OpenMode, QObject* parent = nullptr); + virtual ~VFileDevice(); virtual void close() override; virtual bool seek(qint64 pos) override; @@ -29,6 +30,7 @@ public: VFileDevice& operator=(VFile*); operator VFile*() { return m_vf; } + VFile* take(); static VFile* wrap(QIODevice*, QIODevice::OpenMode); static VFile* wrap(QFileDevice*, QIODevice::OpenMode); From 88212fc2deb72b3ab85313852b0b091edc88403b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 1 Feb 2021 01:53:20 -0800 Subject: [PATCH 28/40] Core: Allow deserializing PNG savestates with ignoring extdata --- src/core/serialize.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/serialize.c b/src/core/serialize.c index f965418e5..446152e04 100644 --- a/src/core/serialize.c +++ b/src/core/serialize.c @@ -283,7 +283,11 @@ static void* _loadPNGState(struct mCore* core, struct VFile* vf, struct mStateEx success = success && PNGReadFooter(png, end); PNGReadClose(png, info, end); - if (success) { + if (!success) { + free(pixels); + mappedMemoryFree(state, stateSize); + return NULL; + } else if (extdata) { struct mStateExtdataItem item = { .size = width * height * 4, .data = pixels, @@ -292,8 +296,6 @@ static void* _loadPNGState(struct mCore* core, struct VFile* vf, struct mStateEx mStateExtdataPut(extdata, EXTDATA_SCREENSHOT, &item); } else { free(pixels); - mappedMemoryFree(state, stateSize); - return 0; } return state; } From 28504b308e9b35068661dcc9eb86bbbe830b6ef7 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 1 Feb 2021 01:53:55 -0800 Subject: [PATCH 29/40] Qt: Cleaner byte size formatting --- src/platform/qt/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/qt/utils.cpp b/src/platform/qt/utils.cpp index 94b230361..31845e140 100644 --- a/src/platform/qt/utils.cpp +++ b/src/platform/qt/utils.cpp @@ -11,16 +11,16 @@ namespace QGBA { QString niceSizeFormat(size_t filesize) { double size = filesize; - QString unit = "B"; + QString unit = QObject::tr("%1 byte"); if (size >= 1024.0) { size /= 1024.0; - unit = "kiB"; + unit = QObject::tr("%1 kiB"); } if (size >= 1024.0) { size /= 1024.0; - unit = "MiB"; + unit = QObject::tr("%1 MiB"); } - return QString("%0 %1").arg(size, 0, 'f', 1).arg(unit); + return unit.arg(size, 0, 'f', int(size * 10) % 10 ? 1 : 0); } QString nicePlatformFormat(mPlatform platform) { switch (platform) { From df082b46d9c9d0a31edc29d05f9c93fd5b17197e Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 1 Feb 2021 01:54:19 -0800 Subject: [PATCH 30/40] Utils: Make sure to seek to start of file when doing PNG check --- src/util/png-io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/png-io.c b/src/util/png-io.c index 530ea8f0b..6c25f399c 100644 --- a/src/util/png-io.c +++ b/src/util/png-io.c @@ -210,6 +210,7 @@ void PNGWriteClose(png_structp png, png_infop info) { bool isPNG(struct VFile* source) { png_byte header[PNG_HEADER_BYTES]; + source->seek(source, 0, SEEK_SET); if (source->read(source, header, PNG_HEADER_BYTES) < PNG_HEADER_BYTES) { return false; } From 517aa353caaa6484a2607d93265c4aafc14997ae Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 1 Feb 2021 01:55:06 -0800 Subject: [PATCH 31/40] Qt: Add creating a VFileDevice from a QByteArray --- src/platform/qt/VFileDevice.cpp | 7 +++++++ src/platform/qt/VFileDevice.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/platform/qt/VFileDevice.cpp b/src/platform/qt/VFileDevice.cpp index c2eff887c..bce0ed830 100644 --- a/src/platform/qt/VFileDevice.cpp +++ b/src/platform/qt/VFileDevice.cpp @@ -91,6 +91,13 @@ VFileDevice::VFileDevice(const QString& filename, QIODevice::OpenMode mode, QObj } } +VFileDevice::VFileDevice(const QByteArray& mem, QObject* parent) + : QIODevice(parent) + , m_vf(VFileMemChunk(mem.constData(), mem.size())) +{ + setOpenMode(QIODevice::ReadWrite); +} + VFileDevice::~VFileDevice() { close(); } diff --git a/src/platform/qt/VFileDevice.h b/src/platform/qt/VFileDevice.h index b230d14ae..9df1aff93 100644 --- a/src/platform/qt/VFileDevice.h +++ b/src/platform/qt/VFileDevice.h @@ -19,6 +19,7 @@ Q_OBJECT public: VFileDevice(VFile* vf = nullptr, QObject* parent = nullptr); + VFileDevice(const QByteArray& mem, QObject* parent = nullptr); VFileDevice(const QString&, QIODevice::OpenMode, QObject* parent = nullptr); virtual ~VFileDevice(); From 2498f85cda6a8d3e2b4904a920b84d2cc9ffb02a Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 3 Feb 2021 21:08:52 -0800 Subject: [PATCH 32/40] VFS: Fix build with minizip --- include/mgba-util/vfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mgba-util/vfs.h b/include/mgba-util/vfs.h index 8100541e0..c9faded6e 100644 --- a/include/mgba-util/vfs.h +++ b/include/mgba-util/vfs.h @@ -79,7 +79,7 @@ struct VFile* VFileFIFO(struct CircleBuffer* backing); struct VDir* VDirOpen(const char* path); struct VDir* VDirOpenArchive(const char* path); -#if defined(USE_LIBZIP) || defined(USE_ZLIB) +#if defined(USE_LIBZIP) || defined(USE_MINIZIP) struct VDir* VDirOpenZip(const char* path, int flags); #endif From 1089285b45c1213fff87e0518fc45a327b8ede8b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 3 Feb 2021 21:10:25 -0800 Subject: [PATCH 33/40] Qt: Add linked library info to report generator --- src/platform/qt/ReportView.cpp | 107 +++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/src/platform/qt/ReportView.cpp b/src/platform/qt/ReportView.cpp index accc5d9e6..b33fd2ea6 100644 --- a/src/platform/qt/ReportView.cpp +++ b/src/platform/qt/ReportView.cpp @@ -12,7 +12,9 @@ #include #include +#include #include +#include #include #include "CoreController.h" @@ -37,8 +39,43 @@ #include #endif +#ifdef USE_EDITLINE +#include +#endif + +#ifdef USE_FFMPEG +#include +#include +#include +#include +#include +#ifdef USE_LIBAVRESAMPLE +#include +#endif +#ifdef USE_LIBSWRESAMPLE +#include +#endif +#endif + +#ifdef USE_LIBZIP +#include +#endif + +#ifdef USE_LZMA +#include <7zVersion.h> +#endif + +#ifdef BUILD_SDL +#include +#endif + #ifdef USE_SQLITE3 #include "feature/sqlite3/no-intro.h" +#include +#endif + +#ifdef USE_ZLIB +#include #endif using namespace QGBA; @@ -84,6 +121,72 @@ void ReportView::generateReport() { swReport << QString("Build architecture: %1").arg(QSysInfo::buildCpuArchitecture()); swReport << QString("Run architecture: %1").arg(QSysInfo::currentCpuArchitecture()); swReport << QString("Qt version: %1").arg(QLatin1String(qVersion())); +#ifdef USE_FFMPEG + QStringList libavVers; + libavVers << QLatin1String(LIBAVCODEC_IDENT); + libavVers << QLatin1String(LIBAVFILTER_IDENT); + libavVers << QLatin1String(LIBAVFORMAT_IDENT); +#ifdef USE_LIBAVRESAMPLE + libavVers << QLatin1String(LIBAVRESAMPLE_IDENT); +#endif + libavVers << QLatin1String(LIBAVUTIL_IDENT); +#ifdef USE_LIBSWRESAMPLE + libavVers << QLatin1String(LIBSWRESAMPLE_IDENT); +#endif + libavVers << QLatin1String(LIBSWSCALE_IDENT); +#ifdef USE_LIBAV + swReport << QString("Libav versions: %1.%2").arg(libavVers.join(", ")); +#else + swReport << QString("FFmpeg versions: %1.%2").arg(libavVers.join(", ")); +#endif +#else + swReport << QString("FFmpeg not linked"); +#endif +#ifdef USE_EDITLINE + swReport << QString("libedit version: %1.%2").arg(LIBEDIT_MAJOR).arg(LIBEDIT_MINOR); +#else + swReport << QString("libedit not linked"); +#endif +#ifdef USE_ELF + swReport << QString("libelf linked"); +#else + swReport << QString("libelf not linked"); +#endif +#ifdef USE_PNG + swReport << QString("libpng version: %1").arg(QLatin1String(PNG_LIBPNG_VER_STRING)); +#else + swReport << QString("libpng not linked"); +#endif +#ifdef USE_LIBZIP + swReport << QString("libzip version: %1").arg(QLatin1String(LIBZIP_VERSION)); +#else + swReport << QString("libzip not linked"); +#endif +#ifdef USE_LZMA + swReport << QString("libLZMA version: %1").arg(QLatin1String(MY_VERSION_NUMBERS)); +#else + swReport << QString("libLZMA not linked"); +#endif +#ifdef USE_MINIZIP + swReport << QString("minizip linked"); +#else + swReport << QString("minizip not linked"); +#endif +#ifdef BUILD_SDL + swReport << QString("SDL version: %1.%2.%3").arg(SDL_MAJOR_VERSION).arg(SDL_MINOR_VERSION).arg(SDL_PATCHLEVEL); +#else + swReport << QString("SDL not linked"); +#endif +#ifdef USE_SQLITE3 + swReport << QString("SQLite3 version: %1").arg(QLatin1String(SQLITE_VERSION)); +#else + swReport << QString("SQLite3 not linked"); +#endif +#ifdef USE_ZLIB + swReport << QString("zlib version: %1").arg(QLatin1String(ZLIB_VERSION)); +#else + swReport << QString("zlib not linked"); +#endif addReport(QString("System info"), swReport.join('\n')); QStringList hwReport; @@ -209,6 +312,7 @@ void ReportView::generateReport() { } void ReportView::save() { +#if defined(USE_LIBZIP) || defined(USE_MINIZIP) QString filename = GBAApp::app()->getSaveFileName(this, tr("Bug report archive"), tr("ZIP archive (*.zip)")); if (filename.isNull()) { return; @@ -228,6 +332,7 @@ void ReportView::save() { vf.close(); } zip->close(zip); +#endif } void ReportView::setShownReport(const QString& filename) { @@ -243,7 +348,9 @@ void ReportView::rebuildModel() { } m_ui.fileList->addItem(item); } +#if defined(USE_LIBZIP) || defined(USE_MINIZIP) m_ui.save->setEnabled(true); +#endif m_ui.fileList->setEnabled(true); m_ui.fileView->setEnabled(true); m_ui.openList->setEnabled(true); From 217d1b238b5d7c194a20d75cf3e48bc98d1411dd Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 4 Feb 2021 00:00:31 -0800 Subject: [PATCH 34/40] Qt: Add save converter tool --- CHANGES | 1 + src/platform/qt/CMakeLists.txt | 2 + src/platform/qt/CoreManager.cpp | 54 --- src/platform/qt/CoreManager.h | 4 - src/platform/qt/SaveConverter.cpp | 658 ++++++++++++++++++++++++++++++ src/platform/qt/SaveConverter.h | 102 +++++ src/platform/qt/SaveConverter.ui | 124 ++++++ src/platform/qt/Window.cpp | 3 + src/platform/qt/utils.h | 7 + 9 files changed, 897 insertions(+), 58 deletions(-) create mode 100644 src/platform/qt/SaveConverter.cpp create mode 100644 src/platform/qt/SaveConverter.h create mode 100644 src/platform/qt/SaveConverter.ui diff --git a/CHANGES b/CHANGES index e0c8e9eec..7e04db0a7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ 0.9.0: (Future) Features: - e-Reader card scanning + - New tool for converting between different save game formats - WebP and APNG recording - Separate overrides for GBC games that can also run on SGB or regular GB - Game Boy Player features can be enabled by default for all compatible games diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index eb6d947e2..be9172e51 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -103,6 +103,7 @@ set(SOURCE_FILES ReportView.cpp ROMInfo.cpp RotatedHeaderView.cpp + SaveConverter.cpp SavestateButton.cpp SensorView.cpp SettingsView.cpp @@ -142,6 +143,7 @@ set(UI_FILES PrinterView.ui ReportView.ui ROMInfo.ui + SaveConverter.ui SensorView.ui SettingsView.ui ShaderSelector.ui diff --git a/src/platform/qt/CoreManager.cpp b/src/platform/qt/CoreManager.cpp index 758eaaca1..98403216a 100644 --- a/src/platform/qt/CoreManager.cpp +++ b/src/platform/qt/CoreManager.cpp @@ -14,9 +14,6 @@ #ifdef M_CORE_GBA #include #endif -#ifdef M_CORE_GB -#include -#endif #include #include @@ -31,57 +28,6 @@ void CoreManager::setMultiplayerController(MultiplayerController* multiplayer) { m_multiplayer = multiplayer; } -QByteArray CoreManager::getExtdata(const QString& filename, mStateExtdataTag extdataType) { - VFileDevice vf(filename, QIODevice::ReadOnly); - - if (!vf.isOpen()) { - return {}; - } - - mStateExtdata extdata; - mStateExtdataInit(&extdata); - - QByteArray bytes; - auto extract = [&bytes, &extdata, &vf, extdataType](mCore* core) -> bool { - if (mCoreExtractExtdata(core, vf, &extdata)) { - mStateExtdataItem extitem; - if (!mStateExtdataGet(&extdata, extdataType, &extitem)) { - return false; - } - if (extitem.size) { - bytes = QByteArray::fromRawData(static_cast(extitem.data), extitem.size); - } - return true; - } - return false; - }; - - bool done = false; - struct mCore* core = nullptr; -#ifdef USE_PNG - done = extract(nullptr); -#endif -#ifdef M_CORE_GBA - if (!done) { - core = GBACoreCreate(); - core->init(core); - done = extract(core); - core->deinit(core); - } -#endif -#ifdef M_CORE_GB - if (!done) { - core = GBCoreCreate(); - core->init(core); - done = extract(core); - core->deinit(core); - } -#endif - - mStateExtdataDeinit(&extdata); - return bytes; -} - CoreController* CoreManager::loadGame(const QString& path) { QFileInfo info(path); if (!info.isReadable()) { diff --git a/src/platform/qt/CoreManager.h b/src/platform/qt/CoreManager.h index 3a31288b9..da7460f22 100644 --- a/src/platform/qt/CoreManager.h +++ b/src/platform/qt/CoreManager.h @@ -9,8 +9,6 @@ #include #include -#include - struct mCoreConfig; struct VFile; @@ -27,8 +25,6 @@ public: void setMultiplayerController(MultiplayerController*); void setPreload(bool preload) { m_preload = preload; } - static QByteArray getExtdata(const QString& filename, mStateExtdataTag extdataType); - public slots: CoreController* loadGame(const QString& path); CoreController* loadGame(VFile* vf, const QString& path, const QString& base); diff --git a/src/platform/qt/SaveConverter.cpp b/src/platform/qt/SaveConverter.cpp new file mode 100644 index 000000000..ec8ad08f3 --- /dev/null +++ b/src/platform/qt/SaveConverter.cpp @@ -0,0 +1,658 @@ +/* Copyright (c) 2013-2021 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "SaveConverter.h" + +#include + +#include "GBAApp.h" +#include "LogController.h" +#include "VFileDevice.h" +#include "utils.h" + +#ifdef M_CORE_GBA +#include +#include +#endif +#ifdef M_CORE_GB +#include +#include +#endif + +#include +#include + +using namespace QGBA; + +SaveConverter::SaveConverter(std::shared_ptr controller, QWidget* parent) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint) + , m_controller(controller) +{ + m_ui.setupUi(this); + + connect(m_ui.inputFile, &QLineEdit::textEdited, this, &SaveConverter::refreshInputTypes); + connect(m_ui.inputBrowse, &QAbstractButton::clicked, this, [this]() { + // TODO: Add gameshark saves here too + QStringList formats{"*.sav", "*.sgm", "*.ss0", "*.ss1", "*.ss2", "*.ss3", "*.ss4", "*.ss5", "*.ss6", "*.ss7", "*.ss8", "*.ss9"}; + QString filter = tr("Save games and save states (%1)").arg(formats.join(QChar(' '))); + QString filename = GBAApp::app()->getOpenFileName(this, tr("Select save game or save state"), filter); + if (!filename.isEmpty()) { + m_ui.inputFile->setText(filename); + refreshInputTypes(); + } + }); + connect(m_ui.inputType, static_cast(&QComboBox::currentIndexChanged), this, &SaveConverter::refreshOutputTypes); + + connect(m_ui.outputFile, &QLineEdit::textEdited, this, &SaveConverter::checkCanConvert); + connect(m_ui.outputBrowse, &QAbstractButton::clicked, this, [this]() { + // TODO: Add gameshark saves here too + QStringList formats{"*.sav", "*.sgm"}; + QString filter = tr("Save games (%1)").arg(formats.join(QChar(' '))); + QString filename = GBAApp::app()->getSaveFileName(this, tr("Select save game"), filter); + if (!filename.isEmpty()) { + m_ui.outputFile->setText(filename); + checkCanConvert(); + } + }); + connect(m_ui.outputType, static_cast(&QComboBox::currentIndexChanged), this, &SaveConverter::checkCanConvert); + connect(this, &QDialog::accepted, this, &SaveConverter::convert); + + refreshInputTypes(); + m_ui.buttonBox->button(QDialogButtonBox::Save)->setDisabled(true); +} + +void SaveConverter::convert() { + if (m_validSaves.isEmpty() || m_validOutputs.isEmpty()) { + return; + } + const AnnotatedSave& input = m_validSaves[m_ui.inputType->currentIndex()]; + const AnnotatedSave& output = m_validOutputs[m_ui.outputType->currentIndex()]; + QByteArray converted = input.convertTo(output); + if (converted.isEmpty()) { + QMessageBox* failure = new QMessageBox(QMessageBox::Warning, tr("Conversion failed"), tr("Failed to convert the save game. This is probably a bug."), + QMessageBox::Ok, this, Qt::Sheet); + failure->setAttribute(Qt::WA_DeleteOnClose); + failure->show(); + return; + } + QFile out(m_ui.outputFile->text()); + out.open(QIODevice::WriteOnly | QIODevice::Truncate); + out.write(converted); + out.close(); +} + +void SaveConverter::refreshInputTypes() { + m_validSaves.clear(); + m_ui.inputType->clear(); + if (m_ui.inputFile->text().isEmpty()) { + m_ui.inputType->addItem(tr("No file selected")); + m_ui.inputType->setEnabled(false); + return; + } + + std::shared_ptr vf = std::make_shared(m_ui.inputFile->text(), QIODevice::ReadOnly); + if (!vf->isOpen()) { + m_ui.inputType->addItem(tr("Could not open file")); + m_ui.inputType->setEnabled(false); + return; + } + + detectFromSavestate(*vf); + detectFromSize(vf); + + for (const auto& save : m_validSaves) { + m_ui.inputType->addItem(save); + } + if (m_validSaves.count()) { + m_ui.inputType->setEnabled(true); + } else { + m_ui.inputType->addItem(tr("No valid formats found")); + m_ui.inputType->setEnabled(false); + } +} + +void SaveConverter::refreshOutputTypes() { + m_ui.outputType->clear(); + if (m_validSaves.isEmpty()) { + m_ui.outputType->addItem(tr("Please select a valid input file")); + m_ui.outputType->setEnabled(false); + return; + } + m_validOutputs = m_validSaves[m_ui.inputType->currentIndex()].possibleConversions(); + for (const auto& save : m_validOutputs) { + m_ui.outputType->addItem(save); + } + if (m_validOutputs.count()) { + m_ui.outputType->setEnabled(true); + } else { + m_ui.outputType->addItem(tr("No valid conversions found")); + m_ui.outputType->setEnabled(false); + } + checkCanConvert(); +} + +void SaveConverter::checkCanConvert() { + QAbstractButton* button = m_ui.buttonBox->button(QDialogButtonBox::Save); + if (m_ui.inputFile->text().isEmpty()) { + button->setEnabled(false); + return; + } + if (m_ui.outputFile->text().isEmpty()) { + button->setEnabled(false); + return; + } + if (!m_ui.inputType->isEnabled()) { + button->setEnabled(false); + return; + } + if (!m_ui.outputType->isEnabled()) { + button->setEnabled(false); + return; + } + button->setEnabled(true); +} + +void SaveConverter::detectFromSavestate(VFile* vf) { + mPlatform platform = getStatePlatform(vf); + if (platform == mPLATFORM_NONE) { + return; + } + + QByteArray extSavedata = getExtdata(vf, platform, EXTDATA_SAVEDATA); + if (!extSavedata.size()) { + return; + } + + QByteArray state = getState(vf, platform); + AnnotatedSave save{platform, std::make_shared(extSavedata)}; + switch (platform) { +#ifdef M_CORE_GBA + case mPLATFORM_GBA: + save.gba.type = static_cast(state.at(offsetof(GBASerializedState, savedata.type))); + if (save.gba.type == SAVEDATA_EEPROM || save.gba.type == SAVEDATA_EEPROM512) { + save.endianness = Endian::LITTLE; + } + break; +#endif +#ifdef M_CORE_GB + case mPLATFORM_GB: + // GB savestates don't store the MBC type...should probably fix that + save.gb.type = GB_MBC_AUTODETECT; + if (state.size() == 0x100) { + // MBC2 packed save + save.endianness = Endian::LITTLE; + save.gb.type = GB_MBC2; + } + break; +#endif + default: + break; + } + m_validSaves.append(save); +} + +void SaveConverter::detectFromSize(std::shared_ptr vf) { +#ifdef M_CORE_GBA + switch (vf->size()) { + case SIZE_CART_SRAM: + m_validSaves.append(AnnotatedSave{SAVEDATA_SRAM, vf}); + break; + case SIZE_CART_FLASH512: + m_validSaves.append(AnnotatedSave{SAVEDATA_FLASH512, vf}); + break; + case SIZE_CART_FLASH1M: + m_validSaves.append(AnnotatedSave{SAVEDATA_FLASH1M, vf}); + break; + case SIZE_CART_EEPROM: + m_validSaves.append(AnnotatedSave{SAVEDATA_EEPROM, vf, Endian::LITTLE}); + m_validSaves.append(AnnotatedSave{SAVEDATA_EEPROM, vf, Endian::BIG}); + break; + case SIZE_CART_EEPROM512: + m_validSaves.append(AnnotatedSave{SAVEDATA_EEPROM512, vf, Endian::LITTLE}); + m_validSaves.append(AnnotatedSave{SAVEDATA_EEPROM512, vf, Endian::BIG}); + break; + } +#endif + +#ifdef M_CORE_GB + switch (vf->size()) { + case 0x800: + case 0x82C: + case 0x830: + case 0x2000: + case 0x202C: + case 0x2030: + case 0x8000: + case 0x802C: + case 0x8030: + case 0x10000: + case 0x1002C: + case 0x10030: + case 0x20000: + case 0x2002C: + case 0x20030: + m_validSaves.append(AnnotatedSave{GB_MBC_AUTODETECT, vf}); + break; + case 0x100: + m_validSaves.append(AnnotatedSave{GB_MBC2, vf, Endian::LITTLE}); + m_validSaves.append(AnnotatedSave{GB_MBC2, vf, Endian::BIG}); + break; + case 0x200: + m_validSaves.append(AnnotatedSave{GB_MBC2, vf}); + break; + case GB_SIZE_MBC6_FLASH: // Flash only + case GB_SIZE_MBC6_FLASH + 0x8000: // Concatenated SRAM and flash + m_validSaves.append(AnnotatedSave{GB_MBC6, vf}); + break; + case 0x20: + m_validSaves.append(AnnotatedSave{GB_TAMA5, vf}); + break; + } +#endif +} + +mPlatform SaveConverter::getStatePlatform(VFile* vf) { + uint32_t magic; + void* state = nullptr; + struct mCore* core = nullptr; + mPlatform platform = mPLATFORM_NONE; +#ifdef M_CORE_GBA + if (platform == mPLATFORM_NONE) { + core = GBACoreCreate(); + core->init(core); + state = mCoreExtractState(core, vf, nullptr); + core->deinit(core); + if (state) { + LOAD_32LE(magic, 0, state); + if (magic - GBA_SAVESTATE_MAGIC <= GBA_SAVESTATE_VERSION) { + platform = mPLATFORM_GBA; + } + mappedMemoryFree(state, core->stateSize(core)); + } + } +#endif +#ifdef M_CORE_GB + if (platform == mPLATFORM_NONE) { + core = GBCoreCreate(); + core->init(core); + state = mCoreExtractState(core, vf, nullptr); + core->deinit(core); + if (state) { + LOAD_32LE(magic, 0, state); + if (magic - GB_SAVESTATE_MAGIC <= GB_SAVESTATE_VERSION) { + platform = mPLATFORM_GB; + } + mappedMemoryFree(state, core->stateSize(core)); + } + } +#endif + + return platform; +} + +QByteArray SaveConverter::getState(VFile* vf, mPlatform platform) { + QByteArray bytes; + struct mCore* core = mCoreCreate(platform); + core->init(core); + void* state = mCoreExtractState(core, vf, nullptr); + if (state) { + size_t size = core->stateSize(core); + bytes = QByteArray::fromRawData(static_cast(state), size); + bytes.data(); // Trigger a deep copy before we delete the backing + mappedMemoryFree(state, size); + } + core->deinit(core); + return bytes; +} + +QByteArray SaveConverter::getExtdata(VFile* vf, mPlatform platform, mStateExtdataTag extdataType) { + mStateExtdata extdata; + mStateExtdataInit(&extdata); + QByteArray bytes; + struct mCore* core = mCoreCreate(platform); + core->init(core); + if (mCoreExtractExtdata(core, vf, &extdata)) { + mStateExtdataItem extitem; + if (mStateExtdataGet(&extdata, extdataType, &extitem) && extitem.size) { + bytes = QByteArray::fromRawData(static_cast(extitem.data), extitem.size); + bytes.data(); // Trigger a deep copy before we delete the backing + } + } + core->deinit(core); + mStateExtdataDeinit(&extdata); + return bytes; +} + +SaveConverter::AnnotatedSave::AnnotatedSave() + : savestate(false) + , platform(mPLATFORM_NONE) + , size(0) + , backing() + , endianness(Endian::NONE) +{ +} + +SaveConverter::AnnotatedSave::AnnotatedSave(mPlatform platform, std::shared_ptr vf, Endian endianness) + : savestate(true) + , platform(platform) + , size(vf->size()) + , backing(vf) + , endianness(endianness) +{ +} + +#ifdef M_CORE_GBA +SaveConverter::AnnotatedSave::AnnotatedSave(SavedataType type, std::shared_ptr vf, Endian endianness) + : savestate(false) + , platform(mPLATFORM_GBA) + , size(vf->size()) + , backing(vf) + , endianness(endianness) + , gba({type}) +{ +} +#endif + +#ifdef M_CORE_GB +SaveConverter::AnnotatedSave::AnnotatedSave(GBMemoryBankControllerType type, std::shared_ptr vf, Endian endianness) + : savestate(false) + , platform(mPLATFORM_GB) + , size(vf->size()) + , backing(vf) + , endianness(endianness) + , gb({type}) +{ +} +#endif + +SaveConverter::AnnotatedSave SaveConverter::AnnotatedSave::asRaw() const { + AnnotatedSave raw; + raw.platform = platform; + raw.size = size; + raw.endianness = endianness; + switch (platform) { +#ifdef M_CORE_GBA + case mPLATFORM_GBA: + raw.gba = gba; + break; +#endif +#ifdef M_CORE_GB + case mPLATFORM_GB: + raw.gb = gb; + break; +#endif + default: + break; + } + return raw; +} + +SaveConverter::AnnotatedSave::operator QString() const { + QString sizeStr(niceSizeFormat(size)); + QString typeFormat("%1"); + QString endianStr; + QString saveType; + QString format = QCoreApplication::translate("SaveConverter", "%1 %2 save game"); + + switch (endianness) { + case Endian::LITTLE: + endianStr = QCoreApplication::translate("SaveConverter", "little endian"); + break; + case Endian::BIG: + endianStr = QCoreApplication::translate("SaveConverter", "big endian"); + break; + default: + break; + } + + switch (platform) { +#ifdef M_CORE_GBA + case mPLATFORM_GBA: + switch (gba.type) { + case SAVEDATA_SRAM: + typeFormat = QCoreApplication::translate("SaveConverter", "SRAM"); + break; + case SAVEDATA_FLASH512: + case SAVEDATA_FLASH1M: + typeFormat = QCoreApplication::translate("SaveConverter", "%1 flash"); + break; + case SAVEDATA_EEPROM: + case SAVEDATA_EEPROM512: + typeFormat = QCoreApplication::translate("SaveConverter", "%1 EEPROM"); + break; + default: + break; + } + break; +#endif +#ifdef M_CORE_GB + case mPLATFORM_GB: + switch (gb.type) { + case GB_MBC_AUTODETECT: + if (size & 0xFF) { + typeFormat = QCoreApplication::translate("SaveConverter", "%1 SRAM + RTC"); + } else { + typeFormat = QCoreApplication::translate("SaveConverter", "%1 SRAM"); + } + break; + case GB_MBC2: + if (size == 0x100) { + typeFormat = QCoreApplication::translate("SaveConverter", "packed MBC2"); + } else { + typeFormat = QCoreApplication::translate("SaveConverter", "unpacked MBC2"); + } + break; + case GB_MBC6: + if (size == GB_SIZE_MBC6_FLASH) { + typeFormat = QCoreApplication::translate("SaveConverter", "MBC6 flash"); + } else if (size > GB_SIZE_MBC6_FLASH) { + typeFormat = QCoreApplication::translate("SaveConverter", "MBC6 combined SRAM + flash"); + } else { + typeFormat = QCoreApplication::translate("SaveConverter", "MBC6 SRAM"); + } + break; + case GB_TAMA5: + typeFormat = QCoreApplication::translate("SaveConverter", "TAMA5"); + break; + default: + break; + } + break; +#endif + default: + break; + } + saveType = typeFormat.arg(sizeStr); + if (!endianStr.isEmpty()) { + saveType = QCoreApplication::translate("SaveConverter", "%1 (%2)").arg(saveType).arg(endianStr); + } + if (savestate) { + format = QCoreApplication::translate("SaveConverter", "%1 save state with embedded %2 save game"); + } + return format.arg(nicePlatformFormat(platform)).arg(saveType); +} + +bool SaveConverter::AnnotatedSave::operator==(const AnnotatedSave& other) const { + if (other.savestate != savestate || other.platform != platform || other.size != size || other.endianness != endianness) { + return false; + } + switch (platform) { +#ifdef M_CORE_GBA + case mPLATFORM_GBA: + if (other.gba.type != gba.type) { + return false; + } + break; +#endif +#ifdef M_CORE_GB + case mPLATFORM_GB: + if (other.gb.type != gb.type) { + return false; + } + break; +#endif + default: + break; + } + return true; +} + +QList SaveConverter::AnnotatedSave::possibleConversions() const { + QList possible; + AnnotatedSave same = asRaw(); + same.backing.reset(); + same.savestate = false; + + if (savestate) { + possible.append(same); + } + + + AnnotatedSave endianSwapped = same; + switch (endianness) { + case Endian::LITTLE: + endianSwapped.endianness = Endian::BIG; + possible.append(endianSwapped); + break; + case Endian::BIG: + endianSwapped.endianness = Endian::LITTLE; + possible.append(endianSwapped); + break; + default: + break; + } + + switch (platform) { +#ifdef M_CORE_GB + case mPLATFORM_GB: + switch (gb.type) { + case GB_MBC2: + if (size == 0x100) { + AnnotatedSave unpacked = same; + unpacked.size = 0x200; + unpacked.endianness = Endian::NONE; + possible.append(unpacked); + } else { + AnnotatedSave packed = same; + packed.size = 0x100; + packed.endianness = Endian::LITTLE; + possible.append(packed); + packed.endianness = Endian::BIG; + possible.append(packed); + } + break; + case GB_MBC6: + if (size > GB_SIZE_MBC6_FLASH) { + AnnotatedSave separated = same; + separated.size = size - GB_SIZE_MBC6_FLASH; + possible.append(separated); + separated.size = GB_SIZE_MBC6_FLASH; + possible.append(separated); + } + break; + default: + break; + } + break; +#endif + default: + break; + } + + return possible; +} + +QByteArray SaveConverter::AnnotatedSave::convertTo(const SaveConverter::AnnotatedSave& target) const { + QByteArray converted; + QByteArray buffer; + backing->seek(0); + if (target == asRaw()) { + return backing->readAll(); + } + + if (platform != target.platform) { + LOG(QT, ERROR) << tr("Cannot convert save games between platforms"); + return {}; + } + + switch (platform) { +#ifdef M_CORE_GBA + case mPLATFORM_GBA: + switch (gba.type) { + case SAVEDATA_EEPROM: + case SAVEDATA_EEPROM512: + converted.resize(target.size); + buffer = backing->readAll(); + for (int i = 0; i < size; i += 8) { + uint64_t word; + const uint64_t* in = reinterpret_cast(buffer.constData()); + uint64_t* out = reinterpret_cast(converted.data()); + LOAD_64LE(word, i, in); + STORE_64BE(word, i, out); + } + break; + default: + break; + } + break; +#endif +#ifdef M_CORE_GB + case mPLATFORM_GB: + switch (gb.type) { + case GB_MBC2: + converted.reserve(target.size); + buffer = backing->readAll(); + if (size == 0x100 && target.size == 0x200) { + if (endianness == Endian::LITTLE) { + for (uint8_t byte : buffer) { + converted.append(0xF0 | (byte & 0xF)); + converted.append(0xF0 | (byte >> 4)); + } + } else if (endianness == Endian::BIG) { + for (uint8_t byte : buffer) { + converted.append(0xF0 | (byte >> 4)); + converted.append(0xF0 | (byte & 0xF)); + } + } + } else if (size == 0x200 && target.size == 0x100) { + uint8_t byte; + if (target.endianness == Endian::LITTLE) { + for (int i = 0; i < target.size; ++i) { + byte = buffer[i * 2] & 0xF; + byte |= (buffer[i * 2 + 1] & 0xF) << 4; + converted.append(byte); + } + } else if (target.endianness == Endian::BIG) { + for (int i = 0; i < target.size; ++i) { + byte = (buffer[i * 2] & 0xF) << 4; + byte |= buffer[i * 2 + 1] & 0xF; + converted.append(byte); + } + } + } else if (size == 0x100 && target.size == 0x100) { + for (uint8_t byte : buffer) { + converted.append((byte >> 4) | (byte << 4)); + } + } + break; + case GB_MBC6: + if (size == target.size + GB_SIZE_MBC6_FLASH) { + converted = backing->read(target.size); + } else if (target.size == GB_SIZE_MBC6_FLASH) { + backing->skip(size - GB_SIZE_MBC6_FLASH); + converted = backing->read(GB_SIZE_MBC6_FLASH); + } + break; + default: + break; + } + break; +#endif + default: + break; + } + + return converted; +} diff --git a/src/platform/qt/SaveConverter.h b/src/platform/qt/SaveConverter.h new file mode 100644 index 000000000..a9da27952 --- /dev/null +++ b/src/platform/qt/SaveConverter.h @@ -0,0 +1,102 @@ +/* Copyright (c) 2013-2021 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#pragma once + +#include + +#include "CoreController.h" +#include "utils.h" + +#ifdef M_CORE_GBA +#include +#include +#endif +#ifdef M_CORE_GB +#include +#include +#endif + +#include + +#include "ui_SaveConverter.h" + +struct VFile; + +namespace QGBA { + +class SaveConverter : public QDialog { +Q_OBJECT + +public: + SaveConverter(std::shared_ptr controller, QWidget* parent = nullptr); + + static mPlatform getStatePlatform(VFile*); + static QByteArray getState(VFile*, mPlatform); + static QByteArray getExtdata(VFile*, mPlatform, mStateExtdataTag); + +public slots: + void convert(); + +private slots: + void refreshInputTypes(); + void refreshOutputTypes(); + void checkCanConvert(); + +private: +#ifdef M_CORE_GBA + struct GBASave { + SavedataType type; + }; +#endif +#ifdef M_CORE_GB + struct GBSave { + GBMemoryBankControllerType type; + }; +#endif + struct AnnotatedSave { + AnnotatedSave(); + AnnotatedSave(mPlatform, std::shared_ptr, Endian = Endian::NONE); +#ifdef M_CORE_GBA + AnnotatedSave(SavedataType, std::shared_ptr, Endian = Endian::NONE); +#endif +#ifdef M_CORE_GB + AnnotatedSave(GBMemoryBankControllerType, std::shared_ptr, Endian = Endian::NONE); +#endif + + AnnotatedSave asRaw() const; + operator QString() const; + bool operator==(const AnnotatedSave&) const; + + QList possibleConversions() const; + QByteArray convertTo(const AnnotatedSave&) const; + + bool savestate; + mPlatform platform; + ssize_t size; + std::shared_ptr backing; + Endian endianness; + union { +#ifdef M_CORE_GBA + GBASave gba; +#endif +#ifdef M_CORE_GB + GBSave gb; +#endif + }; + }; + + void detectFromSavestate(VFile*); + void detectFromSize(std::shared_ptr); + void detectFromHeaders(std::shared_ptr); + + Ui::SaveConverter m_ui; + + std::shared_ptr m_controller; + QList m_validSaves; + QList m_validOutputs; +}; + +} diff --git a/src/platform/qt/SaveConverter.ui b/src/platform/qt/SaveConverter.ui new file mode 100644 index 000000000..758400e25 --- /dev/null +++ b/src/platform/qt/SaveConverter.ui @@ -0,0 +1,124 @@ + + + SaveConverter + + + + 0 + 0 + 546 + 300 + + + + Convert/Extract Save Game + + + + + + Input file + + + + + + + + + Browse + + + + + + + false + + + + + + + + + + Output file + + + + + + + + + Browse + + + + + + + false + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Save + + + + + + + inputFile + inputBrowse + inputType + outputFile + outputBrowse + outputType + + + + + buttonBox + accepted() + SaveConverter + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + SaveConverter + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index bac7f29b0..0b175eb41 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -49,6 +49,7 @@ #include "PrinterView.h" #include "ReportView.h" #include "ROMInfo.h" +#include "SaveConverter.h" #include "SensorView.h" #include "ShaderSelector.h" #include "ShortcutController.h" @@ -1209,6 +1210,8 @@ void Window::setupMenu(QMenuBar* menubar) { #ifdef M_CORE_GBA m_actions.addSeparator("file"); + m_actions.addAction(tr("Convert save game..."), "convertSave", openControllerTView(), "file"); + Action* importShark = addGameAction(tr("Import GameShark Save..."), "importShark", this, &Window::importSharkport, "file"); m_platformActions.insert(mPLATFORM_GBA, importShark); diff --git a/src/platform/qt/utils.h b/src/platform/qt/utils.h index dfab510ed..db0151d67 100644 --- a/src/platform/qt/utils.h +++ b/src/platform/qt/utils.h @@ -15,6 +15,13 @@ namespace QGBA { +enum class Endian { + NONE = 0b00, + BIG = 0b01, + LITTLE = 0b10, + UNKNOWN = 0b11 +}; + QString niceSizeFormat(size_t filesize); QString nicePlatformFormat(mPlatform platform); From 1a0a2848d6c72acb15a9ac61d58794cfd15acee0 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 4 Feb 2021 00:16:52 -0800 Subject: [PATCH 35/40] Qt: Update translations --- src/platform/qt/ts/mgba-de.ts | 525 ++++++++++++++++++--------- src/platform/qt/ts/mgba-en.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-es.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-fr.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-it.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-ja.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-ko.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-nl.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-pt_BR.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-ru.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-template.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-tr.ts | 545 +++++++++++++++++++--------- src/platform/qt/ts/mgba-zh_CN.ts | 545 +++++++++++++++++++--------- 13 files changed, 4748 insertions(+), 2317 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index 90a24f691..796dc457b 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -1232,17 +1232,17 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 Fehler beim Öffnen der Spieldatei: %1 - + Could not load game. Are you sure it's in the correct format? Konnte das Spiel nicht laden. Bist Du sicher, dass es im korrekten Format vorliegt? - + Failed to open save file. Is the save directory writable? Fehler beim Öffnen der Speicherdatei. Ist das Zielverzeichnis beschreibbar? @@ -1303,7 +1303,7 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence Discord-Integration aktivieren @@ -3494,62 +3494,62 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection Auswahl kopieren - + Save selection Auswahl speichern - + Paste Einfügen - + Load Laden - + All Alle - + Load TBL TBL laden - + Save selected memory Ausgewählten Speicher abspeichern - + Failed to open output file: %1 Fehler beim Öffnen der Ausgabedatei: %1 - + Load memory Lade Speicher - + Failed to open input file: %1 Fehler beim Laden der Eingabedatei: %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3719,16 +3719,79 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive Fehlerbericht speichern - + ZIP archive (*.zip) ZIP-Archiv (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + Spielstände (%1) + + + + Select save game + Spielstand auswählen + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3890,86 +3953,86 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance-ROMs (%1) - + Game Boy ROMs (%1) Game Boy-ROMs (%1) - + All ROMs (%1) Alle ROMs (%1) - + %1 Video Logs (*.mvl) %1 Video-Logs (*.mvl) - + Archives (%1) Archive (%1) - - - + + + Select ROM ROM auswählen - - + + Select save Speicherdatei wählen - + Select patch Patch wählen - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select image Bild auswählen - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Bild-Datei (*.png *.gif *.jpg *.jpeg);;Alle Dateien (*) - - + + GameShark saves (*.sps *.xps) GameShark-Speicherdaten (*.sps *.xps) - + Select video log Video-Log auswählen - + Video logs (*.mvl) Video-Logs (*.mvl) - + Crash Absturz - + The game has crashed with the following error: %1 @@ -3978,640 +4041,660 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd. - + Unimplemented BIOS call Nicht implementierter BIOS-Aufruf - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Dieses Spiel verwendet einen BIOS-Aufruf, der nicht implementiert ist. Bitte verwenden Sie für die beste Spielerfahrung das offizielle BIOS. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. Es konnte kein geeignetes Ausgabegerät erstellt werden, stattdessen wird Software-Rendering als Rückfalloption genutzt. Spiele laufen möglicherweise langsamer, besonders innerhalb großer Fenster. - + Really make portable? Portablen Modus wirklich aktivieren? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Diese Einstellung wird den Emulator so konfigurieren, dass er seine Konfiguration aus dem gleichen Verzeichnis wie die Programmdatei lädt. Möchten Sie fortfahren? - + Restart needed Neustart benötigt - + Some changes will not take effect until the emulator is restarted. Einige Änderungen werden erst übernommen, wenn der Emulator neu gestartet wurde. - + - Player %1 of %2 - Spieler %1 von %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 Bilder/Sekunde) - %4 - + &File &Datei - + Load &ROM... &ROM laden... - + Load ROM in archive... ROM aus Archiv laden... - + Load &patch... &Patch laden... - + Boot BIOS BIOS booten - + Replace ROM... ROM ersetzen... - + ROM &info... ROM-&Informationen... - + Recent Zuletzt verwendet - + Make portable Portablen Modus aktivieren - + &Load state Savestate (aktueller Zustand) &laden - + Load state file... Savestate-Datei laden... - + &Save state Savestate (aktueller Zustand) &speichern - + Save state file... Savestate-Datei speichern... - + Quick load Schnell laden - + Quick save Schnell speichern - + Load recent Lade zuletzt gespeicherten Savestate - + Save recent Speichere aktuellen Zustand - + Undo load state Laden des Savestate rückgängig machen - + Undo save state Speichern des Savestate rückgängig machen - - + + State &%1 Savestate &%1 - + Load camera image... Lade Kamerabild... - + + Convert save game... + + + + New multiplayer window Neues Multiplayer-Fenster - + Report bug... Fehler melden... - + E&xit &Beenden - + &Emulation &Emulation - + &Reset Zu&rücksetzen - + Sh&utdown Schli&eßen - + Yank game pak Spielmodul herausziehen - + &Pause &Pause - + &Next frame &Nächstes Bild - + Fast forward (held) Schneller Vorlauf (gehalten) - + &Fast forward Schneller &Vorlauf - + Fast forward speed Vorlauf-Geschwindigkeit - + Unbounded Unbegrenzt - + %0x %0x - + Rewind (held) Zurückspulen (gehalten) - + Re&wind Zur&ückspulen - + Step backwards Schrittweiser Rücklauf - + Sync to &video Mit &Video synchronisieren - + Sync to &audio Mit &Audio synchronisieren - + Solar sensor Sonnen-Sensor - + Increase solar level Sonnen-Level erhöhen - + Decrease solar level Sonnen-Level verringern - + Brightest solar level Hellster Sonnen-Level - + Darkest solar level Dunkelster Sonnen-Level - + Brightness %1 Helligkeit %1 - + BattleChip Gate... BattleChip Gate... - + Audio/&Video Audio/&Video - + Frame size Bildgröße - + Toggle fullscreen Vollbildmodus umschalten - + Lock aspect ratio Seitenverhältnis korrigieren - + Force integer scaling Pixelgenaue Skalierung (Integer scaling) - + Interframe blending Interframe-Überblendung - + Frame&skip Frame&skip - + Mute Stummschalten - + FPS target Bildwiederholrate - + Take &screenshot &Screenshot erstellen - + F12 F12 - + Clear Leeren - + Game Boy Printer... Game Boy Printer... - + Video layers Video-Ebenen - + Audio channels Audio-Kanäle - + Adjust layer placement... Lage der Bildebenen anpassen... - + &Tools &Werkzeuge - + View &logs... &Logs ansehen... - + Game &overrides... Spiel-&Überschreibungen... - + &Cheats... &Cheats... - + Open debugger console... Debugger-Konsole öffnen... - + Start &GDB server... &GDB-Server starten... - + Settings... Einstellungen... - + Select folder Ordner auswählen - + Save games (%1) Spielstände (%1) - + Select save game Spielstand auswählen - + mGBA save state files (%1) mGBA-Savestates (%1) - - + + Select save state Savestate auswählen - + Select e-Reader dotcode e-Reader-Code auswählen - + e-Reader card (*.raw *.bin *.bmp) e-Reader-Karte (*.raw *.bin *.bmp) - + Couldn't Start Konnte nicht gestartet werden - + Could not start game. Spiel konnte nicht gestartet werden. - + Add folder to library... Ordner zur Bibliothek hinzufügen... - + Load alternate save game... Alternativen Spielstand laden... - + Load temporary save game... Temporären Spielstand laden... - + Scan e-Reader dotcodes... e-Reader-Code einlesen... - + Import GameShark Save... GameShare-Speicherstand importieren... - + Export GameShark Save... GameShark-Speicherstand exportieren... - + About... Über... - + %1× %1x - + Bilinear filtering Bilineare Filterung - + Native (59.7275) Nativ (59.7275) - + Record A/V... Audio/Video aufzeichnen... - + Record GIF/WebP/APNG... GIF/WebP/APNG aufzeichnen... - + Game Pak sensors... Spielmodul-Sensoren... - + View &palette... &Palette betrachten... - + View &sprites... &Sprites betrachten... - + View &tiles... &Tiles betrachten... - + View &map... &Map betrachten... - + &Frame inspector... &Bildbetrachter... - + View memory... Speicher betrachten... - + Search memory... Speicher durchsuchen... - + View &I/O registers... &I/O-Register betrachten... - + Record debug video log... Video-Protokoll aufzeichnen... - + Stop debug video log Aufzeichnen des Video-Protokolls beenden - + Exit fullscreen Vollbildmodus beenden - + GameShark Button (held) GameShark-Taste (gehalten) - + Autofire Autofeuer - + Autofire A Autofeuer A - + Autofire B Autofeuer B - + Autofire L Autofeuer L - + Autofire R Autofeuer R - + Autofire Start Autofeuer Start - + Autofire Select Autofeuer Select - + Autofire Up Autofeuer nach oben - + Autofire Right Autofeuer rechts - + Autofire Down Autofeuer nach unten - + Autofire Left Autofeuer links QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4747,6 +4830,110 @@ Game Boy Advance ist eine eingetragene Marke von Nintendo Co., Ltd.Savestate erzeugen und anhängen + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + Durchsuchen + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5466,17 +5653,17 @@ wenn vorhanden Tastenkürzel bearbeiten - + Keyboard Tastatur - + Gamepad Gamepad - + Clear Löschen diff --git a/src/platform/qt/ts/mgba-en.ts b/src/platform/qt/ts/mgba-en.ts index 9b13dbabb..ebc481dfd 100644 --- a/src/platform/qt/ts/mgba-en.ts +++ b/src/platform/qt/ts/mgba-en.ts @@ -1231,17 +1231,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 - + Could not load game. Are you sure it's in the correct format? - + Failed to open save file. Is the save directory writable? @@ -1249,52 +1249,52 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::FrameView - + Export frame - + Portable Network Graphics (*.png) - + None - + Background - + Window - + Objwin - + Sprite - + Backdrop - + Frame - + %1 %2 @@ -1302,7 +1302,7 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence @@ -3493,62 +3493,62 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection - + Save selection - + Paste - + Load - + All - + Load TBL - + Save selected memory - + Failed to open output file: %1 - + Load memory - + Failed to open input file: %1 - + TBL - + ISO-8859-1 @@ -3718,16 +3718,79 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3889,726 +3952,746 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - - + + Select save - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - - Import GameShark Save... + + Convert save game... + Import GameShark Save... + + + + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4744,6 +4827,110 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5458,17 +5645,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - + Keyboard - + Gamepad - + Clear diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index 557274646..9977fed8c 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -1232,17 +1232,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 Error al abrir el archivo del juego: %1 - + Could not load game. Are you sure it's in the correct format? No se pudo cargar el juego. ¿Estás seguro de que está en el formato correcto? - + Failed to open save file. Is the save directory writable? Error al abrir el archivo de guardado: ¿El directorio tiene permisos de escritura? @@ -1250,52 +1250,52 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::FrameView - + Export frame Exportar cuadro - + Portable Network Graphics (*.png) Gráficos de red portátiles (*.png) - + None Ninguno - + Background Fondo (BG) - + Window Ventana (WIN) - + Objwin Objwin - + Sprite Sprite - + Backdrop Telón de fondo (backdrop) - + Frame Cuadro - + %1 %2 %1× {1 %2?} @@ -1303,7 +1303,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence Habilitar Rich Presence en Discord @@ -3494,62 +3494,62 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection Copiar selección - + Save selection Guardar selección - + Paste Pegar - + Load Cargar - + All Todo - + Load TBL Cargar TBL - + Save selected memory Guardar memoria seleccionada - + Failed to open output file: %1 Error al abrir el archivo de salida: %1 - + Load memory Cargar memoria - + Failed to open input file: %1 Error al abrir el archivo de entrada: %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3719,16 +3719,79 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive Archivo del reporte de bugs - + ZIP archive (*.zip) Archivo ZIP (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3890,101 +3953,101 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROMs de Game Boy Advance (%1) - + Game Boy ROMs (%1) ROMs de Game Boy (%1) - + All ROMs (%1) Todas las ROMs (%1) - + %1 Video Logs (*.mvl) Video-registros de %1 (*.mvl) - + Archives (%1) Contenedores (%1) - - - + + + Select ROM Seleccionar ROM - + Select folder Seleccionar carpeta - - + + Select save Seleccionar guardado - + Select patch Seleccionar parche - + Patches (*.ips *.ups *.bps) Parches (*.ips *.ups *.bps) - + Select e-Reader dotcode Seleccionar dotcode del e-Reader - + e-Reader card (*.raw *.bin *.bmp) Tarjeta e-Reader (*.raw *.bin *.bmp) - + Select image Seleccionar imagen - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Archivo de imagen (*.png *.gif *.jpg *.jpeg);;Todos los archivos (*) - - + + GameShark saves (*.sps *.xps) Guardados de GameShark (*.sps *.xps) - + Select video log Seleccionar video-registro - + Video logs (*.mvl) Video-registros (*.mvl) - + Crash Error fatal - + The game has crashed with the following error: %1 @@ -3993,625 +4056,645 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. %1 - + Unimplemented BIOS call Llamada a BIOS no implementada - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Este juego utiliza una llamada al BIOS que no se ha implementado. Utiliza el BIOS oficial para obtener la mejor experiencia. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. No se pudo crear un dispositivo de pantalla apropiado, recurriendo a software. Los juegos pueden funcionar lentamente, especialmente con ventanas grandes. - + Really make portable? ¿Hacer "portable"? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Esto hará que el emulador cargue su configuración desde el mismo directorio que el ejecutable. ¿Quieres continuar? - + Restart needed Reinicio necesario - + Some changes will not take effect until the emulator is restarted. Algunos cambios no surtirán efecto hasta que se reinicie el emulador. - + - Player %1 of %2 - Jugador %1 de %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &Archivo - + Load &ROM... Cargar &ROM... - + Load ROM in archive... Cargar ROM desde contenedor... - + Add folder to library... Agregar carpeta a la biblioteca... - + Load &patch... Cargar &parche... - + Boot BIOS Arrancar BIOS - + Replace ROM... Reemplazar ROM... - + ROM &info... &Información de la ROM... - + Recent Recientes - + Make portable Hacer "portable" - + &Load state Ca&rgar estado - + Report bug... Reportar bug... - + About... Acerca de... - + Game Pak sensors... Sensores del cartucho... - + Clear Limpiar - + Load state file... Cargar archivo de estado... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + &Save state Guardar e&stado - + Save state file... Guardar archivo de estado... - + Quick load Cargado rápido - + Quick save Guardado rápido - + Load recent Cargar reciente - + Save recent Guardar reciente - + Undo load state Deshacer cargar estado - + Undo save state Deshacer guardar estado - - + + State &%1 Estado &%1 - + Load camera image... Cargar imagen para la cámara... - + + Convert save game... + + + + New multiplayer window Nueva ventana multijugador - + E&xit Salir (&X) - + &Emulation &Emulación - + &Reset &Reinicializar - + Sh&utdown Apagar (&U) - + Yank game pak Tirar del cartucho - + &Pause &Pausar - + &Next frame Cuadro siguie&nte - + Fast forward (held) Avance rápido (mantener) - + &Fast forward &Avance rápido - + Fast forward speed Velocidad de avance rápido - + Unbounded Sin límite - + %0x %0x - + Rewind (held) Rebobinar (mantener) - + Re&wind Re&bobinar - + Step backwards Paso hacia atrás - + Sync to &video Sincronizar a &video - + Sync to &audio Sincronizar a au&dio - + Solar sensor Sensor solar - + Increase solar level Subir nivel - + Decrease solar level Bajar nivel - + Brightest solar level Más claro - + Darkest solar level Más oscuro - + Brightness %1 Brillo %1 - + Audio/&Video Audio/&video - + Frame size Tamaño del cuadro - + Toggle fullscreen Pantalla completa - + Lock aspect ratio Bloquear proporción de aspecto - + Force integer scaling Forzar escala a enteros - + Bilinear filtering Filtro bilineal - + Frame&skip &Salto de cuadros - + Mute Silenciar - + FPS target Objetivo de FPS - + Native (59.7275) Nativo (59,7275) - + Take &screenshot Tomar pan&tallazo - + F12 F12 - + Game Boy Printer... Game Boy Printer... - + BattleChip Gate... BattleChip Gate... - + %1× %1× - + Interframe blending Mezcla entre cuadros - + Record A/V... Grabar A/V... - + Video layers Capas de video - + Audio channels Canales de audio - + Adjust layer placement... Ajustar ubicación de capas... - + &Tools Herramien&tas - + View &logs... Ver re&gistros... - + Game &overrides... Ajustes específic&os por juego... - + Couldn't Start No se pudo iniciar - + Could not start game. No se pudo iniciar el juego. - + Scan e-Reader dotcodes... Escanear dotcodes del e-Reader... - + Import GameShark Save... Importar desde GameShark... - + Export GameShark Save... Exportar a GameShark... - + Record GIF/WebP/APNG... Grabar GIF/WebP/APNG... - + &Cheats... Tru&cos... - + Settings... Ajustes... - + Open debugger console... Abrir consola de depuración... - + Start &GDB server... Iniciar servidor &GDB... - + View &palette... Ver &paleta... - + View &sprites... Ver &sprites... - + View &tiles... Ver &tiles... - + View &map... Ver &mapa... - + &Frame inspector... Inspec&tor de cuadros... - + View memory... Ver memoria... - + Search memory... Buscar memoria... - + View &I/O registers... Ver registros &I/O... - + Record debug video log... Grabar registro de depuración de video... - + Stop debug video log Detener registro de depuración de video - + Exit fullscreen Salir de pantalla completa - + GameShark Button (held) Botón GameShark (mantener) - + Autofire Disparo automático - + Autofire A Disparo automático A - + Autofire B Disparo automático B - + Autofire L Disparo automático L - + Autofire R Disparo automático R - + Autofire Start Disparo automático Start - + Autofire Select Disparo automático Select - + Autofire Up Disparo automático Arriba - + Autofire Right Disparo automático Derecha - + Autofire Down Disparo automático Abajo - + Autofire Left Disparo automático Izquierda QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4747,6 +4830,110 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + Examinar + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5461,17 +5648,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Editar atajos de teclado - + Keyboard Teclado - + Gamepad Mando - + Clear Limpiar diff --git a/src/platform/qt/ts/mgba-fr.ts b/src/platform/qt/ts/mgba-fr.ts index 84cb4ebeb..c2f775641 100644 --- a/src/platform/qt/ts/mgba-fr.ts +++ b/src/platform/qt/ts/mgba-fr.ts @@ -1225,17 +1225,17 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 Échec de l'ouverture du fichier de jeu : %1 - + Could not load game. Are you sure it's in the correct format? Impossible de charger le jeu. Êtes-vous sûr qu'il est dans le bon format ? - + Failed to open save file. Is the save directory writable? Impossible d'ouvrir le fichier de sauvegarde. Le répertoire de sauvegarde est-il accessible en écriture ? @@ -1243,52 +1243,52 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::FrameView - + Export frame Exporter l'image - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - + None Aucun - + Background Arrière plan - + Window Fenêtre - + Objwin - + Sprite Sprite - + Backdrop Toile de fond - + Frame - + %1 %2 %1 %2 @@ -1296,7 +1296,7 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence Activer intégration avec Discord @@ -3505,62 +3505,62 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection Copier la sélection - + Save selection Sauvegarder la sélection - + Paste Coller - + Load Charger - + All Tout - + Load TBL Charger le TBL - + Save selected memory Sauvegarder la mémoire sélectionné - + Failed to open output file: %1 Impossible d'ouvrir le fichier de sortie : %1 - + Load memory Charger la mémoire - + Failed to open input file: %1 Impossible d'ouvrir le fichier d'entrée : %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3730,16 +3730,79 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive Archive de signalement d'erreur - + ZIP archive (*.zip) Archive ZIP (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3901,101 +3964,101 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROMs de Game Boy Advance (%1) - + Game Boy ROMs (%1) ROMs de Game Boy (%1) - + All ROMs (%1) Toutes les ROM (%1) - + %1 Video Logs (*.mvl) %1 Journaux vidéo (*.mvl) - + Archives (%1) Archives (%1) - - - + + + Select ROM Choisir une ROM - + Select folder Choisir un dossier - - + + Select save Choisir une sauvegarde - + Select patch Sélectionner un correctif - + Patches (*.ips *.ups *.bps) Correctifs/Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode Sélectionnez le numéro de point du e-Reader - + e-Reader card (*.raw *.bin *.bmp) e-Reader carte (*.raw *.bin *.bmp) - + Select image Choisir une image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Image (*.png *.gif *.jpg *.jpeg);;Tous les fichiers (*) - - + + GameShark saves (*.sps *.xps) Sauvegardes GameShark (*.sps *.xps) - + Select video log Sélectionner un journal vidéo - + Video logs (*.mvl) Journaux vidéo (*.mvl) - + Crash Plantage - + The game has crashed with the following error: %1 @@ -4004,625 +4067,645 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. - + Unimplemented BIOS call Requête au BIOS non supporté - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Ce jeu utilise un appel BIOS qui n'est pas implémenté. Veuillez utiliser le BIOS officiel pour une meilleure expérience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. Échec de la création d'un périphérique d'affichage approprié, retour à l'affichage du logiciel. Les jeux peuvent fonctionner lentement, en particulier avec des fenêtres plus grandes. - + Really make portable? Vraiment rendre portable ? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Cela amènera l'émulateur à charger sa configuration depuis le même répertoire que l'exécutable. Souhaitez vous continuer ? - + Restart needed Un redémarrage est nécessaire - + Some changes will not take effect until the emulator is restarted. Certains changements ne prendront effet qu'après le redémarrage de l'émulateur. - + - Player %1 of %2 - Joueur %1 of %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &Fichier - + Load &ROM... Charger une &ROM… - + Load ROM in archive... Charger la ROM d'une archive… - + Add folder to library... Ajouter un dossier à la bibliothèque… - + Load &patch... Charger un c&orrectif… - + Boot BIOS Démarrer le BIOS - + Replace ROM... Remplacer la ROM… - + ROM &info... &Infos sur la ROM… - + Recent Récent - + Make portable Rendre portable - + &Load state &Charger un état - + &Save state &Sauvegarder un état - + Quick load Chargement rapide - + Quick save Sauvegarde rapide - + Load recent Charger un fichier récent - + Save recent Sauvegarder un fichier récent - + Undo load state Annuler le chargement de l'état - + Undo save state Annuler la sauvegarde de l'état - - + + State &%1 État &%1 - + Load camera image... Charger une image de la caméra… - + + Convert save game... + + + + New multiplayer window Nouvelle fenêtre multijoueur - + Report bug... Signalement de l'erreur… - + E&xit &Quitter - + &Emulation &Émulation - + &Reset &Réinitialiser - + Sh&utdown Extin&ction - + Yank game pak Yank game pak - + &Pause &Pause - + &Next frame &Image suivante - + Fast forward (held) Avance rapide (maintenir) - + &Fast forward A&vance rapide - + Fast forward speed Vitesse de l'avance rapide - + Unbounded Sans limites - + %0x %0x - + Rewind (held) Rembobiner (maintenir) - + Re&wind Rem&bobiner - + Step backwards Retour en arrière - + Sync to &video Synchro &vidéo - + Sync to &audio Synchro &audio - + Solar sensor Capteur solaire - + Increase solar level Augmenter le niveau solaire - + Decrease solar level Diminuer le niveau solaire - + Brightest solar level Tester le niveau solaire - + Darkest solar level Assombrir le niveau solaire - + Brightness %1 Luminosité %1 - + Audio/&Video Audio/&Vidéo - + Frame size Taille de l'image - + Toggle fullscreen Basculer en plein écran - + Lock aspect ratio Bloquer les proportions - + Force integer scaling Forcer la mise à l'échelle par des nombres entiers - + Bilinear filtering Filtrage bilinèaire - + Frame&skip &Saut d'image - + Mute Muet - + FPS target FPS ciblé - + Take &screenshot Prendre une ca&pture d'écran - + F12 F12 - + Game Boy Printer... Imprimante GameBoy… - + Video layers Couches vidéo - + Audio channels Canaux audio - + Adjust layer placement... Ajuster la disposition… - + &Tools Ou&tils - + View &logs... Voir les &journaux… - + Game &overrides... - + Couldn't Start N'a pas pu démarrer - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Could not start game. Impossible de démarrer le jeu. - + Load alternate save game... - + Load temporary save game... - + Scan e-Reader dotcodes... Scanner les dotcodes e-Reader... - + Load state file... Charger le fichier d'état... - + Save state file... Enregistrer le fichier d'état... - + Import GameShark Save... Importer la sauvegarde de GameShark... - + Export GameShark Save... Exporter la sauvegarde de GameShark... - + About... À propos de… - + BattleChip Gate... - + %1× %1× - + Interframe blending Mélange d'images - + Native (59.7275) Natif (59.7275) - + Record A/V... Enregistrer A/V... - + Record GIF/WebP/APNG... Enregistrer GIF/WebP/APNG... - + Game Pak sensors... Capteurs de la Game Pak... - + &Cheats... &Cheats… - + Settings... Paramètres… - + Open debugger console... Ouvrir la console de débug… - + Start &GDB server... Démarrer le serveur &GDB… - + View &palette... Voir la &palette… - + View &sprites... Voir les &sprites… - + View &tiles... Voir les &tiles… - + View &map... Voir la &map… - + &Frame inspector... Inspecteur de &frame... - + View memory... Voir la mémoire… - + Search memory... Recherche dans la mémoire… - + View &I/O registers... Voir les registres d'&E/S... - + Record debug video log... Enregistrer le journal vidéo de débogage... - + Stop debug video log Arrêter le journal vidéo de débogage - + Exit fullscreen Quitter le plein écran - + GameShark Button (held) Bouton GameShark (maintenir) - + Autofire Tir automatique - + Autofire A Tir automatique A - + Autofire B Tir automatique B - + Autofire L Tir automatique L - + Autofire R Tir automatique R - + Autofire Start Tir automatique Start - + Autofire Select Tir automatique Select - + Autofire Up Tir automatique Up - + Autofire Right Tir automatique Right - + Autofire Down Tir automatique Down - + Autofire Left Tir automatique Gauche - + Clear Vider QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4758,6 +4841,110 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Créer et inclure l'état de sauvegarde + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + Parcourir + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5473,17 +5660,17 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Modifier les raccourcis - + Keyboard Clavier - + Gamepad Manette de jeu - + Clear Vider diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index 0553f6f27..565de4ee2 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -1224,17 +1224,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 Impossibile aprire il file di gioco: %1 - + Could not load game. Are you sure it's in the correct format? Impossibile caricare il gioco. Sei sicuro che sia nel formato corretto? - + Failed to open save file. Is the save directory writable? Impossibile aprire il file di salvataggio. La directory di salvataggio è scrivibile? @@ -1242,52 +1242,52 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::FrameView - + Export frame Esporta Frame - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - + None Nessuno - + Background Sfondo - + Window Finestra - + Objwin Objwin - + Sprite Sprite - + Backdrop Sfondo - + Frame Inquadratura - + %1 %2 %1x {1 %2?} @@ -1295,7 +1295,7 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence Abilita Discord Rich Presence @@ -3486,62 +3486,62 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection Copia selezione - + Save selection Salva selezione - + Paste Incolla - + Load Carica - + All Tutto - + Load TBL Carica TBL - + Save selected memory Salva la memoria selezionata - + Failed to open output file: %1 Impossibile aprire il file di output: %1 - + Load memory Carica memoria - + Failed to open input file: %1 Impossibile aprire il file di input: %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3711,16 +3711,79 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive Archivio delle segnalazioni di bug - + ZIP archive (*.zip) Archivio ZIP (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3882,96 +3945,96 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROM per Game Boy Advance (%1) - + Game Boy ROMs (%1) ROM per Game Boy (%1) - + All ROMs (%1) Tutte le ROM (%1) - + %1 Video Logs (*.mvl) %1 log Video (*.mvl) - + Archives (%1) Archivi (%1) - - - + + + Select ROM Seleziona ROM - - + + Select save Seleziona salvataggio - + Select patch Seleziona patch - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode Selezione e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) e-Reader card (*.raw *.bin *.bmp) - + Select image Seleziona immagine - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) File immagine (*.png *.gif *.jpg *.jpeg);;Tutti i file (*) - - + + GameShark saves (*.sps *.xps) Salvataggi GameShark (*.sps *.xps) - + Select video log Seleziona log video - + Video logs (*.mvl) Log video (*.mvl) - + Crash Errore fatale - + The game has crashed with the following error: %1 @@ -3980,630 +4043,650 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. %1 - + Unimplemented BIOS call BIOS non implementato - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Questo gioco utilizza una chiamata BIOS non implementata. Utilizza il BIOS ufficiale per una migliore esperienza. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. Impossibile creare un dispositivo di visualizzazione appropriato, tornando alla visualizzazione software. I giochi possono funzionare lentamente, specialmente con finestre più grandi. - + Really make portable? Vuoi davvero rendere portatile l'applicazione? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? In questo modo l'emulatore carica la propria configurazione dalla stessa cartella dell'eseguibile. Vuoi continuare? - + Restart needed È necessario riavviare - + Some changes will not take effect until the emulator is restarted. Alcune modifiche non avranno effetto finché l'emulatore non verrà riavviato. - + - Player %1 of %2 - Giocatore %1 di %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File File - + Load &ROM... Carica ROM... - + Load ROM in archive... Carica la ROM in archivio... - + Load &patch... Carica patch... - + Boot BIOS Avvia BIOS - + Replace ROM... Sostituisci la ROM... - + Scan e-Reader dotcodes... Scansiona e-Reader dotcode... - + ROM &info... Informazioni ROM... - + Recent Recente - + Make portable Rendi portatile - + &Load state Carica stato - + &Save state Salva stato - + Quick load Caricamento rapido - + Quick save Salvataggio rapido - + Load recent Carica recente - + Save recent Salva recente - + Undo load state Annulla il caricamento dello stato - + Undo save state Annulla salvataggio stato - - + + State &%1 Stato %1 - + Load camera image... Carica immagine camera... - + + Convert save game... + + + + New multiplayer window Nuova finestra multigiocatore - + Report bug... Segnala bug... - + E&xit Esci (&X) - + &Emulation Emulazione - + &Reset Reset - + Sh&utdown Spegni (&U) - + Yank game pak Yank game pak - + &Pause Pausa - + &Next frame Salta il prossimo frame (&N) - + Fast forward (held) Avanzamento rapido (tieni premuto) - + &Fast forward Avanzamento rapido (&F) - + Fast forward speed Velocità di avanzamento rapido - + Unbounded Illimitata - + %0x %0x - + Rewind (held) Riavvolgimento (tieni premuto) - + Re&wind Riavvolgimento (&W) - + Step backwards Torna indietro - + Sync to &video Sincronizza con il video - + Sync to &audio Sincronizza con l'audio - + Solar sensor Sensore solare - + Increase solar level Aumenta il livello solare - + Decrease solar level Riduce il livello solare - + Brightest solar level Livello solare brillante - + Darkest solar level Livello solare più scuro - + Brightness %1 Luminosità %1 - + Audio/&Video Audio/Video - + Frame size Dimensioni Frame - + Toggle fullscreen Abilita Schermo Intero - + Lock aspect ratio Blocca rapporti aspetto - + Frame&skip Salto frame - + Mute Muto - + FPS target FPS finali - + Take &screenshot Acquisisci screenshot - + F12 F12 - + Record GIF/WebP/APNG... Registra GIF / WebP / APNG ... - + Video layers Layers video - + Audio channels Canali audio - + &Tools Strumenti - + View &logs... Visualizza (&Logs) &registri... - + Game &overrides... Valore specifico per il gioco... - + &Cheats... Trucchi... - + Open debugger console... Apri debugger console... - + Start &GDB server... Avvia server GDB... - + Settings... Impostazioni... - + Select folder Seleziona cartella - + Couldn't Start Non è stato possibile avviare - + Could not start game. Non è stato possibile avviare il gioco. - + Add folder to library... Aggiungi cartella alla libreria... - + Load state file... Carica stato di salvataggio... - + Save state file... Salva stato di salvataggio... - + Import GameShark Save... Importa Salvataggio GameShark... - + Export GameShark Save... Esporta Salvataggio GameShark... - + About... Informazioni… - + Force integer scaling Forza l'integer scaling - + Bilinear filtering Filtro bilineare - + Game Boy Printer... Stampante Game Boy... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + BattleChip Gate... BattleChip Gate... - + %1× %1x - + Interframe blending Interframe blending - + Native (59.7275) Nativo (59.7) - + Record A/V... Registra A/V... - + Adjust layer placement... Regola posizionamento layer... - + Game Pak sensors... Sensori Game Pak... - + View &palette... Mostra palette... - + View &sprites... Mostra sprites... - + View &tiles... Mostra tiles... - + View &map... Mostra mappa... - + &Frame inspector... &Frame inspector... - + View memory... Mostra memoria... - + Search memory... Ricerca memoria... - + View &I/O registers... Mostra registri I/O... - + Record debug video log... Registra debug video log... - + Stop debug video log Ferma debug video log - + Exit fullscreen Esci da Schermo Intero - + GameShark Button (held) Pulsante GameShark (tieni premuto) - + Autofire Pulsanti Autofire - + Autofire A Autofire A - + Autofire B Autofire B - + Autofire L Autofire L - + Autofire R Autofire R - + Autofire Start Autofire Start - + Autofire Select Autofire Select - + Autofire Up Autofire Su - + Autofire Right AAutofire Destra - + Autofire Down Autofire Giù - + Autofire Left Autofire Sinistra - + Clear Pulisci QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4739,6 +4822,110 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Creare e includere lo stato di salvataggio + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + Sfoglia + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5453,17 +5640,17 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Modifica le Scorciatoie - + Keyboard Tastiera - + Gamepad Gamepad - + Clear Svuota diff --git a/src/platform/qt/ts/mgba-ja.ts b/src/platform/qt/ts/mgba-ja.ts index a4ece0fe8..429249a16 100644 --- a/src/platform/qt/ts/mgba-ja.ts +++ b/src/platform/qt/ts/mgba-ja.ts @@ -1224,17 +1224,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 ゲームファイルを開けませんでした: %1 - + Could not load game. Are you sure it's in the correct format? ゲームをロードできませんでした。ゲームのフォーマットが正しいことを確認してください。 - + Failed to open save file. Is the save directory writable? セーブファイルを開けませんでした。セーブディレクトリが書き込み可能であることを確認してください。 @@ -1242,52 +1242,52 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::FrameView - + Export frame フレームを書き出す - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - + None なし - + Background バックグラウンド - + Window ウインドウ - + Objwin Objwin - + Sprite スプライト - + Backdrop 背景 - + Frame フレーム - + %1 %2 %1 %2 @@ -1295,7 +1295,7 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence DiscordのRich Presence有効 @@ -3486,62 +3486,62 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection 選択値をコピー - + Save selection 選択値を保存 - + Paste 貼り付け - + Load ロード - + All All - + Load TBL TBLをロード - + Save selected memory 選択したメモリを保存 - + Failed to open output file: %1 出力ファイルを開けませんでした: %1 - + Load memory メモリをロード - + Failed to open input file: %1 入力ファイルを開けませんでした: %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3711,16 +3711,79 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive バグレポートアーカイブ - + ZIP archive (*.zip) ZIPアーカイブ (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3882,101 +3945,101 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ゲームボーイアドバンスファイル (%1) - + Game Boy ROMs (%1) ゲームボーイファイル (%1) - + All ROMs (%1) すべてのファイル (%1) - + %1 Video Logs (*.mvl) %1ビデオログ (*.mvl) - + Archives (%1) アーカイブファイル (%1) - - - + + + Select ROM ROMを開く - + Select folder フォルダを開く - - + + Select save セーブを開く - + Select patch パッチを開く - + Patches (*.ips *.ups *.bps) パッチファイル (*.ips *.ups *.bps) - + Select e-Reader dotcode カードeを開く - + e-Reader card (*.raw *.bin *.bmp) カードe (*.raw *.bin *.bmp) - + Select image 画像を開く - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) 画像ファイル (*.png *.gif *.jpg *.jpeg);;すべてのファイル (*) - - + + GameShark saves (*.sps *.xps) GameSharkセーブファイル (*.sps *.xps) - + Select video log ビデオログを開く - + Video logs (*.mvl) ビデオログ (*.mvl) - + Crash クラッシュ - + The game has crashed with the following error: %1 @@ -3985,625 +4048,645 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. %1 - + Couldn't Start 起動失敗 - + Could not start game. ゲームを起動できませんでした。 - + Unimplemented BIOS call 未実装のBIOS呼び出し - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. このゲームは実装されていないBIOS呼び出しを使用します。最高のエクスペリエンスを得るには公式のBIOSを使用してください。 - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. 適切なディスプレイデバイスの作成に失敗し、ソフトディスプレイにフォールバックしました。特に大きなウィンドウでは、ゲームの実行が遅い場合があります。 - + Really make portable? 本当にポータブルにしますか? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? これによりエミュレータは実行ファイルと同じディレクトリにある設定ファイルをロードします。続けますか? - + Restart needed 再起動が必要 - + Some changes will not take effect until the emulator is restarted. 一部の変更は、エミュレータを再起動するまで有効になりません。 - + - Player %1 of %2 - プレーヤー %1 of %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &ファイル (&F) - + Load &ROM... ROMをロード... - + Load ROM in archive... アーカイブにROMをロード... - + Add folder to library... ライブリーにフォルダを追加... - + Load &patch... パッチをロード... (&P) - + Boot BIOS BIOSを起動 - + Replace ROM... ROMを交換... - + Scan e-Reader dotcodes... カードeをスキャン... - + ROM &info... ROM情報... (&I) - + Recent 最近開いたROM - + Make portable ポータブル化 - + &Load state ステートをロード (&L) - + Report bug... バグ報告 - + About... バージョン情報... - + Record GIF/WebP/APNG... GIF/WebP/APNGを記録 - + Game Pak sensors... カートリッジセンサー... - + Clear 消去 - + Load state file... ステートファイルをロード... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + &Save state ステートをセーブ (&S) - + Save state file... ステートファイルをセーブ... - + Quick load クイックロード - + Quick save クイックセーブ - + Load recent 最近使ったクイックロットからロード - + Save recent 最近使ったクイックロットにセーブ - + Undo load state クイックロードを元に戻す - + Undo save state クイックセーブを元に戻す - - + + State &%1 クイックスロット &%1 - + Load camera image... カメラ画像をロード... - + + Convert save game... + + + + Import GameShark Save... GameSharkスナップショットを読み込む - + Export GameShark Save... GameSharkスナップショットを書き出す - + New multiplayer window 新しいウィンドウ(マルチプレイ) - + E&xit 終了 (&X) - + &Emulation エミュレーション (&E) - + &Reset リセット (&R) - + Sh&utdown 閉じる (&U) - + Yank game pak ゲームパックをヤンク - + &Pause 一時停止 (&P) - + &Next frame 次のフレーム (&N) - + Fast forward (held) 早送り(押し) - + &Fast forward 早送り (&F) - + Fast forward speed 早送り速度 - + Unbounded 制限なし - + %0x %0x - + Rewind (held) 巻戻し(押し) - + Re&wind 巻戻し (&R) - + Step backwards 後退 - + Sync to &video ビデオ同期 (&V) - + Sync to &audio オーディオ同期 (&A) - + Solar sensor 太陽センサー - + Increase solar level 明るさを上げる - + Decrease solar level 明るさを下げる - + Brightest solar level 明るさ最高 - + Darkest solar level 明るさ最低 - + Brightness %1 明るさ %1 - + Audio/&Video オーディオ/ビデオ (&V) - + Frame size 画面サイズ - + Toggle fullscreen 全画面表示 - + Lock aspect ratio 縦横比を固定 - + Force integer scaling 整数スケーリングを強制 - + Bilinear filtering バイリニアフィルタリング - + Frame&skip フレームスキップ (&S) - + Mute ミュート - + FPS target FPS - + Native (59.7275) ネイティブ(59.7275) - + Take &screenshot スクリーンショット (&S) - + F12 F12 - + Game Boy Printer... ポケットプリンタ... - + BattleChip Gate... チップゲート... - + %1× %1× - + Interframe blending フレーム間混合 - + Record A/V... ビデオ録画... - + Video layers ビデオレイヤー - + Audio channels オーディオチャンネル - + Adjust layer placement... レイヤーの配置を調整... - + &Tools ツール (&T) - + View &logs... ログビューアー... (&L) - + Game &overrides... ゲーム別設定... (&O) - + &Cheats... チート... (&C) - + Settings... 設定... - + Open debugger console... デバッガコンソールを開く... - + Start &GDB server... GDBサーバを起動... (&G) - + View &palette... パレットビューアー... (&P) - + View &sprites... スプライトビューアー... (&S) - + View &tiles... タイルビューアー... (&T) - + View &map... マップビューアー... (&M) - + &Frame inspector... フレームインスペクタ... (&F) - + View memory... メモリビューアー... - + Search memory... メモリ検索... - + View &I/O registers... IOビューアー... (&I) - + Record debug video log... デバッグビデオログ... - + Stop debug video log デバッグビデオログを停止 - + Exit fullscreen 全画面表示を終了 - + GameShark Button (held) GameSharkボタン(押し) - + Autofire 連打 - + Autofire A 連打 A - + Autofire B 連打 B - + Autofire L 連打 L - + Autofire R 連打 R - + Autofire Start 連打 Start - + Autofire Select 連打 Select - + Autofire Up 連打 上 - + Autofire Right 連打 右 - + Autofire Down 連打 下 - + Autofire Left 連打 左 QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4739,6 +4822,110 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. セーブステートファイルを作成して含める + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + 参照 + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5453,17 +5640,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. ショートカットキーを編集 - + Keyboard キーボード - + Gamepad ゲームパッド - + Clear 削除 diff --git a/src/platform/qt/ts/mgba-ko.ts b/src/platform/qt/ts/mgba-ko.ts index da218fc18..ababe148f 100644 --- a/src/platform/qt/ts/mgba-ko.ts +++ b/src/platform/qt/ts/mgba-ko.ts @@ -1232,17 +1232,17 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::CoreManager - + Failed to open game file: %1 게임 파일을 열지 못했습니다: %1 - + Could not load game. Are you sure it's in the correct format? 게임을 로드할 수 없습니다. 올바른 형식인지 확인하십시오. - + Failed to open save file. Is the save directory writable? @@ -1250,52 +1250,52 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::FrameView - + Export frame - + Portable Network Graphics (*.png) 휴대용 네트워크 그래픽 (*.png) - + None 없음 - + Background 배경 - + Window - + Objwin - + Sprite - + Backdrop - + Frame - + %1 %2 %1x {1 %2?} @@ -1303,7 +1303,7 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::GBAApp - + Enable Discord Rich Presence @@ -3494,62 +3494,62 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::MemoryModel - + Copy selection 선택 항목 복사 - + Save selection 선택 항목 저장 - + Paste 붙여넣기 - + Load 로드 - + All 모두 - + Load TBL 테이블 로드 - + Save selected memory 선택한 메모리 저장 - + Failed to open output file: %1 출력 파일을 열지 못했습니다: %1 - + Load memory 메모리 로드 - + Failed to open input file: %1 입력 파일을 열지 못했습니다: %1 - + TBL 테이블 - + ISO-8859-1 ISO-8859-1 @@ -3719,16 +3719,79 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3890,96 +3953,96 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. QGBA::Window - + Game Boy Advance ROMs (%1) 게임 보이 어드밴스 롬 (%1) - + Game Boy ROMs (%1) 게임 보이 (%1) - + All ROMs (%1) 모든 롬 (%1) - + %1 Video Logs (*.mvl) %1 비디오 로그 (*.mvl) - + Archives (%1) 아카이브 (%1) - - - + + + Select ROM 롬 선택 - - + + Select save 저장 파일 선택 - + Select patch 패치 선택 - + Patches (*.ips *.ups *.bps) 패치 (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image 이미지 선택 - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) 이미지 파일 (*.png *.gif *.jpg *.jpeg);;모든 파일 (*) - - + + GameShark saves (*.sps *.xps) 게임샤크 저장 파일 (*.sps *.xps) - + Select video log 비디오 로그 선택 - + Video logs (*.mvl) 비디오 로그 (*.mvl) - + Crash 치명적인 오류 - + The game has crashed with the following error: %1 @@ -3988,630 +4051,650 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. %1 - + Unimplemented BIOS call 구현되지 않은 바이오스 호출 - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. 이 게임은 구현되지 않은 바이오스 호출을 사용합니다. 최상의 성능을 얻으려면 공식 바이오스를 사용하십시오. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? 정말로 휴대용을 만듭니까? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? 이렇게하면 에뮬레이터가 실행 파일과 동일한 디렉토리에서 구성을 로드하게됩니다. 계속 하시겠습니까? - + Restart needed 재시작 필요 - + Some changes will not take effect until the emulator is restarted. 일부 변경 사항은 에뮬레이터가 다시 시작될 때까지 적용되지 않습니다. - + - Player %1 of %2 - 플레이어 %1 의 %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &파일 - + Load &ROM... 로드 &롬... - + Load ROM in archive... 롬을 아카이브에 로드... - + Load &patch... 로드 &패치... - + Boot BIOS BIOS 부팅 - + Replace ROM... 롬 교체... - + Scan e-Reader dotcodes... - + ROM &info... 롬 &정보... - + Recent 최근 실행 - + Make portable 휴대용 만들기 - + &Load state &로드 파일 상태 - + &Save state &저장 파일 상태 - + Quick load 빠른 로드 - + Quick save 빠른 저장 - + Load recent 최근 실행 로드 - + Save recent 최근 실행 저장 - + Undo load state 로드 파일 상태 복원 - + Undo save state 저장 파일 상태 복원 - - + + State &%1 상태 &%1 - + Load camera image... 카메라 이미지 로드... - + + Convert save game... + + + + New multiplayer window 새로운 멀티 플레이어 창 - + E&xit 종&료 - + &Emulation &에뮬레이션 - + &Reset &재설정 - + Sh&utdown 종&료 - + Yank game pak 양키 게임 팩 - + &Pause &정지 - + &Next frame &다음 프레임 - + Fast forward (held) 빨리 감기 (누름) - + &Fast forward &빨리 감기 - + Fast forward speed 빨리 감기 속도 - + Unbounded 무제한 - + %0x %0x - + Rewind (held) 되김기 (누름) - + Re&wind 리&와인드 - + Step backwards 돌아가기 - + Sync to &video 비디오 &동기화 - + Sync to &audio 오디오 &동기화 - + Brightest solar level 가장 밝은 태양 수준 - + Darkest solar level 가장 어두운 태양 수준 - + Brightness %1 밝기 %1 - + Audio/&Video 오디오/&비디오 - + Frame size 프레임 크기 - + Toggle fullscreen 전체화면 전환 - + Lock aspect ratio 화면비 잠금 - + Frame&skip 프레임&건너뛰기 - + Mute 무음 - + FPS target FPS 대상 - + Take &screenshot 스크린샷 &찍기 - + F12 F12 - + Video layers 비디오 레이어 - + Audio channels 오디오 채널 - + &Tools &도구 - + View &logs... 로그 &보기... - + Game &overrides... 게임 &오버라이드... - + &Cheats... &치트.. - + Open debugger console... 디버거 콘솔 열기... - + Start &GDB server... GDB 서버 &시작... - + Settings... 설정... - + Select folder 폴더 선택 - + Couldn't Start - + Could not start game. - + Add folder to library... 라이브러리에 폴더 추가... - + Load state file... - + Save state file... - + Import GameShark Save... - + Export GameShark Save... - + Report bug... - + About... - + Solar sensor - + Increase solar level - + Decrease solar level - + Force integer scaling 정수 스케일링 강제 수행 - + Bilinear filtering 이중선형 필터링 - + Game Boy Printer... 게임 보이 프린터... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + BattleChip Gate... - + %1× %1x {1×?} - + Interframe blending - + Native (59.7275) Nativo (59.7) {59.7275)?} - + Record A/V... - + Record GIF/WebP/APNG... - + Adjust layer placement... 레이어 배치 조정... - + Game Pak sensors... - + View &palette... 팔레트 &보기... - + View &sprites... 스프라이트 &보기... - + View &tiles... 타일 &보기... - + View &map... 지도 &보기... - + &Frame inspector... - + View memory... 메모리 보기... - + Search memory... 메모리 검색... - + View &I/O registers... I/O 레지스터 &보기... - + Record debug video log... - + Stop debug video log - + Exit fullscreen 전체화면 종료 - + GameShark Button (held) 게임샤크 버튼 (누름) - + Autofire 연사 - + Autofire A 연사 A - + Autofire B 연사 B - + Autofire L 연사 L - + Autofire R 연사 R - + Autofire Start 연사 시작 - + Autofire Select - + Clear 정리 - + Autofire Up 연사 위쪽 - + Autofire Right 연사 오른쪽 - + Autofire Down 연사 아래쪽 - + Autofire Left 연사 왼쪽 QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4747,6 +4830,110 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + 브라우저 + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5461,17 +5648,17 @@ Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. 단축키 수정 - + Keyboard 키보드 - + Gamepad 게임패드 - + Clear 정리 diff --git a/src/platform/qt/ts/mgba-nl.ts b/src/platform/qt/ts/mgba-nl.ts index 94a279126..caaa8f697 100644 --- a/src/platform/qt/ts/mgba-nl.ts +++ b/src/platform/qt/ts/mgba-nl.ts @@ -1231,17 +1231,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 - + Could not load game. Are you sure it's in the correct format? - + Failed to open save file. Is the save directory writable? @@ -1249,52 +1249,52 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::FrameView - + Export frame - + Portable Network Graphics (*.png) - + None - + Background - + Window - + Objwin - + Sprite - + Backdrop - + Frame - + %1 %2 @@ -1302,7 +1302,7 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence @@ -3493,62 +3493,62 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection - + Save selection - + Paste - + Load - + All - + Load TBL - + Save selected memory - + Failed to open output file: %1 - + Load memory - + Failed to open input file: %1 - + TBL - + ISO-8859-1 @@ -3718,16 +3718,79 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3889,726 +3952,746 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - - + + Select save - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - - Import GameShark Save... + + Convert save game... + Import GameShark Save... + + + + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4744,6 +4827,110 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5458,17 +5645,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - + Keyboard - + Gamepad - + Clear diff --git a/src/platform/qt/ts/mgba-pt_BR.ts b/src/platform/qt/ts/mgba-pt_BR.ts index be8de3974..23035766b 100644 --- a/src/platform/qt/ts/mgba-pt_BR.ts +++ b/src/platform/qt/ts/mgba-pt_BR.ts @@ -1224,17 +1224,17 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 Falha ao abrir o arquivo do jogo: %1 - + Could not load game. Are you sure it's in the correct format? Não foi possível carregar o jogo. Tem certeza que está no formato correto? - + Failed to open save file. Is the save directory writable? Falha ao abrir o arquivo de salvamento. O diretório para salvar tem permissão de escrita? @@ -1242,52 +1242,52 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::FrameView - + Export frame Exportar quadro - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - + None Nenhum - + Background Plano de Fundo - + Window Janela - + Objwin - + Sprite Sprite - + Backdrop Cor de Fundo - + Frame - + %1 %2 %1 %2 @@ -1295,7 +1295,7 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence Habilitar o Discord Rich Presence @@ -3486,62 +3486,62 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection Copiar seleção - + Save selection Salvar seleção - + Paste Colar - + Load Carregar - + All Todos - + Load TBL Carregar TBL - + Save selected memory Salvar memória selecionada - + Failed to open output file: %1 Falha ao abrir arquivo de saída: %1 - + Load memory Carregar memória - + Failed to open input file: %1 Falha ao abrir arquivo de entrada: %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3711,16 +3711,79 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) Arquivo ZIP (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3882,101 +3945,101 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) ROMs de Game Boy Advance (%1) - + Game Boy ROMs (%1) ROMs de Game Boy (%1) - + All ROMs (%1) Todas as ROMs (%1) - + %1 Video Logs (*.mvl) %1 Logs de Vídeo (*.mvl) - + Archives (%1) Arquivos (%1) - - - + + + Select ROM Selecionar ROM - + Select folder Selecionar pasta - - + + Select save Selecionar salvamento - + Select patch Selecione correção - + Patches (*.ips *.ups *.bps) Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode Selecione dotcode do e-Reader - + e-Reader card (*.raw *.bin *.bmp) e-Reader card (*.raw *.bin *.bmp) - + Select image Selecionar imagem - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Arquivo de imagem (*.png *.gif *.jpg *.jpeg);;Todos os arquivos (*) - - + + GameShark saves (*.sps *.xps) GameShark saves (*.sps *.xps) - + Select video log Selecionar registro de vídeo - + Video logs (*.mvl) Video logs (*.mvl) - + Crash Travamento - + The game has crashed with the following error: %1 @@ -3985,625 +4048,645 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. %1 - + Unimplemented BIOS call Chamada de BIOS não implementada - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Este jogo usa uma chamada de BIOS que não está implementada. Por favor, use a BIOS oficial para uma melhor experiência. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? Quer mesmo tornar portátil? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Isto fará com que o emulador carregue sua configuração a partir do mesmo diretório que o executável. Você quer continuar? - + Restart needed É necessário reiniciar - + Some changes will not take effect until the emulator is restarted. Algumas alterações não terão efeito até que o emulador seja reiniciado. - + - Player %1 of %2 - Jogador %1 de %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File &Arquivo - + Load &ROM... Carregar &ROM... - + Load ROM in archive... Carregar ROM em arquivo... - + Add folder to library... Adicionar pasta à biblioteca... - + Load &patch... Carregar &patch... - + Boot BIOS Rodar BIOS - + Replace ROM... Substituir ROM... - + ROM &info... &Informações da ROM... - + Recent Recente - + Make portable Tornar portátil - + &Load state &Carregar Estado - + Report bug... - + About... Sobre... - + Game Pak sensors... Sensores de Game Pak... - + Clear Limpar - + Load state file... Carregar arquivo de estado... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + &Save state &Salvar Estado - + Save state file... Salvar arquivo de estado... - + Quick load Carregamento rápido - + Quick save Salvamento rápido - + Load recent Carregar recente - + Save recent Salvar recente - + Undo load state Desfazer carregar estado - + Undo save state Desfazer salvar estado - - + + State &%1 Estado &%1 - + Load camera image... Carregar imagem da câmera... - + + Convert save game... + + + + New multiplayer window Nova janela multijogador - + E&xit &Sair - + &Emulation &Emulação - + &Reset &Resetar - + Sh&utdown &Desligar - + Yank game pak Remover game pak - + &Pause &Pausar - + &Next frame &Próximo quadro - + Fast forward (held) Avançar rápido (segurado) - + &Fast forward Avanço &Rápido - + Fast forward speed Velocidade de avanço - + Unbounded Ilimitado - + %0x %0x - + Rewind (held) Retroceder (segurado) - + Re&wind Re&troceder - + Step backwards Voltar um passo - + Sync to &video Sincronizar para &vídeo - + Sync to &audio Sincronizar para &áudio - + Solar sensor Sensor solar - + Increase solar level Aumentar nível solar - + Decrease solar level Diminuir nível solar - + Brightest solar level Nível solar mais brilhante - + Darkest solar level Nível solar mais escuro - + Brightness %1 Brilho %1 - + Audio/&Video Áudio/&Vídeo - + Frame size Tamanho do quadro - + Toggle fullscreen Alternar tela cheia - + Lock aspect ratio Fixar proporção - + Force integer scaling Forçar dimensionamento inteiro - + Bilinear filtering Filtragem bilinear - + Frame&skip &Salto de quadro - + Mute Mudo - + FPS target Meta de FPS - + Native (59.7275) Nativo (59,7275) - + Take &screenshot Capturar &tela - + F12 F12 - + Game Boy Printer... Game Boy Printer... - + BattleChip Gate... BattleChip Gate... - + %1× %1× - + Interframe blending Interframe blending - + Record A/V... Gravar A/V... - + Video layers Camadas de vídeo - + Audio channels Canais de áudio - + Adjust layer placement... Ajustar posicionamento da camada... - + &Tools &Ferramentas - + View &logs... Visualizar &registros... - + Game &overrides... Game &overrides... - + Couldn't Start Não foi possível Iniciar - + Could not start game. Não foi possível iniciar o jogo. - + Scan e-Reader dotcodes... Escanear dotcode do e-Reader... - + Import GameShark Save... Importar salvamento do GameShark... - + Export GameShark Save... Exportar salvamento do GameShark... - + Record GIF/WebP/APNG... Gravar GIF/WebP/APNG... - + &Cheats... &Cheats... - + Settings... Configurações... - + Open debugger console... Abrir console de depuração... - + Start &GDB server... Iniciar servidor &GDB... - + View &palette... Visualizar &paleta... - + View &sprites... Visualizar &sprites... - + View &tiles... Visualizar &blocos... - + View &map... Visualizar &mapa... - + &Frame inspector... Inspetor de &quadro... - + View memory... Visualizar memória... - + Search memory... Pesquisar memória... - + View &I/O registers... Visualizar registros de &E/S... - + Record debug video log... Gravar log de vídeo de depuração... - + Stop debug video log Parar log de vídeo de depuração - + Exit fullscreen Sair da tela cheia - + GameShark Button (held) Botão de GameShark (segurado) - + Autofire Disparo automático - + Autofire A Disparo automático A - + Autofire B Disparo automático B - + Autofire L Disparo automático L - + Autofire R Disparo automático R - + Autofire Start Disparo automático Start - + Autofire Select Disparo automático Select - + Autofire Up Disparo automático Cima - + Autofire Right Disparo automático Direita - + Autofire Down Disparo automático Baixo - + Autofire Left Disparo automático Esquerda QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4739,6 +4822,110 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + Navegar + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5453,17 +5640,17 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Editar Atalhos - + Keyboard Teclado - + Gamepad Controle - + Clear Limpar diff --git a/src/platform/qt/ts/mgba-ru.ts b/src/platform/qt/ts/mgba-ru.ts index 5eef97cbc..a35b0a9bd 100644 --- a/src/platform/qt/ts/mgba-ru.ts +++ b/src/platform/qt/ts/mgba-ru.ts @@ -1231,17 +1231,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 - + Could not load game. Are you sure it's in the correct format? - + Failed to open save file. Is the save directory writable? @@ -1249,52 +1249,52 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::FrameView - + Export frame - + Portable Network Graphics (*.png) - + None - + Background - + Window - + Objwin - + Sprite - + Backdrop - + Frame - + %1 %2 @@ -1302,7 +1302,7 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence @@ -3493,62 +3493,62 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection - + Save selection - + Paste - + Load - + All - + Load TBL - + Save selected memory - + Failed to open output file: %1 - + Load memory - + Failed to open input file: %1 - + TBL - + ISO-8859-1 @@ -3718,16 +3718,79 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3889,726 +3952,746 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - - + + Select save - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - - Import GameShark Save... + + Convert save game... + Import GameShark Save... + + + + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4744,6 +4827,110 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5458,17 +5645,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - + Keyboard - + Gamepad - + Clear diff --git a/src/platform/qt/ts/mgba-template.ts b/src/platform/qt/ts/mgba-template.ts index 58d774fc4..0ede98618 100644 --- a/src/platform/qt/ts/mgba-template.ts +++ b/src/platform/qt/ts/mgba-template.ts @@ -1231,17 +1231,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::CoreManager - + Failed to open game file: %1 - + Could not load game. Are you sure it's in the correct format? - + Failed to open save file. Is the save directory writable? @@ -1249,52 +1249,52 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::FrameView - + Export frame - + Portable Network Graphics (*.png) - + None - + Background - + Window - + Objwin - + Sprite - + Backdrop - + Frame - + %1 %2 @@ -1302,7 +1302,7 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::GBAApp - + Enable Discord Rich Presence @@ -3493,62 +3493,62 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::MemoryModel - + Copy selection - + Save selection - + Paste - + Load - + All - + Load TBL - + Save selected memory - + Failed to open output file: %1 - + Load memory - + Failed to open input file: %1 - + TBL - + ISO-8859-1 @@ -3718,16 +3718,79 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3889,726 +3952,746 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. QGBA::Window - + Game Boy Advance ROMs (%1) - + Game Boy ROMs (%1) - + All ROMs (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) - - - + + + Select ROM - + Select folder - - + + Select save - + Select patch - + Patches (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) - + Select video log - + Video logs (*.mvl) - + Crash - + The game has crashed with the following error: %1 - + Couldn't Start - + Could not start game. - + Unimplemented BIOS call - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? - + Restart needed - + Some changes will not take effect until the emulator is restarted. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... - + Load ROM in archive... - + Add folder to library... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + Load &patch... - + Boot BIOS - + Replace ROM... - + Scan e-Reader dotcodes... - + ROM &info... - + Recent - + Make portable - + &Load state - + Load state file... - + &Save state - + Save state file... - + Quick load - + Quick save - + Load recent - + Save recent - + Undo load state - + Undo save state - - + + State &%1 - + Load camera image... - - Import GameShark Save... + + Convert save game... + Import GameShark Save... + + + + Export GameShark Save... - + New multiplayer window - + Report bug... - + About... - + E&xit - + &Emulation - + &Reset - + Sh&utdown - + Yank game pak - + &Pause - + &Next frame - + Fast forward (held) - + &Fast forward - + Fast forward speed - + Unbounded - + %0x - + Rewind (held) - + Re&wind - + Step backwards - + Sync to &video - + Sync to &audio - + Solar sensor - + Increase solar level - + Decrease solar level - + Brightest solar level - + Darkest solar level - + Brightness %1 - + Game Boy Printer... - + BattleChip Gate... - + Audio/&Video - + Frame size - + %1× - + Toggle fullscreen - + Lock aspect ratio - + Force integer scaling - + Interframe blending - + Bilinear filtering - + Frame&skip - + Mute - + FPS target - + Native (59.7275) - + Take &screenshot - + F12 - + Record A/V... - + Record GIF/WebP/APNG... - + Video layers - + Audio channels - + Adjust layer placement... - + &Tools - + View &logs... - + Game &overrides... - + Game Pak sensors... - + &Cheats... - + Settings... - + Open debugger console... - + Start &GDB server... - + View &palette... - + View &sprites... - + View &tiles... - + View &map... - + &Frame inspector... - + View memory... - + Search memory... - + View &I/O registers... - + Record debug video log... - + Stop debug video log - + Exit fullscreen - + GameShark Button (held) - + Autofire - + Autofire A - + Autofire B - + Autofire L - + Autofire R - + Autofire Start - + Autofire Select - + Autofire Up - + Autofire Right - + Autofire Down - + Autofire Left - + Clear QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4744,6 +4827,110 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5458,17 +5645,17 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - + Keyboard - + Gamepad - + Clear diff --git a/src/platform/qt/ts/mgba-tr.ts b/src/platform/qt/ts/mgba-tr.ts index e29bc2e72..3c8e2ebd9 100644 --- a/src/platform/qt/ts/mgba-tr.ts +++ b/src/platform/qt/ts/mgba-tr.ts @@ -1232,17 +1232,17 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::CoreManager - + Failed to open game file: %1 Oyun dosyası açılamadı: %1 - + Could not load game. Are you sure it's in the correct format? Oyun yüklenemedi. Doğru formatta olduğundan emin misin? - + Failed to open save file. Is the save directory writable? @@ -1250,52 +1250,52 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::FrameView - + Export frame - + Portable Network Graphics (*.png) - + None Hiçbiri - + Background Arkaplan - + Window - + Objwin - + Sprite - + Backdrop - + Frame - + %1 %2 @@ -1303,7 +1303,7 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::GBAApp - + Enable Discord Rich Presence Discord etkinliğini etkinleştir @@ -3494,62 +3494,62 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::MemoryModel - + Copy selection Seçileni kopyala - + Save selection Seçilenleri kaydet - + Paste Yapıştır - + Load Yükle - + All Hepsi - + Load TBL TBL yükle - + Save selected memory Seçilen memory'i kaydet - + Failed to open output file: %1 Çıkış dosyası açılamadı:%1 - + Load memory Memory yükle - + Failed to open input file: %1 Giriş dosyası açılamadı:%1 - + TBL - + ISO-8859-1 @@ -3719,16 +3719,79 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::ReportView - + Bug report archive - + ZIP archive (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3890,101 +3953,101 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance ROMları (%1) - + Game Boy ROMs (%1) Game Boy ROMları (%1) - + All ROMs (%1) Bütün ROMlar (%1) - + %1 Video Logs (*.mvl) - + Archives (%1) Arşivler (%1) - - - + + + Select ROM ROM seç - + Select folder Klasör seç - - + + Select save Kayıt seç - + Select patch Yama seç - + Patches (*.ips *.ups *.bps) Yamalar (*.ips *.ups *.bps) - + Select e-Reader dotcode - + e-Reader card (*.raw *.bin *.bmp) - + Select image Resim seç - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) Resim dosyası (*.png *.gif *.jpg *.jpeg);;All files (*) - - + + GameShark saves (*.sps *.xps) GameShark kayıtları (*.sps *.xps) - + Select video log Video günlüğü seç - + Video logs (*.mvl) Video günlükleri (*.mvl) - + Crash Çökme - + The game has crashed with the following error: %1 @@ -3993,625 +4056,645 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. - + Unimplemented BIOS call Uygulanmamış BIOS girişi - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. Oyun BIOS dosyasına ihtiyacı var. Lütfen en iyi deneyim için resmi BIOS'u kullanın. - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. - + Really make portable? Taşınabilir yapılsın mı? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? Emülatörün yapılandırmasını yürütülebilir dosya ile aynı dizinden yüklemesini sağlar. Devam etmek istiyor musun? - + Restart needed Yeniden başlatma gerekli - + Some changes will not take effect until the emulator is restarted. Bazı değişiklikler emülatör yeniden başlatılıncaya kadar etkili olmaz. - + - Player %1 of %2 - + %1 - %2 - + %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 - + &File - + Load &ROM... &ROM yükle... - + Load ROM in archive... ROM'u arşivden yükle ... - + Add folder to library... Kütüphaneye klasör ekle ... - + Load &patch... &Patch yükle... - + Boot BIOS BIOS boot et - + Replace ROM... ROM değişti... - + ROM &info... ROM &info... - + Recent Son kullanılanlar - + Make portable Portatif yap - + &Load state &Kaydedilmiş konum yükle - + Load state file... Kaydedilmiş konum dosyası yükle... - + &Save state &Konumu kaydet - + Save state file... Konum dosyasını kaydet... - + Quick load Hızlı Yükle - + Quick save Hızlı kaydet - + Load recent En son yükle - + Save recent Hızlı kaydet - + Undo load state Kaydedilen konum yüklemeyi geri al - + Undo save state Konum kaydetmeyi geri al - - + + State &%1 Konum &%1 - + Load camera image... Kamera resmini yükle ... - + + Convert save game... + + + + New multiplayer window Yeni çokoyunculu ekranı - + Report bug... - + About... Hakkında... - + E&xit Çıkış - + &Emulation Emülasyon - + &Reset &Reset - + Sh&utdown Kapat - + Yank game pak - + &Pause &Durdur - + &Next frame &Sonraki kare - + Fast forward (held) İleriye sar(basılı tutun) - + &Fast forward &İleriye sar - + Fast forward speed İleriye sarma hızı - + Unbounded - + %0x - + Rewind (held) Geri sar (basılı tutun) - + Re&wind Geri sar - + Step backwards Geriye doğru adım - + Sync to &video &Videoya eşitle - + Sync to &audio &Sese eşitle - + Solar sensor - + Increase solar level Solar seviyesini arttır - + Decrease solar level Solar seviyesini düşür - + Brightest solar level En parlak solar seviyesi - + Darkest solar level En karanlık solar seviyesi - + Brightness %1 Parlaklık:%1 - + Game Boy Printer... Game Boy yazıcısı... - + BattleChip Gate... - + Audio/&Video Ses/&Video - + Frame size Çerçeve boyutu - + Toggle fullscreen Tamekranı aç/kapa - + Lock aspect ratio En boy oranını kilitle - + Force integer scaling Tamsayılı ölçeklendirmeyi zorla - + Bilinear filtering Bilinear filtreleme - + Frame&skip Kare atlama - + Mute Sessiz - + FPS target FPS hedefi - + Native (59.7275) - + Take &screenshot Ekran görüntüsü al - + F12 - + Video layers - + Audio channels Ses kanalları - + Adjust layer placement... Katman yerleşimini ayarlayın... - + &Tools &Araçlar - + View &logs... Kayıtları görüntüle... - + Game &overrides... Oyunların üzerine yazılanlar - + Couldn't Start - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Could not start game. - + Load alternate save game... - + Load temporary save game... - + Scan e-Reader dotcodes... - + Import GameShark Save... - + Export GameShark Save... - + %1× - + Interframe blending - + Record A/V... - + Record GIF/WebP/APNG... - + Game Pak sensors... - + &Cheats... &Hileler... - + Settings... Ayarlar... - + Open debugger console... Hata ayıklayıcı konsolunu aç ... - + Start &GDB server... &GDB sunucusunu başlat... - + View &palette... &Renk Paletini gör... - + View &sprites... &Spriteları gör... - + View &tiles... &Desenleri gör... - + View &map... &Haritayı gör - + &Frame inspector... - + View memory... Hafıza gör... - + Search memory... Hafızada ara... - + View &I/O registers... &I/O kayıtlarını görüntüle - + Record debug video log... - + Stop debug video log - + Exit fullscreen Tam ekrandan çık - + GameShark Button (held) GameShark Butonu (basılı tutun) - + Autofire Otomatik basma - + Autofire A Otomatik basma A - + Autofire B Otomatik basma B - + Autofire L Otomatik basma L - + Autofire R Otomatik basma R - + Autofire Start Otomatik basma Start - + Autofire Select Otomatik basma Select - + Autofire Up Otomatik basma Up - + Autofire Right Otomatik basma Right - + Autofire Down Otomatik basma Down - + Autofire Left Otomatik basma Sol - + Clear Temizle QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4747,6 +4830,110 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + Gözat + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5461,17 +5648,17 @@ Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır.Kısayolları düzenle - + Keyboard Klavye - + Gamepad - + Clear Temizle diff --git a/src/platform/qt/ts/mgba-zh_CN.ts b/src/platform/qt/ts/mgba-zh_CN.ts index 9f43e015c..e219ca9c5 100644 --- a/src/platform/qt/ts/mgba-zh_CN.ts +++ b/src/platform/qt/ts/mgba-zh_CN.ts @@ -1224,17 +1224,17 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::CoreManager - + Failed to open game file: %1 打开游戏文件失败: %1 - + Could not load game. Are you sure it's in the correct format? 无法载入游戏。请确认游戏格式是否正确? - + Failed to open save file. Is the save directory writable? 无法打开存档文件。存档目录是否可写入? @@ -1242,52 +1242,52 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::FrameView - + Export frame 导出框架 - + Portable Network Graphics (*.png) 便携式网络图形 (*.png) - + None - + Background 背景 - + Window 窗口 - + Objwin Objwin - + Sprite 精灵图 - + Backdrop 背幕 - + Frame - + %1 %2 %1 %2 @@ -1295,7 +1295,7 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::GBAApp - + Enable Discord Rich Presence 启用 Discord Rich Presence @@ -3486,62 +3486,62 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::MemoryModel - + Copy selection 复制所选 - + Save selection 保存所选 - + Paste 粘贴 - + Load 载入 - + All 全部 - + Load TBL 载入 TBL - + Save selected memory 保存所选内存 - + Failed to open output file: %1 打开输出文件失败: %1 - + Load memory 载入内存 - + Failed to open input file: %1 打开输入文件失败: %1 - + TBL TBL - + ISO-8859-1 ISO-8859-1 @@ -3711,16 +3711,79 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::ReportView - + Bug report archive 错误报告存档 - + ZIP archive (*.zip) ZIP 存档 (*.zip) + + QGBA::SaveConverter + + + Save games and save states (%1) + + + + + Select save game or save state + + + + + Save games (%1) + + + + + Select save game + + + + + Conversion failed + + + + + Failed to convert the save game. This is probably a bug. + + + + + No file selected + + + + + Could not open file + + + + + No valid formats found + + + + + Please select a valid input file + + + + + No valid conversions found + + + + + Cannot convert save games between platforms + + + QGBA::SettingsView @@ -3882,101 +3945,101 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::Window - + Game Boy Advance ROMs (%1) Game Boy Advance ROM (%1) - + Game Boy ROMs (%1) Game Boy ROM (%1) - + All ROMs (%1) 所有 ROM (%1) - + %1 Video Logs (*.mvl) %1 视频日志 (*.mvl) - + Archives (%1) 压缩文件 (%1) - - - + + + Select ROM 选择 ROM - + Select folder 选择文件夹 - - + + Select save 选择存档 - + Select patch 选择补丁 - + Patches (*.ips *.ups *.bps) 补丁 (*.ips *.ups *.bps) - + Select e-Reader dotcode 选择 e-Reader 点码 - + e-Reader card (*.raw *.bin *.bmp) e-Reader 卡 (*.raw *.bin *.bmp) - + Select image 选择图片 - + Image file (*.png *.gif *.jpg *.jpeg);;All files (*) 图像文件 (*.png *.gif *.jpg *.jpeg);;所有文件 (*) - - + + GameShark saves (*.sps *.xps) GameShark 存档 (*.sps *.xps) - + Select video log 选择视频日志 - + Video logs (*.mvl) 视频日志文件 (*.mvl) - + Crash 崩溃 - + The game has crashed with the following error: %1 @@ -3985,625 +4048,645 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 %1 - + Couldn't Start 无法启动 - + Could not start game. 无法启动游戏。 - + Unimplemented BIOS call 未实现的 BIOS 调用 - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. 此游戏使用尚未实现的 BIOS 调用。请使用官方 BIOS 以获得最佳体验。 - + Failed to create an appropriate display device, falling back to software display. Games may run slowly, especially with larger windows. 无法创建适合的显示设备,正在回滚到软件显示。游戏的运行速度(特别在大窗口的情况下)可能会变慢。 - + Really make portable? 确定进行程序便携化? - + This will make the emulator load its configuration from the same directory as the executable. Do you want to continue? 进行此操作后,模拟器将从其可执行文件所在目录中载入模拟器配置。您想继续吗? - + Restart needed 需要重新启动 - + Some changes will not take effect until the emulator is restarted. 更改将在模拟器下次重新启动时生效。 - + - Player %1 of %2 - 玩家 %1 共 %2 - + %1 - %2 %1 - %2 - + %1 - %2 - %3 %1 - %2 - %3 - + %1 - %2 (%3 fps) - %4 %1 - %2 (%3 fps) - %4 - + &File 文件(&F) - + Load &ROM... 载入 ROM(&R)... - + Load ROM in archive... 从压缩文件中载入 ROM... - + Add folder to library... 将文件夹添加到库中... - + Save games (%1) - + Select save game - + mGBA save state files (%1) - - + + Select save state - + Load alternate save game... - + Load temporary save game... - + Load &patch... 载入补丁(&P)... - + Boot BIOS 引导 BIOS - + Replace ROM... 替换 ROM... - + Scan e-Reader dotcodes... 扫描 e-Reader 点码... - + ROM &info... ROM 信息(&I)... - + Recent 最近打开 - + Make portable 程序便携化 - + &Load state 载入即时存档(&L) - + Load state file... 载入即时存档文件... - + &Save state 保存即时存档(&S) - + Save state file... 保存即时存档文件... - + Quick load 快速读档 - + Quick save 快速存档 - + Load recent 载入最近存档 - + Save recent 保存最近存档 - + Undo load state 撤消读档 - + Undo save state 撤消存档 - - + + State &%1 即时存档 (&%1) - + Load camera image... 载入相机图片... - + + Convert save game... + + + + Import GameShark Save... 导入 GameShark 存档... - + Export GameShark Save... 导出 GameShark 存档... - + New multiplayer window 新建多人游戏窗口 - + Report bug... 报告错误... - + About... 关于... - + E&xit 退出(&X) - + &Emulation 模拟(&E) - + &Reset 重置(&R) - + Sh&utdown 关机(&U) - + Yank game pak 快速抽出游戏卡带 - + &Pause 暂停(&P) - + &Next frame 下一帧(&N) - + Fast forward (held) 快进 (长按) - + &Fast forward 快进(&F) - + Fast forward speed 快进速度 - + Unbounded 不限制 - + %0x %0x - + Rewind (held) 倒带 (长按) - + Re&wind 倒带(&W) - + Step backwards 步退 - + Sync to &video 视频同步(&V) - + Sync to &audio 音频同步(&A) - + Solar sensor 太阳光传感器 - + Increase solar level 增加太阳光等级 - + Decrease solar level 降低太阳光等级 - + Brightest solar level 太阳光等级为最亮 - + Darkest solar level 太阳光等级为最暗 - + Brightness %1 亮度 %1 - + Game Boy Printer... Game Boy 打印机... - + BattleChip Gate... BattleChip Gate... - + Audio/&Video 音频/视频(&V) - + Frame size 画面大小 - + %1× %1× - + Toggle fullscreen 切换全屏 - + Lock aspect ratio 锁定纵横比 - + Force integer scaling 强制整数缩放 - + Interframe blending 帧间混合 - + Bilinear filtering 双线性过滤 - + Frame&skip 跳帧(&S) - + Mute 静音 - + FPS target 目标 FPS - + Native (59.7275) 原生 (59.7275) - + Take &screenshot 截图(&S) - + F12 F12 - + Record A/V... 录制音频/视频... - + Record GIF/WebP/APNG... 录制 GIF/WebP/APNG... - + Video layers 视频图层 - + Audio channels 音频声道 - + Adjust layer placement... 调整图层布局... - + &Tools 工具(&T) - + View &logs... 查看日志(&L)... - + Game &overrides... 覆写游戏(&O)... - + Game Pak sensors... 游戏卡带传感器... - + &Cheats... 作弊码(&C)... - + Settings... 设置... - + Open debugger console... 打开调试器控制台... - + Start &GDB server... 打开 GDB 服务器(&G)... - + View &palette... 查看调色板(&P)... - + View &sprites... 查看精灵图(&S)... - + View &tiles... 查看图块(&T)... - + View &map... 查看映射(&M)... - + &Frame inspector... 框架检查器(&F)... - + View memory... 查看内存... - + Search memory... 搜索内存... - + View &I/O registers... 查看 I/O 寄存器(&I)... - + Record debug video log... 记录调试视频日志... - + Stop debug video log 停止记录调试视频日志 - + Exit fullscreen 退出全屏 - + GameShark Button (held) GameShark 键 (长按) - + Autofire 连发 - + Autofire A 连发 A - + Autofire B 连发 B - + Autofire L 连发 L - + Autofire R 连发 R - + Autofire Start 连发 Start - + Autofire Select 连发 Select - + Autofire Up 连发 上 - + Autofire Right 连发 右 - + Autofire Down 连发 下 - + Autofire Left 连发 左 - + Clear 清除 QObject + + + %1 byte + + + + + %1 kiB + + + + + %1 MiB + + GBA @@ -4739,6 +4822,110 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 创建并包含即时存档 + + SaveConverter + + + Convert/Extract Save Game + + + + + Input file + + + + + + Browse + 浏览 + + + + Output file + + + + + %1 %2 save game + + + + + little endian + + + + + big endian + + + + + SRAM + SRAM + + + + %1 flash + + + + + %1 EEPROM + + + + + %1 SRAM + RTC + + + + + %1 SRAM + + + + + packed MBC2 + + + + + unpacked MBC2 + + + + + MBC6 flash + + + + + MBC6 combined SRAM + flash + + + + + MBC6 SRAM + + + + + TAMA5 + + + + + %1 (%2) + + + + + %1 save state with embedded %2 save game + + + SensorView @@ -5453,17 +5640,17 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 编辑快捷键 - + Keyboard 键盘 - + Gamepad 游戏手柄 - + Clear 清除 From 9d1eb3dedbb80ec91f7d8235bc406ccd7ff47dd2 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 4 Feb 2021 00:26:50 -0800 Subject: [PATCH 36/40] Qt: Fix outdated copyright translation strings --- src/platform/qt/ts/mgba-es.ts | 4 ++-- src/platform/qt/ts/mgba-fr.ts | 12 ++++++++++-- src/platform/qt/ts/mgba-it.ts | 12 ++++++++++-- src/platform/qt/ts/mgba-ja.ts | 12 ++++++++++-- src/platform/qt/ts/mgba-ko.ts | 4 ++-- src/platform/qt/ts/mgba-pt_BR.ts | 12 ++++++++++-- src/platform/qt/ts/mgba-tr.ts | 4 ++-- src/platform/qt/ts/mgba-zh_CN.ts | 12 ++++++++++-- 8 files changed, 56 insertions(+), 16 deletions(-) diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index 9977fed8c..911a6b110 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -25,9 +25,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – 2020 Jeffrey Pfau, licenciado bajo la Mozilla Public License, versión 2.0 + © 2013 – {year} Jeffrey Pfau, licenciado bajo la Mozilla Public License, versión 2.0 Game Boy Advance es una marca registrada de Nintendo Co., Ltd. diff --git a/src/platform/qt/ts/mgba-fr.ts b/src/platform/qt/ts/mgba-fr.ts index c2f775641..e1f79b724 100644 --- a/src/platform/qt/ts/mgba-fr.ts +++ b/src/platform/qt/ts/mgba-fr.ts @@ -25,9 +25,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – 2020 Jeffrey Pfau, sous la licence publique de Mozilla, version 2.0 + © 2013 – {year} Jeffrey Pfau, sous la licence publique de Mozilla, version 2.0 Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd. @@ -1136,6 +1136,14 @@ Game Boy Advance est une marque de fabrique enregistré par Nintendo Co., Ltd.Agrandissement + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-it.ts b/src/platform/qt/ts/mgba-it.ts index 565de4ee2..073fef9df 100644 --- a/src/platform/qt/ts/mgba-it.ts +++ b/src/platform/qt/ts/mgba-it.ts @@ -20,9 +20,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 - 2020 Jeffrey Pfau, sotto licenza Mozilla Public License, versione 2.0 + © 2013 - {year} Jeffrey Pfau, sotto licenza Mozilla Public License, versione 2.0 Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. @@ -1135,6 +1135,14 @@ Game Boy Advance è un marchio registrato di Nintendo Co., Ltd. Ingrandimento + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-ja.ts b/src/platform/qt/ts/mgba-ja.ts index 429249a16..a32606ec1 100644 --- a/src/platform/qt/ts/mgba-ja.ts +++ b/src/platform/qt/ts/mgba-ja.ts @@ -25,9 +25,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – 2020 Jeffrey Pfau。Mozilla Public License(バージョン2.0)の下でライセンスされています。 + © 2013 – {year} Jeffrey Pfau。Mozilla Public License(バージョン2.0)の下でライセンスされています。 「ゲームボーイアドバンス」、GAME BOY ADVANCEは任天堂株式会社の登録商標です。 @@ -1135,6 +1135,14 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. 倍率 + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-ko.ts b/src/platform/qt/ts/mgba-ko.ts index ababe148f..269009b14 100644 --- a/src/platform/qt/ts/mgba-ko.ts +++ b/src/platform/qt/ts/mgba-ko.ts @@ -20,9 +20,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 - 2020 Jeffrey Pfau, 모질라 공식 라이센스 버전 2.0에 따라 사용 허가되었습니다. + © 2013 - {year} Jeffrey Pfau, 모질라 공식 라이센스 버전 2.0에 따라 사용 허가되었습니다. Game Boy Advance는 Nintendo Co., Ltd.의 등록 상표입니다. diff --git a/src/platform/qt/ts/mgba-pt_BR.ts b/src/platform/qt/ts/mgba-pt_BR.ts index 23035766b..8f0373090 100644 --- a/src/platform/qt/ts/mgba-pt_BR.ts +++ b/src/platform/qt/ts/mgba-pt_BR.ts @@ -25,9 +25,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – 2020 Jeffrey Pfau, licenciado sob a Licença Pública Mozilla, versão 2.0 + © 2013 – {year} Jeffrey Pfau, licenciado sob a Licença Pública Mozilla, versão 2.0 Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. @@ -1135,6 +1135,14 @@ Game Boy Advance é uma marca registrada da Nintendo Co., Ltd. Ampliação + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile diff --git a/src/platform/qt/ts/mgba-tr.ts b/src/platform/qt/ts/mgba-tr.ts index 3c8e2ebd9..6a35ac4b1 100644 --- a/src/platform/qt/ts/mgba-tr.ts +++ b/src/platform/qt/ts/mgba-tr.ts @@ -25,9 +25,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 - 2020 Mozilla Public License, 2.0 sürümünde lisanslı Jeffrey Pfau + © 2013 - {year} Mozilla Public License, 2.0 sürümünde lisanslı Jeffrey Pfau Game Boy Advance, Nintendo Co., Ltd.'nin tescilli ticari markasıdır. diff --git a/src/platform/qt/ts/mgba-zh_CN.ts b/src/platform/qt/ts/mgba-zh_CN.ts index e219ca9c5..e5c7356d8 100644 --- a/src/platform/qt/ts/mgba-zh_CN.ts +++ b/src/platform/qt/ts/mgba-zh_CN.ts @@ -25,9 +25,9 @@ - © 2013 – 2020 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 + © 2013 – {year} Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - © 2013 – 2020 Jeffrey Pfau,基于 Mozilla 公共许可证(版本 2.0)授权 + © 2013 – {year} Jeffrey Pfau,基于 Mozilla 公共许可证(版本 2.0)授权 Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标。 @@ -1135,6 +1135,14 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 复制 + + QGBA::AboutScreen + + + 2021 + 2021 + + QGBA::AssetTile From 7408ee9c568699fd567d11a52386bd1406f143c2 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 4 Feb 2021 01:04:28 -0800 Subject: [PATCH 37/40] Qt: Fix build on older Qt --- src/platform/qt/SaveConverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/qt/SaveConverter.cpp b/src/platform/qt/SaveConverter.cpp index ec8ad08f3..d7c351501 100644 --- a/src/platform/qt/SaveConverter.cpp +++ b/src/platform/qt/SaveConverter.cpp @@ -641,7 +641,7 @@ QByteArray SaveConverter::AnnotatedSave::convertTo(const SaveConverter::Annotate if (size == target.size + GB_SIZE_MBC6_FLASH) { converted = backing->read(target.size); } else if (target.size == GB_SIZE_MBC6_FLASH) { - backing->skip(size - GB_SIZE_MBC6_FLASH); + backing->seek(size - GB_SIZE_MBC6_FLASH); converted = backing->read(GB_SIZE_MBC6_FLASH); } break; From 32a8a47de67c77579dfb5ce69aad54b9a8afae9d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 7 Feb 2021 15:07:27 -0800 Subject: [PATCH 38/40] GBA SIO: Fix hanging on starting a second multiplayer window (fixes #854) --- CHANGES | 1 + src/gba/sio/lockstep.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 7e04db0a7..e5bd2ff74 100644 --- a/CHANGES +++ b/CHANGES @@ -50,6 +50,7 @@ Emulation fixes: - GBA SIO: Fix copying Normal mode transfer values - GBA SIO: Fix Normal mode being totally broken (fixes mgba.io/i/1800) - GBA SIO: Fix deseralizing SIO registers + - GBA SIO: Fix hanging on starting a second multiplayer window (fixes mgba.io/i/854) - GBA Video: Latch scanline at end of Hblank (fixes mgba.io/i/1319) - GBA Video: Fix Hblank timing - GBA Video: Implement green swap (fixes mgba.io/i/1609) diff --git a/src/gba/sio/lockstep.c b/src/gba/sio/lockstep.c index a2ecfc5b5..16992e31b 100644 --- a/src/gba/sio/lockstep.c +++ b/src/gba/sio/lockstep.c @@ -444,6 +444,7 @@ static void _GBASIOLockstepNodeProcessEvents(struct mTiming* timing, void* user, struct GBASIOLockstepNode* node = user; mLockstepLock(&node->p->d); if (node->p->d.attached < 2) { + mTimingSchedule(timing, &node->event, GBASIOCyclesPerTransfer[GBASIOMultiplayerGetBaud(node->d.p->siocnt)][0]); mLockstepUnlock(&node->p->d); return; } From b92bb30a722a87a7114461e1ad634367c8520457 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 8 Feb 2021 23:06:00 -0800 Subject: [PATCH 39/40] GBA SIO: Clean up lockstep cycle counting --- src/gba/sio/lockstep.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/gba/sio/lockstep.c b/src/gba/sio/lockstep.c index 16992e31b..6e4f1f31d 100644 --- a/src/gba/sio/lockstep.c +++ b/src/gba/sio/lockstep.c @@ -149,11 +149,7 @@ bool GBASIOLockstepNodeUnload(struct GBASIODriver* driver) { // Flush ongoing transfer if (mTimingIsScheduled(&driver->p->p->timing, &node->event)) { - int oldWhen = node->event.when; - - mTimingDeschedule(&driver->p->p->timing, &node->event); - mTimingSchedule(&driver->p->p->timing, &node->event, 0); - node->eventDiff -= oldWhen - node->event.when; + node->eventDiff -= node->event.when - mTimingCurrentTime(&driver->p->p->timing); mTimingDeschedule(&driver->p->p->timing, &node->event); } @@ -190,15 +186,11 @@ static uint16_t GBASIOLockstepNodeMultiWriteRegister(struct GBASIODriver* driver ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTING); ATOMIC_STORE(node->p->d.transferCycles, GBASIOCyclesPerTransfer[GBASIOMultiplayerGetBaud(node->d.p->siocnt)][node->p->d.attached - 1]); - bool scheduled = mTimingIsScheduled(&driver->p->p->timing, &node->event); - int oldWhen = node->event.when; - - mTimingDeschedule(&driver->p->p->timing, &node->event); - mTimingSchedule(&driver->p->p->timing, &node->event, 0); - - if (scheduled) { - node->eventDiff -= oldWhen - node->event.when; + if (mTimingIsScheduled(&driver->p->p->timing, &node->event)) { + node->eventDiff -= node->event.when - mTimingCurrentTime(&driver->p->p->timing); + mTimingDeschedule(&driver->p->p->timing, &node->event); } + mTimingSchedule(&driver->p->p->timing, &node->event, 0); } else { value &= ~0x0080; } @@ -443,15 +435,13 @@ static uint32_t _slaveUpdate(struct GBASIOLockstepNode* node) { static void _GBASIOLockstepNodeProcessEvents(struct mTiming* timing, void* user, uint32_t cyclesLate) { struct GBASIOLockstepNode* node = user; mLockstepLock(&node->p->d); - if (node->p->d.attached < 2) { - mTimingSchedule(timing, &node->event, GBASIOCyclesPerTransfer[GBASIOMultiplayerGetBaud(node->d.p->siocnt)][0]); - mLockstepUnlock(&node->p->d); - return; - } + int32_t cycles = 0; node->nextEvent -= cyclesLate; node->eventDiff += cyclesLate; - if (node->nextEvent <= 0) { + if (node->p->d.attached < 2) { + cycles = GBASIOCyclesPerTransfer[GBASIOMultiplayerGetBaud(node->d.p->siocnt)][0]; + } else if (node->nextEvent <= 0) { if (!node->id) { cycles = _masterUpdate(node); } else { From 33098926577f52a74730de1708a427e275a9bc88 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 9 Feb 2021 00:28:42 -0800 Subject: [PATCH 40/40] GB, GBA Serialize: Attempt to fix MSVC build --- include/mgba/internal/gb/serialize.h | 4 ++-- include/mgba/internal/gba/serialize.h | 4 ++-- src/gb/serialize.c | 22 +++++++++++----------- src/gba/serialize.c | 18 +++++++++--------- src/platform/qt/SaveConverter.cpp | 4 ++-- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/mgba/internal/gb/serialize.h b/include/mgba/internal/gb/serialize.h index b3cde1661..18ac83b09 100644 --- a/include/mgba/internal/gb/serialize.h +++ b/include/mgba/internal/gb/serialize.h @@ -13,8 +13,8 @@ CXX_GUARD_START #include #include -extern const uint32_t GB_SAVESTATE_MAGIC; -extern const uint32_t GB_SAVESTATE_VERSION; +extern MGBA_EXPORT const uint32_t GBSavestateMagic; +extern MGBA_EXPORT const uint32_t GBSavestateVersion; mLOG_DECLARE_CATEGORY(GB_STATE); diff --git a/include/mgba/internal/gba/serialize.h b/include/mgba/internal/gba/serialize.h index e901329bd..bf6a93774 100644 --- a/include/mgba/internal/gba/serialize.h +++ b/include/mgba/internal/gba/serialize.h @@ -14,8 +14,8 @@ CXX_GUARD_START #include #include -extern const uint32_t GBA_SAVESTATE_MAGIC; -extern const uint32_t GBA_SAVESTATE_VERSION; +extern MGBA_EXPORT const uint32_t GBASavestateMagic; +extern MGBA_EXPORT const uint32_t GBASavestateVersion; mLOG_DECLARE_CATEGORY(GBA_STATE); diff --git a/src/gb/serialize.c b/src/gb/serialize.c index f9c37b48f..f50d0bb86 100644 --- a/src/gb/serialize.c +++ b/src/gb/serialize.c @@ -13,11 +13,11 @@ mLOG_DEFINE_CATEGORY(GB_STATE, "GB Savestate", "gb.serialize"); -const uint32_t GB_SAVESTATE_MAGIC = 0x00400000; -const uint32_t GB_SAVESTATE_VERSION = 0x00000002; +MGBA_EXPORT const uint32_t GBSavestateMagic = 0x00400000; +MGBA_EXPORT const uint32_t GBSavestateVersion = 0x00000002; void GBSerialize(struct GB* gb, struct GBSerializedState* state) { - STORE_32LE(GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION, 0, &state->versionMagic); + STORE_32LE(GBSavestateMagic + GBSavestateVersion, 0, &state->versionMagic); STORE_32LE(gb->romCrc32, 0, &state->romCrc32); STORE_32LE(gb->timing.masterCycles, 0, &state->masterCycles); STORE_64LE(gb->timing.globalCycles, 0, &state->globalCycles); @@ -76,20 +76,20 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) { int16_t check16; uint16_t ucheck16; LOAD_32LE(ucheck, 0, &state->versionMagic); - if (ucheck > GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION) { - mLOG(GB_STATE, WARN, "Invalid or too new savestate: expected %08X, got %08X", GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION, ucheck); + if (ucheck > GBSavestateMagic + GBSavestateVersion) { + mLOG(GB_STATE, WARN, "Invalid or too new savestate: expected %08X, got %08X", GBSavestateMagic + GBSavestateVersion, ucheck); error = true; - } else if (ucheck < GB_SAVESTATE_MAGIC) { - mLOG(GB_STATE, WARN, "Invalid savestate: expected %08X, got %08X", GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION, ucheck); + } else if (ucheck < GBSavestateMagic) { + mLOG(GB_STATE, WARN, "Invalid savestate: expected %08X, got %08X", GBSavestateMagic + GBSavestateVersion, ucheck); error = true; - } else if (ucheck < GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION) { - mLOG(GB_STATE, WARN, "Old savestate: expected %08X, got %08X, continuing anyway", GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION, ucheck); + } else if (ucheck < GBSavestateMagic + GBSavestateVersion) { + mLOG(GB_STATE, WARN, "Old savestate: expected %08X, got %08X, continuing anyway", GBSavestateMagic + GBSavestateVersion, ucheck); } - bool canSgb = ucheck >= GB_SAVESTATE_MAGIC + 2; + bool canSgb = ucheck >= GBSavestateMagic + 2; if (gb->memory.rom && memcmp(state->title, ((struct GBCartridge*) &gb->memory.rom[0x100])->titleLong, sizeof(state->title))) { LOAD_32LE(ucheck, 0, &state->versionMagic); - if (ucheck > GB_SAVESTATE_MAGIC + 2 || memcmp(state->title, ((struct GBCartridge*) gb->memory.rom)->titleLong, sizeof(state->title))) { + if (ucheck > GBSavestateMagic + 2 || memcmp(state->title, ((struct GBCartridge*) gb->memory.rom)->titleLong, sizeof(state->title))) { // There was a bug in previous versions where the memory address being compared was wrong mLOG(GB_STATE, WARN, "Savestate is for a different game"); error = true; diff --git a/src/gba/serialize.c b/src/gba/serialize.c index fbb7d99d9..f6eafa6a4 100644 --- a/src/gba/serialize.c +++ b/src/gba/serialize.c @@ -14,8 +14,8 @@ #include -const uint32_t GBA_SAVESTATE_MAGIC = 0x01000000; -const uint32_t GBA_SAVESTATE_VERSION = 0x00000004; +MGBA_EXPORT const uint32_t GBASavestateMagic = 0x01000000; +MGBA_EXPORT const uint32_t GBASavestateVersion = 0x00000004; mLOG_DEFINE_CATEGORY(GBA_STATE, "GBA Savestate", "gba.serialize"); @@ -25,7 +25,7 @@ struct GBABundledState { }; void GBASerialize(struct GBA* gba, struct GBASerializedState* state) { - STORE_32(GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION, 0, &state->versionMagic); + STORE_32(GBASavestateMagic + GBASavestateVersion, 0, &state->versionMagic); STORE_32(gba->biosChecksum, 0, &state->biosChecksum); STORE_32(gba->romCrc32, 0, &state->romCrc32); STORE_32(gba->timing.masterCycles, 0, &state->masterCycles); @@ -87,14 +87,14 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) { int32_t check; uint32_t ucheck; LOAD_32(ucheck, 0, &state->versionMagic); - if (ucheck > GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION) { - mLOG(GBA_STATE, WARN, "Invalid or too new savestate: expected %08X, got %08X", GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION, ucheck); + if (ucheck > GBASavestateMagic + GBASavestateVersion) { + mLOG(GBA_STATE, WARN, "Invalid or too new savestate: expected %08X, got %08X", GBASavestateMagic + GBASavestateVersion, ucheck); error = true; - } else if (ucheck < GBA_SAVESTATE_MAGIC) { - mLOG(GBA_STATE, WARN, "Invalid savestate: expected %08X, got %08X", GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION, ucheck); + } else if (ucheck < GBASavestateMagic) { + mLOG(GBA_STATE, WARN, "Invalid savestate: expected %08X, got %08X", GBASavestateMagic + GBASavestateVersion, ucheck); error = true; - } else if (ucheck < GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION) { - mLOG(GBA_STATE, WARN, "Old savestate: expected %08X, got %08X, continuing anyway", GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION, ucheck); + } else if (ucheck < GBASavestateMagic + GBASavestateVersion) { + mLOG(GBA_STATE, WARN, "Old savestate: expected %08X, got %08X, continuing anyway", GBASavestateMagic + GBASavestateVersion, ucheck); } LOAD_32(ucheck, 0, &state->biosChecksum); if (ucheck != gba->biosChecksum) { diff --git a/src/platform/qt/SaveConverter.cpp b/src/platform/qt/SaveConverter.cpp index d7c351501..3ccc952d6 100644 --- a/src/platform/qt/SaveConverter.cpp +++ b/src/platform/qt/SaveConverter.cpp @@ -266,7 +266,7 @@ mPlatform SaveConverter::getStatePlatform(VFile* vf) { core->deinit(core); if (state) { LOAD_32LE(magic, 0, state); - if (magic - GBA_SAVESTATE_MAGIC <= GBA_SAVESTATE_VERSION) { + if (magic - GBASavestateMagic <= GBASavestateVersion) { platform = mPLATFORM_GBA; } mappedMemoryFree(state, core->stateSize(core)); @@ -281,7 +281,7 @@ mPlatform SaveConverter::getStatePlatform(VFile* vf) { core->deinit(core); if (state) { LOAD_32LE(magic, 0, state); - if (magic - GB_SAVESTATE_MAGIC <= GB_SAVESTATE_VERSION) { + if (magic - GBSavestateMagic <= GBSavestateVersion) { platform = mPLATFORM_GB; } mappedMemoryFree(state, core->stateSize(core));