From 65b553022c3ff0190516e501ec49418428eb863e Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 28 Sep 2019 20:15:24 -0700 Subject: [PATCH 01/28] Qt: Fix LibraryController initialization (fixes #1324) --- CHANGES | 1 + src/platform/qt/library/LibraryController.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 3ed7e3302..449403325 100644 --- a/CHANGES +++ b/CHANGES @@ -44,6 +44,7 @@ Other fixes: - Qt: Only show emulator restart warning once per settings saving - FFmpeg: Drain recording buffers - Shaders: Fix gba-color shader resolution (fixes mgba.io/i/1435) + - Qt: Fix LibraryController initialization (fixes mgba.io/i/1324) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/platform/qt/library/LibraryController.cpp b/src/platform/qt/library/LibraryController.cpp index 3f2a5fc96..b7756437b 100644 --- a/src/platform/qt/library/LibraryController.cpp +++ b/src/platform/qt/library/LibraryController.cpp @@ -51,6 +51,7 @@ LibraryController::LibraryController(QWidget* parent, const QString& path, Confi m_libraryGrid = std::make_unique(this); addWidget(m_libraryGrid->widget()); + m_currentStyle = LibraryStyle::STYLE_TREE; // Make sure setViewStyle does something setViewStyle(LibraryStyle::STYLE_LIST); refresh(); } From 8da533c551f423a252f12b79db132025c09e2a6b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 28 Sep 2019 20:17:50 -0700 Subject: [PATCH 02/28] GBA Video: Fix unitialized value --- src/gba/renderers/video-software.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 565b7a452..bd47ad2b2 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -131,6 +131,8 @@ static void GBAVideoSoftwareRendererReset(struct GBAVideoRenderer* renderer) { memset(softwareRenderer->cache, 0, sizeof(softwareRenderer->cache)); memset(softwareRenderer->nextIo, 0, sizeof(softwareRenderer->nextIo)); + softwareRenderer->lastHighlightAmount = 0; + for (i = 0; i < 4; ++i) { struct GBAVideoSoftwareBackground* bg = &softwareRenderer->bg[i]; bg->index = i; From 4e81b8e2b01a79a5cf96e73614a4733c0ab91e09 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 29 Sep 2019 16:01:18 -0700 Subject: [PATCH 03/28] Switch: Fix audio when video rate desyncs (fixes #1532) --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 449403325..82367daa7 100644 --- a/CHANGES +++ b/CHANGES @@ -45,6 +45,7 @@ Other fixes: - FFmpeg: Drain recording buffers - Shaders: Fix gba-color shader resolution (fixes mgba.io/i/1435) - Qt: Fix LibraryController initialization (fixes mgba.io/i/1324) + - Switch: Fix audio when video rate desyncs (fixes mgba.io/i/1532) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash From 2044039c7a08a617a0db17facc889aa1c6881c4e Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 29 Sep 2019 22:16:30 -0700 Subject: [PATCH 04/28] CMake: Don't use libzip on embedded platforms (fixes #1527) --- CHANGES | 1 + CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 82367daa7..df57e44ac 100644 --- a/CHANGES +++ b/CHANGES @@ -76,6 +76,7 @@ Misc: - OpenGL: Only resize textures when needed - GBA BIOS: Fix clobbered registers in CpuSet (fixes mgba.io/i/1531) - Qt: Remove What's This icon from dialogs + - CMake: Don't use libzip on embedded platforms (fixes mgba.io/i/1527) 0.7.3: (2019-09-15) Emulation fixes: diff --git a/CMakeLists.txt b/CMakeLists.txt index 14aff08a6..2627c4ff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,6 +245,7 @@ if(DEFINED 3DS OR DEFINED PSP2 OR DEFINED WII OR DEFINED SWITCH) set(USE_DEBUGGERS OFF) set(USE_SQLITE3 OFF) set(USE_DISCORD_RPC OFF) + set(USE_LIBZIP OFF CACHE BOOL "") endif() if(DEFINED 3DS) From 6bbf5755c63f49d974b31951c5609b42c7ae0492 Mon Sep 17 00:00:00 2001 From: EmpyreusX <36258024+EmpyreusX@users.noreply.github.com> Date: Sun, 29 Sep 2019 21:47:58 +0800 Subject: [PATCH 05/28] Update mgba-zh_CN.ts --- src/platform/qt/ts/mgba-zh_CN.ts | 425 +++++++++++++++++-------------- 1 file changed, 227 insertions(+), 198 deletions(-) diff --git a/src/platform/qt/ts/mgba-zh_CN.ts b/src/platform/qt/ts/mgba-zh_CN.ts index f1979889f..6840ea2b2 100644 --- a/src/platform/qt/ts/mgba-zh_CN.ts +++ b/src/platform/qt/ts/mgba-zh_CN.ts @@ -310,34 +310,24 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 录制 GIF - - Start - 开始 - - - - Stop - 停止 - - - - Select File - 选择文件 - - - + Frameskip 跳帧 - - Frame delay (ms) - 帧延迟 (ms) + + Start + 开始 - - Automatic - 自动设置 + + Stop + 停止 + + + + Select File + 选择文件 @@ -614,6 +604,40 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 缩放率 + + MemoryDump + + + Save Memory Range + 保存内存范围 + + + + Start Address: + 起始地址: + + + + : + : + + + + + 0x + 0x + + + + Byte Count: + 字节数: + + + + Dump across banks + 跨 bank 转储 + + MemorySearch @@ -816,6 +840,11 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Load 载入 + + + Save Range + 保存范围 + ObjView @@ -1405,22 +1434,22 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::CoreController - + Failed to open save file: %1 无法打开存档: %1 - + Failed to open game file: %1 无法打开游戏文件: %1 - + Failed to open snapshot file for reading: %1 无法读取快照文件: %1 - + Failed to open snapshot file for writing: %1 无法写入快照文件: %1 @@ -1553,17 +1582,17 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 QGBA::GIFView - + Failed to open output GIF file: %1 无法打开输出的 GIF 文件: %1 - + Select output file 选择输出文件 - + Graphics Interchange Format (*.gif) 图形交换格式 (*.gif) @@ -3445,12 +3474,12 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 No shader loaded - 未载入着色器 + 不载入着色器 by %1 - by %1 + 由 %1 @@ -3460,7 +3489,7 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Pass %1 - Pass %1 + 通道 %1 @@ -3515,108 +3544,108 @@ 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 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 @@ -3625,578 +3654,578 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 %1 - + Couldn't Load 无法载入 - + Could not load game. Are you sure it's in the correct format? 无法载入游戏。请确认游戏格式是否无误。 - + Unimplemented BIOS call 未实现的 BIOS 调用 - + This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience. 该游戏使用了尚未实现的 BIOS 调用。请使用官方 BIOS 以获得最佳游戏体验。 - + 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... - + 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(&1) - + Load camera image... 读取相机图片... - + Import GameShark Save 导入 GameShark 存档 - + Export GameShark Save 导出 GameShark 存档 - + New multiplayer window 新建多人游戏窗口 - + 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 打印机.. + 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) - + Record A/V... 录制音频/视频... - + Record GIF... 录制 GIF... - + Video layers 视频图层 - + Audio channels 音频通道 - + Adjust layer placement... - 调整图层布局 + 调整图层布局... - + &Tools 工具(&T) - + View &logs... 查看日志(&L)... - + Game &overrides... 覆盖游戏(&O)... - - Game &Pak sensors... - 游戏卡带传感器(&P)... + + Game Pak sensors... + 游戏卡带传感器... - + &Cheats... 作弊码(&C)... - + Settings... 设置... - + Open debugger console... 打开调试器控制台... - + Start &GDB server... 打开 GDB 服务器(&G)... - + View &palette... 查看调色板(&P)... - + View &sprites... - 查看精灵图(&S) + 查看精灵图(&S)... - + View &tiles... - 查看瓷贴(&T) + 查看瓷贴(&T)... - + View &map... - 查看映射(&M) + 查看映射(&M)... - - Frame inspector - 框架检查 + + &Frame inspector + 框架检查(&F) - + View memory... 查看内存... - + Search memory... 搜索内存... - + View &I/O registers... 查看 I/O 寄存器(&I)... - - Record video log... - 记录视频日志... + + Record debug video log... + 记录调试视频日志... - - Stop 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 清除 @@ -4648,6 +4677,11 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Enable Discord Rich Presence 启用 Enable Discord Rich Presence + + + Pause when minimized + 最小化时暂停 + Fast forward speed: @@ -4667,8 +4701,8 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 不限制 - - Fast forward (held) speed:: + + Fast forward (held) speed: 快进 (按住) 速度: @@ -4694,7 +4728,7 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Run all - 运行所有 + 运行全部 @@ -4949,7 +4983,7 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Camera: - 相机 + 相机: @@ -4982,7 +5016,7 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 Unload Shader - 未载入着色器 + 卸载着色器 @@ -5129,11 +5163,6 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 MKV MKV - - - WebM - WebM - AVI @@ -5211,12 +5240,12 @@ Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标 - Bitrate (kbps) + Bitrate (kbps) 比特率 (kbps) - VBR + VBR VBR From c8cc2eba2e24129f74205d06a5038d18d03cfaa9 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 30 Sep 2019 18:18:56 -0700 Subject: [PATCH 06/28] Switch: Fix audio when video rate desyncs (fixes #1532) --- src/platform/switch/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/platform/switch/main.c b/src/platform/switch/main.c index f87caf667..45560cab4 100644 --- a/src/platform/switch/main.c +++ b/src/platform/switch/main.c @@ -20,7 +20,7 @@ #include #define AUTO_INPUT 0x4E585031 -#define SAMPLES 0x400 +#define SAMPLES 0x200 #define BUFFER_SIZE 0x1000 #define N_BUFFERS 4 #define ANALOG_DEADZONE 0x4000 @@ -281,6 +281,8 @@ static void _setup(struct mGUIRunner* runner) { if (mCoreConfigGetUIntValue(&runner->config, "screenMode", &mode) && mode < SM_MAX) { screenMode = mode; } + + runner->core->setAudioBufferSize(runner->core, SAMPLES); } static void _gameLoaded(struct mGUIRunner* runner) { @@ -539,6 +541,11 @@ static void _postAudioBuffer(struct mAVStream* stream, blip_t* left, blip_t* rig if (enqueuedBuffers >= N_BUFFERS - 1 && R_SUCCEEDED(audoutWaitPlayFinish(&releasedBuffers, &audoutNReleasedBuffers, 10000000))) { enqueuedBuffers -= audoutNReleasedBuffers; } + if (enqueuedBuffers >= N_BUFFERS) { + blip_clear(left); + blip_clear(right); + return; + } struct GBAStereoSample* samples = audioBuffer[audioBufferActive]; blip_read_samples(left, &samples[0].left, SAMPLES, true); @@ -754,7 +761,7 @@ int main(int argc, char* argv[]) { audoutBuffer[i].next = NULL; audoutBuffer[i].buffer = audioBuffer[i]; audoutBuffer[i].buffer_size = BUFFER_SIZE; - audoutBuffer[i].data_size = BUFFER_SIZE; + audoutBuffer[i].data_size = SAMPLES * 4; audoutBuffer[i].data_offset = 0; } From 28151ee65c2e1189b6093cb5f36d4ab46f8a4ae0 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 1 Oct 2019 18:33:56 -0700 Subject: [PATCH 07/28] Qt: Printer quality of life improvements (fixes #1540) --- CHANGES | 1 + src/platform/qt/PrinterView.cpp | 20 ++++-- src/platform/qt/PrinterView.ui | 122 +++++++++++++++++++++++++++----- 3 files changed, 123 insertions(+), 20 deletions(-) diff --git a/CHANGES b/CHANGES index df57e44ac..bb3d134c2 100644 --- a/CHANGES +++ b/CHANGES @@ -77,6 +77,7 @@ Misc: - GBA BIOS: Fix clobbered registers in CpuSet (fixes mgba.io/i/1531) - Qt: Remove What's This icon from dialogs - CMake: Don't use libzip on embedded platforms (fixes mgba.io/i/1527) + - Qt: Printer quality of life improvements (fixes mgba.io/i/1540) 0.7.3: (2019-09-15) Emulation fixes: diff --git a/src/platform/qt/PrinterView.cpp b/src/platform/qt/PrinterView.cpp index 2a2b621cf..9386e0994 100644 --- a/src/platform/qt/PrinterView.cpp +++ b/src/platform/qt/PrinterView.cpp @@ -8,6 +8,7 @@ #include "CoreController.h" #include "GBAApp.h" +#include #include using namespace QGBA; @@ -24,6 +25,17 @@ PrinterView::PrinterView(std::shared_ptr controller, QWidget* pa connect(m_ui.tear, &QAbstractButton::clicked, this, &PrinterView::clear); connect(m_ui.buttonBox, &QDialogButtonBox::accepted, this, &PrinterView::save); m_timer.setInterval(80); + + connect(m_ui.magnification, static_cast(&QSpinBox::valueChanged), [this](int mag) { + if (m_image.isNull()) { + return; + } + int oldMag = m_ui.image->size().width() / m_image.size().width(); + m_ui.image->setPixmap(m_image.scaled(m_image.size() * mag)); + m_ui.image->setFixedWidth(m_image.size().width() * mag); + m_ui.image->setFixedHeight(m_ui.image->size().height() / oldMag * mag); + }); + clear(); } @@ -52,22 +64,22 @@ void PrinterView::printImage(const QImage& image) { painter.drawPixmap(0, 0, m_image); painter.drawImage(0, m_image.height(), image); m_image = pixmap; - m_ui.image->setPixmap(m_image); + m_ui.image->setPixmap(m_image.scaled(m_image.size() * m_ui.magnification->value())); m_timer.start(); m_ui.hurry->setEnabled(true); } void PrinterView::printLine() { - m_ui.image->setFixedHeight(m_ui.image->height() + 1); + m_ui.image->setFixedHeight(m_ui.image->height() + m_ui.magnification->value()); m_ui.scrollArea->ensureVisible(0, m_ui.image->height(), 0, 0); - if (m_ui.image->height() >= m_image.height()) { + if (m_ui.image->height() >= m_image.height() * m_ui.magnification->value()) { printAll(); } } void PrinterView::printAll() { m_timer.stop(); - m_ui.image->setFixedHeight(m_image.height()); + m_ui.image->setFixedHeight(m_image.height() * m_ui.magnification->value()); m_controller->endPrint(); m_ui.buttonBox->button(QDialogButtonBox::Save)->setEnabled(true); m_ui.hurry->setEnabled(false); diff --git a/src/platform/qt/PrinterView.ui b/src/platform/qt/PrinterView.ui index ceac7c577..b103ae768 100644 --- a/src/platform/qt/PrinterView.ui +++ b/src/platform/qt/PrinterView.ui @@ -6,15 +6,15 @@ 0 0 - 241 - 311 + 246 + 425 Game Boy Printer - + QFrame::NoFrame @@ -23,10 +23,15 @@ true - - - 0 - + + + 0 + 0 + 234 + 249 + + + 0 @@ -39,14 +44,36 @@ 0 - + + 0 + + Qt::Vertical + + + 0 + 0 + + - + + + + Qt::Horizontal + + + + 0 + 0 + + + + + @@ -60,18 +87,12 @@ 1 - - - 160 - 16777215 - - Qt::AlignHCenter|Qt::AlignTop - + QFrame::Plain @@ -81,6 +102,19 @@ + + + + Qt::Horizontal + + + + 0 + 0 + + + + @@ -106,6 +140,62 @@ + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + × + + + 1 + + + 8 + + + + + + + Magnification + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + From 038d21debd6885a7ae74fd2bf24869eafa50d6da Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 1 Oct 2019 18:37:00 -0700 Subject: [PATCH 08/28] Qt: Add copy and QoL improvements to graphic views (closes #1541) --- CHANGES | 1 + src/platform/qt/AssetTile.cpp | 3 + src/platform/qt/AssetTile.h | 2 + src/platform/qt/MapView.cpp | 39 +-- src/platform/qt/MapView.h | 3 +- src/platform/qt/MapView.ui | 85 ++++--- src/platform/qt/ObjView.cpp | 21 ++ src/platform/qt/ObjView.h | 1 + src/platform/qt/ObjView.ui | 438 +++++++++++++++++--------------- src/platform/qt/PrinterView.cpp | 5 + src/platform/qt/TileView.cpp | 45 +++- src/platform/qt/TileView.h | 3 + src/platform/qt/TileView.ui | 51 ++-- 13 files changed, 412 insertions(+), 285 deletions(-) diff --git a/CHANGES b/CHANGES index bb3d134c2..68620d659 100644 --- a/CHANGES +++ b/CHANGES @@ -78,6 +78,7 @@ Misc: - Qt: Remove What's This icon from dialogs - CMake: Don't use libzip on embedded platforms (fixes mgba.io/i/1527) - Qt: Printer quality of life improvements (fixes mgba.io/i/1540) + - Qt: Add copy and QoL improvements to graphic views (closes mgba.io/i/1541) 0.7.3: (2019-09-15) Emulation fixes: diff --git a/src/platform/qt/AssetTile.cpp b/src/platform/qt/AssetTile.cpp index 0f87f7654..23ff4ff56 100644 --- a/src/platform/qt/AssetTile.cpp +++ b/src/platform/qt/AssetTile.cpp @@ -116,6 +116,9 @@ void AssetTile::selectIndex(int index) { m_ui.preview->setColor(i ^ flip, data[i]); } m_ui.preview->update(); + + QImage tile(reinterpret_cast(data), 8, 8, QImage::Format_ARGB32); + m_activeTile = tile.rgbSwapped(); } void AssetTile::setFlip(bool h, bool v) { diff --git a/src/platform/qt/AssetTile.h b/src/platform/qt/AssetTile.h index 676582387..d90572018 100644 --- a/src/platform/qt/AssetTile.h +++ b/src/platform/qt/AssetTile.h @@ -21,6 +21,7 @@ Q_OBJECT public: AssetTile(QWidget* parent = nullptr); void setController(std::shared_ptr); + QImage activeTile() const { return m_activeTile; } public slots: void setPalette(int); @@ -48,6 +49,7 @@ private: bool m_flipV = false; QMap m_customProperties; + QImage m_activeTile; }; } diff --git a/src/platform/qt/MapView.cpp b/src/platform/qt/MapView.cpp index 0fe80c2c3..f71baf0fe 100644 --- a/src/platform/qt/MapView.cpp +++ b/src/platform/qt/MapView.cpp @@ -22,7 +22,9 @@ #include #endif +#include #include +#include #include #include #include @@ -88,11 +90,19 @@ MapView::MapView(std::shared_ptr controller, QWidget* parent) }); group->addButton(button); } -#ifdef USE_PNG connect(m_ui.exportButton, &QAbstractButton::clicked, this, &MapView::exportMap); -#else - m_ui.exportButton->setVisible(false); -#endif + connect(m_ui.copyButton, &QAbstractButton::clicked, this, &MapView::copyMap); + + QAction* exportAction = new QAction(this); + exportAction->setShortcut(QKeySequence::Save); + connect(exportAction, &QAction::triggered, this, &MapView::exportMap); + addAction(exportAction); + + QAction* copyAction = new QAction(this); + copyAction->setShortcut(QKeySequence::Copy); + connect(copyAction, &QAction::triggered, this, &MapView::copyMap); + addAction(copyAction); + m_ui.map->installEventFilter(this); m_ui.tile->addCustomProperty("mapAddr", tr("Map Addr.")); m_ui.tile->addCustomProperty("flip", tr("Mirror")); @@ -211,7 +221,7 @@ void MapView::updateTilesGBA(bool force) { mBitmapCacheCleanRow(bitmapCache, m_bitmapStatus, j); memcpy(static_cast(&bgBits[width * j * 4]), mBitmapCacheGetRow(bitmapCache, j), width * 4); } - m_rawMap = m_rawMap.rgbSwapped(); + m_rawMap = m_rawMap.convertToFormat(QImage::Format_RGB32).rgbSwapped(); } else { mMapCache* mapCache = mMapCacheSetGetPointer(&m_cacheSet->maps, m_map); int tilesW = 1 << mMapCacheSystemInfoGetTilesWide(mapCache->sysConfig); @@ -242,23 +252,18 @@ void MapView::updateTilesGB(bool force) { } #endif -#ifdef USE_PNG void MapView::exportMap() { QString filename = GBAApp::app()->getSaveFileName(this, tr("Export map"), tr("Portable Network Graphics (*.png)")); - VFile* vf = VFileDevice::open(filename, O_WRONLY | O_CREAT | O_TRUNC); - if (!vf) { - LOG(QT, ERROR) << tr("Failed to open output PNG file: %1").arg(filename); + if (filename.isNull()) { return; } CoreController::Interrupter interrupter(m_controller); - png_structp png = PNGWriteOpen(vf); - png_infop info = PNGWriteHeaderA(png, m_rawMap.width(), m_rawMap.height()); - - QImage map = m_rawMap.rgbSwapped(); - PNGWritePixelsA(png, map.width(), map.height(), map.bytesPerLine() / 4, static_cast(map.constBits())); - PNGWriteClose(png, info); - vf->close(vf); + m_rawMap.save(filename, "PNG"); } -#endif + +void MapView::copyMap() { + CoreController::Interrupter interrupter(m_controller); + GBAApp::app()->clipboard()->setImage(m_rawMap); +} \ No newline at end of file diff --git a/src/platform/qt/MapView.h b/src/platform/qt/MapView.h index 4b39dcd7a..89c09259b 100644 --- a/src/platform/qt/MapView.h +++ b/src/platform/qt/MapView.h @@ -21,10 +21,9 @@ Q_OBJECT public: MapView(std::shared_ptr controller, QWidget* parent = nullptr); -#ifdef USE_PNG public slots: void exportMap(); -#endif + void copyMap(); private slots: void selectMap(int); diff --git a/src/platform/qt/MapView.ui b/src/platform/qt/MapView.ui index d21cce841..2d733c934 100644 --- a/src/platform/qt/MapView.ui +++ b/src/platform/qt/MapView.ui @@ -13,38 +13,7 @@ Maps - - - - - - - - - - - - - - - - Export - - - - - - - Qt::Vertical - - - - 0 - 0 - - - - + @@ -79,7 +48,7 @@ - + true @@ -133,21 +102,59 @@ + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + Export + + + + + + + + + + + + + + + Copy + + + - - QGBA::AssetInfo - QGroupBox -
AssetInfo.h
- 1 -
QGBA::AssetTile QGroupBox
AssetTile.h
1
+ + QGBA::AssetInfo + QGroupBox +
AssetInfo.h
+ 1 +
diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index e482f023b..373e0ef16 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -8,6 +8,8 @@ #include "CoreController.h" #include "GBAApp.h" +#include +#include #include #include @@ -52,6 +54,17 @@ ObjView::ObjView(std::shared_ptr controller, QWidget* parent) updateTiles(true); }); connect(m_ui.exportButton, &QAbstractButton::clicked, this, &ObjView::exportObj); + connect(m_ui.copyButton, &QAbstractButton::clicked, this, &ObjView::copyObj); + + QAction* exportAction = new QAction(this); + exportAction->setShortcut(QKeySequence::Save); + connect(exportAction, &QAction::triggered, this, &ObjView::exportObj); + addAction(exportAction); + + QAction* copyAction = new QAction(this); + copyAction->setShortcut(QKeySequence::Copy); + connect(copyAction, &QAction::triggered, this, &ObjView::copyObj); + addAction(copyAction); } void ObjView::selectObj(int obj) { @@ -203,7 +216,15 @@ void ObjView::updateTilesGB(bool force) { void ObjView::exportObj() { QString filename = GBAApp::app()->getSaveFileName(this, tr("Export sprite"), tr("Portable Network Graphics (*.png)")); + if (filename.isNull()) { + return; + } CoreController::Interrupter interrupter(m_controller); QImage obj = compositeObj(m_objInfo); obj.save(filename, "PNG"); } + +void ObjView::copyObj() { + CoreController::Interrupter interrupter(m_controller); + GBAApp::app()->clipboard()->setImage(compositeObj(m_objInfo)); +} diff --git a/src/platform/qt/ObjView.h b/src/platform/qt/ObjView.h index 42cd3f65e..1ceef7417 100644 --- a/src/platform/qt/ObjView.h +++ b/src/platform/qt/ObjView.h @@ -23,6 +23,7 @@ public: public slots: void exportObj(); + void copyObj(); private slots: void selectObj(int); diff --git a/src/platform/qt/ObjView.ui b/src/platform/qt/ObjView.ui index df0a003a9..5585b6393 100644 --- a/src/platform/qt/ObjView.ui +++ b/src/platform/qt/ObjView.ui @@ -6,80 +6,170 @@ 0 0 - 454 - 385 + 641 + 470 Sprites - - - - - QFrame::StyledPanel + + + + + Geometry - - - 0 - - - - - - 0 - 0 - - - - - 8 - 8 - - - + + + + + + + Position + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + + 20 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + , + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 20 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + Dimensions + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + + 20 + 0 + + + + 8 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + × + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 20 + 0 + + + + 8 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + - - - - - - - 0 - 0 - - - - × - - - 1 - - - 8 - - - - - - - Magnification - - - - - - - Export - - - - + + + + Tile + + - + + + + Export + + + + Attributes @@ -383,154 +473,6 @@ - - - - Tile - - - - - - - Geometry - - - - - - - - Position - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - 20 - 0 - - - - 0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - , - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 20 - 0 - - - - 0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - Dimensions - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - 20 - 0 - - - - 8 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - × - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 20 - 0 - - - - 8 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - @@ -568,6 +510,80 @@ + + + + + + + 0 + 0 + + + + × + + + 1 + + + 8 + + + + + + + Magnification + + + + + + + + + Copy + + + + + + + QFrame::StyledPanel + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 8 + 8 + + + + + + + diff --git a/src/platform/qt/PrinterView.cpp b/src/platform/qt/PrinterView.cpp index 9386e0994..816d29566 100644 --- a/src/platform/qt/PrinterView.cpp +++ b/src/platform/qt/PrinterView.cpp @@ -36,6 +36,11 @@ PrinterView::PrinterView(std::shared_ptr controller, QWidget* pa m_ui.image->setFixedHeight(m_ui.image->size().height() / oldMag * mag); }); + QAction* save = new QAction(this); + save->setShortcut(QKeySequence::Save); + connect(save, &QAction::triggered, this, &MapView::save); + addAction(save); + clear(); } diff --git a/src/platform/qt/TileView.cpp b/src/platform/qt/TileView.cpp index 972d5f419..166114a1d 100644 --- a/src/platform/qt/TileView.cpp +++ b/src/platform/qt/TileView.cpp @@ -8,6 +8,8 @@ #include "CoreController.h" #include "GBAApp.h" +#include +#include #include #include @@ -87,7 +89,20 @@ TileView::TileView(std::shared_ptr controller, QWidget* parent) updateTiles(true); }); - connect(m_ui.exportButton, &QAbstractButton::clicked, this, &TileView::exportTiles); + connect(m_ui.exportAll, &QAbstractButton::clicked, this, &TileView::exportTiles); + connect(m_ui.exportOne, &QAbstractButton::clicked, this, &TileView::exportTile); + connect(m_ui.copyAll, &QAbstractButton::clicked, this, &TileView::copyTiles); + connect(m_ui.copyOne, &QAbstractButton::clicked, this, &TileView::copyTile); + + QAction* exportAll = new QAction(this); + exportAll->setShortcut(QKeySequence::Save); + connect(exportAll, &QAction::triggered, this, &TileView::exportTiles); + addAction(exportAll); + + QAction* copyOne = new QAction(this); + copyOne->setShortcut(QKeySequence::Copy); + connect(copyOne, &QAction::triggered, this, &TileView::copyTile); + addAction(copyOne); } #ifdef M_CORE_GBA @@ -162,8 +177,36 @@ void TileView::updatePalette(int palette) { void TileView::exportTiles() { QString filename = GBAApp::app()->getSaveFileName(this, tr("Export tiles"), tr("Portable Network Graphics (*.png)")); + if (filename.isNull()) { + return; + } CoreController::Interrupter interrupter(m_controller); updateTiles(false); QPixmap pixmap(m_ui.tiles->backing()); pixmap.save(filename, "PNG"); } + +void TileView::exportTile() { + QString filename = GBAApp::app()->getSaveFileName(this, tr("Export tile"), + tr("Portable Network Graphics (*.png)")); + if (filename.isNull()) { + return; + } + CoreController::Interrupter interrupter(m_controller); + updateTiles(false); + QImage image(m_ui.tile->activeTile()); + image.save(filename, "PNG"); +} + +void TileView::copyTiles() { + CoreController::Interrupter interrupter(m_controller); + updateTiles(false); + QPixmap pixmap(); + GBAApp::app()->clipboard()->setPixmap(m_ui.tiles->backing()); +} + +void TileView::copyTile() { + CoreController::Interrupter interrupter(m_controller); + updateTiles(false); + GBAApp::app()->clipboard()->setImage(m_ui.tile->activeTile()); +} diff --git a/src/platform/qt/TileView.h b/src/platform/qt/TileView.h index bf89f5645..0f6e0017b 100644 --- a/src/platform/qt/TileView.h +++ b/src/platform/qt/TileView.h @@ -24,6 +24,9 @@ public: public slots: void updatePalette(int); void exportTiles(); + void exportTile(); + void copyTiles(); + void copyTile(); private: #ifdef M_CORE_GBA diff --git a/src/platform/qt/TileView.ui b/src/platform/qt/TileView.ui index 521ad27b0..d979459fc 100644 --- a/src/platform/qt/TileView.ui +++ b/src/platform/qt/TileView.ui @@ -6,14 +6,28 @@ 0 0 - 693 - 467 + 748 + 823 Tiles - + + + + + Export Selected + + + + + + + Export All + + + @@ -104,17 +118,7 @@ - - - - - - - Export - - - - + @@ -133,7 +137,7 @@ 0 0 - 405 + 480 768 @@ -179,6 +183,23 @@ + + + + + + + Copy Selected + + + + + + + Copy All + + + From ca37c1ecbf7f6b11a4bc48a8e55154ca3c2ac785 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 1 Oct 2019 18:45:03 -0700 Subject: [PATCH 09/28] Qt: Fix compilation --- src/platform/qt/PrinterView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/qt/PrinterView.cpp b/src/platform/qt/PrinterView.cpp index 816d29566..3e56e4dc0 100644 --- a/src/platform/qt/PrinterView.cpp +++ b/src/platform/qt/PrinterView.cpp @@ -38,7 +38,7 @@ PrinterView::PrinterView(std::shared_ptr controller, QWidget* pa QAction* save = new QAction(this); save->setShortcut(QKeySequence::Save); - connect(save, &QAction::triggered, this, &MapView::save); + connect(save, &QAction::triggered, this, &PrinterView::save); addAction(save); clear(); From c76f173880830d573c55c4b719aa1eef8e5993ba Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 1 Oct 2019 18:52:38 -0700 Subject: [PATCH 10/28] Qt: Add missing MBCs --- src/platform/qt/OverrideView.cpp | 3 +++ src/platform/qt/OverrideView.ui | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/platform/qt/OverrideView.cpp b/src/platform/qt/OverrideView.cpp index 1259761ee..f2957a5d2 100644 --- a/src/platform/qt/OverrideView.cpp +++ b/src/platform/qt/OverrideView.cpp @@ -42,9 +42,12 @@ OverrideView::OverrideView(ConfigController* config, QWidget* parent) s_mbcList.append(GB_MBC3_RTC); s_mbcList.append(GB_MBC5); s_mbcList.append(GB_MBC5_RUMBLE); + s_mbcList.append(GB_MBC6); s_mbcList.append(GB_MBC7); + s_mbcList.append(GB_MMM01); s_mbcList.append(GB_POCKETCAM); s_mbcList.append(GB_TAMA5); + s_mbcList.append(GB_HuC1); s_mbcList.append(GB_HuC3); } if (s_gbModelList.isEmpty()) { diff --git a/src/platform/qt/OverrideView.ui b/src/platform/qt/OverrideView.ui index 108622ffc..6d908247d 100644 --- a/src/platform/qt/OverrideView.ui +++ b/src/platform/qt/OverrideView.ui @@ -319,11 +319,21 @@ MBC5 + Rumble + + + MBC6 + + MBC7 + + + MMM01 + + Pocket Cam @@ -334,6 +344,11 @@ TAMA5 + + + HuC-1 + + HuC-3 From 68af1131aa92c1f51d1d39c17aa045a693ec1150 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 1 Oct 2019 18:58:44 -0700 Subject: [PATCH 11/28] GB: Fix reading ROM immediately after unmapping BIOS --- CHANGES | 1 + src/gb/gb.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 68620d659..fd1167588 100644 --- a/CHANGES +++ b/CHANGES @@ -46,6 +46,7 @@ Other fixes: - Shaders: Fix gba-color shader resolution (fixes mgba.io/i/1435) - Qt: Fix LibraryController initialization (fixes mgba.io/i/1324) - Switch: Fix audio when video rate desyncs (fixes mgba.io/i/1532) + - GB: Fix reading ROM immediately after unmapping BIOS Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash diff --git a/src/gb/gb.c b/src/gb/gb.c index 0e065a0a2..d030545f5 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -573,6 +573,7 @@ void GBUnmapBIOS(struct GB* gb) { if (gb->memory.romBase < gb->memory.rom || gb->memory.romBase > &gb->memory.rom[gb->memory.romSize - 1]) { free(gb->memory.romBase); gb->memory.romBase = gb->memory.rom; + gb->cpu->memory.setActiveRegion(gb->cpu, gb->cpu->pc); } // XXX: Force AGB registers for AGB-mode if (gb->model == GB_MODEL_AGB && gb->cpu->pc == 0x100) { From ed6d55bc4626ef9c3e1543fa873b1af7ff83aef9 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 2 Oct 2019 18:05:54 -0700 Subject: [PATCH 12/28] GB Video: Fix color scaling in AGB mode --- CHANGES | 1 + src/gb/renderers/software.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index fd1167588..1577f105d 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,7 @@ Emulation fixes: - GB Memory: Better emulate 0xFEA0 region on DMG, MGB and AGB - GB Video: Fix mode 0 window edge case (fixes mgba.io/i/1519) - GB Audio: Fix channel 4 volume (fixes mgba.io/i/1529) + - GB Video: Fix color scaling in AGB mode Other fixes: - Qt: Fix some Qt display driver race conditions - Core: Improved lockstep driver reliability (Le Hoang Quyen) diff --git a/src/gb/renderers/software.c b/src/gb/renderers/software.c index c0e5c2367..661a4363f 100644 --- a/src/gb/renderers/software.c +++ b/src/gb/renderers/software.c @@ -461,8 +461,11 @@ static void GBVideoSoftwareRendererWritePalette(struct GBVideoRenderer* renderer color = mColorFrom555(r | (g << 5) | (b << 10)); #else r >>= 2; + r += r >> 4; g >>= 2; + g += g >> 4; b >>= 2; + b += b >> 4; color = r | (g << 8) | (b << 16); #endif } From 6b90a75ae92170a876237ba81e90302ca952da3e Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 2 Oct 2019 18:08:15 -0700 Subject: [PATCH 13/28] GB: Fix using boot ROM with MMM01 games --- CHANGES | 1 + src/gb/gb.c | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/CHANGES b/CHANGES index 1577f105d..a6475479e 100644 --- a/CHANGES +++ b/CHANGES @@ -35,6 +35,7 @@ Emulation fixes: - GB Video: Fix mode 0 window edge case (fixes mgba.io/i/1519) - GB Audio: Fix channel 4 volume (fixes mgba.io/i/1529) - GB Video: Fix color scaling in AGB mode + - GB: Fix using boot ROM with MMM01 games Other fixes: - Qt: Fix some Qt display driver race conditions - Core: Improved lockstep driver reliability (Le Hoang Quyen) diff --git a/src/gb/gb.c b/src/gb/gb.c index d030545f5..1357e713a 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -415,23 +415,6 @@ void GBReset(struct LR35902Core* cpu) { gb->memory.romBase = gb->memory.rom; GBDetectModel(gb); - if (gb->biosVf) { - if (!GBIsBIOS(gb->biosVf)) { - gb->biosVf->close(gb->biosVf); - gb->biosVf = NULL; - } else { - GBMapBIOS(gb); - cpu->a = 0; - cpu->f.packed = 0; - cpu->c = 0; - cpu->e = 0; - cpu->h = 0; - cpu->l = 0; - cpu->sp = 0; - cpu->pc = 0; - } - } - cpu->b = 0; cpu->d = 0; @@ -457,6 +440,24 @@ void GBReset(struct LR35902Core* cpu) { mTimingClear(&gb->timing); GBMemoryReset(gb); + + if (gb->biosVf) { + if (!GBIsBIOS(gb->biosVf)) { + gb->biosVf->close(gb->biosVf); + gb->biosVf = NULL; + } else { + GBMapBIOS(gb); + cpu->a = 0; + cpu->f.packed = 0; + cpu->c = 0; + cpu->e = 0; + cpu->h = 0; + cpu->l = 0; + cpu->sp = 0; + cpu->pc = 0; + } + } + GBVideoReset(&gb->video); GBTimerReset(&gb->timer); if (!gb->biosVf) { @@ -561,19 +562,23 @@ void GBSkipBIOS(struct GB* gb) { void GBMapBIOS(struct GB* gb) { gb->biosVf->seek(gb->biosVf, 0, SEEK_SET); + uint8_t* oldRomBase = gb->memory.romBase; gb->memory.romBase = malloc(GB_SIZE_CART_BANK0); ssize_t size = gb->biosVf->read(gb->biosVf, gb->memory.romBase, GB_SIZE_CART_BANK0); - memcpy(&gb->memory.romBase[size], &gb->memory.rom[size], GB_SIZE_CART_BANK0 - size); + memcpy(&gb->memory.romBase[size], &oldRomBase[size], GB_SIZE_CART_BANK0 - size); if (size > 0x100) { - memcpy(&gb->memory.romBase[0x100], &gb->memory.rom[0x100], sizeof(struct GBCartridge)); + memcpy(&gb->memory.romBase[0x100], &oldRomBase[0x100], sizeof(struct GBCartridge)); } } void GBUnmapBIOS(struct GB* gb) { if (gb->memory.romBase < gb->memory.rom || gb->memory.romBase > &gb->memory.rom[gb->memory.romSize - 1]) { free(gb->memory.romBase); - gb->memory.romBase = gb->memory.rom; - gb->cpu->memory.setActiveRegion(gb->cpu, gb->cpu->pc); + if (gb->memory.mbcType == GB_MMM01) { + GBMBCSwitchBank0(gb, gb->memory.romSize / GB_SIZE_CART_BANK0 - 2); + } else { + GBMBCSwitchBank0(gb, 0); + } } // XXX: Force AGB registers for AGB-mode if (gb->model == GB_MODEL_AGB && gb->cpu->pc == 0x100) { From ecf01ca258b99aeb8c8ea18f5c0f10e098a3f883 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 2 Oct 2019 18:45:49 -0700 Subject: [PATCH 14/28] cinema: Rebaseline AGB tests --- .../misc/boot_regs-A/baseline_0000.png | Bin 1344 -> 1310 bytes cinema/gb/window/wmm-hud/baseline_0000.png | Bin 5126 -> 6114 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/cinema/gb/mooneye-gb/misc/boot_regs-A/baseline_0000.png b/cinema/gb/mooneye-gb/misc/boot_regs-A/baseline_0000.png index e8fd37e04ddfc30c08c76098577d6fbfa9a2fd6e..96dc85bddaac311b563937c0641611224115dd18 100644 GIT binary patch delta 1167 zcmV;A1aSMn3Z4p(BYy(YB)?3`KEP|Nobr2WMFaNfeUQa6J3v-clP= zjvygamUUeV!R61>4v<(VFgO$#9108$1qO!#gF}JA`IJ(YW!Yc5gvHCUFuYE}XZy43 zQE4-#ee=lORP}E2Y8W`LWdG$X>$*y{c^3P49c%|n^4w9e2!BHA=iMDvTqQf-7JS)~ zj)mKi&3BtLRp~wN`Rw}#CHv&F|JST*y}qi}uX9%A@?ia~rmJkq6`$jaN@J<_9%wH5 z4YE>2xoeEse>2wWoh>FgpX)N_idzyXfuvNZF(=ZKQhf z>KitscW)YLCSa7rOdhOVbdx;S@@2a7XP!L8NDJPZuhNK-xYKIUx@es)$+v^gACbx( z>0Oc1ToBPL&qH3%hzpE^!5JB3`L3f@;z)bf=eRK8U4L<~w8XU+C62V;eb4J{?WS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doo1~YZzpO3- zm#oxt`Sa{TrQ*6RTiUMF<55&o$Ytk{^us?DIm)nvi`l5>C)We3?<9=gNu+HG}f9|rANmZ$NkSu(obP8WJB6( zEWhMdx1@b;l1tT>_~#~h#Tm!_ztPd z1}Dq!MVA9}O)T|U@RfH;5Yd!f9}2TLQ4lEZ&rR&P%mXEaHloAf(_(x=2}A?YAX znI;=A;rR9-CG2rVljZlK%N>KPJaNWB9}G^?E}D3O?1LBPgRy;ZVLtfwWP@IaOZTuL z?KPHPa;sa?J~zqBc<7Pji8GF*gRK1iawC77lP%cGU#{v;F0WU<|KCL)59Wz84*Fnl zl6F+l#ETh$t6Pro4%7~Gz2=a8Z;f$rh627W+KZ>e*FB|w2*X=mET`(+5{99{s$5u7PrrO R^n(BZ002ovPDHLkV1l|VbzA@d diff --git a/cinema/gb/window/wmm-hud/baseline_0000.png b/cinema/gb/window/wmm-hud/baseline_0000.png index 73af7e9c50c7d8348e857e1a4b0f22145f6aa39b..bf01a3469cacff2aa9ced88885c76fe253b15047 100644 GIT binary patch literal 6114 zcmd6L`8yPB)c;7K#~vZuh(vh`*|!<8^_9Hiltl-g&=2egA~_mvi0Mxz2q)=X1_|u5+C`+1kpS_b>6k00025#T^q{ z0Dz5k1k7`tVMz};WljJ-F$R1wsrx21PY5qD9nj$Xp=V01&plb>D!)UwRH%o;h z_wvwUN#D_x8S1Tv_46ee3DtrjkI-e=|3yivoVy;Q8nAxS02`F%08Xz5@D{n_SEXGk zBnPsoiPvM` zT1BEf=^h`Sk~htDJ>&=z@f(fu0iF1903N*pQt+4cBM-OcKhusYm?6^TF`xAKX^g{9 zT{*uSx1&yQTJOE^4%qYW)qLaiDTNymPC4hIr~Al4fqr}frQJT8$}j3MWrwCHzXoUI zOAU6ekd?z~y^)Y0swmOhK5wz$nV>orH$`sSfq5LnbN+48P)ycS3_g+#0a4^MuS|9h zUAkjxFx=%%*@y4~q7Emwegm=12oiC)VqkF2w0C2~V9ZZ*X-T8d4{PxfyOS0VR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b_!cFfJZ*6;T*#xl6zoEb9WW)CtI=Tx|p` zkX+-KKqL72cJXKq$s<55K`mrTC}>F}lS;R7yBu;Lf*M#%XZYZN<*_A3JikPrc^;yA ztv1ZDVbJ%!_-=|W2%AucZPU|eCxpfQZb>k2-R;}CTY^OcbF1;be|=k8zi^6M4(6D? zz6~$Fo5FHm(Y+xMsH0HRkGexo-B>j6>%-Yddhy+K5Bg+8T(oe6FIB7K!zt|j*e40W zZE?OrjLTF#@8o?D;!=>dB5Od~_b8vSG#|j6n oP3xOQN3FqDHkofJULV5$0T?K6?g+OF7ytkO07*qoM6N<$f+zQEH~;_u From e576f23fc42827d0d85ba680d6a14a92bb276476 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 3 Oct 2019 20:31:24 -0700 Subject: [PATCH 15/28] Qt: Show list of all sprites in sprite view --- CHANGES | 1 + src/platform/qt/ObjView.cpp | 40 ++++++++++++ src/platform/qt/ObjView.h | 8 +++ src/platform/qt/ObjView.ui | 117 +++++++++++++++++++++++------------- 4 files changed, 123 insertions(+), 43 deletions(-) diff --git a/CHANGES b/CHANGES index a6475479e..38407c923 100644 --- a/CHANGES +++ b/CHANGES @@ -82,6 +82,7 @@ Misc: - CMake: Don't use libzip on embedded platforms (fixes mgba.io/i/1527) - Qt: Printer quality of life improvements (fixes mgba.io/i/1540) - Qt: Add copy and QoL improvements to graphic views (closes mgba.io/i/1541) + - Qt: Show list of all sprites in sprite view 0.7.3: (2019-09-15) Emulation fixes: diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index 373e0ef16..fbbfdf309 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "LogController.h" @@ -56,6 +57,13 @@ ObjView::ObjView(std::shared_ptr controller, QWidget* parent) connect(m_ui.exportButton, &QAbstractButton::clicked, this, &ObjView::exportObj); connect(m_ui.copyButton, &QAbstractButton::clicked, this, &ObjView::copyObj); + connect(m_ui.objList, &QListWidget::currentItemChanged, [this]() { + QListWidgetItem* item = m_ui.objList->currentItem(); + if (item) { + selectObj(item->data(Qt::UserRole).toInt()); + } + }); + QAction* exportAction = new QAction(this); exportAction->setShortcut(QKeySequence::Save); connect(exportAction, &QAction::triggered, this, &ObjView::exportObj); @@ -69,6 +77,14 @@ ObjView::ObjView(std::shared_ptr controller, QWidget* parent) void ObjView::selectObj(int obj) { m_objId = obj; + bool blocked = m_ui.objId->blockSignals(true); + m_ui.objId->setValue(m_objId); + m_ui.objId->blockSignals(blocked); + if (m_objs.size() > obj) { + blocked = m_ui.objList->blockSignals(true); + m_ui.objList->setCurrentItem(m_objs[obj]); + m_ui.objList->blockSignals(blocked); + } updateTiles(true); } @@ -84,6 +100,8 @@ void ObjView::updateTilesGBA(bool force) { const GBA* gba = static_cast(m_controller->thread()->core->board); const GBAObj* obj = &gba->video.oam.obj[m_objId]; + updateObjList(128); + ObjInfo newInfo; lookupObj(m_objId, &newInfo); @@ -166,6 +184,8 @@ void ObjView::updateTilesGB(bool force) { const GB* gb = static_cast(m_controller->thread()->core->board); const GBObj* obj = &gb->video.oam.obj[m_objId]; + updateObjList(40); + ObjInfo newInfo; lookupObj(m_objId, &newInfo); @@ -213,6 +233,26 @@ void ObjView::updateTilesGB(bool force) { } #endif +void ObjView::updateObjList(int maxObj) { + for (int i = 0; i < maxObj; ++i) { + if (m_objs.size() <= i) { + QListWidgetItem* item = new QListWidgetItem; + item->setText(QString::number(i)); + item->setData(Qt::UserRole, i); + item->setSizeHint(QSize(64, 96)); + if (m_objId == i) { + item->setSelected(true); + } + m_objs.append(item); + m_ui.objList->addItem(item); + } + QListWidgetItem* item = m_objs[i]; + ObjInfo info; + lookupObj(i, &info); + item->setIcon(QPixmap::fromImage(std::move(compositeObj(info)))); + } +} + void ObjView::exportObj() { QString filename = GBAApp::app()->getSaveFileName(this, tr("Export sprite"), tr("Portable Network Graphics (*.png)")); diff --git a/src/platform/qt/ObjView.h b/src/platform/qt/ObjView.h index 1ceef7417..c10d661c3 100644 --- a/src/platform/qt/ObjView.h +++ b/src/platform/qt/ObjView.h @@ -9,8 +9,12 @@ #include "ui_ObjView.h" +#include + #include +class QListWidgetItem; + namespace QGBA { class CoreController; @@ -37,6 +41,8 @@ private: void updateTilesGB(bool force) override; #endif + void updateObjList(int maxObj); + Ui::ObjView m_ui; std::shared_ptr m_controller; @@ -44,6 +50,8 @@ private: int m_objId = 0; ObjInfo m_objInfo = {}; + QList m_objs; + int m_tileOffset; int m_boundary; }; diff --git a/src/platform/qt/ObjView.ui b/src/platform/qt/ObjView.ui index 5585b6393..3385b80b2 100644 --- a/src/platform/qt/ObjView.ui +++ b/src/platform/qt/ObjView.ui @@ -6,14 +6,21 @@ 0 0 - 641 - 470 + 800 + 730 Sprites - + + + + + Copy + + + @@ -155,6 +162,43 @@ + + + + QFrame::StyledPanel + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 8 + 8 + + + + + + + @@ -540,48 +584,35 @@ - - - - Copy + + + + + 64 + 64 + - - - - - - QFrame::StyledPanel + + QListView::LeftToRight + + + QListView::Adjust + + + + 64 + 96 + + + + QListView::IconMode + + + true + + + Qt::AlignBottom|Qt::AlignHCenter - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 8 - 8 - - - - - From a2ed0785d95ba766025d02a1f00622bcdedbd09b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 3 Oct 2019 21:08:15 -0700 Subject: [PATCH 16/28] Qt: Fix build on older versions of Qt --- src/platform/qt/ObjView.ui | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/platform/qt/ObjView.ui b/src/platform/qt/ObjView.ui index 3385b80b2..7584deff6 100644 --- a/src/platform/qt/ObjView.ui +++ b/src/platform/qt/ObjView.ui @@ -610,9 +610,6 @@ true - - Qt::AlignBottom|Qt::AlignHCenter - From d1ef6d258ed3dafe1d56000087b8d332aba69f5f Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 5 Oct 2019 15:36:52 -0700 Subject: [PATCH 17/28] OpenGL: Bump minimum to 3.2 --- README.md | 2 +- src/gba/renderers/gl.c | 2 +- src/platform/opengl/gles2.c | 18 +++++++++++++++--- src/platform/qt/Display.cpp | 3 ++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f85550c84..799936e5c 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Other Unix-like platforms, such as OpenBSD, are known to work as well, but are u ### System requirements -Requirements are minimal. Any computer that can run Windows Vista or newer should be able to handle emulation. Support for OpenGL 1.1 or newer is also required, with OpenGL 3.0 or newer for shaders and advanced features. +Requirements are minimal. Any computer that can run Windows Vista or newer should be able to handle emulation. Support for OpenGL 1.1 or newer is also required, with OpenGL 3.2 or newer for shaders and advanced features. Downloads --------- diff --git a/src/gba/renderers/gl.c b/src/gba/renderers/gl.c index 0667f2cf5..13a36a231 100644 --- a/src/gba/renderers/gl.c +++ b/src/gba/renderers/gl.c @@ -64,7 +64,7 @@ static const GLchar* const _gles3Header = "precision highp isampler2D;\n"; static const GLchar* const _gl3Header = - "#version 130\n" + "#version 150 core\n" "#define OUT(n)\n" PALETTE_ENTRY "precision highp float;\n"; diff --git a/src/platform/opengl/gles2.c b/src/platform/opengl/gles2.c index 09848b476..33dcad053 100644 --- a/src/platform/opengl/gles2.c +++ b/src/platform/opengl/gles2.c @@ -21,8 +21,17 @@ static const GLchar* const _gles2Header = "#version 100\n" "precision mediump float;\n"; -static const GLchar* const _gl3Header = - "#version 120\n"; +static const GLchar* const _gl32VHeader = + "#version 150 core\n" + "#define attribute in\n" + "#define varying out\n"; + +static const GLchar* const _gl32FHeader = + "#version 150 core\n" + "#define varying in\n" + "#define texture2D texture\n" + "out vec4 compat_FragColor;\n" + "#define gl_FragColor compat_FragColor\n"; static const char* const _vertexShader = "attribute vec4 position;\n" @@ -449,7 +458,7 @@ void mGLES2ShaderInit(struct mGLES2Shader* shader, const char* vs, const char* f const GLchar* shaderBuffer[2]; const GLubyte* version = glGetString(GL_VERSION); if (strncmp((const char*) version, "OpenGL ES ", strlen("OpenGL ES "))) { - shaderBuffer[0] = _gl3Header; + shaderBuffer[0] = _gl32VHeader; } else { shaderBuffer[0] = _gles2Header; } @@ -460,6 +469,9 @@ void mGLES2ShaderInit(struct mGLES2Shader* shader, const char* vs, const char* f } glShaderSource(shader->vertexShader, 2, shaderBuffer, 0); + if (strncmp((const char*) version, "OpenGL ES ", strlen("OpenGL ES "))) { + shaderBuffer[0] = _gl32FHeader; + } if (fs) { shaderBuffer[1] = fs; } else { diff --git a/src/platform/qt/Display.cpp b/src/platform/qt/Display.cpp index 6a4d2bcb5..bdbffcc0e 100644 --- a/src/platform/qt/Display.cpp +++ b/src/platform/qt/Display.cpp @@ -26,7 +26,8 @@ Display* Display::create(QWidget* parent) { switch (s_driver) { #if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY) case Driver::OPENGL: - format.setVersion(3, 0); + format.setVersion(3, 2); + format.setProfile(QSurfaceFormat::CoreProfile); return new DisplayGL(format, parent); #endif #ifdef BUILD_GL From ba3a8da2868913d1476393a21505ac97df3e61a8 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 6 Oct 2019 02:45:40 -0700 Subject: [PATCH 18/28] Qt: Fix integer scaling not being set when reloading display driver --- src/platform/qt/Window.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 05026660b..35abe2168 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -905,6 +905,7 @@ void Window::reloadDisplayDriver() { const mCoreOptions* opts = m_config->options(); m_display->lockAspectRatio(opts->lockAspectRatio); + m_display->lockIntegerScaling(opts->lockIntegerScaling); m_display->interframeBlending(opts->interframeBlending); m_display->filter(opts->resampleVideo); #if defined(BUILD_GL) || defined(BUILD_GLES2) From 54b92bee16e9e61ad35ce4175688432e173b461d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 6 Oct 2019 02:47:40 -0700 Subject: [PATCH 19/28] Qt: Fix Qt GL context sizing --- src/platform/qt/DisplayGL.cpp | 1 + src/platform/qt/DisplayGL.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index af0dac717..4a9122ccf 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -350,6 +350,7 @@ void PainterGL::setMessagePainter(MessagePainter* messagePainter) { void PainterGL::resize(const QSize& size) { m_size = size; + m_window->setSize(m_size); if (m_started && !m_active) { forceDraw(); } diff --git a/src/platform/qt/DisplayGL.h b/src/platform/qt/DisplayGL.h index ffe433f90..5871f8840 100644 --- a/src/platform/qt/DisplayGL.h +++ b/src/platform/qt/DisplayGL.h @@ -29,6 +29,8 @@ #include "platform/video-backend.h" +class QOpenGLPaintDevice; + namespace QGBA { class PainterGL; @@ -119,7 +121,7 @@ private: QPainter m_painter; QMutex m_mutex; QWindow* m_surface; - QPaintDevice* m_window; + QOpenGLPaintDevice* m_window; QOpenGLContext* m_gl; bool m_active = false; bool m_started = false; From 546f787eb3b276f4ad2f5469f5a774dc83fbbe09 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 6 Oct 2019 02:54:51 -0700 Subject: [PATCH 20/28] Qt: Add option for disabling OSD messages --- CHANGES | 1 + src/platform/qt/Display.cpp | 4 ++ src/platform/qt/Display.h | 3 ++ src/platform/qt/DisplayGL.cpp | 14 ++++- src/platform/qt/DisplayGL.h | 3 ++ src/platform/qt/DisplayQt.cpp | 4 +- src/platform/qt/SettingsView.cpp | 2 + src/platform/qt/SettingsView.ui | 93 +++++++++++++++++++------------- src/platform/qt/Window.cpp | 9 ++++ 9 files changed, 93 insertions(+), 40 deletions(-) diff --git a/CHANGES b/CHANGES index 38407c923..2aff452c5 100644 --- a/CHANGES +++ b/CHANGES @@ -83,6 +83,7 @@ Misc: - Qt: Printer quality of life improvements (fixes mgba.io/i/1540) - Qt: Add copy and QoL improvements to graphic views (closes mgba.io/i/1541) - Qt: Show list of all sprites in sprite view + - Qt: Add option for disabling OSD messages 0.7.3: (2019-09-15) Emulation fixes: diff --git a/src/platform/qt/Display.cpp b/src/platform/qt/Display.cpp index bdbffcc0e..36b463545 100644 --- a/src/platform/qt/Display.cpp +++ b/src/platform/qt/Display.cpp @@ -75,6 +75,10 @@ void Display::interframeBlending(bool lock) { m_interframeBlending = lock; } +void Display::showOSDMessages(bool enable) { + m_showOSD = enable; +} + void Display::filter(bool filter) { m_filter = filter; } diff --git a/src/platform/qt/Display.h b/src/platform/qt/Display.h index 52db65a41..ce2a5cffc 100644 --- a/src/platform/qt/Display.h +++ b/src/platform/qt/Display.h @@ -44,6 +44,7 @@ public: bool isIntegerScalingLocked() const { return m_lockIntegerScaling; } bool hasInterframeBlending() const { return m_interframeBlending; } bool isFiltered() const { return m_filter; } + bool isShowOSD() const { return m_showOSD; } virtual void startDrawing(std::shared_ptr) = 0; virtual bool isDrawing() const = 0; @@ -66,6 +67,7 @@ public slots: virtual void lockAspectRatio(bool lock); virtual void lockIntegerScaling(bool lock); virtual void interframeBlending(bool enable); + virtual void showOSDMessages(bool enable); virtual void filter(bool filter); virtual void framePosted() = 0; virtual void setShaders(struct VDir*) = 0; @@ -85,6 +87,7 @@ private: static const int MOUSE_DISAPPEAR_TIMER = 1000; MessagePainter m_messagePainter; + bool m_showOSD = true; bool m_lockAspectRatio = false; bool m_lockIntegerScaling = false; bool m_interframeBlending = false; diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 4a9122ccf..db1f2e42d 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -111,6 +111,7 @@ void DisplayGL::startDrawing(std::shared_ptr controller) { lockAspectRatio(isAspectRatioLocked()); lockIntegerScaling(isIntegerScalingLocked()); interframeBlending(hasInterframeBlending()); + showOSDMessages(isShowOSD()); filter(isFiltered()); #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) messagePainter()->resize(size(), isAspectRatioLocked(), devicePixelRatioF()); @@ -184,6 +185,13 @@ void DisplayGL::interframeBlending(bool enable) { } } +void DisplayGL::showOSDMessages(bool enable) { + Display::showOSDMessages(enable); + if (m_drawThread) { + QMetaObject::invokeMethod(m_painter, "showOSD", Q_ARG(bool, enable)); + } +} + void DisplayGL::filter(bool filter) { Display::filter(filter); if (m_drawThread) { @@ -370,6 +378,10 @@ void PainterGL::interframeBlending(bool enable) { m_backend->interframeBlending = enable; } +void PainterGL::showOSD(bool enable) { + m_showOSD = enable; +} + void PainterGL::filter(bool filter) { m_backend->filter = filter; if (m_started && !m_active) { @@ -458,7 +470,7 @@ void PainterGL::performDraw() { m_backend->resized(m_backend, m_size.width() * r, m_size.height() * r); m_backend->drawFrame(m_backend); m_painter.endNativePainting(); - if (m_messagePainter) { + if (m_showOSD && m_messagePainter) { m_messagePainter->paint(&m_painter); } } diff --git a/src/platform/qt/DisplayGL.h b/src/platform/qt/DisplayGL.h index 5871f8840..3eb5d8eeb 100644 --- a/src/platform/qt/DisplayGL.h +++ b/src/platform/qt/DisplayGL.h @@ -56,6 +56,7 @@ public slots: void lockAspectRatio(bool lock) override; void lockIntegerScaling(bool lock) override; void interframeBlending(bool enable) override; + void showOSDMessages(bool enable) override; void filter(bool filter) override; void framePosted() override; void setShaders(struct VDir*) override; @@ -102,6 +103,7 @@ public slots: void lockAspectRatio(bool lock); void lockIntegerScaling(bool lock); void interframeBlending(bool enable); + void showOSD(bool enable); void filter(bool filter); void resizeContext(); @@ -127,6 +129,7 @@ private: bool m_started = false; std::shared_ptr m_context = nullptr; bool m_supportsShaders; + bool m_showOSD; VideoShader m_shader{}; VideoBackend* m_backend = nullptr; QSize m_size; diff --git a/src/platform/qt/DisplayQt.cpp b/src/platform/qt/DisplayQt.cpp index 30cb3a8e4..764bf88ca 100644 --- a/src/platform/qt/DisplayQt.cpp +++ b/src/platform/qt/DisplayQt.cpp @@ -122,5 +122,7 @@ void DisplayQt::paintEvent(QPaintEvent*) { } painter.drawImage(full, m_backing, QRect(0, 0, m_width, m_height)); painter.setOpacity(1); - messagePainter()->paint(&painter); + if (isShowOSD()) { + messagePainter()->paint(&painter); + } } diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index ff1485dc5..cf3bca860 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/platform/qt/SettingsView.cpp @@ -377,6 +377,7 @@ void SettingsView::updateConfig() { saveSetting("lockAspectRatio", m_ui.lockAspectRatio); saveSetting("lockIntegerScaling", m_ui.lockIntegerScaling); saveSetting("interframeBlending", m_ui.interframeBlending); + saveSetting("showOSD", m_ui.showOSD); saveSetting("volume", m_ui.volume); saveSetting("mute", m_ui.mute); saveSetting("fastForwardVolume", m_ui.volumeFf); @@ -547,6 +548,7 @@ void SettingsView::reloadConfig() { loadSetting("lockAspectRatio", m_ui.lockAspectRatio); loadSetting("lockIntegerScaling", m_ui.lockIntegerScaling); loadSetting("interframeBlending", m_ui.interframeBlending); + loadSetting("showOSD", m_ui.showOSD, true); loadSetting("volume", m_ui.volume, 0x100); loadSetting("mute", m_ui.mute, false); loadSetting("fastForwardVolume", m_ui.volumeFf, m_ui.volume->value()); diff --git a/src/platform/qt/SettingsView.ui b/src/platform/qt/SettingsView.ui index e4050da5c..2dbb2fca7 100644 --- a/src/platform/qt/SettingsView.ui +++ b/src/platform/qt/SettingsView.ui @@ -562,7 +562,21 @@ - + + + + Pause when minimized + + + + + + + Qt::Horizontal + + + + Show FPS in title bar @@ -572,41 +586,21 @@ - + + + + Enable Discord Rich Presence + + + + Qt::Horizontal - - - - Qt::Horizontal - - - - - - - Automatically save cheats - - - true - - - - - - - Automatically load cheats - - - true - - - - + Automatically save state @@ -616,7 +610,7 @@ - + Automatically load state @@ -626,17 +620,40 @@ - - - - Enable Discord Rich Presence + + + + Qt::Horizontal - - + + - Pause when minimized + Automatically save cheats + + + true + + + + + + + Automatically load cheats + + + true + + + + + + + Show OSD messages + + + true diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 35abe2168..122eea673 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -738,6 +738,7 @@ void Window::gameStarted() { m_config->updateOption("lockIntegerScaling"); m_config->updateOption("lockAspectRatio"); m_config->updateOption("interframeBlending"); + m_config->updateOption("showOSD"); if (m_savedScale > 0) { resizeFrame(size * m_savedScale); } @@ -908,6 +909,7 @@ void Window::reloadDisplayDriver() { m_display->lockIntegerScaling(opts->lockIntegerScaling); m_display->interframeBlending(opts->interframeBlending); m_display->filter(opts->resampleVideo); + m_config->updateOption("showOSD"); #if defined(BUILD_GL) || defined(BUILD_GLES2) if (opts->shader) { struct VDir* shader = VDirOpen(opts->shader); @@ -1603,6 +1605,13 @@ void Window::setupMenu(QMenuBar* menubar) { } }, this); + ConfigOption* showOSD = m_config->addOption("showOSD"); + showOSD->connect([this](const QVariant& value) { + if (m_display) { + m_display->showOSDMessages(value.toBool()); + } + }, this); + m_actions.addHiddenAction(tr("Exit fullscreen"), "exitFullScreen", this, &Window::exitFullScreen, "frame", QKeySequence("Esc")); m_actions.addHeldAction(tr("GameShark Button (held)"), "holdGSButton", [this](bool held) { From 3c78bb50e736d117e1413589912f6b814c808833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=B3pez=20Brante?= Date: Wed, 9 Oct 2019 13:49:42 -0300 Subject: [PATCH 21/28] Qt: Updated Spanish translation --- src/platform/qt/ts/mgba-es.ts | 1025 +++++++++++++++++++++------------ 1 file changed, 672 insertions(+), 353 deletions(-) diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index 2e950a8df..82ce027cb 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -232,15 +232,20 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Cargar
- + Add New Set Agregar nuevo conjunto - + Add Agregar + + + Enter codes here... + Ingresa los códigos aquí... +
DebuggerConsole @@ -260,6 +265,49 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Entrar a depuración + + FrameView + + + Inspect frame + Inspeccionar cuadro + + + + × + × + + + + Magnification + Ampliación + + + + Freeze frame + Congelar cuadro + + + + Backdrop color + Color de telón de fondo (backdrop) + + + + Disable scanline effects + Desactivar efectos de línea de trazado + + + + Export + Exportar + + + + Reset + Reinicializar + + GIFView @@ -268,34 +316,32 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Grabar GIF - + Start Iniciar - + Stop Detener - + Select File Seleccionar archivo - + Frameskip Salto - Frame delay (ms) - Retraso (ms) + Retraso (ms) - Automatic - Automático + Automático @@ -423,13 +469,13 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. LoadSaveState - + %1 State %1 estado - + @@ -441,17 +487,22 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Sin estado - + 1 1 - + 2 2 - + + Cancel + Cancelar + + + 3 3 @@ -461,12 +512,12 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. 4 - + 5 5 - + 6 6 @@ -476,12 +527,12 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. 7 - + 8 8 - + 9 9 @@ -541,7 +592,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Max Lines - Líneas max. + Líneas max @@ -552,20 +603,59 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Mapas - + × x - + Magnification Ampliación - + Export Exportar + + + Copy + Copiar + + + + MemoryDump + + + Save Memory Range + Volcar rango de memoria + + + + Start Address: + Dirección de inicio: + + + + : + : + + + + + 0x + 0x + + + + Byte Count: + Cantidad de bytes: + + + + Dump across banks + Volcar entre bancos de memoria + MemorySearch @@ -705,12 +795,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Inspeccionar dirección: - + + : + : + + + 0x 0x - + Set Alignment: Alinear a: @@ -727,57 +822,62 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. 4 bytes - + &1 Byte - + &2 Bytes - + &4 Bytes - + Unsigned Integer: Entero sin signo: - + Signed Integer: Entero con signo: - + String: Cadena de texto: - + Load TBL Cargar TBL - + Copy Selection Copiar selección - + Paste Pegar - + Save Selection Guardar selección - + + Save Range + Guardar rango + + + Load Cargar @@ -790,140 +890,145 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Sprites - - + + × x - + Magnification Ampliación - + Export Esportar - + Attributes Atributos - + Transform Transform - + Off No - + Palette Paleta - - - - + + + + 0 0 - + + Copy + Copiar + + + Double Size Tamaño doble - - - - + + + + Return, Ctrl+R Volver, Ctrl+R - + Flipped Volteo - + H H - + V V - + Mode Modo - + Normal Normal - + Mosaic Mosaico - + Enabled Habilitado - + Priority Prioridad - + Tile Tile - + Geometry Geometría - + Position Posición - + , , - + Dimensions Dimensiones - - + + 8 8 - + Address Dirección - + 0x07000000 0x07000000 @@ -1081,36 +1186,51 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. + MBC6 + MBC6 + + + MBC7 MBC7 - - - Pocket Cam - - - TAMA5 + MMM01 + Pocket Cam + + + + + TAMA5 + + + + + HuC-1 + HuC-1 + + + HuC-3 HuC-3 - + Background Colors Colores de fondo - + Sprite Colors 1 Colores de sprite 1 - + Sprite Colors 2 Colores de sprite 2 @@ -1240,27 +1360,37 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Game Boy Printer - + Hurry up! ¡Apúrate! - + Tear off Arrancar papel + + + × + + + + + Magnification + Ampliación + QGBA::AssetTile - + %0%1%2 %0%1%2 - - - + + + 0x%0 (%1) 0x%0 (%1) @@ -1374,22 +1504,22 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::CoreController - + Failed to open save file: %1 Error al abrir el archivo de guardado: %1 - + Failed to open game file: %1 Error al abrir el archivo del juego: %1 - + Failed to open snapshot file for reading: %1 Error al leer del archivo de captura: %1 - + Failed to open snapshot file for writing: %1 Error al escribir al archivo de captura: %1 @@ -1402,6 +1532,49 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Error al abrir el archivo del juego: %1 + + 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) + + + + Sprite + Sprite + + + + Backdrop + Telón de fondo (backdrop) + + + + %1 %2 + %1× {1 %2?} + + QGBA::GBAApp @@ -1479,17 +1652,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::GIFView - + Failed to open output GIF file: %1 Error al abrir el archivo GIF de salida: %1 - + Select output file Seleccionar archivo de salida - + Graphics Interchange Format (*.gif) Graphics Interchange Format (*.gif) @@ -2897,27 +3070,27 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::LoadSaveState - + Load State Cargar estado - + Save State Guardar estado - + Empty Vacío - + Corrupted Dañado - + Slot %1 Espacio %1 @@ -3017,49 +3190,101 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::MapView - + + Priority + Prioridad + + + + + Map base + Base mapas + + + + + Tile base + Base tiles + + + + Size + Tamaño + + + + + Offset + Posición + + + + Xform + Xform + + + Map Addr. Dir de mapa - + Mirror Espejar - + None Ninguno - + Both Ambos - + Horizontal Horizontal - + Vertical Vertical - + + + + N/A + n/d + + + Export map Exportar mapa - + Portable Network Graphics (*.png) Gráficos de red portátiles (*.png) - Failed to open output PNG file: %1 - Error al abrir el archivo PNG de salida: %1 + Error al abrir el archivo PNG de salida: %1 + + + + QGBA::MemoryDump + + + Save memory region + Guardar región de memoria + + + + Failed to open output file: %1 + Error al abrir el archivo de salida: %1 @@ -3163,56 +3388,55 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::ObjView - - + + 0x%0 0x%0 - + Off No - + Normal Normal - + Trans Trans - + OBJWIN OBJWIN - + Invalid Inválido - - + + N/A n/d - + Export sprite Exportar sprite - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - Failed to open output PNG file: %1 - Error al abrir el archivo PNG de salida: %1 + Error al abrir el archivo PNG de salida: %1 @@ -3258,12 +3482,12 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::PrinterView - + Save Printout Guardar impresión - + Portable Network Graphics (*.png) Gráficos de red portátiles (*.png) @@ -3294,62 +3518,67 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::SettingsView - - + + Qt Multimedia Qt Multimedia - + SDL SDL - + Software (Qt) Software (Qt) - + OpenGL OpenGL - + OpenGL (force version 1.x) OpenGL (forzar versión 1.x) - + None (Still Image) Nada (imagen estática) - + Keyboard Teclado - + Controllers Controladores - + Shortcuts Atajos de teclado - - + + Shaders Shaders - + Select BIOS Seleccionar BIOS + + + (%1×%2) + + QGBA::ShaderSelector @@ -3417,6 +3646,25 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Mando + + QGBA::TileView + + + Export tiles + Exportar tiles + + + + + Portable Network Graphics (*.png) + Gráficos de red portátiles (*.png) + + + + Export tile + Exportar tile + + QGBA::VideoView @@ -3534,12 +3782,12 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Video-registros (*.mvl) - + Crash Error fatal - + The game has crashed with the following error: %1 @@ -3548,146 +3796,156 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. %1 - + Couldn't Load No se pudo cargar - + 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? - + 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. - + 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 - + About... Acerca de... + + + Game Pak sensors... + Sensores del cartucho... + + + + Clear + Limpiar + F10 F10 - + Load state file... Cargar archivo de estado... - + &Save state Guardar e&stado @@ -3696,32 +3954,32 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Shift+F10 - + 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 @@ -3730,7 +3988,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. F11 - + Undo save state Deshacer guardar estado @@ -3739,8 +3997,8 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Shift+F11 - - + + State &%1 Estado &%1 @@ -3753,22 +4011,22 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Shift+F%1 - + Load camera image... Cargar imagen para la cámara... - + Import GameShark Save Importar guardado de GameShark - + Export GameShark Save Exportar guardado de GameShark - + New multiplayer window Nueva ventana multijugador @@ -3777,17 +4035,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Acerca de - + E&xit Salir (&X) - + &Emulation &Emulación - + &Reset &Reinicializar @@ -3796,17 +4054,17 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Ctrl+R - + Sh&utdown Apagar (&U) - + Yank game pak Tirar del cartucho - + &Pause &Pausar @@ -3815,7 +4073,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Ctrl+P - + &Next frame Cuadro siguie&nte @@ -3824,12 +4082,12 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Ctrl+N - + Fast forward (held) Avance rápido (mantener) - + &Fast forward &Avance rápido @@ -3838,27 +4096,27 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Shift+Tab - + Fast forward speed Velocidad de avance rápido - + Unbounded Sin límite - + %0x %0x - + Rewind (held) Rebobinar (mantener) - + Re&wind Re&bobinar @@ -3867,7 +4125,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. ~ - + Step backwards Paso hacia atrás @@ -3876,52 +4134,52 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Ctrl+B - + 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 @@ -3930,42 +4188,42 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. %1x - + 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) @@ -4002,12 +4260,12 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. 240 - + Take &screenshot Tomar pan&tallazo - + F12 F12 @@ -4016,7 +4274,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Grabar salida... - + Record GIF... Grabar GIF... @@ -4029,187 +4287,196 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Detener video-registro - + 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... - Game &Pak sensors... - Sensores del Game &Pak... + Sensores del Game &Pak... - + &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 @@ -4527,7 +4794,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. - + frames cuadros @@ -4567,42 +4834,72 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Filtro bilineal - + + Native (59.7275) + Nativo (59,7275) + + + + Interframe blending + Mezcla entre cuadros + + + + Pause when minimized + Pausar al estar minimizado + + + + Show OSD messages + Mostrar mensajes en el OSD + + + + Fast forward (held) speed: + Avance rápido (mantenido): + + + + (240×160) + (240×160) + + + Log to file Guardar a archivo - + Log to console Guardar a consola - + Select Log File Seleccionar - + Game Boy model: Modelo de Game Boy: - + Super Game Boy model: Modelo de Super Game Boy: - + Game Boy Color model: Modelo de Game Boy Color: - + Use GBC colors in GB games Usar colores de GBC en juegos GB - + Camera: Cámara: @@ -4612,156 +4909,158 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Forzar escalado a valores enteros - + Language Idioma - + English English - + Library: Biblioteca: - + List view Lista - + Tree view Árbol - + Show when no game open Mostrar cuando no haya un juego abierto - + Clear cache Limpiar caché - + Allow opposing input directions Permitir direcciones opuestas al mismo tiempo - + Suspend screensaver Suspender protector de pantalla - + Pause when inactive Pausar al no estar activo - + Show FPS in title bar Mostrar FPS en la barra de título - + Automatically save cheats Guardar trucos automáticamente - + Automatically load cheats Cargar trucos automáticamente - + Automatically save state Guardar estado automáticamente - + Automatically load state Cargar estado automáticamente - + Enable Discord Rich Presence Hablitar Rich Presence en Discord - + Fast forward speed: Avance rápido: - - + + + × × - + + Unbounded Sin límite - + Enable rewind Habilitar el rebobinar - + Rewind history: Hist. de rebobinado: - + Idle loops: Bucles inactivos: - + Run all Ejecutarlos todos - + Remove known Eliminar los conocidos - + 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: @@ -4770,119 +5069,119 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. El rebobinar afecta los datos de guardado - + Preload entire ROM into memory Cargar ROM completa a la memoria - + Autofire interval: Intervalo de turbo: - + Video renderer: Renderizador de video: - + Software Software - + OpenGL OpenGL - + OpenGL enhancements Mejoras para OpenGL - + High-resolution scale: Escala de alta resolución: - + XQ GBA audio (experimental) Mejorar audio GBA (experimental) - + GB BIOS file: Archivo BIOS GB: - - - - - - - - - + + + + + + + + + Browse Examinar - + Use BIOS file if found Usar archivo BIOS si fue encontrado - + Skip BIOS intro Saltar animación de entrada del BIOS - + GBA BIOS file: Archivo BIOS GBA: - + GBC BIOS file: Archivo BIOS GBC: - + SGB BIOS file: Archivo BIOS SGB: - + Save games Datos de guardado - - - - - + + + + + Same directory as the ROM Al mismo directorio que la ROM - + Save states Estados de guardado - + Screenshots Pantallazos - + Patches Parches - + Cheats Trucos @@ -4891,37 +5190,37 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Modelo de Game Boy - - - + + + Autodetect Detección automática - - - + + + Game Boy (DMG) Game Boy (DMG) - - - + + + Super Game Boy (SGB) - - - + + + Game Boy Color (CGB) Game Boy Color (CGB) - - - + + + Game Boy Advance (AGB) Game Boy Advance (AGB) @@ -4934,27 +5233,27 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Modelo de Game Boy Color - + Default BG colors: Colores de fondo por defecto: - + Super Game Boy borders Bordes de Super Game Boy - + Camera driver: Controlador de cámara: - + Default sprite colors 1: Colores de sprite 1 por defecto: - + Default sprite colors 2: Colores de sprite 2 por defecto: @@ -5028,30 +5327,50 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Tiles - + + Export Selected + Exportar seleccionados + + + + Export All + Exportar todos + + + 256 colors 256 colores - + × × - + Magnification Ampliación - + Tiles per row Tiles por fila - + Fit to window Ajustar a ventana + + + Copy Selected + Copiar seleccionados + + + + Copy All + Copiar todos + VideoView From 693a0800670e87263b674a617be5d4e3882213f8 Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Sun, 13 Oct 2019 23:09:43 +0200 Subject: [PATCH 22/28] Qt: Update German GUI translation --- src/platform/qt/ts/mgba-de.ts | 825 +++++++++++++++++++--------------- 1 file changed, 464 insertions(+), 361 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index e59be7b30..6b1ebf17c 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -310,35 +310,25 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.GIF aufzeichnen - + Start Start - + Stop Stop - + Select File Datei wählen - + Frameskip Frameskip - - - Frame delay (ms) - Bildverzögerung (ms) - - - - Automatic - Automatisch - IOViewer @@ -599,20 +589,59 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Maps - + × × - + Magnification Vergrößerung - + Export Exportieren + + + Copy + Kopieren + + + + MemoryDump + + + Save Memory Range + Speicherbereich abspeichern + + + + Start Address: + Start-Adresse: + + + + : + : + + + + + 0x + 0x + + + + Byte Count: + Bytes: + + + + Dump across banks + Über Speicherbänke hinweg dumpen + MemorySearch @@ -752,67 +781,77 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Untersuche Adresse: - + + : + : + + + 0x 0x - + Set Alignment: Ausrichtung festlegen: - + &1 Byte &1 Byte - + &2 Bytes &2 Bytes - + &4 Bytes &4 Bytes - + Signed Integer: Signed Integer: - + String: String: - + Load TBL TBL laden - + Copy Selection Auswahl kopieren - + Paste Einfügen - + Save Selection Auswahl speichern - + + Save Range + Bereich speichern + + + Load Laden - + Unsigned Integer: Unsigned Integer: @@ -825,140 +864,145 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Sprites - - + + × × - + Magnification Vergrößerung - + Export Exportieren - + Attributes Eigenschaften - + Transform Transform - + Off Aus - + Palette Palette - - - - + + + + 0 0 - + + Copy + Kopieren + + + Double Size Doppelte Größe - - - - + + + + Return, Ctrl+R Eingabe, Strg+R - + Flipped Gespiegelt - + H H - + V V - + Mode Modus - + Normal Normal - + Mosaic Mosaic - + Enabled Aktiviert - + Priority Priorität - + Tile - + Geometry Geometrie - + Position Position - + , , - + Dimensions Abmessungen - - + + 8 8 - + Address Adresse - + 0x07000000 0x07000000 @@ -1116,36 +1160,51 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. + MBC6 + MBC6 + + + MBC7 MBC7 - + + MMM01 + MMM01 + + + Pocket Cam Pocket Cam - + TAMA5 TAMA5 - + + HuC-1 + HuC-1 + + + HuC-3 HuC-3 - + Background Colors Hintergrund-Farbpalette - + Sprite Colors 1 Sprite-Farbpalette 1 - + Sprite Colors 2 Sprite-Farbpalette 2 @@ -1271,15 +1330,25 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Game Boy Printer - + Hurry up! Los geht's! - + Tear off Abreißen + + + × + × + + + + Magnification + Vergrößerung + QGBA::AssetTile @@ -1289,9 +1358,9 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.%0%1%2 - - - + + + 0x%0 (%1) 0x%0 (%1) @@ -1342,22 +1411,22 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::CoreController - + Failed to open save file: %1 Fehler beim Öffnen der Speicherdatei: %1 - + Failed to open game file: %1 Fehler beim Öffnen der Spieldatei: %1 - + Failed to open snapshot file for reading: %1 Konnte Snapshot-Datei %1 nicht zum Lesen öffnen - + Failed to open snapshot file for writing: %1 Konnte Snapshot-Datei %1 nicht zum Schreiben öffnen @@ -1490,17 +1559,17 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::GIFView - + Failed to open output GIF file: %1 Fehler beim Öffnen der Ausgabe-GIF-Datei: %1 - + Select output file Ausgabedatei auswählen - + Graphics Interchange Format (*.gif) Graphics Interchange Format (*.gif) @@ -3005,89 +3074,97 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::MapView - + Priority Priorität - - + + Map base Map-Basis - - + + Tile base Tile-Basis - + Size Größe - - + + Offset Versatz - + Xform Xform - + Map Addr. Map-Addr. - + Mirror Spiegel - + None Keiner - + Both Beidseitig - + Horizontal Horizontal - + Vertical Vertikal - - - + + + N/A N/A - + Export map Map exportieren - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) + + + QGBA::MemoryDump - - Failed to open output PNG file: %1 - Fehler beim Öffnen der Ausgabe-PNG-Datei: %1 + + Save memory region + Speicherbereich abspeichern + + + + Failed to open output file: %1 + Fehler beim Öffnen der Ausgabedatei: %1 @@ -3179,49 +3256,49 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::ObjView - - + + 0x%0 0x%0 - + Off Aus - + Normal Normal - + Trans Trans - + OBJWIN OBJWIN - + Invalid Ungültig - - + + N/A N/A - + Export sprite Sprite exportieren - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) @@ -3349,7 +3426,7 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.BIOS auswählen - + (%1×%2) (%1×%2) @@ -3408,15 +3485,21 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::TileView - + Export tiles Tiles exportieren - + + Portable Network Graphics (*.png) Portable Network Graphics (*.png) + + + Export tile + Tile exportieren + QGBA::VideoView @@ -3439,103 +3522,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 @@ -3544,588 +3627,588 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. - + Couldn't Load Konnte nicht geladen werden - + Could not load game. Are you sure it's in the correct format? Konnte das Spiel nicht laden. Sind Sie sicher, dass es im korrekten Format vorliegt? - + 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. - + 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... Ssavestate-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... - + Import GameShark Save Importiere GameShark-Speicherstand - + Export GameShark Save Exportiere GameShark-Speicherstand - + New multiplayer window Neues Multiplayer-Fenster - + 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 - + Record GIF... GIF aufzeichen... - + 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 - + Add folder to library... Ordner zur Bibliothek hinzufügen... - + About... Über... - + %1× %1x - + Bilinear filtering Bilineare Filterung - + Native (59.7275) Nativ (59.7275) - + Record A/V... Audio/Video 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 @@ -4438,7 +4521,7 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. - + frames Bild(er) @@ -4509,177 +4592,182 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Baumansicht - + Show FPS in title bar Bildwiederholrate in der Titelleiste anzeigen - + Automatically save cheats Cheats automatisch speichern - + Automatically load cheats Cheats automatisch laden - + Automatically save state Zustand (Savestate) automatisch speichern - + Automatically load state Zustand (Savestate) automatisch laden - + Enable Discord Rich Presence Discord-Integration aktivieren - + Pause when minimized Pause, wenn minimiert - + + Show OSD messages + Bildschirmmeldungen anzeigen + + + Fast forward (held) speed: Vorlauf-Geschwindigkeit (halten): - + Video renderer: Video-Renderer: - + Software Software - + OpenGL OpenGL - + OpenGL enhancements OpenGL-Verbesserungen - + High-resolution scale: Hochauflösende Skalierung: - + XQ GBA audio (experimental) XQ GBA-Audio (experimentell) - + Cheats Cheats - + Log to file In Datei protokollieren - + Log to console Auf die Konsole protokollieren - + Select Log File Protokoll-Datei auswählen - + Camera: Kamera: - - - + + + Autodetect Automatisch erkennen - - - + + + Game Boy (DMG) Game Boy (DMG) - - - + + + Super Game Boy (SGB) Super Game Boy (SGB) - - - + + + Game Boy Color (CGB) Game Boy Color (CGB) - - - + + + Game Boy Advance (AGB) Game Boy Advance (AGB) - + Default BG colors: Standard-Hintergrundfarben: - + Default sprite colors 1: Standard-Sprite-Farben 1: - + Default sprite colors 2: Standard-Sprite-Farben 2: - + Use GBC colors in GB games Verwende GBC-Farben in GB-Spielen - + Super Game Boy borders Super Game Boy-Rahmen - + Game Boy model: Game Boy-Modell: - + Super Game Boy model: Super Game Boy-Modell: - + Game Boy Color model: Game Boy Color-Modell: - + Camera driver: Kamera-Treiber: @@ -4699,50 +4787,50 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd.Cache leeren - + Fast forward speed: Vorlauf-Geschwindigkeit: - + Preload entire ROM into memory ROM-Datei vollständig in Arbeitsspeicher vorladen - - - - - - - - - + + + + + + + + + Browse Durchsuchen - + Use BIOS file if found BIOS-Datei verwenden, wenn vorhanden - + Skip BIOS intro BIOS-Intro überspringen - - - + + + × × - - + + Unbounded unbegrenzt @@ -4762,17 +4850,17 @@ wenn vorhanden Pause, wenn inaktiv - + Run all Alle ausführen - + Remove known Bekannte entfernen - + Detect and remove Erkennen und entfernen @@ -4782,25 +4870,25 @@ wenn vorhanden Gegensätzliche Eingaberichtungen erlauben - - + + Screenshot Screenshot - - + + Save data Speicherdaten - - + + Cheat codes Cheat-Codes - + Enable rewind Rücklauf aktivieren @@ -4810,81 +4898,81 @@ wenn vorhanden Bilineare Filterung - + Rewind history: Rücklauf-Verlauf: - + Idle loops: Leerlaufprozesse: - + Savestate extra data: Zusätzliche Savestate-Daten: - + Load extra data: Lade zusätzliche Daten: - + Autofire interval: Autofeuer-Intervall: - + (240×160) (240×160) - + GB BIOS file: Datei mit GB-BIOS: - + GBA BIOS file: Datei mit GBA-BIOS: - + GBC BIOS file: Datei mit GBC-BIOS: - + SGB BIOS file: Datei mit SGB-BIOS: - + Save games Spielstände - - - - - + + + + + Same directory as the ROM Verzeichnis der ROM-Datei - + Save states Savestates - + Screenshots Screenshots - + Patches Patches @@ -4958,34 +5046,49 @@ wenn vorhanden Tiles - + + Export Selected + Auswahl exportieren + + + + Export All + Alle exportieren + + + 256 colors 256 Farben - + × × - + Magnification Vergrößerung - + Tiles per row Tiles pro Zeile - + Fit to window An Fenster anpassen - - Export - Exportieren + + Copy Selected + Auswahl kopieren + + + + Copy All + Alle kopieren From 447c053f7e802941d036da12233080e1a75403f4 Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Sun, 13 Oct 2019 23:10:05 +0200 Subject: [PATCH 23/28] README: Update German README file --- README_DE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README_DE.md b/README_DE.md index d0e0ab18c..cd834f0e4 100644 --- a/README_DE.md +++ b/README_DE.md @@ -86,7 +86,7 @@ Andere Unix-ähnliche Plattformen wie OpenBSD sind ebenfalls dafür bekannt, mit ### Systemvoraussetzungen -Die Systemvoraussetzungen sind minimal. Jeder Computer, der mit Windows Vista oder neuer läuft, sollte in der Lage sein, die Emulation zu bewältigen. Unterstützung für OpenGL 1.1 oder neuer ist ebenfalls voraussgesetzt. OpenGL 3.0 oder neuer wird für Shader und erweiterte Funktionen benötigt. +Die Systemvoraussetzungen sind minimal. Jeder Computer, der mit Windows Vista oder neuer läuft, sollte in der Lage sein, die Emulation zu bewältigen. Unterstützung für OpenGL 1.1 oder neuer ist ebenfalls voraussgesetzt. OpenGL 3.2 oder neuer wird für Shader und erweiterte Funktionen benötigt. Downloads --------- @@ -145,7 +145,7 @@ Damit wird mGBA gebaut und in `/usr/bin` und `/usr/lib` installiert. Installiert Wenn Du macOS verwendest, sind die einzelnen Schritte etwas anders. Angenommen, dass Du den Homebrew-Paketmanager verwendest, werden folgende Schritte zum installieren der Abhängigkeiten und anschließenden bauen von mGBA empfohlen: - brew install cmake ffmpeg imagemagick libzip qt5 sdl2 libedit pkg-config + brew install cmake ffmpeg libzip qt5 sdl2 libedit pkg-config mkdir build cd build cmake -DCMAKE_PREFIX_PATH='brew --prefix qt5' .. @@ -159,11 +159,11 @@ Um mGBA auf Windows zu kompilieren, wird MSYS2 empfohlen. Befolge die Installati Für x86 (32 Bit): - pacman -Sy --needed base-devel git mingw-w64-i686-{cmake,ffmpeg,gcc,gdb,imagemagick,libelf,libepoxy,libzip,pkg-config,qt5,SDL2,ntldd-git} + pacman -Sy --needed base-devel git mingw-w64-i686-{cmake,ffmpeg,gcc,gdb,libelf,libepoxy,libzip,pkg-config,qt5,SDL2,ntldd-git} Für x86_64 (64 Bit): - pacman -Sy --needed base-devel git mingw-w64-x86_64-{cmake,ffmpeg,gcc,gdb,imagemagick,libelf,libepoxy,libzip,pkg-config,qt5,SDL2,ntldd-git} + pacman -Sy --needed base-devel git mingw-w64-x86_64-{cmake,ffmpeg,gcc,gdb,libelf,libepoxy,libzip,pkg-config,qt5,SDL2,ntldd-git} Lade den aktuellen mGBA-Quellcode mithilfe des folgenden Kommandos herunter: From b9edcd8d93759311eebb54cf4d8be704916d566d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 13 Oct 2019 15:53:40 -0700 Subject: [PATCH 24/28] Core: Add more memory search ops (closes #1510) --- CHANGES | 1 + include/mgba/core/mem-search.h | 4 + src/core/mem-search.c | 35 +++++--- src/platform/qt/MemorySearch.cpp | 36 +++++++- src/platform/qt/MemorySearch.ui | 146 ++++++++++++++++++++++++------- src/platform/qt/SettingsView.ui | 12 ++- 6 files changed, 183 insertions(+), 51 deletions(-) diff --git a/CHANGES b/CHANGES index 2aff452c5..430717069 100644 --- a/CHANGES +++ b/CHANGES @@ -84,6 +84,7 @@ Misc: - Qt: Add copy and QoL improvements to graphic views (closes mgba.io/i/1541) - Qt: Show list of all sprites in sprite view - Qt: Add option for disabling OSD messages + - Core: Add more memory search ops (closes mgba.io/i/1510) 0.7.3: (2019-09-15) Emulation fixes: diff --git a/include/mgba/core/mem-search.h b/include/mgba/core/mem-search.h index c18c20922..d45601556 100644 --- a/include/mgba/core/mem-search.h +++ b/include/mgba/core/mem-search.h @@ -22,7 +22,11 @@ enum mCoreMemorySearchOp { mCORE_MEMORY_SEARCH_EQUAL, mCORE_MEMORY_SEARCH_GREATER, mCORE_MEMORY_SEARCH_LESS, + mCORE_MEMORY_SEARCH_ANY, mCORE_MEMORY_SEARCH_DELTA, + mCORE_MEMORY_SEARCH_DELTA_POSITIVE, + mCORE_MEMORY_SEARCH_DELTA_NEGATIVE, + mCORE_MEMORY_SEARCH_DELTA_ANY, }; struct mCoreMemorySearchParams { diff --git a/src/core/mem-search.c b/src/core/mem-search.c index c6404638f..7f0c215a1 100644 --- a/src/core/mem-search.c +++ b/src/core/mem-search.c @@ -19,6 +19,14 @@ static bool _op(int32_t value, int32_t match, enum mCoreMemorySearchOp op) { case mCORE_MEMORY_SEARCH_EQUAL: case mCORE_MEMORY_SEARCH_DELTA: return value == match; + case mCORE_MEMORY_SEARCH_DELTA_POSITIVE: + return value > 0; + case mCORE_MEMORY_SEARCH_DELTA_NEGATIVE: + return value < 0; + case mCORE_MEMORY_SEARCH_DELTA_ANY: + return value != 0; + case mCORE_MEMORY_SEARCH_ANY: + return true; } return false; } @@ -244,20 +252,20 @@ bool _testGuess(struct mCore* core, struct mCoreMemorySearchResult* res, const s int64_t value; int32_t offset = 0; char* end; - if (params->op == mCORE_MEMORY_SEARCH_DELTA) { + if (params->op >= mCORE_MEMORY_SEARCH_DELTA) { offset = res->oldValue; } value = strtoll(params->valueStr, &end, 10); if (end) { res->oldValue += value; - if (_op(core->rawRead8(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier, value + offset, params->op)) { + if (_op(core->rawRead8(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier - offset, value, params->op)) { return true; } - if (!(res->address & 1) && (res->width >= 2 || res->width == -1) && _op(core->rawRead16(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier, value + offset, params->op)) { + if (!(res->address & 1) && (res->width >= 2 || res->width == -1) && _op(core->rawRead16(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier - offset, value, params->op)) { return true; } - if (!(res->address & 3) && (res->width >= 4 || res->width == -1) && _op(core->rawRead32(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier, value + offset, params->op)) { + if (!(res->address & 3) && (res->width >= 4 || res->width == -1) && _op(core->rawRead32(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier - offset, value, params->op)) { return true; } res->oldValue -= value; @@ -266,13 +274,13 @@ bool _testGuess(struct mCore* core, struct mCoreMemorySearchResult* res, const s value = strtoll(params->valueStr, &end, 16); if (end) { res->oldValue += value; - if (_op(core->rawRead8(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier, value + offset, params->op)) { + if (_op(core->rawRead8(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier - offset, value, params->op)) { return true; } - if (!(res->address & 1) && (res->width >= 2 || res->width == -1) && _op(core->rawRead16(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier, value + offset, params->op)) { + if (!(res->address & 1) && (res->width >= 2 || res->width == -1) && _op(core->rawRead16(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier - offset, value, params->op)) { return true; } - if (!(res->address & 3) && (res->width >= 4 || res->width == -1) && _op(core->rawRead32(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier, value + offset, params->op)) { + if (!(res->address & 3) && (res->width >= 4 || res->width == -1) && _op(core->rawRead32(core, res->address, res->segment) * res->guessDivisor / res->guessMultiplier - offset, value, params->op)) { return true; } res->oldValue -= value; @@ -293,10 +301,7 @@ void mCoreMemorySearchRepeat(struct mCore* core, const struct mCoreMemorySearchP --i; } } else if (params->type == mCORE_MEMORY_SEARCH_INT) { - int32_t oldValue = params->valueInt; - if (params->op == mCORE_MEMORY_SEARCH_DELTA) { - oldValue += res->oldValue; - } + int32_t match = params->valueInt; int32_t value = 0; switch (params->width) { case 1: @@ -311,7 +316,11 @@ void mCoreMemorySearchRepeat(struct mCore* core, const struct mCoreMemorySearchP default: break; } - if (!_op(value, oldValue, params->op)) { + int32_t opValue = value; + if (params->op >= mCORE_MEMORY_SEARCH_DELTA) { + opValue -= res->oldValue; + } + if (!_op(opValue, match, params->op)) { *res = *mCoreMemorySearchResultsGetPointer(inout, mCoreMemorySearchResultsSize(inout) - 1); mCoreMemorySearchResultsResize(inout, -1); --i; @@ -322,7 +331,7 @@ void mCoreMemorySearchRepeat(struct mCore* core, const struct mCoreMemorySearchP break; case mCORE_MEMORY_SEARCH_STRING: case mCORE_MEMORY_SEARCH_GUESS: - // TOOD + // TODO break; } } diff --git a/src/platform/qt/MemorySearch.cpp b/src/platform/qt/MemorySearch.cpp index 4ff967da5..f3f82c9ed 100644 --- a/src/platform/qt/MemorySearch.cpp +++ b/src/platform/qt/MemorySearch.cpp @@ -35,19 +35,28 @@ MemorySearch::~MemorySearch() { } bool MemorySearch::createParams(mCoreMemorySearchParams* params) { - params->memoryFlags = mCORE_MEMORY_RW; + params->memoryFlags = mCORE_MEMORY_WRITE; + if (m_ui.searchROM->isChecked()) { + params->memoryFlags |= mCORE_MEMORY_READ; + } mCore* core = m_controller->thread()->core; QByteArray string; bool ok = false; if (m_ui.typeNum->isChecked()) { params->type = mCORE_MEMORY_SEARCH_INT; - if (m_ui.opDelta->isChecked()) { + if (m_ui.opDelta->isChecked() || m_ui.opDelta0->isChecked()) { params->op = mCORE_MEMORY_SEARCH_DELTA; } else if (m_ui.opGreater->isChecked()) { params->op = mCORE_MEMORY_SEARCH_GREATER; } else if (m_ui.opLess->isChecked()) { params->op = mCORE_MEMORY_SEARCH_LESS; + } else if (m_ui.opUnknown->isChecked()) { + params->op = mCORE_MEMORY_SEARCH_ANY; + } else if (m_ui.opDeltaPositive->isChecked()) { + params->op = mCORE_MEMORY_SEARCH_DELTA_POSITIVE; + } else if (m_ui.opDeltaNegative->isChecked()) { + params->op = mCORE_MEMORY_SEARCH_DELTA_NEGATIVE; } else { params->op = mCORE_MEMORY_SEARCH_EQUAL; } @@ -103,9 +112,15 @@ bool MemorySearch::createParams(mCoreMemorySearchParams* params) { } if (m_ui.numGuess->isChecked()) { params->type = mCORE_MEMORY_SEARCH_GUESS; - m_string = m_ui.value->text().toLocal8Bit(); + if (m_ui.opDelta0->isChecked()) { + m_string = QString("0").toLocal8Bit(); + } else { + m_string = m_ui.value->text().toLocal8Bit(); + } params->valueStr = m_string.constData(); ok = true; + } else if (m_ui.opDelta0->isChecked()) { + params->valueInt = 0; } } if (m_ui.typeStr->isChecked()) { @@ -140,6 +155,9 @@ void MemorySearch::searchWithin() { mCore* core = m_controller->thread()->core; if (createParams(¶ms)) { + if (m_ui.opUnknown->isChecked()) { + params.op = mCORE_MEMORY_SEARCH_DELTA_ANY; + } mCoreMemorySearchRepeat(core, ¶ms, &m_results); } @@ -153,6 +171,9 @@ void MemorySearch::refresh() { m_ui.results->clearContents(); m_ui.results->setRowCount(mCoreMemorySearchResultsSize(&m_results)); m_ui.opDelta->setEnabled(false); + m_ui.opDelta0->setEnabled(false); + m_ui.opDeltaPositive->setEnabled(false); + m_ui.opDeltaNegative->setEnabled(false); for (size_t i = 0; i < mCoreMemorySearchResultsSize(&m_results); ++i) { mCoreMemorySearchResult* result = mCoreMemorySearchResultsGetPointer(&m_results, i); QTableWidgetItem* item = new QTableWidgetItem(QString("%1").arg(result->address, 8, 16, QChar('0'))); @@ -214,9 +235,18 @@ void MemorySearch::refresh() { m_ui.results->setItem(i, 1, item); m_ui.results->setItem(i, 2, type); m_ui.opDelta->setEnabled(true); + m_ui.opDelta0->setEnabled(true); + m_ui.opDeltaPositive->setEnabled(true); + m_ui.opDeltaNegative->setEnabled(true); } if (m_ui.opDelta->isChecked() && !m_ui.opDelta->isEnabled()) { m_ui.opEqual->setChecked(true); + } else if (m_ui.opDelta0->isChecked() && !m_ui.opDelta0->isEnabled()) { + m_ui.opEqual->setChecked(true); + } else if (m_ui.opDeltaPositive->isChecked() && !m_ui.opDeltaPositive->isEnabled()) { + m_ui.opEqual->setChecked(true); + } else if (m_ui.opDeltaNegative->isChecked() && !m_ui.opDeltaNegative->isEnabled()) { + m_ui.opEqual->setChecked(true); } m_ui.results->sortItems(0); } diff --git a/src/platform/qt/MemorySearch.ui b/src/platform/qt/MemorySearch.ui index 4e8649e42..7811c14a3 100644 --- a/src/platform/qt/MemorySearch.ui +++ b/src/platform/qt/MemorySearch.ui @@ -6,14 +6,20 @@ 0 0 - 540 - 491 + 725 + 813 + + + 0 + 0 + + 540 - 241 + 400 @@ -99,21 +105,21 @@ - + Qt::Horizontal - + Width - + Guess @@ -126,7 +132,7 @@ - + 1 Byte (8-bit) @@ -136,7 +142,7 @@ - + 2 Bytes (16-bit) @@ -146,7 +152,7 @@ - + 4 Bytes (32-bit) @@ -159,21 +165,21 @@ - + Qt::Horizontal - + Number type - + Guess @@ -183,38 +189,38 @@ - + Decimal - + Hexadecimal - + Qt::Horizontal - + - Compare + Search type - + - Equal + Equal to value true @@ -224,20 +230,10 @@ - + - Greater - - - op - - - - - - - Less + Greater than value op @@ -245,18 +241,84 @@ + + + Less than value + + + op + + + + + + + Unknown/changed + + + op + + + + false - Delta + Changed by value op + + + + false + + + Unchanged + + + op + + + + + + + false + + + Increased + + + op + + + + + + + false + + + Decreased + + + op + + + + + + + Search ROM + + + @@ -271,7 +333,7 @@ - Search + New Search @@ -318,10 +380,26 @@ + + opDelta0 + toggled(bool) + value + setDisabled(bool) + + + 231 + 768 + + + 272 + 26 + + + - + diff --git a/src/platform/qt/SettingsView.ui b/src/platform/qt/SettingsView.ui index 2dbb2fca7..0847639a7 100644 --- a/src/platform/qt/SettingsView.ui +++ b/src/platform/qt/SettingsView.ui @@ -6,7 +6,7 @@ 0 0 - 849 + 885 797 @@ -2043,6 +2043,16 @@ toggled(bool) fastForwardHeldRatio setDisabled(bool) + + + 20 + 20 + + + 20 + 20 + + From c4b560eb1e4001380bd1466977d2e23f230e6441 Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Mon, 14 Oct 2019 20:18:31 +0200 Subject: [PATCH 25/28] Qt: Update German GUI translation --- src/platform/qt/ts/mgba-de.ts | 133 ++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 54 deletions(-) diff --git a/src/platform/qt/ts/mgba-de.ts b/src/platform/qt/ts/mgba-de.ts index 6b1ebf17c..af4c7d560 100644 --- a/src/platform/qt/ts/mgba-de.ts +++ b/src/platform/qt/ts/mgba-de.ts @@ -646,124 +646,149 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. MemorySearch - + Memory Search Speicher durchsuchen - + Address Adresse - + Current Value Aktueller Wert - - + + Type Typ - + Value Wert - + Numeric Numerisch - + Text Text - + Width Breite - + 1 Byte (8-bit) 1 Byte (8-bit) - + 2 Bytes (16-bit) 2 Bytes (16-bit) - + 4 Bytes (32-bit) 4 Bytes (32-bit) - + Number type Zahlensystem - + Hexadecimal Hexadezimal - + + Search type + Suche nach + + + + Equal to value + Entspricht dem Wert + + + + Greater than value + Größer als der Wert + + + + Less than value + Kleiner als der Wert + + + + Unknown/changed + Unbekannt/geändert + + + + Changed by value + Geändert durch Wert + + + + Unchanged + Unverändert + + + + Increased + Erhöht + + + + Decreased + Verringert + + + + Search ROM + ROM durchsuchen + + + + New Search + Neue Suche + + + Decimal Dezimal - - + + Guess automatisch - - Compare - Vergleichen - - - - Equal - Gleichwertig - - - - Greater - Größer - - - - Less - Kleiner - - - - Delta - Differenz - - - - Search - Suchen - - - + Search Within Suchen innerhalb - + Open in Memory Viewer Im Speicher-Monitor öffnen - + Refresh Aktualisieren @@ -3233,22 +3258,22 @@ Game Boy Advance ist ein eingetragenes Warenzeichen von Nintendo Co., Ltd. QGBA::MemorySearch - + (%0/%1×) (%0/%1×) - + (⅟%0×) (⅟%0×) - + (%0×) (%0×) - + %1 byte%2 %1 byte%2 From 7fe88430cf48027405e1af6da5c98459ed8ffc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=B3pez=20Brante?= Date: Mon, 14 Oct 2019 16:00:53 -0300 Subject: [PATCH 26/28] Qt: Updated Spanish translation --- src/platform/qt/ts/mgba-es.ts | 123 ++++++++++++++++++++++++---------- 1 file changed, 86 insertions(+), 37 deletions(-) diff --git a/src/platform/qt/ts/mgba-es.ts b/src/platform/qt/ts/mgba-es.ts index 82ce027cb..6df49af91 100644 --- a/src/platform/qt/ts/mgba-es.ts +++ b/src/platform/qt/ts/mgba-es.ts @@ -660,124 +660,173 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. MemorySearch - + Memory Search Búsqueda en la memoria - + Address Dirección - + Current Value Valor actual - - + + Type Tipo - + Value Valor - + Numeric Numérico - + Text Texto - + Width Ancho - + 1 Byte (8-bit) 1 byte (8 bits) - + 2 Bytes (16-bit) 2 bytes (16 bits) - + 4 Bytes (32-bit) 4 bytes (32 bits) - + Number type Tipo de número - + Hexadecimal Hexadecimal - + + Search type + Tipo de búsqueda + + + + Equal to value + Igual a valor + + + + Greater than value + Mayor que valor + + + + Less than value + Menor que valor + + + + Unknown/changed + Desconocido/cambiado + + + + Changed by value + Cambiado a valor + + + + Unchanged + Sin cambios + + + + Increased + Aumentado + + + + Decreased + Disminuido + + + + Search ROM + Buscar ROM + + + + New Search + Nueva búsqueda + + + Decimal Decimal - - + + Guess Adivinar - Compare - Comparar + Comparar - Equal - Igual a + Igual a - Greater - Mayor que + Mayor que - Less - Menor que + Menor que - Delta - Diferencia + Diferencia - Search - Buscar + Buscar - + Search Within Buscar dentro - + Open in Memory Viewer Abrir en el Visor de memoria - + Refresh Actualizar @@ -3225,7 +3274,7 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. Map Addr. - Dir de mapa + Dir. de mapa @@ -3353,22 +3402,22 @@ Game Boy Advance es una marca registrada de Nintendo Co., Ltd. QGBA::MemorySearch - + (%0/%1×) (%0/%1×) - + (⅟%0×) (⅟%0×) - + (%0×) (%0×) - + %1 byte%2 %1 byte%2 From f3496042aff3aad933f542cfe6a87444b20736a7 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 14 Oct 2019 19:53:39 -0700 Subject: [PATCH 27/28] Travis: Fix newer Qt moc --- .travis-deps.sh | 4 ++++ .travis.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis-deps.sh b/.travis-deps.sh index 02e336f75..cf70b5010 100755 --- a/.travis-deps.sh +++ b/.travis-deps.sh @@ -1,5 +1,9 @@ #!/bin/sh +set -e if [ $TRAVIS_OS_NAME = "osx" ]; then brew update brew install qt5 ffmpeg imagemagick sdl2 libedit libelf libpng libzip +else + sudo apt-get update + sudo apt-get -y install libseccomp2 fi diff --git a/.travis.yml b/.travis.yml index 9bec872a2..f411d0fe6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ matrix: before_install: - '[ -z "$DOCKER_TAG" ] || docker pull mgba/$DOCKER_TAG' -- '[ "$TRAVIS_OS_NAME" != "osx" ] || . ./.travis-deps.sh' +- '. ./.travis-deps.sh' - 'mkdir build && chmod 777 build' script: From 0edf26c90f9d5334057e279f4834f38a0a2a16c5 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 19 Oct 2019 16:54:59 -0700 Subject: [PATCH 28/28] Res: Update patrons --- res/patrons.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/res/patrons.txt b/res/patrons.txt index 306534b40..b203109e2 100644 --- a/res/patrons.txt +++ b/res/patrons.txt @@ -1,8 +1,9 @@ Jaime J. Denizard -Fog -Philip Horton +Benedikt Feih Oskenso Kashi +The Libretro Team Mored1984 -Rohit Nirmal Rhys Powell +Johnathan Roatch Yuri Kunde Schlesner +Voidheim