--- /dev/null
+# 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,NEC PC-100, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+project (pc100)
+
+set(LOCAL_LIBS vm_pc100
+ vm_vm
+ common_common
+ qt_debugger
+ qt_pc100
+ qt_gui
+ )
+
+set(VMFILES
+ i286.cpp
+
+ and.cpp
+
+ i8251.cpp
+ i8255.cpp
+ i8259.cpp
+
+ msm58321.cpp
+ upd765a.cpp
+
+ beep.cpp
+ memory.cpp
+ pcm1bit.cpp
+
+ disk.cpp
+ event.cpp
+ io.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.")
+
+add_definitions(-D_PC100)
+set(EXEC_TARGET emupc100)
+set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/pc100.qrc)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/pc100)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/pc100)
+
+include(config_commonsource)
+
+add_subdirectory(../../src/vm/pc100 vm/pc100)
+add_subdirectory(../../src/qt/pc100 qt/pc100)
+add_subdirectory(../../src/qt/common qt/common)
+add_subdirectory(../../src/qt/debugger qt/debugger)
--- /dev/null
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file alias="default.ico">../../../res/pc100.ico</file>
+</qresource>
+</RCC>
\ No newline at end of file
--- /dev/null
+message("* qt/pc100")
+
+set(s_qt_pc100_headers
+ menuclasses.h
+)
+
+if(USE_QT_5)
+ QT5_WRAP_CPP(s_qt_pc100_headers_MOC ${s_qt_pc100_headers})
+else()
+ QT4_WRAP_CPP(s_qt_pc100_headers_MOC ${s_qt_pc100_headers})
+endif()
+
+add_library(qt_pc100
+ MainWindow.cpp
+ ${s_qt_pc100_headers_MOC}
+)
+
+
--- /dev/null
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for PC-100 .
+ * (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)
+{
+ int i;
+ QString tmps;
+
+}
+
+void META_MainWindow::retranslateUi(void)
+{
+ int i;
+
+ retranslateControlMenu("", false);
+ retranslateFloppyMenu(0, 1);
+ retranslateFloppyMenu(1, 2);
+ 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
+
+
+
--- /dev/null
+
+
+
+#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
--- /dev/null
+cmake_minimum_required (VERSION 2.6)
+
+message("* vm/pc100")
+
+set(VM_pc100_LIB_SRCS
+ pc100.cpp
+
+ crtc.cpp
+ ioctrl.cpp
+ kanji.cpp
+)
+
+add_library(vm_pc100
+ ${VM_pc100_LIB_SRCS}
+)
\ No newline at end of file
dummy = new DEVICE(this, emu); // must be 1st device
event = new EVENT(this, emu); // must be 2nd device
- and = new AND(this, emu);
+ g_and = new AND(this, emu);
beep = new BEEP(this, emu);
sio = new I8251(this, emu);
pio0 = new I8255(this, emu);
event->set_context_sound(beep);
event->set_context_sound(pcm);
- and->set_context_out(cpu, SIG_CPU_NMI, 1);
- and->set_mask(SIG_AND_BIT_0 | SIG_AND_BIT_1);
+ g_and->set_context_out(cpu, SIG_CPU_NMI, 1);
+ g_and->set_mask(SIG_AND_BIT_0 | SIG_AND_BIT_1);
sio->set_context_rxrdy(pic, SIG_I8259_IR1, 1);
pio0->set_context_port_a(rtc, SIG_MSM58321_READ, 1, 0);
pio0->set_context_port_a(rtc, SIG_MSM58321_WRITE, 2, 0);
pio1->set_context_port_a(crtc, SIG_CRTC_BITMASK_LOW, 0xff, 0);
pio1->set_context_port_b(crtc, SIG_CRTC_BITMASK_HIGH, 0xff, 0);
pio1->set_context_port_c(crtc, SIG_CRTC_VRAM_PLANE, 0x3f, 0);
- pio1->set_context_port_c(and, SIG_AND_BIT_0, 0x80, 0);
+ pio1->set_context_port_c(g_and, SIG_AND_BIT_0, 0x80, 0);
pio1->set_context_port_c(ioctrl, SIG_IOCTRL_RESET, 0x40, 0);
pic->set_context_cpu(cpu);
rtc->set_context_data(pio0, SIG_I8255_PORT_C, 0x0f, 0);
rtc->set_context_busy(pio0, SIG_I8255_PORT_C, 0x10);
fdc->set_context_irq(cpu, SIG_CPU_NMI, 1);
- fdc->set_context_drq(and, SIG_AND_BIT_1, 1);
+ fdc->set_context_drq(g_and, SIG_AND_BIT_1, 1);
crtc->set_context_pic(pic);
ioctrl->set_context_pic(pic);
// devices
EVENT* event;
- AND* and;
+ AND* g_and;
BEEP* beep;
I8251* sio;
I8255* pio0;