OSDN Git Service

[BUILD] Set SOVERSION and GIT hash automatically.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 6 Aug 2018 13:40:14 +0000 (22:40 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 6 Aug 2018 13:40:14 +0000 (22:40 +0900)
[DEVICE][COMMON_VM] Add DEVICE:: to libCSPcommon_vm.
[BUILD] Update SOVERSION.

92 files changed:
source/build-cmake/cmake/config_commonsource.cmake
source/build-cmake/cmake/config_sharedlibs.cmake
source/src/common.cpp
source/src/common.h
source/src/qt/CMakeLists.txt
source/src/qt/avio/CMakeLists.txt
source/src/qt/avio/movie_saver.cpp
source/src/qt/avio/movie_saver.h
source/src/qt/common/mainwidget.h
source/src/qt/common/qt_utils.cpp
source/src/qt/emuutils/CMakeLists.txt
source/src/qt/gui/CMakeLists.txt
source/src/qt/gui/display_about.cpp
source/src/qt/gui/display_about.h
source/src/qt/gui/mainwidget_base.h
source/src/qt/gui/menu_main.cpp
source/src/qt/osd.h
source/src/qt/osd_base.h
source/src/qt/osd_wrapper.cpp
source/src/res/credits.html
source/src/vm/babbage2nd/babbage2nd.cpp
source/src/vm/bmjr/bmjr.cpp
source/src/vm/bubcom80/bubcom80.cpp
source/src/vm/colecovision/colecovision.cpp
source/src/vm/common_vm/CMakeLists.txt
source/src/vm/ex80/ex80.cpp
source/src/vm/familybasic/familybasic.cpp
source/src/vm/fm16beta/fm16beta.cpp
source/src/vm/fm16pi/fm16pi.cpp
source/src/vm/fm7/fm7.cpp
source/src/vm/fmgen/CMakeLists.txt
source/src/vm/fmgen/fmgen.cpp
source/src/vm/fmgen/fmgen.h
source/src/vm/fmgen/misc.h
source/src/vm/fmr30/fmr30.cpp
source/src/vm/fmr50/fmr50.cpp
source/src/vm/fmtowns/fmtowns.cpp
source/src/vm/fp1100/fp1100.cpp
source/src/vm/fp200/fp200.cpp
source/src/vm/gamegear/gamegear.cpp
source/src/vm/gamegear/mastersystem.cpp
source/src/vm/hc20/hc20.cpp
source/src/vm/hc40/hc40.cpp
source/src/vm/hc80/hc80.cpp
source/src/vm/j3100/j3100.cpp
source/src/vm/jr100/jr100.cpp
source/src/vm/jr800/jr800.cpp
source/src/vm/jx/jx.cpp
source/src/vm/libcpu_newdev/device.cpp
source/src/vm/libcpu_newdev/device.h
source/src/vm/m5/m5.cpp
source/src/vm/msx/msx.cpp
source/src/vm/msx/msx_ex.cpp
source/src/vm/multi8/multi8.cpp
source/src/vm/mycomz80a/mycomz80a.cpp
source/src/vm/mz2500/mz2500.cpp
source/src/vm/mz2500/mz80b.cpp
source/src/vm/mz2800/mz2800.cpp
source/src/vm/mz3500/mz3500.cpp
source/src/vm/mz5500/mz5500.cpp
source/src/vm/mz700/mz700.cpp
source/src/vm/mz80k/mz80k.cpp
source/src/vm/n5200/n5200.cpp
source/src/vm/pasopia/pasopia.cpp
source/src/vm/pasopia7/pasopia7.cpp
source/src/vm/pc100/pc100.cpp
source/src/vm/pc2001/pc2001.cpp
source/src/vm/pc6001/pc6001.cpp
source/src/vm/pc8201/pc8201.cpp
source/src/vm/pc8801/pc8801.cpp
source/src/vm/pc9801/pc9801.cpp
source/src/vm/pc98ha/pc98ha.cpp
source/src/vm/pcengine/pcengine.cpp
source/src/vm/phc20/phc20.cpp
source/src/vm/phc25/phc25.cpp
source/src/vm/pv1000/pv1000.cpp
source/src/vm/pv2000/pv2000.cpp
source/src/vm/pyuta/pyuta.cpp
source/src/vm/qc10/qc10.cpp
source/src/vm/rx78/rx78.cpp
source/src/vm/sc3000/sc3000.cpp
source/src/vm/scv/scv.cpp
source/src/vm/smb80te/smb80te.cpp
source/src/vm/smc777/smc777.cpp
source/src/vm/tk80bs/tk80bs.cpp
source/src/vm/vm_template.h
source/src/vm/x07/x07.cpp
source/src/vm/x1/x1.cpp
source/src/vm/yalky/yalky.cpp
source/src/vm/yis/yis.cpp
source/src/vm/ys6464a/ys6464a.cpp
source/src/vm/z80tvgame/z80tvgame.cpp

index 04f7998..7e3ec05 100644 (file)
@@ -58,19 +58,16 @@ endif()
 if(FLAG_USE_Z80)
   set(VMFILES ${VMFILES} ${Z80_CPPS})
 endif()
 if(FLAG_USE_Z80)
   set(VMFILES ${VMFILES} ${Z80_CPPS})
 endif()
-if(USE_DEVICES_SHARED_LIB)
-  set(VMFILES ${VMFILES}   libcpu_newdev/device.cpp)
-endif()
 
 if(DEFINED QT5_ROOT_PATH)
   SET(CMAKE_FIND_ROOT_PATH  ${QT5_ROOT_PATH} ${CMAKE_FIND_ROOT_PATH})
 endif()
 
 
 if(DEFINED QT5_ROOT_PATH)
   SET(CMAKE_FIND_ROOT_PATH  ${QT5_ROOT_PATH} ${CMAKE_FIND_ROOT_PATH})
 endif()
 
-# Use cmake if enabled.
-  find_program(USE_CCACHE ccache)
-  if(USE_CCACHE)
+# Use ccache if enabled.
+find_program(USE_CCACHE ccache)
+if(USE_CCACHE)
    SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
    SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
- #  SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+#  SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
   endif()
 if(WIN32)
   FIND_PACKAGE(Qt5Core REQUIRED)
   endif()
 if(WIN32)
   FIND_PACKAGE(Qt5Core REQUIRED)
@@ -88,6 +85,7 @@ if(USE_SOCKET)
   FIND_PACKAGE(Qt5Network REQUIRED)
   include_directories(${Qt5Network_INCLUDE_DIRS})
 endif()
   FIND_PACKAGE(Qt5Network REQUIRED)
   include_directories(${Qt5Network_INCLUDE_DIRS})
 endif()
+
 SET(USE_QT_5 ON)
 set(USE_QT5_4_APIS OFF CACHE BOOL "Build with Qt5.4 (or later) APIs if you can.")
 set(USE_GCC_OLD_ABI ON CACHE BOOL "Build with older GCC ABIs if you can.")
 SET(USE_QT_5 ON)
 set(USE_QT5_4_APIS OFF CACHE BOOL "Build with Qt5.4 (or later) APIs if you can.")
 set(USE_GCC_OLD_ABI ON CACHE BOOL "Build with older GCC ABIs if you can.")
@@ -95,6 +93,7 @@ set(USE_SDL2 ON CACHE BOOL "Build with libSDL2. DIsable is building with libSDL1
 set(USE_MOVIE_SAVER OFF CACHE BOOL "Save screen/audio as MP4 MOVIE. Needs libav .")
 set(USE_MOVIE_LOADER OFF CACHE BOOL "Load movie from screen for some VMs. Needs libav .")
 set(USE_LTO ON CACHE BOOL "Use link-time-optimization to build.")
 set(USE_MOVIE_SAVER OFF CACHE BOOL "Save screen/audio as MP4 MOVIE. Needs libav .")
 set(USE_MOVIE_LOADER OFF CACHE BOOL "Load movie from screen for some VMs. Needs libav .")
 set(USE_LTO ON CACHE BOOL "Use link-time-optimization to build.")
+
 if(USE_LTO)
   # set_property(DIRECTORY PROPERTY INTERPROCEDURAL_OPTIMIZATION true)
 else()
 if(USE_LTO)
   # set_property(DIRECTORY PROPERTY INTERPROCEDURAL_OPTIMIZATION true)
 else()
@@ -115,7 +114,6 @@ else()
   add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
 endif()
 
   add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
 endif()
 
-
 SET(CMAKE_AUTOMOC OFF)
 SET(CMAKE_AUTORCC ON)
 SET(CMAKE_INCLUDE_CURRENT_DIR ON)
 SET(CMAKE_AUTOMOC OFF)
 SET(CMAKE_AUTORCC ON)
 SET(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -146,12 +144,15 @@ if(GIT_FOUND)
        string(FIND ${__tstr} "fatal" __notfound)
        string(REPLACE "\n" "" __tstr2 ${__tstr})
        if(${__notfound} EQUAL -1)
        string(FIND ${__tstr} "fatal" __notfound)
        string(REPLACE "\n" "" __tstr2 ${__tstr})
        if(${__notfound} EQUAL -1)
-                  add_definitions(-D__GIT_REPO_VERSION=${__tstr2})
+                  add_definitions(-D__GIT_REPO_VERSION=\"${__tstr2}\")
        else()
                   add_definitions(-U__GIT_REPO_VERSION)
        endif()
 endif()
 
        else()
                   add_definitions(-U__GIT_REPO_VERSION)
        endif()
 endif()
 
+string(TIMESTAMP __build_date "%b %d,%Y %H:%M:%S UTC" UTC)
+add_definitions(-D__BUILD_DATE=\"${__build_date}\")
+
 include(FindLibAV)
     if(LIBAV_FOUND)
       add_definitions(-DUSE_LIBAV)
 include(FindLibAV)
     if(LIBAV_FOUND)
       add_definitions(-DUSE_LIBAV)
index 15f5c9c..3454264 100644 (file)
@@ -109,6 +109,9 @@ if(GIT_FOUND)
        endif()
 endif()
 
        endif()
 endif()
 
+string(TIMESTAMP __build_date "%b %d,%Y %H:%M:%S UTC" UTC)
+add_definitions(-D__BUILD_DATE=\"${__build_date}\")
+
 include(FindLibAV)
 if(LIBAV_FOUND)
       add_definitions(-DUSE_LIBAV)
 include(FindLibAV)
 if(LIBAV_FOUND)
       add_definitions(-DUSE_LIBAV)
index 130a4f7..8149a80 100644 (file)
@@ -2015,3 +2015,12 @@ bool DLL_PREFIX load_wav_to_monoral(void *__fio, int16_t **buffer, uint32_t *rat
        *got_samples = (int)samples;
        return true;
 }
        *got_samples = (int)samples;
        return true;
 }
+
+DLL_PREFIX const _TCHAR *get_lib_common_version()
+{
+#if defined(__LIBEMU_UTIL_VERSION)
+       return (const _TCHAR *)__LIBEMU_UTIL_VERSION;
+#else
+       return (const _TCHAR *)"\0";
+#endif
+}
index aea7f0a..ba7bb9e 100644 (file)
@@ -1169,6 +1169,7 @@ typedef DLL_PREFIX struct cur_time_s {
 } cur_time_t;
 
 void DLL_PREFIX get_host_time(cur_time_t* cur_time);
 } cur_time_t;
 
 void DLL_PREFIX get_host_time(cur_time_t* cur_time);
+const _TCHAR DLL_PREFIX *get_lib_common_version();
 
 // symbol
 typedef struct symbol_s {
 
 // symbol
 typedef struct symbol_s {
index 87d71ee..7e40a56 100644 (file)
@@ -1,5 +1,5 @@
 message("* qt/osd")
 message("* qt/osd")
-SET(THIS_LIB_VERSION 2.13.1)
+SET(THIS_LIB_VERSION 2.13.2)
 
 set(s_qt_osd_headers
        osd_base.h
 
 set(s_qt_osd_headers
        osd_base.h
@@ -25,7 +25,8 @@ SET(s_qt_osd_srcs
          ${s_qt_osd_headers_MOC}
 
 )
          ${s_qt_osd_headers_MOC}
 
 )
-add_definitions(-D_LIBOSD_VERSION=${THIS_LIB_VERSION})
+add_definitions(-D__LIBOSD_VERSION=\"libCSPosd.${THIS_LIB_VERSION}\")
+
 if(WIN32)
 #add_library(qt_osd
 #    ${s_qt_osd_srcs}
 if(WIN32)
 #add_library(qt_osd
 #    ${s_qt_osd_srcs}
index aafc68e..76291e5 100644 (file)
@@ -1,6 +1,6 @@
 message("* qt/avio")
 
 message("* qt/avio")
 
-SET(THIS_LIB_VERSION 2.9.1)
+SET(THIS_LIB_VERSION 2.9.2)
 set(s_qt_avio_headers
          movie_saver.h
          movie_loader.h
 set(s_qt_avio_headers
          movie_saver.h
          movie_loader.h
@@ -15,6 +15,7 @@ set(s_qt_avio_srcs
          movie_saver_fileio.cpp
          sound_loader.cpp
 )
          movie_saver_fileio.cpp
          sound_loader.cpp
 )
+add_definitions(-D__LIBAVIO_VERSION=\"libCSPavio.${THIS_LIB_VERSION}\")
 
 if(USE_QT_5)
   QT5_WRAP_CPP(s_qt_avio_headers_MOC ${s_qt_avio_headers})
 
 if(USE_QT_5)
   QT5_WRAP_CPP(s_qt_avio_headers_MOC ${s_qt_avio_headers})
index a607269..d50d8a7 100644 (file)
@@ -8,6 +8,7 @@
 #include <QDateTime>
 #include "movie_saver.h"
 #include "../osd.h"
 #include <QDateTime>
 #include "movie_saver.h"
 #include "../osd.h"
+#include "common.h"
 #include "csp_logger.h"
 
 MOVIE_SAVER::MOVIE_SAVER(int width, int height, int fps, OSD *osd, config_t *cfg) : QThread(0)
 #include "csp_logger.h"
 
 MOVIE_SAVER::MOVIE_SAVER(int width, int height, int fps, OSD *osd, config_t *cfg) : QThread(0)
@@ -67,6 +68,15 @@ MOVIE_SAVER::~MOVIE_SAVER()
        if(recording) do_close_main();
 }
 
        if(recording) do_close_main();
 }
 
+QString MOVIE_SAVER::get_avio_version()
+{
+#if defined(__LIBAVIO_VERSION)
+       return QString::fromUtf8(__LIBAVIO_VERSION);
+#else
+       return QString::fromUtf8("\0");
+#endif
+}
+
 QString MOVIE_SAVER::ts2str(int64_t ts)
 {
 #if defined(USE_LIBAV) 
 QString MOVIE_SAVER::ts2str(int64_t ts)
 {
 #if defined(USE_LIBAV) 
index 7eb9763..e43f180 100644 (file)
@@ -218,6 +218,7 @@ public:
        MOVIE_SAVER(int width, int height, int fps, OSD *osd, config_t *cfg);
        ~MOVIE_SAVER();
        bool is_recording(void);
        MOVIE_SAVER(int width, int height, int fps, OSD *osd, config_t *cfg);
        ~MOVIE_SAVER();
        bool is_recording(void);
+       QString get_avio_version();
 
 public slots:
        void run();
 
 public slots:
        void run();
index 9ff3b78..53aa098 100644 (file)
@@ -50,6 +50,8 @@ public:
        bool GetBubbleCasetteIsProtected(int drv);
        QString GetBubbleB77FileName(int drv);
        QString GetBubbleB77BubbleName(int drv, int num);
        bool GetBubbleCasetteIsProtected(int drv);
        QString GetBubbleB77FileName(int drv);
        QString GetBubbleB77BubbleName(int drv, int num);
+       QString get_system_version();
+       QString get_build_date();
 
 public slots:
 #if defined(USE_FLOPPY_DISK)
 
 public slots:
 #if defined(USE_FLOPPY_DISK)
index e7a58e4..d912e3d 100644 (file)
@@ -43,6 +43,7 @@
 #include "dialog_movie.h"
 #include "../avio/movie_saver.h"
 // emulation core
 #include "dialog_movie.h"
 #include "../avio/movie_saver.h"
 // emulation core
+#include "../../vm/fmgen/fmgen.h"
 
 EMU* emu;
 QApplication *GuiMain = NULL;
 
 EMU* emu;
 QApplication *GuiMain = NULL;
@@ -1555,3 +1556,85 @@ void Ui_MainWindow::OnCloseDebugger(void )
 }
 #endif
 
 }
 #endif
 
+QString Ui_MainWindow::get_system_version()
+{
+       QString guiver = get_gui_version();
+       QString aviover;
+       QString vm_gitver;
+       QString common_vmver;
+       QString osdver;
+       QString libcommon_ver;
+       QString libfmgen_ver;
+       QString build_date;
+       
+       QString outstr;
+       
+       aviover.clear();
+       common_vmver.clear();
+       vm_gitver.clear();
+       osdver.clear();
+       libcommon_ver.clear();
+       
+       if(hSaveMovieThread != NULL) {
+               aviover = hSaveMovieThread->get_avio_version();
+       }
+       if(emu != NULL) {
+               if(emu->get_osd() != NULL) {
+                       _TCHAR *cvp = emu->get_osd()->get_lib_common_vm_version();
+                       _TCHAR *gvp = emu->get_osd()->get_lib_common_vm_git_version();
+                       _TCHAR *ovp = emu->get_osd()->get_lib_osd_version();
+                       if(cvp != NULL) {
+                               common_vmver = QString::fromUtf8(cvp);
+                       }
+                       if(gvp != NULL) {
+                               vm_gitver = QString::fromUtf8(gvp);
+                       }
+                       if(ovp != NULL) {
+                               osdver = QString::fromUtf8(ovp);
+                       }
+               }
+       }
+       
+       const _TCHAR *pp = get_lib_common_version();
+       if(pp != NULL) {
+               libcommon_ver = QString::fromUtf8(pp);
+       }
+       libfmgen_ver = QString::fromUtf8(FM::get_libfmgen_version());
+       
+       outstr.clear();
+       if(!(common_vmver.isEmpty())) {
+               outstr.append(common_vmver);
+               outstr.append("<BR>\n");
+       }
+       if(!(libcommon_ver.isEmpty())) {
+               outstr.append(libcommon_ver);
+               outstr.append("<BR>\n");
+       }
+       if(!(libfmgen_ver.isEmpty())) {
+               outstr.append(libfmgen_ver);
+               outstr.append("<BR>\n");
+       }
+       if(!(guiver.isEmpty())) {
+               outstr.append(guiver);
+               outstr.append("<BR>\n");
+       }
+       if(!(aviover.isEmpty())) {
+               outstr.append(aviover);
+               outstr.append("<BR>\n");
+       }
+       if(!(vm_gitver.isEmpty())) {
+               outstr.append("Build Version: ");
+               outstr.append(vm_gitver);
+               outstr.append("<BR>\n");
+       }
+       return outstr;
+}
+
+QString Ui_MainWindow::get_build_date()
+{
+#if defined(__BUILD_DATE)
+       return QString::fromUtf8(__BUILD_DATE);
+#else
+       return QString::fromUtf8("");
+#endif
+}
index 7d6bbf6..4e4bb16 100644 (file)
@@ -15,7 +15,9 @@ set(s_qt_emuutils_srcs
 
 QT5_WRAP_CPP(s_qt_emuutils_headers_MOC ${s_qt_emuutils_headers})
        
 
 QT5_WRAP_CPP(s_qt_emuutils_headers_MOC ${s_qt_emuutils_headers})
        
-SET(THIS_LIB_VERSION 2.12.1) 
+SET(THIS_LIB_VERSION 2.12.2) 
+
+add_definitions(-D__LIBEMU_UTIL_VERSION=\"libCSPemu_utils.${THIS_LIB_VERSION}\")
 
 if(WIN32)
 include (GenerateExportHeader)
 
 if(WIN32)
 include (GenerateExportHeader)
index 5204aba..8784b6b 100644 (file)
@@ -1,6 +1,6 @@
 message("* qt/gui")
 
 message("* qt/gui")
 
-set(THIS_LIB_VERSION 2.15.2)
+set(THIS_LIB_VERSION 2.15.3)
 #include(cotire)
 #include(PrecompiledHeader)
 
 #include(cotire)
 #include(PrecompiledHeader)
 
@@ -119,6 +119,8 @@ set(s_qt_gui_srcs
          ../common/util_bubble2.cpp
 #        qt_main.cpp
 )
          ../common/util_bubble2.cpp
 #        qt_main.cpp
 )
+add_definitions(-D__GUI_LIBRARY_NAME=\"libCSPgui.${THIS_LIB_VERSION}\")
+
 if(USE_QT_5)
   QT5_WRAP_CPP(s_qt_gui_headers_MOC ${s_qt_gui_headers})
 #    QT5_ADD_RESOURCES(s_qt_gui_RCC ${RESOURCE}
 if(USE_QT_5)
   QT5_WRAP_CPP(s_qt_gui_headers_MOC ${s_qt_gui_headers})
 #    QT5_ADD_RESOURCES(s_qt_gui_RCC ${RESOURCE}
index 3a124a0..769ac3d 100644 (file)
 
 #include "display_about.h"
 #include "menu_flags.h"
 
 #include "display_about.h"
 #include "menu_flags.h"
+#include "mainwidget_base.h"
 
 //extern USING_FLAGS *using_flags;
 
 
 //extern USING_FLAGS *using_flags;
 
-Dlg_AboutCSP::Dlg_AboutCSP(USING_FLAGS *p, QWidget *parent) : QWidget(parent)
+Dlg_AboutCSP::Dlg_AboutCSP(USING_FLAGS *p, QWidget *parent) : QWidget(NULL)
 {
        QByteArray tmps;
        QFile f_credits(":/credits.html");
 {
        QByteArray tmps;
        QFile f_credits(":/credits.html");
@@ -32,10 +33,30 @@ Dlg_AboutCSP::Dlg_AboutCSP(USING_FLAGS *p, QWidget *parent) : QWidget(parent)
        using_flags = p;
        // Credits
        credits.clear();
        using_flags = p;
        // Credits
        credits.clear();
+       printf("%x\n",parent_widget);
        if(f_credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
                tmps = f_credits.readAll();
                if(!tmps.isEmpty()) {
        if(f_credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
                tmps = f_credits.readAll();
                if(!tmps.isEmpty()) {
-                       credits = tmps;
+                       QString ss;
+                       QString bs;
+                       ss.clear();
+                       QString ns = QString::fromUtf8(tmps);
+                       if(parent != NULL) {
+                               ss = static_cast<Ui_MainWindowBase *>(parent)->get_system_version();
+                               bs = static_cast<Ui_MainWindowBase *>(parent)->get_build_date();
+                       }
+                       QString reps = QString::fromUtf8("@@RevisionString@@");
+                       int ni = ns.indexOf(reps);
+                       if(ni >= 0) {
+                               ns.replace(ni, reps.length(), ss);
+                       }
+                       reps = QString::fromUtf8("@@BuildDateAt@@");
+                       ni = ns.indexOf(reps);
+                       if(ni >= 0) {
+                               ns.replace(ni, reps.length(), bs);
+                       }
+                       
+                       credits = ns;
                }
                f_credits.close();
        }
                }
                f_credits.close();
        }
@@ -102,3 +123,4 @@ Dlg_AboutCSP::~Dlg_AboutCSP()
 {
 
 }      
 {
 
 }      
+
index bf713a0..a8bc1fc 100644 (file)
@@ -19,6 +19,7 @@
 QT_BEGIN_NAMESPACE
 class USING_FLAGS;
 class EMU;
 QT_BEGIN_NAMESPACE
 class USING_FLAGS;
 class EMU;
+class Ui_MainWindowBase;
 class DLL_PREFIX Dlg_AboutCSP : public QWidget
 {
        Q_OBJECT
 class DLL_PREFIX Dlg_AboutCSP : public QWidget
 {
        Q_OBJECT
index 11d4734..6278335 100644 (file)
@@ -93,7 +93,7 @@ QT_BEGIN_NAMESPACE
                connect(__action[_i], __signal2, this, __slot2);                                \
        }                                                                                                                                       \
 
                connect(__action[_i], __signal2, this, __slot2);                                \
        }                                                                                                                                       \
 
-
+class OSD;
 class QVariant;
 class QAction;
 class QActionGroup;
 class QVariant;
 class QAction;
 class QActionGroup;
@@ -524,6 +524,11 @@ public:
        bool get_direct_load_mzt(int drive);
        virtual bool GetPowerState(void);
        void set_logger(CSP_Logger *logger) { csp_logger = logger; }
        bool get_direct_load_mzt(int drive);
        virtual bool GetPowerState(void);
        void set_logger(CSP_Logger *logger) { csp_logger = logger; }
+
+       virtual QString get_system_version();
+       virtual QString get_build_date();
+       QString get_gui_version();
+
        // Basic slots
 public slots:
        void delete_emu_thread(void);
        // Basic slots
 public slots:
        void delete_emu_thread(void);
index 25353ec..2ffe57f 100644 (file)
@@ -47,6 +47,7 @@
 #include "qt_main.h"
 #include "menu_flags.h"
 #include "csp_logger.h"
 #include "qt_main.h"
 #include "menu_flags.h"
 #include "csp_logger.h"
+#include "common.h"
 
 extern EMU *emu;
 //extern USING_FLAGS *using_flags;
 
 extern EMU *emu;
 //extern USING_FLAGS *using_flags;
@@ -84,6 +85,16 @@ Ui_MainWindowBase::~Ui_MainWindowBase()
        delete using_flags;
 }
 
        delete using_flags;
 }
 
+QString Ui_MainWindowBase::get_gui_version()
+{
+       QString retval;
+       retval.clear();
+#if defined(__GUI_LIBRARY_NAME)
+       retval = QString::fromUtf8(__GUI_LIBRARY_NAME);
+#endif
+       return retval;
+}
+
 void Action_Control::do_check_grab_mouse(bool flag)
 {
        this->toggle();
 void Action_Control::do_check_grab_mouse(bool flag)
 {
        this->toggle();
@@ -143,7 +154,7 @@ void Ui_MainWindowBase::do_set_window_focus_type(bool flag)
 
 void Ui_MainWindowBase::do_show_about(void)
 {
 
 void Ui_MainWindowBase::do_show_about(void)
 {
-       Dlg_AboutCSP *dlg = new Dlg_AboutCSP(using_flags);
+       Dlg_AboutCSP *dlg = new Dlg_AboutCSP(using_flags, static_cast<QWidget *>(this));
        dlg->show();
 }
 
        dlg->show();
 }
 
@@ -1185,6 +1196,17 @@ void Ui_MainWindowBase::rise_joystick_dialog(void)
        }
 }
 
        }
 }
 
+QString Ui_MainWindowBase::get_system_version()
+{
+       return QString::fromUtf8("Dummy");
+}
+
+QString Ui_MainWindowBase::get_build_date()
+{
+       return QString::fromUtf8("Dummy");
+}
+
+
 void Ui_MainWindowBase::rise_movie_dialog(void)
 {
 
 void Ui_MainWindowBase::rise_movie_dialog(void)
 {
 
index 3e336ca..a7492fe 100644 (file)
@@ -110,7 +110,10 @@ public:
 
        // Misc
        void reset_vm_node(void);
 
        // Misc
        void reset_vm_node(void);
-
+       const _TCHAR *get_lib_common_vm_version();
+       const _TCHAR *get_lib_common_vm_git_version();
+       const _TCHAR *get_lib_osd_version();
+       
        // Socket
        void initialize_socket();
        void release_socket();
        // Socket
        void initialize_socket();
        void release_socket();
index 94bcc7b..40b4491 100644 (file)
@@ -444,6 +444,10 @@ public:
        virtual QString get_vm_config_name(void);
        virtual double vm_frame_rate(void);
        virtual void reset_vm_node(void);
        virtual QString get_vm_config_name(void);
        virtual double vm_frame_rate(void);
        virtual void reset_vm_node(void);
+       virtual const _TCHAR *get_lib_common_vm_version() { return (const _TCHAR *)"\0"; }
+       virtual const _TCHAR *get_lib_common_vm_git_version() { return (const _TCHAR *)"\0"; }
+       virtual const _TCHAR *get_lib_osd_version() { return (const _TCHAR *)"\0"; }
+       
        virtual void set_device_name(int id, char *name);
        
        virtual void set_vm_node(int id, const _TCHAR *name);
        virtual void set_device_name(int id, char *name);
        
        virtual void set_vm_node(int id, const _TCHAR *name);
index 22acbed..f40eaa0 100644 (file)
@@ -36,6 +36,7 @@
 #include "osd.h"
 #include "../vm/vm.h"
 #include "../vm/device.h"
 #include "osd.h"
 #include "../vm/vm.h"
 #include "../vm/device.h"
+#include "../common.h"
 
 #include "emu.h"
 
 
 #include "emu.h"
 
 #include "qt_gldraw.h"
 #include "csp_logger.h"
 
 #include "qt_gldraw.h"
 #include "csp_logger.h"
 
+const _TCHAR *OSD::get_lib_common_vm_version()
+{
+       if(vm->first_device != NULL) {
+               return vm->first_device->get_lib_common_vm_version();
+       } else {
+               return (const _TCHAR *)"\0";
+       }
+}
+
+const _TCHAR *OSD::get_lib_common_vm_git_version()
+{
+       return vm->get_vm_git_version();
+}
+
+const _TCHAR *OSD::get_lib_osd_version()
+{
+       const _TCHAR *p = (const _TCHAR *)"\0";
+#if defined(__LIBOSD_VERSION)
+       p = (const _TCHAR *)__LIBOSD_VERSION;
+#endif
+       return p;         
+}
+
+
 void OSD::vm_draw_screen(void)
 {
        vm->draw_screen();
 void OSD::vm_draw_screen(void)
 {
        vm->draw_screen();
index 6c1f0a2..63e118e 100644 (file)
 <DIV ALIGN=RIGHT><FONT SIZE=2>
 Upstream Version: 2018-05-24<BR>
 Qt Port and FM7 series 2018-07-13<BR>
 <DIV ALIGN=RIGHT><FONT SIZE=2>
 Upstream Version: 2018-05-24<BR>
 Qt Port and FM7 series 2018-07-13<BR>
-libCSPavio 2.8.2<BR>
-libCSPgui 2.13.3<BR>
-libCSPosd 2.12.3<BR>
-libCSPemu_utils 2.11.8<BR>
-libCSPcommon_vm 1.4.6<BR>
-libCSPfmgen 1.2.3<BR>
 FFMPEG 4.0 + liblame 3.99 + libx264-155<BR>
 FFMPEG 4.0 + liblame 3.99 + libx264-155<BR>
-Build Version: 9275209c6bed03ccd06716a486e29451c446751d<BR>
+@@RevisionString@@
 </FONT></DIV>
 <BR>
 <DIV ALIGN=RIGHT><FONT SIZE=3>
 </FONT></DIV>
 <BR>
 <DIV ALIGN=RIGHT><FONT SIZE=3>
@@ -76,5 +70,5 @@ See also:<BR>
 </FONT>
 <hr>
 <address></address>
 </FONT>
 <hr>
 <address></address>
-<!-- hhmts start -->Last modified: Fri 13 July, 2018 13:09:15<!-- hhmts end -->
+<!-- hhmts start -->Last modified: @@BuildDateAt@@<!-- hhmts end -->
 </body> </html>
 </body> </html>
index ff57688..19d2b0f 100644 (file)
@@ -96,6 +96,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0x20, 0x23, pio2);
        
        // initialize all devices
        io->set_iomap_range_rw(0x20, 0x23, pio2);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 42f5b61..726c063 100644 (file)
@@ -68,6 +68,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 8498521..8ffdd0f 100644 (file)
@@ -130,6 +130,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0x4000, 0xffff, display);
        
        // initialize all devices
        io->set_iomap_range_rw(0x4000, 0xffff, display);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 647ded0..0488e98 100644 (file)
@@ -66,6 +66,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_w(0xff, 0xff, psg);
        
        // initialize all devices
        io->set_iomap_range_w(0xff, 0xff, psg);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index de2d4ec..d383d4b 100644 (file)
@@ -1,6 +1,6 @@
 message("* vm/common_vm")
 
 message("* vm/common_vm")
 
-SET(THIS_LIB_VERSION 1.6.0)
+SET(THIS_LIB_VERSION 2.0.0)
 
 #include(cotire)
 set(s_vm_common_vm_srcs
 
 #include(cotire)
 set(s_vm_common_vm_srcs
@@ -115,13 +115,15 @@ set(s_vm_common_vm_srcs
        ../fm7/hd6844.cpp
        ../fm7/mb61vh010.cpp
 #      ../fm7/dummydevice.cpp
        ../fm7/hd6844.cpp
        ../fm7/mb61vh010.cpp
 #      ../fm7/dummydevice.cpp
+
+       ../libcpu_newdev/device.cpp
 )
 
 #set_directory_properties(PROPERTIES
 #  COTIRE_PREFIX_HEADER_IGNORE_PATH ${SRC_BASE_DIR}/vm/mame
 #)
 
 )
 
 #set_directory_properties(PROPERTIES
 #  COTIRE_PREFIX_HEADER_IGNORE_PATH ${SRC_BASE_DIR}/vm/mame
 #)
 
-add_definitions(-D_LIBRARY_NAME=libCSPcommon_vm.${THIS_LIB_VERSION})
+add_definitions(-D__LIBRARY_NAME=\"libCSPcommon_vm.${THIS_LIB_VERSION}\")
 
 if(WIN32)
 include (GenerateExportHeader)
 
 if(WIN32)
 include (GenerateExportHeader)
index 87502e1..a3b4deb 100644 (file)
@@ -87,6 +87,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xf8, 0xfb, pio);
        
        // initialize all devices
        io->set_iomap_range_rw(0xf8, 0xfb, pio);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 23e509c..ad7e7e8 100644 (file)
@@ -83,6 +83,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 1b1ea10..08be4c0 100644 (file)
@@ -188,6 +188,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 
        
        // initialize all devices
 
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index d4b770f..b51963f 100644 (file)
@@ -235,6 +235,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 */
        
        // initialize all devices
 */
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 6f0ff04..76792f5 100644 (file)
@@ -657,6 +657,10 @@ void VM::connect_bus(void)
        }
 # endif
 #endif
        }
 # endif
 #endif
+
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 3bb5b0d..4b71399 100644 (file)
@@ -1,7 +1,8 @@
 cmake_minimum_required (VERSION 2.6)
 
 message("* vm/fmgen")
 cmake_minimum_required (VERSION 2.6)
 
 message("* vm/fmgen")
-SET(THIS_LIB_VERSION 1.2.3)
+SET(THIS_LIB_VERSION 1.3.0)
+add_definitions(-D__LIBFMGEN_VERSION=\"libCSPfmgen.${THIS_LIB_VERSION}\")
 
 SET(s_vm_fmgen_srcs
        fmgen.cpp
 
 SET(s_vm_fmgen_srcs
        fmgen.cpp
index 91ac25d..a28f73b 100644 (file)
@@ -176,6 +176,15 @@ namespace FM
        uint    volatile  amtable[2][4][FM_LFOENTS];
 
        static bool tablemade = false;
        uint    volatile  amtable[2][4][FM_LFOENTS];
 
        static bool tablemade = false;
+
+       const char *get_libfmgen_version(void)
+       {
+#if defined(__LIBFMGEN_VERSION)
+               return (const char *)__LIBFMGEN_VERSION;
+#else
+               return (const char *)"\0";
+#endif
+       }
 }
 
 namespace FM
 }
 
 namespace FM
index bbfa9f8..b3f191a 100644 (file)
@@ -293,6 +293,7 @@ namespace FM
                OpType  optype_;
                uint32  multable_[4][16];
        };
                OpType  optype_;
                uint32  multable_[4][16];
        };
+       const char *get_libfmgen_version(void);
 }
 
 #endif // FM_GEN_H
 }
 
 #endif // FM_GEN_H
index a156572..f3e194f 100644 (file)
@@ -4,8 +4,8 @@
 // ---------------------------------------------------------------------------
 //     $Id: misc.h,v 1.5 2002/05/31 09:45:20 cisc Exp $
 
 // ---------------------------------------------------------------------------
 //     $Id: misc.h,v 1.5 2002/05/31 09:45:20 cisc Exp $
 
-#ifndef MISC_H
-#define MISC_H
+#ifndef __FMGEN_MISC_H
+#define __FMGEN_MISC_H
 
 inline int Max(int x, int y) { return (x > y) ? x : y; }
 inline int Min(int x, int y) { return (x < y) ? x : y; }
 
 inline int Max(int x, int y) { return (x > y) ? x : y; }
 inline int Min(int x, int y) { return (x < y) ? x : y; }
index cb44959..636040f 100644 (file)
@@ -197,6 +197,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_rw(0xff00, system);
        
        // initialize all devices
        io->set_iomap_single_rw(0xff00, system);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index e0025df..c96d49d 100644 (file)
@@ -315,6 +315,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_rw(0xfda0, memory);        // crtc
        
        // initialize all devices
        io->set_iomap_single_rw(0xfda0, memory);        // crtc
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 0133c9d..c28d888 100644 (file)
@@ -348,6 +348,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_rw(0xfda0, memory);        // crtc
        
        // initialize all devices
        io->set_iomap_single_rw(0xfda0, memory);        // crtc
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 1476cff..2dc22ca 100644 (file)
@@ -130,6 +130,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 461c80e..7c62c22 100644 (file)
@@ -85,6 +85,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        memory->set_wait_rw(0x0000, 0xffff, 1);
        
        // initialize all devices
        memory->set_wait_rw(0x0000, 0xffff, 1);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index fe2d90f..d515096 100644 (file)
@@ -115,6 +115,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xe8, 0xe9, sio);        // SG  SERIAL
        
        // initialize all devices
        io->set_iomap_range_rw(0xe8, 0xe9, sio);        // SG  SERIAL
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 0404feb..b6edbaa 100644 (file)
@@ -120,6 +120,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xf0, 0xf2, fm);         // MS  FM
        
        // initialize all devices
        io->set_iomap_range_rw(0xf0, 0xf2, fm);         // MS  FM
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 5eaa10f..14daf69 100644 (file)
@@ -144,6 +144,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        sio_tf20->set_rx_clock(1, 4915200 / 8);
        
        // initialize all devices
        sio_tf20->set_rx_clock(1, 4915200 / 8);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 51333f9..ba28276 100644 (file)
@@ -73,6 +73,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index df20034..42a5810 100644 (file)
@@ -64,6 +64,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index db71176..bd0978b 100644 (file)
@@ -249,11 +249,10 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
                io->set_flipflop_single_rw(i, iovalues[i & 0x1f]);
        }
 #endif
                io->set_flipflop_single_rw(i, iovalues[i & 0x1f]);
        }
 #endif
-
-
-
-
        // initialize all devices
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index b9119bf..ad9ba23 100644 (file)
@@ -82,6 +82,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index c9b2328..35a2b1f 100644 (file)
@@ -85,6 +85,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        memory->set_memory_mapped_io_rw(0x0d00, 0x0fff, io);
        
        // initialize all devices
        memory->set_memory_mapped_io_rw(0x0d00, 0x0fff, io);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index cafbf4a..08b599a 100644 (file)
@@ -172,6 +172,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0x3d8, 0x3df, display);
        
        // initialize all devices
        io->set_iomap_range_rw(0x3d8, 0x3df, display);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 04c1dff..3a5ed95 100644 (file)
@@ -412,3 +412,11 @@ int DEVICE::debug_dasm(uint32_t pc, _TCHAR *buffer, size_t buffer_len)
        return 0;
 }
 
        return 0;
 }
 
+const _TCHAR *DEVICE::get_lib_common_vm_version(void)
+{
+#if defined(__LIBRARY_NAME)
+       return (const _TCHAR *)__LIBRARY_NAME;
+#else
+       return (const _TCHAR *)"\0";
+#endif 
+}
index 114204f..a0c4e88 100644 (file)
@@ -63,14 +63,9 @@ protected:
        CSP_Logger *p_logger;
 public:
        DEVICE(VM_TEMPLATE* parent_vm, EMU* parent_emu);
        CSP_Logger *p_logger;
 public:
        DEVICE(VM_TEMPLATE* parent_vm, EMU* parent_emu);
-       //ToDo: Will implement real destructor per real classes and below destructor decl. with "virtual".
-       // This makes warning:
-       //"deleting object of polymorphic class type 'DEVICE' which has non-virtual
-       // destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]".
-       //~DEVICE(void);
-       virtual ~DEVICE() {}
-       
-       virtual void initialize() { /* osd = emu->get_osd(); */}
+       ~DEVICE() {}
+
+       virtual void initialize() { }
        virtual void release();
        
        virtual void update_config() {}
        virtual void release();
        
        virtual void update_config() {}
@@ -566,7 +561,7 @@ public:
        virtual void set_device_name(const _TCHAR *format, ...);
        virtual void out_debug_log(const char *fmt, ...);
        virtual void force_out_debug_log(const char *fmt, ...);
        virtual void set_device_name(const _TCHAR *format, ...);
        virtual void out_debug_log(const char *fmt, ...);
        virtual void force_out_debug_log(const char *fmt, ...);
-#if 1
+
        // debugger
        // DEBUGGER is enabled by default.
        virtual void *get_debugger();
        // debugger
        // DEBUGGER is enabled by default.
        virtual void *get_debugger();
@@ -587,9 +582,13 @@ public:
        virtual bool write_debug_reg(const _TCHAR *reg, uint32_t data);
        virtual void get_debug_regs_info(_TCHAR *buffer, size_t buffer_len);
        virtual int debug_dasm(uint32_t pc, _TCHAR *buffer, size_t buffer_len);
        virtual bool write_debug_reg(const _TCHAR *reg, uint32_t data);
        virtual void get_debug_regs_info(_TCHAR *buffer, size_t buffer_len);
        virtual int debug_dasm(uint32_t pc, _TCHAR *buffer, size_t buffer_len);
-#endif
+       
+       // misc
+       const _TCHAR *get_lib_common_vm_version(void);
+
        _TCHAR this_device_name[128];
        
        _TCHAR this_device_name[128];
        
+       // device node using with iterator.
        DEVICE* prev_device;
        DEVICE* next_device;
        int this_device_id;
        DEVICE* prev_device;
        DEVICE* next_device;
        int this_device_id;
index 999cac0..7518343 100644 (file)
@@ -105,6 +105,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index b22b6a3..e504736 100644 (file)
@@ -167,6 +167,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xfc, 0xff, memory);
        
        // initialize all devices
        io->set_iomap_range_rw(0xfc, 0xff, memory);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 08a36a7..e85bad8 100644 (file)
@@ -337,6 +337,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
 
        // initialize all devices
 #endif
 
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 40ea7ba..98ff6c7 100644 (file)
@@ -126,6 +126,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_w(0x78, memory);
        
        // initialize all devices
        io->set_iomap_single_w(0x78, memory);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 9278ad3..ab71f33 100644 (file)
@@ -146,6 +146,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0x0c, 0x0f, pio3);
        
        // initialize all devices
        io->set_iomap_range_rw(0x0c, 0x0f, pio3);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 24cbc3c..d7e86ea 100644 (file)
@@ -235,6 +235,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iowait_range_rw(0xe8, 0xeb, 1);
        
        // initialize all devices
        io->set_iowait_range_rw(0xe8, 0xeb, 1);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 90c520f..9157617 100644 (file)
@@ -252,6 +252,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iowait_range_rw(0xe8, 0xeb, 1);
 
        // initialize all devices
        io->set_iowait_range_rw(0xe8, 0xeb, 1);
 
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index ed715a4..7e10273 100644 (file)
@@ -213,6 +213,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_rw(0x274, memory);
        
        // initialize all devices
        io->set_iomap_single_rw(0x274, memory);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 793cf73..f196e45 100644 (file)
@@ -243,6 +243,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 1172067..4192aae 100644 (file)
@@ -231,6 +231,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_r(0x270, 0x27f, sysport);
        
        // initialize all devices
        io->set_iomap_range_r(0x270, 0x27f, sysport);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 4131d26..f4aa492 100644 (file)
@@ -384,6 +384,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
 
        // initialize all devices
 #endif
 
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 15f4db4..6fef144 100644 (file)
@@ -179,6 +179,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xfe, 0xff, printer);
        
        // initialize all devices
        io->set_iomap_range_rw(0xfe, 0xff, printer);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 5589bf6..bf8088c 100644 (file)
@@ -239,6 +239,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_r(0xbe, floppy);
        
        // initialize all devices
        io->set_iomap_single_r(0xbe, floppy);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 543db29..c253e4d 100644 (file)
@@ -183,6 +183,9 @@ pio2        20      8255    out cmt, sound
        io->set_iomap_single_rw(0xe6, floppy);
        
        // initialize all devices
        io->set_iomap_single_rw(0xe6, floppy);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index e364194..826a5bf 100644 (file)
@@ -171,6 +171,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_rw(0xe6, floppy);
        
        // initialize and reset all devices except the event manager
        io->set_iomap_single_rw(0xe6, floppy);
        
        // initialize and reset all devices except the event manager
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index ed4352f..bcd2c50 100644 (file)
@@ -151,6 +151,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_w(0x86, kanji);
        
        // initialize all devices
        io->set_iomap_single_w(0x86, kanji);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 551e340..4de712e 100644 (file)
@@ -98,6 +98,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 8edcddc..55b22aa 100644 (file)
@@ -271,6 +271,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xf0, 0xf2, memory);             // MEMORY MAP
        
        // initialize all devices
        io->set_iomap_range_rw(0xf0, 0xf2, memory);             // MEMORY MAP
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 3bffe9e..0cb410a 100644 (file)
@@ -100,6 +100,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xf0, 0xff, lcd);
        
        // initialize all devices
        io->set_iomap_range_rw(0xf0, 0xff, lcd);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index a8d761f..55e651c 100644 (file)
@@ -250,6 +250,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        pc88pit->set_constant_clock(2, 3993624);
 #endif
        // initialize all devices
        pc88pit->set_constant_clock(2, 3993624);
 #endif
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index f20ec16..f5739e6 100644 (file)
@@ -902,6 +902,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
 
        // initialize all devices
 #endif
 
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 33bae9b..3ccbead 100644 (file)
@@ -214,6 +214,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_w(0xc810, note);
        
        // initialize all devices
        io->set_iomap_single_w(0xc810, note);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 63e5398..c9d18eb 100644 (file)
@@ -82,6 +82,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        pce->set_context_scsi_cdrom(scsi_cdrom);
        
        // initialize all devices
        pce->set_context_scsi_cdrom(scsi_cdrom);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 9e2a490..3858efe 100644 (file)
@@ -71,6 +71,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 3f02768..538c8ea 100644 (file)
@@ -104,6 +104,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_alias_r(0xc1, psg, 1);    // PSG data
        
        // initialize all devices
        io->set_iomap_alias_r(0xc1, psg, 1);    // PSG data
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index bd73533..4ec45a7 100644 (file)
@@ -72,6 +72,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_w(0xfe, 0xff, vdp);
        
        // initialize all devices
        io->set_iomap_range_w(0xfe, 0xff, vdp);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index d695cdd..0639b8d 100644 (file)
@@ -88,6 +88,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_w(0xb0, prt);
        
        // initialize all devices
        io->set_iomap_single_w(0xb0, prt);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 24de4ba..37f2a06 100644 (file)
@@ -68,6 +68,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 3e3e72f..ead84e7 100644 (file)
@@ -168,6 +168,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xfc, 0xfd, mfont);
        
        // initialize all devices
        io->set_iomap_range_rw(0xfc, 0xfd, mfont);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index a119b7f..ade6aba 100644 (file)
@@ -85,6 +85,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_single_w(0xff, psg);
        
        // initialize all devices
        io->set_iomap_single_w(0xff, psg);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index fed1943..846847e 100644 (file)
@@ -106,6 +106,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xe8, 0xeb, sio);
        
        // initialize all devices
        io->set_iomap_range_rw(0xe8, 0xeb, sio);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index d1ead08..f734f5a 100644 (file)
@@ -61,6 +61,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index a1c1a6e..ae14bc2 100644 (file)
@@ -91,6 +91,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_rw(0xd8, 0xdb, memory);
        
        // initialize all devices
        io->set_iomap_range_rw(0xd8, 0xdb, memory);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 4d4f495..4ecfd19 100644 (file)
@@ -112,6 +112,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 4197383..18a98a1 100644 (file)
@@ -202,6 +202,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index d972729..87b067a 100644 (file)
@@ -13,11 +13,12 @@ protected:
        // devices
        EVENT* event;
        csp_state_utils *state_entry;
        // devices
        EVENT* event;
        csp_state_utils *state_entry;
-       
+       _TCHAR _git_revision[256];
 public:
        VM_TEMPLATE(EMU* parent_emu) : emu(parent_emu)
        {
                emu = parent_emu;
 public:
        VM_TEMPLATE(EMU* parent_emu) : emu(parent_emu)
        {
                emu = parent_emu;
+               memset(_git_revision, 0x00, sizeof(_git_revision));
        }
        ~VM_TEMPLATE() {}
        // drive virtual machine
        }
        ~VM_TEMPLATE() {}
        // drive virtual machine
@@ -140,9 +141,13 @@ public:
        virtual bool is_screen_changed() { return true; }
        virtual int max_draw_ranges() { return 0; }
        virtual DEVICE* get_device(int id) { return first_device; }
        virtual bool is_screen_changed() { return true; }
        virtual int max_draw_ranges() { return 0; }
        virtual DEVICE* get_device(int id) { return first_device; }
-       
+       //      misc
+       virtual const _TCHAR *get_vm_git_version(void) {
+               return (const _TCHAR *)_git_revision;
+       }
        DEVICE* dummy;
        DEVICE* first_device;
        DEVICE* last_device;
 };
        DEVICE* dummy;
        DEVICE* first_device;
        DEVICE* last_device;
 };
+
 #endif /* __CSP_VM_TEMPLATE_H */
 #endif /* __CSP_VM_TEMPLATE_H */
index 9d8877e..fcfb2e9 100644 (file)
@@ -72,6 +72,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index 561be15..cb5dc7c 100644 (file)
@@ -435,6 +435,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index f25d5a6..30e5849 100644 (file)
@@ -86,6 +86,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        memory->set_memory_rw(0x6000, 0x60ff, ram);     // 8156
        
        // initialize all devices
        memory->set_memory_rw(0x6000, 0x60ff, ram);     // 8156
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index ef79f1a..313257f 100644 (file)
@@ -116,6 +116,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 //     io->set_iomap_range_rw(0xf060, 0xf06f, keyboard);
        
        // initialize all devices
 //     io->set_iomap_range_rw(0xf060, 0xf06f, keyboard);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index a05a15d..e25ce9f 100644 (file)
@@ -83,6 +83,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
        io->set_iomap_range_r(0xf8, 0xfb, pio);
        
        // initialize all devices
        io->set_iomap_range_r(0xf8, 0xfb, pio);
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
index f07bb8c..8173a29 100644 (file)
@@ -75,6 +75,9 @@ VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 #endif
        
        // initialize all devices
 #endif
        
        // initialize all devices
+#if defined(__GIT_REPO_VERSION)
+       strncpy(_git_revision, __GIT_REPO_VERSION, sizeof(_git_revision) - 1);
+#endif
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->initialize();
        }