OSDN Git Service

[VM] Add YAMAHA YIS.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 17 May 2017 13:39:14 +0000 (22:39 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 17 May 2017 13:39:14 +0000 (22:39 +0900)
source/build-cmake/yis/CMakeLists.txt [new file with mode: 0644]
source/src/qt/common/qrc/yis.qrc [new file with mode: 0644]
source/src/qt/machines/yis/CMakeLists.txt [new file with mode: 0644]
source/src/qt/machines/yis/MainWindow.cpp [new file with mode: 0644]
source/src/qt/machines/yis/menuclasses.h [new file with mode: 0644]
source/src/vm/yis/CMakeLists.txt [new file with mode: 0644]

diff --git a/source/build-cmake/yis/CMakeLists.txt b/source/build-cmake/yis/CMakeLists.txt
new file mode 100644 (file)
index 0000000..af7a1a5
--- /dev/null
@@ -0,0 +1,55 @@
+# 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, YAMAHA YIS, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (emuyis)
+
+set(EXEC_TARGET emuyis)
+set(VM_NAME yis)
+set(USE_FMGEN OFF)
+set(WITH_JOYSTICK OFF)
+set(WITH_MOUSE ON)
+set(WITH_DEBUGGER ON)
+
+set(VMFILES_BASE
+       msm58321.cpp
+       m6502.cpp
+       io.cpp
+       memory.cpp
+       event.cpp
+)
+
+set(VMFILES_LIB
+       am9511.cpp
+       beep.cpp
+       mb8877.cpp
+       mc6820.cpp
+       mc6844.cpp
+       mc6850.cpp
+       msm5832_base.cpp
+       m6502_base.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_YIS)
+set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/yis.qrc)
+
+include(config_commonsource)
diff --git a/source/src/qt/common/qrc/yis.qrc b/source/src/qt/common/qrc/yis.qrc
new file mode 100644 (file)
index 0000000..a5b38d7
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="default.ico">../../../res/yis.ico</file>
+    <file alias="bios_and_keys.txt">../../../../../doc/VMs/yis.txt</file>
+</qresource>
+</RCC>
diff --git a/source/src/qt/machines/yis/CMakeLists.txt b/source/src/qt/machines/yis/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7be4fe6
--- /dev/null
@@ -0,0 +1,19 @@
+message("* qt/yis")
+
+set(s_qt_yis_headers
+         menuclasses.h
+)
+
+if(USE_QT_5)
+  QT5_WRAP_CPP(s_qt_yis_headers_MOC ${s_qt_yis_headers})
+#  QT5_ADD_RESOURCES(s_qt_fm7_headers_RCC ${RESOURCE})
+else()
+  QT4_WRAP_CPP(s_qt_yis_headers_MOC ${s_qt_yis_headers})
+endif()
+
+add_library(qt_yis
+         MainWindow.cpp
+         ${s_qt_yis_headers_MOC}
+)
+
+
diff --git a/source/src/qt/machines/yis/MainWindow.cpp b/source/src/qt/machines/yis/MainWindow.cpp
new file mode 100644 (file)
index 0000000..318bed4
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for Yamaha YIS .
+ * (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(0);
+       retranslateMachineMenu();
+       retranslateUI_Help();
+       retranslateEmulatorMenu();
+       retranslateSoundMenu();
+       
+       this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0));
+   // Set Labels
+#ifdef USE_DEBUGGER
+       actionDebugger[0]->setVisible(true);
+       actionDebugger[1]->setVisible(false);
+       actionDebugger[2]->setVisible(false);
+       actionDebugger[3]->setVisible(false);
+#endif
+  
+} // retranslateUi
+
+void META_MainWindow::setupUI_Emu(void)
+{
+}
+
+
+META_MainWindow::META_MainWindow(USING_FLAGS *p, CSP_Logger *logger, QWidget *parent) : Ui_MainWindow(p, logger, parent)
+{
+       setupUI_Emu();
+       retranslateUi();
+}
+
+
+META_MainWindow::~META_MainWindow()
+{
+}
+
+//QT_END_NAMESPACE
+
+
+
diff --git a/source/src/qt/machines/yis/menuclasses.h b/source/src/qt/machines/yis/menuclasses.h
new file mode 100644 (file)
index 0000000..ee35813
--- /dev/null
@@ -0,0 +1,26 @@
+
+#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;
+class USING_FLAGS;
+class CSP_Logger;
+//  wrote of Specific menu.
+class META_MainWindow : public Ui_MainWindow {
+       Q_OBJECT
+protected:
+       void setupUI_Emu(void);
+       void retranslateUi(void);
+public:
+       META_MainWindow(USING_FLAGS *p, CSP_Logger *logger, QWidget *parent = 0);
+       ~META_MainWindow();
+};
+
+QT_END_NAMESPACE
+
+#endif // END
diff --git a/source/src/vm/yis/CMakeLists.txt b/source/src/vm/yis/CMakeLists.txt
new file mode 100644 (file)
index 0000000..76df745
--- /dev/null
@@ -0,0 +1,13 @@
+cmake_minimum_required (VERSION 2.6)
+
+message("* vm/yis")
+
+add_library(vm_yis
+       calendar.cpp
+       display.cpp
+       floppy.cpp
+       keyboard.cpp
+       mapper.cpp
+       sound.cpp
+       yis.cpp
+)
\ No newline at end of file