[DEVICE][COMMON_VM] Add DEVICE:: to libCSPcommon_vm.
[BUILD] Update SOVERSION.
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()
-# 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_LINK ccache)
+# SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif()
if(WIN32)
FIND_PACKAGE(Qt5Core REQUIRED)
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_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()
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
endif()
-
SET(CMAKE_AUTOMOC OFF)
SET(CMAKE_AUTORCC ON)
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
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()
+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)
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)
*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
+}
} 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 {
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
${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}
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
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})
#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)
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)
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();
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)
#include "dialog_movie.h"
#include "../avio/movie_saver.h"
// emulation core
+#include "../../vm/fmgen/fmgen.h"
EMU* emu;
QApplication *GuiMain = NULL;
}
#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
+}
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)
message("* qt/gui")
-set(THIS_LIB_VERSION 2.15.2)
+set(THIS_LIB_VERSION 2.15.3)
#include(cotire)
#include(PrecompiledHeader)
../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}
#include "display_about.h"
#include "menu_flags.h"
+#include "mainwidget_base.h"
//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");
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()) {
- 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();
}
{
}
+
QT_BEGIN_NAMESPACE
class USING_FLAGS;
class EMU;
+class Ui_MainWindowBase;
class DLL_PREFIX Dlg_AboutCSP : public QWidget
{
Q_OBJECT
connect(__action[_i], __signal2, this, __slot2); \
} \
-
+class OSD;
class QVariant;
class QAction;
class QActionGroup;
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);
#include "qt_main.h"
#include "menu_flags.h"
#include "csp_logger.h"
+#include "common.h"
extern EMU *emu;
//extern USING_FLAGS *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 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();
}
}
}
+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)
{
// 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();
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);
#include "osd.h"
#include "../vm/vm.h"
#include "../vm/device.h"
+#include "../common.h"
#include "emu.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();
<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>
-Build Version: 9275209c6bed03ccd06716a486e29451c446751d<BR>
+@@RevisionString@@
</FONT></DIV>
<BR>
<DIV ALIGN=RIGHT><FONT SIZE=3>
</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>
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();
}
#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();
}
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();
}
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();
}
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
../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
#)
-add_definitions(-D_LIBRARY_NAME=libCSPcommon_vm.${THIS_LIB_VERSION})
+add_definitions(-D__LIBRARY_NAME=\"libCSPcommon_vm.${THIS_LIB_VERSION}\")
if(WIN32)
include (GenerateExportHeader)
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();
}
#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();
}
// 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();
}
*/
// 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();
}
}
# 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();
}
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
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
OpType optype_;
uint32 multable_[4][16];
};
+ const char *get_libfmgen_version(void);
}
#endif // FM_GEN_H
// ---------------------------------------------------------------------------
// $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; }
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();
}
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();
}
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();
}
#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();
}
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();
}
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();
}
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();
}
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();
}
#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();
}
#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();
}
io->set_flipflop_single_rw(i, iovalues[i & 0x1f]);
}
#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();
}
#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();
}
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();
}
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();
}
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
+}
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 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();
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];
+ // device node using with iterator.
DEVICE* prev_device;
DEVICE* next_device;
int this_device_id;
#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();
}
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();
}
#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();
}
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();
}
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();
}
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();
}
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();
}
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();
}
#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();
}
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();
}
#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();
}
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();
}
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();
}
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();
}
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();
}
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();
}
#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();
}
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();
}
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();
}
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();
}
#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();
}
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();
}
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();
}
#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();
}
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();
}
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();
}
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();
}
#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();
}
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();
}
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();
}
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();
}
#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();
}
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();
}
#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();
}
#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();
}
// devices
EVENT* event;
csp_state_utils *state_entry;
-
+ _TCHAR _git_revision[256];
public:
VM_TEMPLATE(EMU* parent_emu) : emu(parent_emu)
{
emu = parent_emu;
+ memset(_git_revision, 0x00, sizeof(_git_revision));
}
~VM_TEMPLATE() {}
// drive virtual machine
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;
};
+
#endif /* __CSP_VM_TEMPLATE_H */
#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();
}
#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();
}
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();
}
// 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();
}
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();
}
#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();
}