--- /dev/null
+# Build Common Sourcecode Project, Agar.
+# (C) 2014 K.Ohta <whatisthis.sowhat@gmail.com>
+# This is part of , 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,FM16π, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+
+project (emufm16pi)
+
+
+set(LOCAL_LIBS vm_fm16pi
+ vm_vm
+ common_common
+ qt_fm16pi
+ qt_gui
+ )
+
+set(VMFILES
+ i286.cpp
+#
+ pcm1bit.cpp
+ i8251.cpp
+ i8253.cpp
+ i8255.cpp
+ i8259.cpp
+ msm58321.cpp
+ not.cpp
+ mb8877.cpp
+
+ ym2203.cpp
+
+# datarec.cpp
+ disk.cpp
+ event.cpp
+ io.cpp
+ memory.cpp
+)
+
+
+set(BUILD_SHARED_LIBS OFF)
+
+#set(FM77_EXTRAM_PAGES "12" CACHE STRING "Set banks of EXTRAM of FM77/FM77AV40, bank = 64Kbytes")
+
+set(USE_OPENMP ON CACHE BOOL "Build using OpenMP")
+set(USE_OPENCL ON CACHE BOOL "Build using OpenCL if enabled.")
+set(USE_OPENGL ON CACHE BOOL "Build using OpenGL")
+
+#set(WITH_DEBUGGER ON CACHE BOOL "Build witn XM7 Debugger.")
+
+include(detect_target_cpu)
+#include(windows-mingw-cross)
+# set entry
+set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE STRING "Set processor to build.")
+
+add_definitions(-D_CONFIGURE_WITH_CMAKE)
+
+set(EXEC_TARGET emufm16pi)
+add_definitions(-D_FM16PI)
+
+
+
+
+#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/fm16pi)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/fmgen)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/fm7)
+
+include(config_commonsource)
+
+if(USE_SSE2)
+# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/fm7/vram/sse2)
+# add_subdirectory(../../src/vm/fm7/vram/sse2 vm/fm7/vram/sse2)
+endif()
+
+
+if(USE_SSE2)
+# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/agar/common/scaler/sse2)
+endif()
+
+add_subdirectory(../../src/vm/fm16pi vm/fm16pi)
+add_subdirectory(../../src/qt/fm16pi qt/fm16pi)
+
+
+
+add_subdirectory(../../src/qt/common qt/common)
--- /dev/null
+message("* qt/fm16pi")
+
+set(s_qt_fm16pi_headers
+ menuclasses.h
+)
+QT4_WRAP_CPP(s_qt_fm16pi_headers_MOC ${s_qt_fm16pi_headers})
+
+add_library(qt_fm16pi
+ MainWindow.cpp
+ ${s_qt_fm16pi_headers_MOC}
+)
+
+
--- /dev/null
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for X1TurboZ .
+ * (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 "emu.h"
+#include "qt_main.h"
+
+//QT_BEGIN_NAMESPACE
+
+void META_MainWindow::setupUI_Emu(void)
+{
+ int i;
+ QString tmps;
+#if 0
+ menu_Emu_DipSw = new QMenu(menuMachine);
+ menu_Emu_DipSw->setObjectName(QString::fromUtf8("menu_DipSw"));
+
+ actionGroup_DipSw = new QActionGroup(this);
+ actionGroup_DipSw->setExclusive(false);
+ menuMachine->addAction(menu_Emu_DipSw->menuAction());
+ for(i = 0; i < 4; i++) {
+ action_Emu_DipSw[i] = new Action_Control_HC20(this);
+ action_Emu_DipSw[i]->setCheckable(true);
+ action_Emu_DipSw[i]->hc20_binds->setValue1(i);
+ tmps.number(i + 1);
+ tmps = QString::fromUtf8("actionEmu_DipSw") + tmps;
+ action_Emu_DipSw[i]->setObjectName(tmps);
+
+ if(((1 << i) & config.dipswitch) != 0) action_Emu_DipSw[i]->setChecked(true);
+
+ menu_Emu_DipSw->addAction(action_Emu_DipSw[i]);
+ actionGroup_DipSw->addAction(action_Emu_DipSw[i]);
+ connect(action_Emu_DipSw[i], SIGNAL(toggled(bool)),
+ action_Emu_DipSw[i]->hc20_binds, SLOT(set_dipsw(bool)));
+ connect(action_Emu_DipSw[i]->hc20_binds, SIGNAL(sig_dipsw(int, bool)),
+ this, SLOT(set_dipsw(int, bool)));
+
+ }
+#endif
+
+}
+
+void META_MainWindow::retranslateUi(void)
+{
+ int i;
+
+ retranslateControlMenu(" ", false);
+ retranslateFloppyMenu(0, 0);
+ retranslateFloppyMenu(1, 1);
+// retranslateCMTMenu();
+ retranslateSoundMenu();
+ retranslateScreenMenu();
+
+ this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
+
+
+ actionAbout->setText(QApplication::translate("MainWindow", "About...", 0, QApplication::UnicodeUTF8));
+
+
+ menuEmulator->setTitle(QApplication::translate("MainWindow", "Emulator", 0, QApplication::UnicodeUTF8));
+ menuMachine->setTitle(QApplication::translate("MainWindow", "Machine", 0, QApplication::UnicodeUTF8));
+
+ menuHELP->setTitle(QApplication::translate("MainWindow", "HELP", 0, QApplication::UnicodeUTF8));
+#if 0
+ // Set Labels
+ menu_Emu_DipSw->setTitle(QApplication::translate("MainWindow", "DIP Switches", 0, QApplication::UnicodeUTF8));
+ action_Emu_DipSw[0]->setText(QApplication::translate("MainWindow", "Dip Switch 1", 0, QApplication::UnicodeUTF8));
+ action_Emu_DipSw[1]->setText(QApplication::translate("MainWindow", "Dip Switch 2", 0, QApplication::UnicodeUTF8));
+ action_Emu_DipSw[2]->setText(QApplication::translate("MainWindow", "Dip Switch 3", 0, QApplication::UnicodeUTF8));
+ action_Emu_DipSw[3]->setText(QApplication::translate("MainWindow", "Dip Switch 4", 0, QApplication::UnicodeUTF8));
+#endif
+} // 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
fdc = new MB8877(this, emu);
memory = new MEMORY(this, emu);
rtc = new MSM58321(this, emu);
- not = new NOT(this, emu);
+ d_not = new NOT(this, emu);
pcm = new PCM1BIT(this, emu);
sub = new SUB(this, emu);
Ch.2 Speaker
*/
pit->set_context_ch0(pic, SIG_I8259_IR0, 1);
- pit->set_context_ch0(not, SIG_NOT_INPUT, 1);
- not->set_context_out(pio, SIG_I8255_PORT_B, 0x20);
+ pit->set_context_ch0(d_not, SIG_NOT_INPUT, 1);
+ d_not->set_context_out(pio, SIG_I8255_PORT_B, 0x20);
pit->set_context_ch2(pcm, SIG_PCM1BIT_SIGNAL, 1);
pit->set_constant_clock(0, 2457600);
pit->set_constant_clock(1, 2457600);
MB8877* fdc;
MEMORY* memory;
MSM58321* rtc;
- NOT* not;
+ NOT* d_not;
PCM1BIT* pcm;
SUB* sub;