OSDN Git Service

[UI][Qt] Add YALKY, PC-2000, SMC-70.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Fri, 8 Apr 2016 08:48:56 +0000 (17:48 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Fri, 8 Apr 2016 08:48:56 +0000 (17:48 +0900)
[UI][Qt] Add a debugger entry (to four entries).

13 files changed:
source/build-cmake/cmake/config_mz2500.cmake
source/build-cmake/cmake/config_smc777.cmake
source/build-cmake/yalky/CMakeLists.txt [new file with mode: 0644]
source/src/qt/gui/mainwidget_base.h
source/src/qt/gui/menu_control.cpp
source/src/qt/machines/mz2500/MainWindow.cpp
source/src/qt/machines/smc777/MainWindow.cpp
source/src/qt/machines/x1/MainWindow.cpp
source/src/qt/machines/yalky/CMakeLists.txt [new file with mode: 0644]
source/src/qt/machines/yalky/MainWindow.cpp [new file with mode: 0644]
source/src/qt/machines/yalky/menuclasses.h [new file with mode: 0644]
source/src/vm/pc2001/CMakeLists.txt [new file with mode: 0644]
source/src/vm/yalky/CMakeLists.txt [new file with mode: 0644]

index 5847bc5..742b530 100644 (file)
@@ -19,7 +19,6 @@ set(VMFILES_2500
                   w3100a.cpp
                   
                   ym2203.cpp
-                  
 )
 set(VMFILES_BASE
                   datarec.cpp
index 6afb39a..3196487 100644 (file)
@@ -22,7 +22,8 @@ if(BUILD_SMC70)
                   pcm1bit.cpp
                   hd46505.cpp
                   mb8877.cpp
-                  sn76489an.cpp
+#                 sn76489an.cpp
+                  msm58321.cpp
                   
                   datarec.cpp
                   disk.cpp
diff --git a/source/build-cmake/yalky/CMakeLists.txt b/source/build-cmake/yalky/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d39695a
--- /dev/null
@@ -0,0 +1,47 @@
+# Build Common Sourcecode Project, Qt.
+# (C) 2014 K.Ohta <whatisthis.sowhat@gmail.com>
+# This is part of XM7/SDL, but license is apache 2.2,
+# this part was written only me.
+
+cmake_minimum_required (VERSION 2.8)
+cmake_policy(SET CMP0011 NEW)
+
+message("")
+message("** Start of configure CommonSourceProject, Yuasa Kyouiku System YALKY, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (emuyalky)
+
+set(EXEC_TARGET emuyalky)
+set(VM_NAME yalky)
+set(USE_FMGEN OFF)
+set(WITH_JOYSTICK OFF)
+set(WITH_MOUSE ON)
+
+set(VMFILES_BASE
+       i8080.cpp
+       i8155.cpp
+       not.cpp
+       datarec.cpp
+       memory.cpp
+
+       event.cpp
+)
+
+
+set(USE_OPENMP ON CACHE BOOL "Build using OpenMP")
+set(USE_OPENGL ON CACHE BOOL "Build using OpenGL")
+set(WITH_DEBUGGER ON CACHE BOOL "Build with debugger.")
+
+
+include(detect_target_cpu)
+set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE STRING "Set processor to build.")
+
+set(VMFILES ${VMFILES_BASE})
+
+add_definitions(-D_YALKY)
+set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/yalky.qrc)
+
+include(config_commonsource)
index d2721bd..7d6d13d 100644 (file)
@@ -190,6 +190,7 @@ class Ui_MainWindowBase : public QMainWindow
        class Action_Control *actionDebugger_1;
        class Action_Control *actionDebugger_2;
        class Action_Control *actionDebugger_3;
+       class Action_Control *actionDebugger_4;
        //class Action_Control *actionClose_Debuggers;
 
 
index fa49d03..2fa2974 100644 (file)
@@ -211,6 +211,14 @@ void Ui_MainWindowBase::ConfigControlMenu(void)
                connect(actionDebugger_3, SIGNAL(triggered()),
                                actionDebugger_3->binds, SLOT(open_debugger())); // OK?  
                connect(actionDebugger_3->binds, SIGNAL(on_open_debugger(int)),
+                               this, SLOT(OnOpenDebugger(int))); // OK?
+               
+               actionDebugger_4 = new Action_Control(this);
+               actionDebugger_4->setObjectName(QString::fromUtf8("actionDebugger_4"));
+               actionDebugger_4->binds->setValue1(3);
+               connect(actionDebugger_4, SIGNAL(triggered()),
+                               actionDebugger_4->binds, SLOT(open_debugger())); // OK?  
+               connect(actionDebugger_4->binds, SIGNAL(on_open_debugger(int)),
                                this, SLOT(OnOpenDebugger(int))); // OK?  
        }
        ConfigCpuSpeed();
@@ -258,6 +266,7 @@ void Ui_MainWindowBase::connectActions_ControlMenu(void)
                menuDebugger->addAction(actionDebugger_1);
                menuDebugger->addAction(actionDebugger_2);
                menuDebugger->addAction(actionDebugger_3);
+               menuDebugger->addAction(actionDebugger_4);
                menuDebugger->addSeparator();
        }
 }
@@ -314,9 +323,10 @@ void Ui_MainWindowBase::retranslateControlMenu(const char *SpecialResetTitle,  b
                actionLoad_State->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOpenButton));
        }
        if(using_flags->is_use_debugger()) {
-               actionDebugger_1->setText(QApplication::translate("MainWindow", "Debugger 1", 0));
-               actionDebugger_2->setText(QApplication::translate("MainWindow", "Debugger 2", 0));
-               actionDebugger_3->setText(QApplication::translate("MainWindow", "Debugger 3", 0));
+               actionDebugger_1->setText(QApplication::translate("MainWindow", "Main CPU", 0));
+               actionDebugger_2->setText(QApplication::translate("MainWindow", "Sub CPU", 0));
+               actionDebugger_3->setText(QApplication::translate("MainWindow", "Reserved", 0));
+               actionDebugger_4->setText(QApplication::translate("MainWindow", "Reserved", 0));
                menuDebugger->setTitle(QApplication::translate("MainWindow", "Debugger", 0));
        }
        menuControl->setTitle(QApplication::translate("MainWindow", "Control", 0));
index 62624a5..ae56536 100644 (file)
@@ -49,6 +49,12 @@ void META_MainWindow::retranslateUi(void)
        actionPrintDevice[2]->setText(QString::fromUtf8("Sharp MZ-1P17 (MZ-3)"));
 #endif 
 #endif
+#if defined(USE_DEBUGGER)
+       actionDebugger_1->setText(QString::fromUtf8("Main CPU"));
+#if defined(_MZ2200)
+       actionDebugger_2->setText(QString::fromUtf8("MZ-1M01 CPU"));
+#endif
+#endif
        // Set Labels
 } // retranslateUi
 
index 971e7cd..218afc4 100644 (file)
 
 void META_MainWindow::setupUI_Emu(void)
 {
+#if defined(_SMC70)
+       menuBootMode = new QMenu(menuMachine);
+       menuBootMode->setObjectName(QString::fromUtf8("menuControl_BootMode"));
+       menuMachine->addAction(menuBootMode->menuAction());
+       ConfigCPUBootMode(3);
+#endif
 }
 
 void META_MainWindow::retranslateUi(void)
@@ -34,7 +40,12 @@ void META_MainWindow::retranslateUi(void)
        retranslateMachineMenu();
        retranslateEmulatorMenu();
        retranslateUI_Help();
-   
+#if defined(_SMC70)
+       menuBootMode->setTitle(QApplication::translate("MainWindow", "Auto Start SW:", 0));
+       actionBootMode[0]->setText(QApplication::translate("MainWindow", "ROM", 0));
+       actionBootMode[1]->setText(QApplication::translate("MainWindow", "Disk", 0));
+       actionBootMode[2]->setText(QApplication::translate("MainWindow", "Off", 0));
+#endif 
        this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0));
   
   
@@ -53,6 +64,7 @@ void META_MainWindow::retranslateUi(void)
 
 META_MainWindow::META_MainWindow(QWidget *parent) : Ui_MainWindow(parent)
 {
+       setupUI_Emu();
        retranslateUi();
 }
 
index 20eab80..03612fc 100644 (file)
@@ -120,6 +120,9 @@ void META_MainWindow::retranslateUi(void)
        actionDebugger_1->setText(QApplication::translate("MainWindow", "Main CPU", 0));
        actionDebugger_2->setText(QApplication::translate("MainWindow", "Sub CPU", 0));
        actionDebugger_3->setText(QApplication::translate("MainWindow", "Keyboard CPU", 0));
+#ifdef _X1TWIN 
+       actionDebugger_4->setText(QApplication::translate("MainWindow", "PC-ENGINE CPU", 0));
+#endif
 #endif 
 #if defined(USE_PRINTER)
        actionPrintDevice[1]->setText(QString::fromUtf8("Sharp MZ-1P17"));
diff --git a/source/src/qt/machines/yalky/CMakeLists.txt b/source/src/qt/machines/yalky/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ef99e9b
--- /dev/null
@@ -0,0 +1,19 @@
+message("* qt/yalky")
+
+set(s_qt_yalky_headers
+         menuclasses.h
+)
+
+if(USE_QT_5)
+  QT5_WRAP_CPP(s_qt_yalky_headers_MOC ${s_qt_yalky_headers})
+#  QT5_ADD_RESOURCES(s_qt_fm7_headers_RCC ${RESOURCE})
+else()
+  QT4_WRAP_CPP(s_qt_yalky_headers_MOC ${s_qt_yalky_headers})
+endif()
+
+add_library(qt_yalky
+         MainWindow.cpp
+         ${s_qt_yalky_headers_MOC}
+)
+
+
diff --git a/source/src/qt/machines/yalky/MainWindow.cpp b/source/src/qt/machines/yalky/MainWindow.cpp
new file mode 100644 (file)
index 0000000..969a333
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for Babbage2nd .
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ *   License : GPLv2
+ *   History :
+ * Jan 14, 2015 : Initial, many of constructors were moved to qt/gui/menu_main.cpp.
+ */
+
+#include <QtCore/QVariant>
+#include <QtGui>
+#include "menuclasses.h"
+#include "commonclasses.h"
+
+#include "emu.h"
+#include "qt_main.h"
+#include "vm.h"
+
+//QT_BEGIN_NAMESPACE
+
+
+void META_MainWindow::retranslateUi(void)
+{
+       retranslateControlMenu("", false);
+       retranslateScreenMenu();
+       //retranslateBinaryMenu(0, 1);
+       retranslateCMTMenu();
+       retranslateMachineMenu();
+       retranslateUI_Help();
+       retranslateEmulatorMenu();
+       retranslateSoundMenu();
+       
+       this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0));
+   // Set Labels
+  
+} // retranslateUi
+
+void META_MainWindow::setupUI_Emu(void)
+{
+}
+
+
+META_MainWindow::META_MainWindow(QWidget *parent) : Ui_MainWindow(parent)
+{
+       setupUI_Emu();
+       retranslateUi();
+}
+
+
+META_MainWindow::~META_MainWindow()
+{
+}
+
+//QT_END_NAMESPACE
+
+
+
diff --git a/source/src/qt/machines/yalky/menuclasses.h b/source/src/qt/machines/yalky/menuclasses.h
new file mode 100644 (file)
index 0000000..997123b
--- /dev/null
@@ -0,0 +1,24 @@
+
+#ifndef _CSP_QT_MENUCLASSES_H
+#define _CSP_QT_MENUCLASSES_H
+
+#include "mainwidget.h"
+// This extends class CSP_MainWindow as Ui_MainWindow.
+// You may use this as 
+QT_BEGIN_NAMESPACE
+
+class Ui_MainWindow;
+//  wrote of Specific menu.
+class META_MainWindow : public Ui_MainWindow {
+  Q_OBJECT
+ protected:
+  void setupUI_Emu(void);
+  void retranslateUi(void);
+ public:
+  META_MainWindow(QWidget *parent = 0);
+  ~META_MainWindow();
+};
+
+QT_END_NAMESPACE
+
+#endif // END
diff --git a/source/src/vm/pc2001/CMakeLists.txt b/source/src/vm/pc2001/CMakeLists.txt
new file mode 100644 (file)
index 0000000..fe229aa
--- /dev/null
@@ -0,0 +1,6 @@
+cmake_minimum_required (VERSION 2.6)
+
+add_library(vm_pc2001
+       io.cpp
+       pc2001.cpp
+)
diff --git a/source/src/vm/yalky/CMakeLists.txt b/source/src/vm/yalky/CMakeLists.txt
new file mode 100644 (file)
index 0000000..38fe539
--- /dev/null
@@ -0,0 +1,8 @@
+cmake_minimum_required (VERSION 2.6)
+
+message("* vm/yalky")
+
+add_library(vm_yalky
+       io.cpp
+       yalky.cpp
+)
\ No newline at end of file