OSDN Git Service

[BUILD] Set SOVERSION and GIT hash automatically.
[csp-qt/common_source_project-fm7.git] / source / src / vm / yalky / yalky.cpp
index dcfb662..30e5849 100644 (file)
@@ -28,7 +28,7 @@
 // initialize
 // ----------------------------------------------------------------------------
 
-VM::VM(EMU* parent_emu) : emu(parent_emu)
+VM::VM(EMU* parent_emu) : VM_TEMPLATE(parent_emu)
 {
        config.sound_play_tape = false;
        config.wave_shaper[0] = false;
@@ -86,6 +86,9 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        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();
        }
@@ -285,13 +288,15 @@ void VM::update_config()
 #define STATE_VERSION  4
 
 #include "../../statesub.h"
+#include "../../qt/gui/csp_logger.h"
+extern CSP_Logger DLL_PREFIX_I *csp_logger;
 
 void VM::decl_state(void)
 {
 
-       state_entry = new csp_state_utils(STATE_VERSION, 0, (_TCHAR *)(_T("CSP::YALKY_HEAD")));
-       DECL_STATE_ENTRY_1DARRAY(ram, sizeof(ram));
-       DECL_STATE_ENTRY_1DARRAY(vram, sizeof(vram));
+       state_entry = new csp_state_utils(STATE_VERSION, 0, (_TCHAR *)(_T("CSP::YALKY_HEAD")), csp_logger);
+       DECL_STATE_ENTRY_1D_ARRAY(ram, sizeof(ram));
+       DECL_STATE_ENTRY_1D_ARRAY(vram, sizeof(vram));
        for(DEVICE* device = first_device; device; device = device->next_device) {
                device->decl_state();
        }