OSDN Git Service

[VM][Qt] Add SANYOPHC-20, PHC-25 and SEIKO MAP-1010 .
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 30 Sep 2015 13:37:33 +0000 (22:37 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 30 Sep 2015 13:37:33 +0000 (22:37 +0900)
14 files changed:
source/build-cmake/map1010/CMakeLists.txt [new file with mode: 0644]
source/build-cmake/phc20/CMakeLists.txt [new file with mode: 0644]
source/build-cmake/phc25/CMakeLists.txt [new file with mode: 0644]
source/src/qt/common/qrc/map1010.qrc [new file with mode: 0644]
source/src/qt/common/qrc/phc20.qrc [new file with mode: 0644]
source/src/qt/common/qrc/phc25.qrc [new file with mode: 0644]
source/src/qt/phc20/CMakeLists.txt [new file with mode: 0644]
source/src/qt/phc20/MainWindow.cpp [new file with mode: 0644]
source/src/qt/phc20/menuclasses.h [new file with mode: 0644]
source/src/qt/phc25/CMakeLists.txt [new file with mode: 0644]
source/src/qt/phc25/MainWindow.cpp [new file with mode: 0644]
source/src/qt/phc25/menuclasses.h [new file with mode: 0644]
source/src/vm/phc25/phc25.cpp
source/src/vm/phc25/phc25.h

diff --git a/source/build-cmake/map1010/CMakeLists.txt b/source/build-cmake/map1010/CMakeLists.txt
new file mode 100644 (file)
index 0000000..29b0bfc
--- /dev/null
@@ -0,0 +1,69 @@
+# 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,SEIKO MAP1010, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (map1010)
+
+set(LOCAL_LIBS            vm_phc25
+                  vm_vm
+                  vm_fmgen
+                  common_common
+                  qt_debugger
+                  qt_phc25
+                  qt_gui
+                   )
+
+set(VMFILES
+                  z80.cpp
+                  not.cpp
+                  mc6847.cpp
+                  ym2203.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)
+#include(windows-mingw-cross)
+# set entry
+set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE STRING "Set processor to build.")
+
+set(BUILD_PHC25 OFF CACHE BOOL "Build ePHC25")
+set(BUILD_MAP1010 ON CACHE BOOL "Build eMAP1010")
+
+if(BUILD_PHC25)
+  add_definitions(-D_PHC25)
+  set(EXEC_TARGET emuphc25)
+  set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/phc25.qrc)
+elseif(BUILD_MAP1010)
+  add_definitions(-D_MAP1010)
+  set(EXEC_TARGET emumap1010)
+  set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/map1010.qrc)
+endif()
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/phc25)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/phc25)
+
+include(config_commonsource)
+
+add_subdirectory(../../src/vm/phc25 vm/phc25)
+add_subdirectory(../../src/vm/fmgen vm/fmgen)
+add_subdirectory(../../src/qt/phc25 qt/phc25)
+add_subdirectory(../../src/qt/common qt/common)
+add_subdirectory(../../src/qt/debugger qt/debugger)
diff --git a/source/build-cmake/phc20/CMakeLists.txt b/source/build-cmake/phc20/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f271047
--- /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,SANYO PHC-20, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (phc20)
+
+set(LOCAL_LIBS            vm_phc20
+                  vm_vm
+                  common_common
+#                 qt_debugger
+                  qt_phc20
+                  qt_gui
+                   )
+
+set(VMFILES
+                  z80.cpp
+  
+                  mc6847.cpp
+
+                  datarec.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_PHC20)
+set(EXEC_TARGET emuphc20)
+set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/phc20.qrc)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/phc20)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/phc20)
+
+include(config_commonsource)
+
+add_subdirectory(../../src/vm/phc20 vm/phc20)
+add_subdirectory(../../src/qt/phc20 qt/phc20)
+add_subdirectory(../../src/qt/common qt/common)
+#add_subdirectory(../../src/qt/debugger qt/debugger)
diff --git a/source/build-cmake/phc25/CMakeLists.txt b/source/build-cmake/phc25/CMakeLists.txt
new file mode 100644 (file)
index 0000000..412b301
--- /dev/null
@@ -0,0 +1,69 @@
+# 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,SEIKO MAP1010, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (map1010)
+
+set(LOCAL_LIBS            vm_phc25
+                  vm_vm
+                  vm_fmgen
+                  common_common
+                  qt_debugger
+                  qt_phc25
+                  qt_gui
+                   )
+
+set(VMFILES
+                  z80.cpp
+                  not.cpp
+                  mc6847.cpp
+                  ym2203.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)
+#include(windows-mingw-cross)
+# set entry
+set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE STRING "Set processor to build.")
+
+set(BUILD_PHC25 ON CACHE BOOL "Build ePHC25")
+set(BUILD_MAP1010 OFF CACHE BOOL "Build eMAP1010")
+
+if(BUILD_PHC25)
+  add_definitions(-D_PHC25)
+  set(EXEC_TARGET emuphc25)
+  set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/phc25.qrc)
+elseif(BUILD_MAP1010)
+  add_definitions(-D_MAP1010)
+  set(EXEC_TARGET emumap1010)
+  set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/map1010.qrc)
+endif()
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/phc25)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/phc25)
+
+include(config_commonsource)
+
+add_subdirectory(../../src/vm/phc25 vm/phc25)
+add_subdirectory(../../src/vm/fmgen vm/fmgen)
+add_subdirectory(../../src/qt/phc25 qt/phc25)
+add_subdirectory(../../src/qt/common qt/common)
+add_subdirectory(../../src/qt/debugger qt/debugger)
diff --git a/source/src/qt/common/qrc/map1010.qrc b/source/src/qt/common/qrc/map1010.qrc
new file mode 100644 (file)
index 0000000..13457a3
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="default.ico">../../../res/map1010.ico</file>
+</qresource>
+</RCC>
\ No newline at end of file
diff --git a/source/src/qt/common/qrc/phc20.qrc b/source/src/qt/common/qrc/phc20.qrc
new file mode 100644 (file)
index 0000000..623c1b2
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="default.ico">../../../res/phc20.ico</file>
+</qresource>
+</RCC>
\ No newline at end of file
diff --git a/source/src/qt/common/qrc/phc25.qrc b/source/src/qt/common/qrc/phc25.qrc
new file mode 100644 (file)
index 0000000..b7a6fff
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="default.ico">../../../res/phc25.ico</file>
+</qresource>
+</RCC>
\ No newline at end of file
diff --git a/source/src/qt/phc20/CMakeLists.txt b/source/src/qt/phc20/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9a18d1a
--- /dev/null
@@ -0,0 +1,18 @@
+message("* qt/phc20")
+
+set(s_qt_phc20_headers
+         menuclasses.h
+)
+
+if(USE_QT_5)
+  QT5_WRAP_CPP(s_qt_phc20_headers_MOC ${s_qt_phc20_headers})
+else()
+  QT4_WRAP_CPP(s_qt_phc20_headers_MOC ${s_qt_phc20_headers})
+endif()
+
+add_library(qt_phc20
+         MainWindow.cpp
+         ${s_qt_phc20_headers_MOC}
+)
+
+
diff --git a/source/src/qt/phc20/MainWindow.cpp b/source/src/qt/phc20/MainWindow.cpp
new file mode 100644 (file)
index 0000000..d12207d
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * 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);
+       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/phc20/menuclasses.h b/source/src/qt/phc20/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/qt/phc25/CMakeLists.txt b/source/src/qt/phc25/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d0adf86
--- /dev/null
@@ -0,0 +1,18 @@
+message("* qt/phc25")
+
+set(s_qt_phc25_headers
+         menuclasses.h
+)
+
+if(USE_QT_5)
+  QT5_WRAP_CPP(s_qt_phc25_headers_MOC ${s_qt_phc25_headers})
+else()
+  QT4_WRAP_CPP(s_qt_phc25_headers_MOC ${s_qt_phc25_headers})
+endif()
+
+add_library(qt_phc25
+         MainWindow.cpp
+         ${s_qt_phc25_headers_MOC}
+)
+
+
diff --git a/source/src/qt/phc25/MainWindow.cpp b/source/src/qt/phc25/MainWindow.cpp
new file mode 100644 (file)
index 0000000..831350b
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for PHC-25 / MAP1010 .
+ * (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("",  false);
+       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/phc25/menuclasses.h b/source/src/qt/phc25/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
index c7d10c3..97ed3f6 100644 (file)
@@ -43,7 +43,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        drec = new DATAREC(this, emu);
        io = new IO(this, emu);
        vdp = new MC6847(this, emu);
-       not = new NOT(this, emu);
+       g_not = new NOT(this, emu);
        psg = new YM2203(this, emu);
        cpu = new Z80(this, emu);
        
@@ -60,8 +60,8 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        vdp->load_font_image(emu->bios_path(_T("FONT.ROM")));
        vdp->set_vram_ptr(memory->get_vram(), 0x1800);
 //     vdp->set_context_cpu(cpu);
-       vdp->set_context_vsync(not, SIG_NOT_INPUT, 1);
-       not->set_context_out(cpu, SIG_CPU_IRQ, 1);
+       vdp->set_context_vsync(g_not, SIG_NOT_INPUT, 1);
+       g_not->set_context_out(cpu, SIG_CPU_IRQ, 1);
        
        vdp->set_context_vsync(system, SIG_SYSTEM_PORT, 0x10);
        drec->set_context_ear(system, SIG_SYSTEM_PORT, 0x20);
index c228252..061d6a4 100644 (file)
@@ -71,7 +71,7 @@ protected:
        DATAREC* drec;
        IO* io;
        MC6847* vdp;
-       NOT* not;
+       NOT* g_not;
        YM2203* psg;
        Z80* cpu;