OSDN Git Service

[VM][Qt] Add Bandai RX-78.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 30 Sep 2015 14:23:48 +0000 (23:23 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 30 Sep 2015 14:23:48 +0000 (23:23 +0900)
source/build-cmake/rx78/CMakeLists.txt [new file with mode: 0644]
source/src/qt/common/qrc/rx78.qrc [new file with mode: 0644]
source/src/qt/rx78/CMakeLists.txt [new file with mode: 0644]
source/src/qt/rx78/MainWindow.cpp [new file with mode: 0644]
source/src/qt/rx78/menuclasses.h [new file with mode: 0644]
source/src/vm/rx78/CMakeLists.txt [new file with mode: 0644]

diff --git a/source/build-cmake/rx78/CMakeLists.txt b/source/build-cmake/rx78/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6fc3dd2
--- /dev/null
@@ -0,0 +1,54 @@
+# 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,BANDAI RX-78, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (rx78)
+
+set(LOCAL_LIBS            vm_rx78
+                  vm_vm
+                  common_common
+                  qt_debugger
+                  qt_rx78
+                  qt_gui
+                   )
+
+set(VMFILES
+                  z80.cpp
+                  sn76489an.cpp
+                  datarec.cpp
+                  
+                  io.cpp
+                  event.cpp
+)
+
+set(BUILD_SHARED_LIBS OFF)
+set(USE_OPENMP ON CACHE BOOL "Build using OpenMP")
+set(USE_OPENGL ON CACHE BOOL "Build using OpenGL")
+
+include(detect_target_cpu)
+# set entry
+set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE STRING "Set processor to build.")
+
+add_definitions(-D_RX78)
+set(EXEC_TARGET emurx78)
+set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/rx78.qrc)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/rx78)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/rx78)
+
+include(config_commonsource)
+
+add_subdirectory(../../src/vm/rx78 vm/rx78)
+add_subdirectory(../../src/qt/rx78 qt/rx78)
+add_subdirectory(../../src/qt/common qt/common)
+add_subdirectory(../../src/qt/debugger qt/debugger)
diff --git a/source/src/qt/common/qrc/rx78.qrc b/source/src/qt/common/qrc/rx78.qrc
new file mode 100644 (file)
index 0000000..92c4704
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="default.ico">../../../res/rx78.ico</file>
+</qresource>
+</RCC>
\ No newline at end of file
diff --git a/source/src/qt/rx78/CMakeLists.txt b/source/src/qt/rx78/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6072341
--- /dev/null
@@ -0,0 +1,18 @@
+message("* qt/rx78")
+
+set(s_qt_rx78_headers
+         menuclasses.h
+)
+
+if(USE_QT_5)
+  QT5_WRAP_CPP(s_qt_rx78_headers_MOC ${s_qt_rx78_headers})
+else()
+  QT4_WRAP_CPP(s_qt_rx78_headers_MOC ${s_qt_rx78_headers})
+endif()
+
+add_library(qt_rx78
+         MainWindow.cpp
+         ${s_qt_rx78_headers_MOC}
+)
+
+
diff --git a/source/src/qt/rx78/MainWindow.cpp b/source/src/qt/rx78/MainWindow.cpp
new file mode 100644 (file)
index 0000000..ad61f81
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for JR100 .
+ * (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 <QVariant>
+#include <QtGui>
+#include "emu.h"
+#include "commonclasses.h"
+#include "menuclasses.h"
+#include "qt_main.h"
+
+
+void META_MainWindow::setupUI_Emu(void)
+{
+   
+}
+
+void META_MainWindow::retranslateUi(void)
+{
+       int i;
+       retranslateControlMenu("System Reset",  false);
+       retranslateCartMenu(0, 1);
+       retranslateCMTMenu();
+       retranslateSoundMenu();
+       retranslateScreenMenu();
+   
+       this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0));
+  
+       actionAbout->setText(QApplication::translate("MainWindow", "About...", 0));
+
+       menuEmulator->setTitle(QApplication::translate("MainWindow", "Emulator", 0));
+       menuMachine->setTitle(QApplication::translate("MainWindow", "Machine", 0));
+  
+       menuHELP->setTitle(QApplication::translate("MainWindow", "HELP", 0));
+       actionHelp_AboutQt->setText(QApplication::translate("MainWindow", "About Qt", 0));
+       // Set Labels
+} // retranslateUi
+
+
+
+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/rx78/menuclasses.h b/source/src/qt/rx78/menuclasses.h
new file mode 100644 (file)
index 0000000..abe8b56
--- /dev/null
@@ -0,0 +1,30 @@
+
+
+
+#ifndef _CSP_QT_MENUCLASSES_H
+#define _CSP_QT_MENUCLASSES_H
+
+#include "emu.h"
+#include "mainwidget.h"
+// This extends class CSP_MainWindow as Ui_MainWindow.
+// You may use this as 
+QT_BEGIN_NAMESPACE
+
+class Ui_MainWindow;
+
+class META_MainWindow : public Ui_MainWindow {
+       Q_OBJECT
+ protected:
+       void setupUI_Emu(void);
+       void retranslateUi(void);
+  
+ public:
+       META_MainWindow(QWidget *parent = 0);
+       ~META_MainWindow();
+public slots:
+
+};
+
+QT_END_NAMESPACE
+
+#endif // END
diff --git a/source/src/vm/rx78/CMakeLists.txt b/source/src/vm/rx78/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0db0411
--- /dev/null
@@ -0,0 +1,12 @@
+cmake_minimum_required (VERSION 2.6)
+
+message("* vm/rx78")
+
+add_library(vm_rx78
+       rx78.cpp
+       cmt.cpp
+       keyboard.cpp
+       memory.cpp
+       printer.cpp
+       vdp.cpp
+)