[-]
[+]
|
Changed |
emumaster.spec
|
|
[-]
[+]
|
Changed |
emumaster.yaml
^
|
@@ -1,15 +1,11 @@
Name: emumaster
Summary: An emulator for different gaming consoles etc.
-Version: 0.3.1
+Version: 0.3.2
Release: 1
Group: Amusements/Games
License: GPLv2
URL: https://bitbucket.org/elemental/emumaster/wiki/Home
Patches:
- - enable-gba.patch
- - enable-amiga.patch
-# - enable-nes-and-pico.patch
- - enable_audio.patch
Sources:
- "%{name}_%{version}.tar.gz"
Description:
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.configuration.cpp.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.glpainter.cpp.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.glpainter.h.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.hostinput.cpp.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.hostinputdevice.cpp.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.hostinputdevice.h.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.hostvideo.cpp.swp
^
|
|
Deleted |
emumaster_0.3.1.tar.gz/src/base/.touchinputdevice.h.swp
^
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/qml/base/EmuView.qml
^
|
@@ -1,9 +1,17 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import EmuMaster 1.0
+import QtMultimedia 5.0
ApplicationWindow
{
+ property bool startupAudioHack: true
+
+ Timer {
+ interval: 500; running: true; repeat: false
+ onTriggered: emuView.pause()
+ }
+
initialPage: Page {
allowedOrientations: Orientation.Landscape
@@ -16,15 +24,15 @@
anchors.fill: parent
- IconButton {
- icon.source: "../../data/settings_button.png"
- x: 0
- y: 0
- onClicked: {
- emuView.pause()
- pageStack.push(settingsPage)
- }
- }
+ IconButton {
+ icon.source: "../../data/settings_button.png"
+ x: 0
+ y: 0
+ onClicked: {
+ emuView.pause()
+ pageStack.push(settingsPage)
+ }
+ }
}
}
}
@@ -33,8 +41,22 @@
frameItem.setEmuView(emuView)
}
+ Connections {
+ target: emuView
+ onPauseStage2Finished: {
+ if (startupAudioHack) {
+ emuView.sleepMs(100)
+ emuView.showEmulationView()
+ emuView.resume()
+ startupAudioHack = false
+ }
+ }
+ }
+
SettingsPage {
id: settingsPage
}
+
+ MediaPlayer { }
}
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/amiga/amiga.cpp
^
|
@@ -28,7 +28,8 @@
#include <base/pathmanager.h>
#include <QImage>
#include <QSemaphore>
-#include <QApplication>
+#include <QGuiApplication>
+#include <QQuickView>
static volatile bool amigaGoingShutdown = false;
static QImage amigaFrame;
@@ -178,7 +179,9 @@
int main(int argc, char *argv[]) {
if (argc < 2)
return -1;
- QApplication app(argc, argv);
- EmuView view(&amigaEmu, argv[1]);
- return app.exec();
+ QGuiApplication *app = new QGuiApplication(argc, argv);
+ QQuickView *view = new QQuickView();
+
+ EmuView emuView(&amigaEmu, argv[1], view);
+ return app->exec();
}
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/base/emuview.cpp
^
|
@@ -93,6 +93,7 @@
m_safetyTimer->setSingleShot(false);
QObject::connect(m_safetyTimer, SIGNAL(timeout()), SLOT(onSafetyEvent()));
+ m_audioEnable = true;
showEmulationView();
registerClassesInQml();
@@ -203,10 +204,10 @@
void EmuView::showEmulationView()
{
if (!m_running) {
- setSwipeEnabled(m_swipeEnabled);
+ resume();
+// setSwipeEnabled(m_swipeEnabled);
if (m_audioEnable)
m_hostAudio->open();
- resume();
}
}
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/base/emuview.h
^
|
@@ -27,7 +27,7 @@
#include "hostinput.h"
#include <QImage>
#include <QQuickView>
-class QThread;
+#include <QThread>
//class QQuickView;
class QSettings;
@@ -72,6 +72,8 @@
HostInput* hostInput() { return m_hostInput; };
+ Q_INVOKABLE void sleepMs(unsigned long msecs) { QThread::msleep(msecs); };
+
public slots:
bool close();
void pause();
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/base/touchinputdevice.cpp
^
|
@@ -324,7 +324,7 @@
void TouchInputDevice::setDpadAreaSize(int size)
{
- int rSize = qBound(160, size, 16384);
+ int rSize = qBound(160, size, 320);
if (m_areaSize != rSize) {
m_areaSize = rSize;
setDpadAreaDiagonalSize(m_diagonalAreaSize);
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/emumaster.pro
^
|
@@ -2,10 +2,9 @@
SUBDIRS += \
base \
- snes \
+ nes pico amiga snes gba \
diskgallery
-# gba snes pico \
# nes gba snes psx amiga pico \
OTHER_FILES += \
|
[-]
[+]
|
Added |
emumaster_0.3.2.tar.gz/src/emumaster.pro.user
^
|
@@ -0,0 +1,812 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 4.2.2, 2017-05-06T21:57:32. -->
+<qtcreator>
+ <data>
+ <variable>EnvironmentId</variable>
+ <value type="QByteArray">{4bb5486d-6126-4b6e-b9b9-e9e255707135}</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+ <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+ <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+ <value type="QString" key="language">Cpp</value>
+ <valuemap type="QVariantMap" key="value">
+ <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+ </valuemap>
+ </valuemap>
+ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+ <value type="QString" key="language">QmlJS</value>
+ <valuemap type="QVariantMap" key="value">
+ <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+ </valuemap>
+ </valuemap>
+ <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
+ <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+ <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+ <value type="int" key="EditorConfiguration.IndentSize">4</value>
+ <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+ <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+ <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+ <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+ <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+ <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+ <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+ <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+ <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+ <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+ <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+ <value type="int" key="EditorConfiguration.TabSize">8</value>
+ <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+ <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+ <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+ <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+ <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+ <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.PluginSettings</variable>
+ <valuemap type="QVariantMap"/>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.8.0 GCC 64bit</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.8.0 GCC 64bit</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.58.gcc_64_kit</value>
+ <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
+ <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+ <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/rc/repositories/private/qt/emumaster/build-emumaster-Desktop_Qt_5_8_0_GCC_64bit-Debug</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
+ <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+ <value type="QString">-w</value>
+ <value type="QString">-r</value>
+ </valuelist>
+ <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+ <value type="QString">-w</value>
+ <value type="QString">-r</value>
+ </valuelist>
+ <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
+ <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/rc/repositories/private/qt/emumaster/build-emumaster-Desktop_Qt_5_8_0_GCC_64bit-Release</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
+ <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+ <value type="QString">-w</value>
+ <value type="QString">-r</value>
+ </valuelist>
+ <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+ <value type="QString">-w</value>
+ <value type="QString">-r</value>
+ </valuelist>
+ <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+ <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/rc/repositories/private/qt/emumaster/build-emumaster-Desktop_Qt_5_8_0_GCC_64bit-Profile</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
+ <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/gba/gba.cpp
^
|
@@ -25,12 +25,14 @@
#include <base/emuview.h>
#include <base/pathmanager.h>
#include <QFile>
-#include <QApplication>
+#include <QGuiApplication>
+#include <QQuickView>
//#include <qdeclarative.h>
#include <QSemaphore>
#include <QQuickView>
#include <QtQml>
+#include <QDebug>
timer_type timer[4];
@@ -53,13 +55,14 @@
GbaEmu gbaEmu;
-GbaEmu::GbaEmu() :
- Emu("gba")
+GbaEmu::GbaEmu(QObject *parent) :
+ Emu("gba", parent)
{
}
bool GbaEmu::init(const QString &diskPath, QString *error)
{
+ qDebug("Initializing GbaEmu.");
gpuFrame = QImage(240, 160, QImage::Format_RGB16);
setVideoSrcRect(gpuFrame.rect());
setFrameRate(60);
@@ -68,8 +71,14 @@
requestQuit = false;
*error = loadBios();
- if (error->isEmpty())
+ if (error->isEmpty()) {
+ qDebug() << "Calling setDisk: " << diskPath;
*error = setDisk(diskPath);
+ }
+
+ if (!error->isEmpty()) {
+ qDebug() << "Got error: " << *error;
+ }
return error->isEmpty();
}
@@ -144,14 +153,23 @@
QString GbaEmu::setDisk(const QString &path)
{
+ qDebug("GbaEmu::setDisk");
init_gamepak_buffer();
- if (!gbaMemLoadGamePack(path))
+ qDebug() << "Loading game pack: " << path;
+ if (!gbaMemLoadGamePack(path)) {
+ qDebug("Loading game pack failed.");
return tr("Could not load disk");
+ }
+
+ qDebug("Resetting...");
reset();
skip_next_frame = 1;
+ qDebug("Starting gbaThread...");
gbaThread.start();
consumerSem.acquire();
+
+ qDebug("Leaving GbaEmu::setDisk.");
return QString();
}
@@ -341,9 +359,12 @@
qmlRegisterType<GbaCheats>();
qmlRegisterType<GbaGameSharkValidator>("EmuMaster", 1, 0,
"GbaGameSharkValidator");
- QApplication app(argc, argv);
- EmuView view(&gbaEmu, argv[1]);
- return app.exec();
+
+ QGuiApplication *app = new QGuiApplication(argc, argv);
+ QQuickView *view = new QQuickView();
+
+ EmuView emuView(&gbaEmu, argv[1], view);
+ return app->exec();
}
void GbaEmu::sl()
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/gba/gba.h
^
|
@@ -18,6 +18,7 @@
#define GBAEMU_H
#if defined(__cplusplus)
+#include <base/emu.h>
#include "common.h"
#include <QThread>
@@ -38,7 +39,7 @@
Q_PROPERTY(QString gamePackMaker READ gamePackMaker CONSTANT)
Q_PROPERTY(GbaCheats *cheats READ cheats CONSTANT)
public:
- GbaEmu();
+ explicit GbaEmu(QObject *parent = 0);
bool init(const QString &diskPath, QString *error);
void shutdown();
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/gba/mem.cpp
^
|
@@ -24,6 +24,7 @@
#include <base/pathmanager.h>
#include <base/configuration.h>
#include <QFile>
+#include <QDebug>
// This table is configured for sequential access on system defaults
@@ -2708,6 +2709,8 @@
static void loadConfig()
{
+ qDebug() << "Trying to load game config for (GamePack- Title,Code,Maker): " << gbaGamePackTitle << "," << gbaGamePackCode << "," << gbaGamePackMaker;
+
idle_loop_target_pc = 0xFFFFFFFF;
iwram_stack_optimize = 1;
bios_rom[0x39] = 0x00;
@@ -2722,45 +2725,71 @@
printf("could not load gba_game_config.txt");
return;
}
+
while (!f.atEnd()) {
QString line = f.readLine();
count++;
QPair<QString, QString> vars = parseLine(line, count);
- if (vars.first != "game_name" || vars.second != gbaGamePackTitle)
+ if (vars.first != "game_name" || vars.second != gbaGamePackTitle) {
continue;
+ }
+ qDebug("Found matching title at %i.", count);
line = f.readLine();
count++;
vars = parseLine(line, count);
- if (vars.first != "game_code" || vars.second != gbaGamePackCode)
+ if (vars.first != "game_code" || vars.second != gbaGamePackCode) {
continue;
+ }
+ qDebug("Found matching code at %i.", count);
line = f.readLine();
count++;
vars = parseLine(line, count);
- if (vars.first == "vender_code" && vars.second == gbaGamePackMaker)
+ if (vars.first == "vender_code" && vars.second == gbaGamePackMaker) {
+ qDebug("Found matching maker at %i.", count);
break;
+ }
}
+
+ if (!f.atEnd()) {
+ qDebug("Trying to load config.");
+ }
+
while (!f.atEnd()) {
QString line = f.readLine();
count++;
QPair<QString, QString> vars = parseLine(line, count);
- if (vars.first == "game_name")
+ if (vars.first == "game_name") {
+ qDebug("Found game_name at %i, returning.", count);
return;
- if (vars.first == "idle_loop_eliminate_target")
+ }
+ if (vars.first == "idle_loop_eliminate_target") {
idle_loop_target_pc = vars.second.toInt(0, 16);
+ qDebug() << "Set idle_loop_eliminate_target: " << idle_loop_target_pc;
+ }
if (vars.first == "translation_gate_target") {
+ qDebug("Got a translation_gate_target.");
if(translation_gate_targets < MAX_TRANSLATION_GATES) {
+ qDebug() << "Setting translation_gate_target_pc[" << translation_gate_targets << "] = " << vars.second.toInt(0, 16);
translation_gate_target_pc[translation_gate_targets] = vars.second.toInt(0, 16);
translation_gate_targets++;
}
}
- if (vars.first == "iwram_stack_optimize" && vars.second == "no")
+ if (vars.first == "iwram_stack_optimize" && vars.second == "no") {
+ qDebug("Set iwram_stack_optimize = 0");
iwram_stack_optimize = 0;
- if (vars.first == "flash_rom_type" && vars.second == "128KB")
+ }
+ if (vars.first == "flash_rom_type" && vars.second == "128KB") {
flash_device_id = FLASH_DEVICE_MACRONIX_128KB;
- if (vars.first == "bios_rom_hack_39" && vars.second == "yes")
+ qDebug() << "Set flash_device_id: " << flash_device_id;
+ }
+ if (vars.first == "bios_rom_hack_39" && vars.second == "yes") {
+ qDebug("Applying bios_rom_hack_39.");
bios_rom[0x39] = 0xC0;
- if (vars.first == "bios_rom_hack_2C" && vars.second == "yes")
+ }
+ if (vars.first == "bios_rom_hack_2C" && vars.second == "yes") {
+ qDebug("Applying bios_rom_hack_2C.");
bios_rom[0x2C] = 0x02;
+ }
}
}
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/nes/cheats.cpp
^
|
@@ -131,11 +131,9 @@
NesCheats::NesCheats()
{
- QHash<int, QByteArray> roles;
- roles.insert(CodeRole, "code");
- roles.insert(DescriptionRole, "codeDescription");
- roles.insert(EnableRole, "codeEnabled");
- setRoleNames(roles);
+ _roles.insert(CodeRole, "code");
+ _roles.insert(DescriptionRole, "codeDescription");
+ _roles.insert(EnableRole, "codeEnabled");
}
void NesCheats::sl()
@@ -147,8 +145,9 @@
emsl.end();
if (!emsl.save) {
+ beginResetModel();
setCurrent(enabledList());
- reset();
+ endResetModel();
}
}
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/nes/cheats.h
^
|
@@ -75,12 +75,15 @@
Q_INVOKABLE void setEnabled(int i, bool on);
Q_INVOKABLE void addNew(const QString &code, const QString &description);
Q_INVOKABLE void removeAt(int i);
+
+ virtual QHash<int, QByteArray> roleNames() const { return _roles; }
private:
void setCurrent(const QList<GameGenieCode> &codes);
QStringList m_codes;
QStringList m_descriptions;
QList<bool> m_enable;
+ QHash<int, QByteArray> _roles;
};
extern NesCheats nesCheats;
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/nes/disk.cpp
^
|
@@ -17,7 +17,7 @@
#include "disk.h"
#include "mapper.h"
#include <base/crc32.h>
-#include <QAbstractFileEngine>
+#include <QFile>
class NesDiskHeader
{
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/nes/mapper/mapper018.h
^
|
@@ -19,6 +19,14 @@
#include "../mapper.h"
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
class Mapper018 : public NesMapper
{
public:
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/nes/nes.cpp
^
|
@@ -31,8 +31,9 @@
#include <base/emuview.h>
#include <base/configuration.h>
#include <QSettings>
-#include <QApplication>
-#include <qdeclarative.h>
+#include <QGuiApplication>
+#include <QQuickView>
+#include <QtQml>
NesEmu nesEmu;
SystemType nesSystemType;
@@ -289,11 +290,14 @@
{
if (argc < 2)
return -1;
- QApplication app(argc, argv);
qmlRegisterType<NesPpu>();
- EmuView view(&nesEmu, argv[1]);
+ QGuiApplication *app = new QGuiApplication(argc, argv);
+ QQuickView *view = new QQuickView();
+
+ EmuView emuView(&nesEmu, argv[1], view);
#if defined(ENABLE_DEBUGGING)
- view.disableSafetyTimer();
+ emuView.disableSafetyTimer();
#endif
- return app.exec();
+
+ return app->exec();
}
|
[-]
[+]
|
Changed |
emumaster_0.3.2.tar.gz/src/pico/pico.cpp
^
|
@@ -13,7 +13,8 @@
#include <base/pathmanager.h>
#include <base/emuview.h>
#include <QImage>
-#include <QApplication>
+#include <QGuiApplication>
+#include <QQuickView>
#include <QFile>
#include <QDir>
@@ -649,7 +650,9 @@
{
if (argc < 2)
return -1;
- QApplication app(argc, argv);
- EmuView view(&picoEmu, argv[1]);
- return app.exec();
+ QGuiApplication *app = new QGuiApplication(argc, argv);
+ QQuickView *view = new QQuickView();
+
+ EmuView emuView(&picoEmu, argv[1], view);
+ return app->exec();
}
|