From: K.Ohta Date: Fri, 8 Apr 2016 08:48:56 +0000 (+0900) Subject: [UI][Qt] Add YALKY, PC-2000, SMC-70. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=33cacb8fd4b56b441fdacd223ea20158cdaefdf6;p=csp-qt%2Fcommon_source_project-fm7.git [UI][Qt] Add YALKY, PC-2000, SMC-70. [UI][Qt] Add a debugger entry (to four entries). --- diff --git a/source/build-cmake/cmake/config_mz2500.cmake b/source/build-cmake/cmake/config_mz2500.cmake index 5847bc5d1..742b5304b 100644 --- a/source/build-cmake/cmake/config_mz2500.cmake +++ b/source/build-cmake/cmake/config_mz2500.cmake @@ -19,7 +19,6 @@ set(VMFILES_2500 w3100a.cpp ym2203.cpp - ) set(VMFILES_BASE datarec.cpp diff --git a/source/build-cmake/cmake/config_smc777.cmake b/source/build-cmake/cmake/config_smc777.cmake index 6afb39acb..3196487eb 100644 --- a/source/build-cmake/cmake/config_smc777.cmake +++ b/source/build-cmake/cmake/config_smc777.cmake @@ -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 index 000000000..d39695a13 --- /dev/null +++ b/source/build-cmake/yalky/CMakeLists.txt @@ -0,0 +1,47 @@ +# Build Common Sourcecode Project, Qt. +# (C) 2014 K.Ohta +# 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) diff --git a/source/src/qt/gui/mainwidget_base.h b/source/src/qt/gui/mainwidget_base.h index d2721bd5d..7d6d13d25 100644 --- a/source/src/qt/gui/mainwidget_base.h +++ b/source/src/qt/gui/mainwidget_base.h @@ -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; diff --git a/source/src/qt/gui/menu_control.cpp b/source/src/qt/gui/menu_control.cpp index fa49d03e1..2fa29749c 100644 --- a/source/src/qt/gui/menu_control.cpp +++ b/source/src/qt/gui/menu_control.cpp @@ -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)); diff --git a/source/src/qt/machines/mz2500/MainWindow.cpp b/source/src/qt/machines/mz2500/MainWindow.cpp index 62624a5a9..ae5653691 100644 --- a/source/src/qt/machines/mz2500/MainWindow.cpp +++ b/source/src/qt/machines/mz2500/MainWindow.cpp @@ -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 diff --git a/source/src/qt/machines/smc777/MainWindow.cpp b/source/src/qt/machines/smc777/MainWindow.cpp index 971e7cdda..218afc492 100644 --- a/source/src/qt/machines/smc777/MainWindow.cpp +++ b/source/src/qt/machines/smc777/MainWindow.cpp @@ -19,6 +19,12 @@ 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(); } diff --git a/source/src/qt/machines/x1/MainWindow.cpp b/source/src/qt/machines/x1/MainWindow.cpp index 20eab804b..03612fc5a 100644 --- a/source/src/qt/machines/x1/MainWindow.cpp +++ b/source/src/qt/machines/x1/MainWindow.cpp @@ -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 index 000000000..ef99e9bd5 --- /dev/null +++ b/source/src/qt/machines/yalky/CMakeLists.txt @@ -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 index 000000000..969a333b6 --- /dev/null +++ b/source/src/qt/machines/yalky/MainWindow.cpp @@ -0,0 +1,57 @@ +/* + * Common Source code Project: + * Ui->Qt->MainWindow for Babbage2nd . + * (C) 2015 K.Ohta + * License : GPLv2 + * History : + * Jan 14, 2015 : Initial, many of constructors were moved to qt/gui/menu_main.cpp. + */ + +#include +#include +#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 index 000000000..997123bad --- /dev/null +++ b/source/src/qt/machines/yalky/menuclasses.h @@ -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 index 000000000..fe229aa44 --- /dev/null +++ b/source/src/vm/pc2001/CMakeLists.txt @@ -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 index 000000000..38fe53950 --- /dev/null +++ b/source/src/vm/yalky/CMakeLists.txt @@ -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