diff --git a/src/gb/gb.c b/src/gb/gb.c index 1e5d5228b..7b18a8d84 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -265,20 +265,35 @@ void GBReset(struct LR35902Core* cpu) { gb->biosVf->seek(gb->biosVf, 0, SEEK_SET); 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); - if (size > 0x100) { - memcpy(&gb->memory.romBase[0x100], &gb->memory.rom[0x100], sizeof(struct GBCartridge)); + uint32_t biosCrc = doCrc32(gb->memory.romBase, size); + switch (biosCrc) { + case 0x59C8598E: + break; + case 0x41884E46: + break; + default: + gb->biosVf->close(gb->biosVf); + gb->biosVf = NULL; + free(gb->memory.romBase); + gb->memory.romBase = gb->memory.rom; + break; } - 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; + if (gb->biosVf) { + memcpy(&gb->memory.romBase[size], &gb->memory.rom[size], GB_SIZE_CART_BANK0 - size); + if (size > 0x100) { + memcpy(&gb->memory.romBase[0x100], &gb->memory.rom[0x100], sizeof(struct GBCartridge)); + } + + 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; @@ -298,10 +313,10 @@ void GBReset(struct LR35902Core* cpu) { cpu->h = 1; cpu->l = 0x4D; break; - case GB_MODEL_CGB: + case GB_MODEL_AGB: cpu->b = 1; // Fall through - case GB_MODEL_AGB: // Silence warnings + case GB_MODEL_CGB: cpu->a = 0x11; cpu->f.packed = 0x80; cpu->c = 0; diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index ab8527982..70d7b7941 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -129,6 +129,12 @@ set(UI_FILES TileView.ui VideoView.ui) +set(GBA_SRC + GBAOverride.cpp) + +set(GB_SRC + GBOverride.cpp) + qt5_wrap_ui(UI_SRC ${UI_FILES}) set(QT_LIBRARIES) @@ -139,6 +145,14 @@ if(BUILD_SDL) list(APPEND AUDIO_SRC AudioProcessorSDL.cpp) endif() +if(M_CORE_GBA) + list(APPEND PLATFORM_SRC ${GBA_SRC}) +endif() + +if(M_CORE_GB) + list(APPEND PLATFORM_SRC ${GB_SRC}) +endif() + set(QT_DEFINES) if(Qt5Multimedia_FOUND) list(APPEND AUDIO_SRC diff --git a/src/platform/qt/ConfigController.cpp b/src/platform/qt/ConfigController.cpp index a77e5c1e0..05b9667f6 100644 --- a/src/platform/qt/ConfigController.cpp +++ b/src/platform/qt/ConfigController.cpp @@ -12,7 +12,6 @@ #include extern "C" { -#include "gba/overrides.h" #include "feature/commandline.h" } @@ -177,8 +176,8 @@ QVariant ConfigController::getQtOption(const QString& key, const QString& group) return value; } -void ConfigController::saveOverride(const GBACartridgeOverride& override) { - GBAOverrideSave(overrides(), &override); +void ConfigController::saveOverride(const Override& override) { + override.save(overrides()); write(); } diff --git a/src/platform/qt/ConfigController.h b/src/platform/qt/ConfigController.h index a5f4c5d6b..4d8ab80a0 100644 --- a/src/platform/qt/ConfigController.h +++ b/src/platform/qt/ConfigController.h @@ -6,6 +6,8 @@ #ifndef QGBA_CONFIG_CONTROLLER #define QGBA_CONFIG_CONTROLLER +#include "Override.h" + #include #include #include @@ -78,7 +80,7 @@ public: void setMRU(const QList& mru); Configuration* overrides() { return mCoreConfigGetOverrides(&m_config); } - void saveOverride(const GBACartridgeOverride&); + void saveOverride(const Override&); Configuration* input() { return mCoreConfigGetInput(&m_config); } diff --git a/src/platform/qt/GBAOverride.cpp b/src/platform/qt/GBAOverride.cpp new file mode 100644 index 000000000..cee2e4850 --- /dev/null +++ b/src/platform/qt/GBAOverride.cpp @@ -0,0 +1,23 @@ +/* Copyright (c) 2013-2016 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "GBAOverride.h" + +extern "C" { +#include "core/core.h" +} + +using namespace QGBA; + +void GBAOverride::apply(struct mCore* core) { + if (core->platform(core) != PLATFORM_GBA) { + return; + } + GBAOverrideApply(static_cast(core->board), &override); +} + +void GBAOverride::save(struct Configuration* config) const { + GBAOverrideSave(config, &override); +} diff --git a/src/platform/qt/GBAOverride.h b/src/platform/qt/GBAOverride.h new file mode 100644 index 000000000..56d018489 --- /dev/null +++ b/src/platform/qt/GBAOverride.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2013-2016 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef QGBA_GBA_OVERRIDE +#define QGBA_GBA_OVERRIDE + +#include "Override.h" + +extern "C" { +#include "gba/overrides.h" +} + +namespace QGBA { + +class GBAOverride : public Override { +public: + void apply(struct mCore*) override; + void save(struct Configuration*) const override; + + struct GBACartridgeOverride override; +}; + +} + +#endif diff --git a/src/platform/qt/GBOverride.cpp b/src/platform/qt/GBOverride.cpp new file mode 100644 index 000000000..17c1c0661 --- /dev/null +++ b/src/platform/qt/GBOverride.cpp @@ -0,0 +1,23 @@ +/* Copyright (c) 2013-2016 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "GBOverride.h" + +extern "C" { +#include "core/core.h" +} + +using namespace QGBA; + +void GBOverride::apply(struct mCore* core) { + if (core->platform(core) != PLATFORM_GB) { + return; + } + GBOverrideApply(static_cast(core->board), &override); +} + +void GBOverride::save(struct Configuration* config) const { + GBOverrideSave(config, &override); +} diff --git a/src/platform/qt/GBOverride.h b/src/platform/qt/GBOverride.h new file mode 100644 index 000000000..67a50a001 --- /dev/null +++ b/src/platform/qt/GBOverride.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2013-2016 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef QGBA_GB_OVERRIDE +#define QGBA_GB_OVERRIDE + +#include "Override.h" + +extern "C" { +#include "gb/overrides.h" +} + +namespace QGBA { + +class GBOverride : public Override { +public: + void apply(struct mCore*) override; + void save(struct Configuration*) const override; + + struct GBCartridgeOverride override; +}; + +} + +#endif diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index 215cfb248..6acb7c3a0 100644 --- a/src/platform/qt/GameController.cpp +++ b/src/platform/qt/GameController.cpp @@ -70,6 +70,7 @@ GameController::GameController(QObject* parent) , m_backupSaveState(nullptr) , m_saveStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_CHEATS) , m_loadStateFlags(SAVESTATE_SCREENSHOT) + , m_override(nullptr) { #ifdef M_CORE_GBA m_lux.p = this; @@ -283,8 +284,9 @@ void GameController::clearMultiplayerController() { m_multiplayer = nullptr; } -void GameController::setOverride(const GBACartridgeOverride& override) { - // TODO: Put back overrides +void GameController::clearOverride() { + delete m_override; + m_override = nullptr; } void GameController::setConfig(const mCoreConfig* config) { @@ -434,6 +436,10 @@ void GameController::openGame(bool biosOnly) { } m_vf = nullptr; + if (m_override) { + m_override->apply(m_threadContext.core); + } + if (!mCoreThreadStart(&m_threadContext)) { emit gameFailed(); } diff --git a/src/platform/qt/GameController.h b/src/platform/qt/GameController.h index 91d733e24..86f1e5c5a 100644 --- a/src/platform/qt/GameController.h +++ b/src/platform/qt/GameController.h @@ -39,6 +39,7 @@ namespace QGBA { class AudioProcessor; class InputController; class MultiplayerController; +class Override; class GameController : public QObject { Q_OBJECT @@ -71,8 +72,9 @@ public: MultiplayerController* multiplayerController() { return m_multiplayer; } void clearMultiplayerController(); - void setOverride(const GBACartridgeOverride& override); - void clearOverride() { /* TODO: Put back overrides */ } + void setOverride(Override* override) { m_override = override; } + Override* override() { return m_override; } + void clearOverride(); void setConfig(const mCoreConfig*); @@ -191,6 +193,7 @@ private: QString m_bios; bool m_useBios; QString m_patch; + Override* m_override; QThread* m_audioThread; AudioProcessor* m_audioProcessor; diff --git a/src/platform/qt/OverrideView.cpp b/src/platform/qt/OverrideView.cpp index aca7b3c3f..8b5743583 100644 --- a/src/platform/qt/OverrideView.cpp +++ b/src/platform/qt/OverrideView.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2015 Jeffrey Pfau +/* Copyright (c) 2013-2016 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -8,17 +8,52 @@ #include "ConfigController.h" #include "GameController.h" +#ifdef M_CORE_GBA +#include "GBAOverride.h" extern "C" { #include "gba/gba.h" } +#endif + +#ifdef M_CORE_GB +#include "GBOverride.h" +extern "C" { +#include "gb/gb.h" +} +#endif using namespace QGBA; +QList OverrideView::s_gbModelList; +QList OverrideView::s_mbcList; + OverrideView::OverrideView(GameController* controller, ConfigController* config, QWidget* parent) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint) , m_controller(controller) , m_config(config) { +#ifdef M_CORE_GB + if (s_mbcList.isEmpty()) { + // NB: Keep in sync with OverrideView.ui + s_mbcList.append(GB_MBC_AUTODETECT); + s_mbcList.append(GB_MBC_NONE); + s_mbcList.append(GB_MBC1); + s_mbcList.append(GB_MBC2); + s_mbcList.append(GB_MBC3); + s_mbcList.append(GB_MBC3_RTC); + s_mbcList.append(GB_MBC5); + s_mbcList.append(GB_MBC5_RUMBLE); + s_mbcList.append(GB_MBC7); + s_mbcList.append(GB_HuC3); + } + if (s_gbModelList.isEmpty()) { + // NB: Keep in sync with OverrideView.ui + s_gbModelList.append(GB_MODEL_AUTODETECT); + s_gbModelList.append(GB_MODEL_DMG); + s_gbModelList.append(GB_MODEL_CGB); + s_gbModelList.append(GB_MODEL_AGB); + } +#endif m_ui.setupUi(this); connect(controller, SIGNAL(gameStarted(mCoreThread*, const QString&)), this, SLOT(gameStarted(mCoreThread*))); @@ -41,7 +76,18 @@ OverrideView::OverrideView(GameController* controller, ConfigController* config, connect(m_ui.hwRumble, SIGNAL(clicked()), this, SLOT(updateOverrides())); connect(m_ui.hwGBPlayer, SIGNAL(clicked()), this, SLOT(updateOverrides())); - connect(m_ui.save, SIGNAL(clicked()), this, SLOT(saveOverride())); + connect(m_ui.gbModel, SIGNAL(currentIndexChanged(int)), this, SLOT(updateOverrides())); + connect(m_ui.mbc, SIGNAL(currentIndexChanged(int)), this, SLOT(updateOverrides())); + + connect(m_ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateOverrides())); +#ifndef M_CORE_GBA + m_ui.tabWidget->removeTab(m_ui.tabWidget->indexOf(m_ui.tabGBA)); +#endif +#ifndef M_CORE_GB + m_ui.tabWidget->removeTab(m_ui.tabWidget->indexOf(m_ui.tabGB)); +#endif + + connect(m_ui.buttonBox, SIGNAL(accepted()), this, SLOT(saveOverride())); if (controller->isLoaded()) { gameStarted(controller->thread()); @@ -52,50 +98,67 @@ void OverrideView::saveOverride() { if (!m_config) { return; } - m_config->saveOverride(m_override); + m_config->saveOverride(*m_controller->override()); } void OverrideView::updateOverrides() { - memset(m_override.id, 0, 4); - m_override.savetype = static_cast(m_ui.savetype->currentIndex() - 1); - m_override.hardware = HW_NO_OVERRIDE; - m_override.idleLoop = IDLE_LOOP_NONE; - m_override.mirroring = false; +#ifdef M_CORE_GBA + if (m_ui.tabWidget->currentWidget() == m_ui.tabGBA) { + GBAOverride* gba = new GBAOverride; + memset(gba->override.id, 0, 4); + gba->override.savetype = static_cast(m_ui.savetype->currentIndex() - 1); + gba->override.hardware = HW_NO_OVERRIDE; + gba->override.idleLoop = IDLE_LOOP_NONE; + gba->override.mirroring = false; - if (!m_ui.hwAutodetect->isChecked()) { - m_override.hardware = HW_NONE; - if (m_ui.hwRTC->isChecked()) { - m_override.hardware |= HW_RTC; + if (!m_ui.hwAutodetect->isChecked()) { + gba->override.hardware = HW_NONE; + if (m_ui.hwRTC->isChecked()) { + gba->override.hardware |= HW_RTC; + } + if (m_ui.hwGyro->isChecked()) { + gba->override.hardware |= HW_GYRO; + } + if (m_ui.hwLight->isChecked()) { + gba->override.hardware |= HW_LIGHT_SENSOR; + } + if (m_ui.hwTilt->isChecked()) { + gba->override.hardware |= HW_TILT; + } + if (m_ui.hwRumble->isChecked()) { + gba->override.hardware |= HW_RUMBLE; + } } - if (m_ui.hwGyro->isChecked()) { - m_override.hardware |= HW_GYRO; + if (m_ui.hwGBPlayer->isChecked()) { + gba->override.hardware |= HW_GB_PLAYER_DETECTION; } - if (m_ui.hwLight->isChecked()) { - m_override.hardware |= HW_LIGHT_SENSOR; - } - if (m_ui.hwTilt->isChecked()) { - m_override.hardware |= HW_TILT; - } - if (m_ui.hwRumble->isChecked()) { - m_override.hardware |= HW_RUMBLE; - } - } - if (m_ui.hwGBPlayer->isChecked()) { - m_override.hardware |= HW_GB_PLAYER_DETECTION; - } - bool ok; - uint32_t parsedIdleLoop = m_ui.idleLoop->text().toInt(&ok, 16); - if (ok) { - m_override.idleLoop = parsedIdleLoop; - } + bool ok; + uint32_t parsedIdleLoop = m_ui.idleLoop->text().toInt(&ok, 16); + if (ok) { + gba->override.idleLoop = parsedIdleLoop; + } - if (m_override.savetype != SAVEDATA_AUTODETECT || m_override.hardware != HW_NO_OVERRIDE || - m_override.idleLoop != IDLE_LOOP_NONE) { - m_controller->setOverride(m_override); - } else { - m_controller->clearOverride(); + if (gba->override.savetype != SAVEDATA_AUTODETECT || gba->override.hardware != HW_NO_OVERRIDE || + gba->override.idleLoop != IDLE_LOOP_NONE) { + m_controller->setOverride(gba); + } else { + m_controller->clearOverride(); + } } +#endif +#ifdef M_CORE_GB + if (m_ui.tabWidget->currentWidget() == m_ui.tabGB) { + GBOverride* gb = new GBOverride; + gb->override.mbc = s_mbcList[m_ui.mbc->currentIndex()]; + gb->override.model = s_gbModelList[m_ui.gbModel->currentIndex()]; + if (gb->override.mbc != GB_MBC_AUTODETECT || gb->override.model != GB_MODEL_AUTODETECT) { + m_controller->setOverride(gb); + } else { + m_controller->clearOverride(); + } + } +#endif } void OverrideView::gameStarted(mCoreThread* thread) { @@ -103,66 +166,61 @@ void OverrideView::gameStarted(mCoreThread* thread) { gameStopped(); return; } - if (thread->core->platform(thread->core) != PLATFORM_GBA) { - close(); - return; + + m_ui.tabWidget->setEnabled(false); + + switch (thread->core->platform(thread->core)) { +#ifdef M_CORE_GBA + case PLATFORM_GBA: { + m_ui.tabWidget->setCurrentWidget(m_ui.tabGBA); + GBA* gba = static_cast(thread->core->board); + m_ui.savetype->setCurrentIndex(gba->memory.savedata.type + 1); + m_ui.hwRTC->setChecked(gba->memory.hw.devices & HW_RTC); + m_ui.hwGyro->setChecked(gba->memory.hw.devices & HW_GYRO); + m_ui.hwLight->setChecked(gba->memory.hw.devices & HW_LIGHT_SENSOR); + m_ui.hwTilt->setChecked(gba->memory.hw.devices & HW_TILT); + m_ui.hwRumble->setChecked(gba->memory.hw.devices & HW_RUMBLE); + m_ui.hwGBPlayer->setChecked(gba->memory.hw.devices & HW_GB_PLAYER_DETECTION); + + if (gba->idleLoop != IDLE_LOOP_NONE) { + m_ui.idleLoop->setText(QString::number(gba->idleLoop, 16)); + } else { + m_ui.idleLoop->clear(); + } + break; } - GBA* gba = static_cast(thread->core->board); - m_ui.savetype->setCurrentIndex(gba->memory.savedata.type + 1); - m_ui.savetype->setEnabled(false); - - m_ui.hwAutodetect->setEnabled(false); - m_ui.hwRTC->setEnabled(false); - m_ui.hwGyro->setEnabled(false); - m_ui.hwLight->setEnabled(false); - m_ui.hwTilt->setEnabled(false); - m_ui.hwRumble->setEnabled(false); - - m_ui.hwRTC->setChecked(gba->memory.hw.devices & HW_RTC); - m_ui.hwGyro->setChecked(gba->memory.hw.devices & HW_GYRO); - m_ui.hwLight->setChecked(gba->memory.hw.devices & HW_LIGHT_SENSOR); - m_ui.hwTilt->setChecked(gba->memory.hw.devices & HW_TILT); - m_ui.hwRumble->setChecked(gba->memory.hw.devices & HW_RUMBLE); - m_ui.hwGBPlayer->setChecked(gba->memory.hw.devices & HW_GB_PLAYER_DETECTION); - - if (gba->idleLoop != IDLE_LOOP_NONE) { - m_ui.idleLoop->setText(QString::number(gba->idleLoop, 16)); - } else { - m_ui.idleLoop->clear(); +#endif +#ifdef M_CORE_GB + case PLATFORM_GB: { + m_ui.tabWidget->setCurrentWidget(m_ui.tabGB); + GB* gb = static_cast(thread->core->board); + int mbc = s_mbcList.indexOf(gb->memory.mbcType); + if (mbc >= 0) { + m_ui.mbc->setCurrentIndex(mbc); + } else { + m_ui.mbc->setCurrentIndex(0); + } + int model = s_gbModelList.indexOf(gb->model); + if (model >= 0) { + m_ui.gbModel->setCurrentIndex(model); + } else { + m_ui.gbModel->setCurrentIndex(0); + } + break; + } +#endif + case PLATFORM_NONE: + break; } - - GBAGetGameCode(gba, m_override.id); - m_override.hardware = gba->memory.hw.devices; - m_override.savetype = gba->memory.savedata.type; - m_override.idleLoop = gba->idleLoop; - - m_ui.idleLoop->setEnabled(false); - - m_ui.save->setEnabled(m_config); } void OverrideView::gameStopped() { + m_ui.tabWidget->setEnabled(true); m_ui.savetype->setCurrentIndex(0); - m_ui.savetype->setEnabled(true); - - m_ui.hwAutodetect->setEnabled(true); - m_ui.hwRTC->setEnabled(!m_ui.hwAutodetect->isChecked()); - m_ui.hwGyro->setEnabled(!m_ui.hwAutodetect->isChecked()); - m_ui.hwLight->setEnabled(!m_ui.hwAutodetect->isChecked()); - m_ui.hwTilt->setEnabled(!m_ui.hwAutodetect->isChecked()); - m_ui.hwRumble->setEnabled(!m_ui.hwAutodetect->isChecked()); - - m_ui.hwAutodetect->setChecked(true); - m_ui.hwRTC->setChecked(false); - m_ui.hwGyro->setChecked(false); - m_ui.hwLight->setChecked(false); - m_ui.hwTilt->setChecked(false); - m_ui.hwRumble->setChecked(false); - - m_ui.idleLoop->setEnabled(true); m_ui.idleLoop->clear(); - m_ui.save->setEnabled(false); + m_ui.mbc->setCurrentIndex(0); + m_ui.gbModel->setCurrentIndex(0); updateOverrides(); } diff --git a/src/platform/qt/OverrideView.h b/src/platform/qt/OverrideView.h index 16e578c19..dc31f2223 100644 --- a/src/platform/qt/OverrideView.h +++ b/src/platform/qt/OverrideView.h @@ -8,11 +8,13 @@ #include -#include "ui_OverrideView.h" - +#ifdef M_CORE_GB extern "C" { -#include "gba/overrides.h" +#include "gb/overrides.h" } +#endif + +#include "ui_OverrideView.h" struct mCoreThread; @@ -20,6 +22,7 @@ namespace QGBA { class ConfigController; class GameController; +class Override; class OverrideView : public QDialog { Q_OBJECT @@ -40,7 +43,11 @@ private: GameController* m_controller; ConfigController* m_config; - GBACartridgeOverride m_override; + +#ifdef M_CORE_GB + static QList s_gbModelList; + static QList s_mbcList; +#endif }; } diff --git a/src/platform/qt/OverrideView.ui b/src/platform/qt/OverrideView.ui index bb99fc40a..2d383ad47 100644 --- a/src/platform/qt/OverrideView.ui +++ b/src/platform/qt/OverrideView.ui @@ -6,8 +6,8 @@ 0 0 - 401 - 203 + 443 + 282 @@ -19,232 +19,322 @@ Game Overrides - - - QLayout::SetFixedSize - - - - - - - Qt::Horizontal - - - - 0 - 0 - - - - - - - - false - - - Save - - - - - - - - - Qt::Vertical + + + + + 0 - - - 0 - 0 - - - - - - - - - - - - - - + + + Game Boy Advance + + + + + + + + + + + + Autodetect + + + true + + + + + + + false + + + Realtime clock + + + + + + + false + + + Gyroscope + + + + + + + false + + + Tilt + + + + + + + false + + + Light sensor + + + + + + + false + + + Rumble + + + + + + + + + + + + + + + + + + Save type + + + + + + + + Autodetect + + + + + None + + + + + SRAM + + + + + Flash 512kb + + + + + Flash 1Mb + + + + + EEPROM + + + + + + + + Idle loop + + + + + + + + + + Qt::Horizontal + + + + + + + + + Qt::Horizontal + + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + Game Boy Player features + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + Game Boy + + + + + + Game Boy model + + + + + + - Save type + Autodetect - - - - - - - Autodetect - - - - - None - - - - - SRAM - - - - - Flash 512kb - - - - - Flash 1Mb - - - - - EEPROM - - - - - - + + - Idle loop + Game Boy (DMG) - - - - - - - - - Qt::Horizontal - - - - - - - - - Qt::Horizontal - - - - - - - - - Qt::Horizontal - - - - 0 - 0 - - - - - - + + - Game Boy Player features + Game Boy Color (CGB) - - - - - - Qt::Horizontal + + + + Game Boy Advance (AGB) - - - 0 - 0 - + + + + + + + Memory bank controller + + + + + + + + Autodetect - - - - - + + + + None + + + + + MBC1 + + + + + MBC2 + + + + + MBC3 + + + + + MBC3 + RTC + + + + + MBC5 + + + + + MBC5 + Rumble + + + + + MBC7 + + + + + HuC-3 + + + + + + - - - - + + + + QDialogButtonBox::Close|QDialogButtonBox::Save - - - - - Autodetect - - - true - - - - - - - false - - - Realtime clock - - - - - - - false - - - Gyroscope - - - - - - - false - - - Tilt - - - - - - - false - - - Light sensor - - - - - - - false - - - Rumble - - - - diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index a6cb83c9b..28b0be671 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1318,7 +1318,6 @@ void Window::setupMenu(QMenuBar* menubar) { #ifdef M_CORE_GBA QAction* overrides = new QAction(tr("Game &overrides..."), toolsMenu); connect(overrides, SIGNAL(triggered()), this, SLOT(openOverrideWindow())); - m_gbaActions.append(overrides); addControlledAction(toolsMenu, overrides, "overrideWindow"); #endif