OSDN Git Service

[VM][JX][J3100] (Temporally?) stop to use I86:: using insetad of I286::.Fix FTBFS...
authorK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 21 Feb 2019 09:33:10 +0000 (18:33 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 21 Feb 2019 09:33:10 +0000 (18:33 +0900)
[VM][J3100][DEBUGGER][EMU] Some functions at debugger.cpp moved (and modified) to emu.cpp. This workaround needed by libCSPcommon .

source/build-cmake/j3100gt/CMakeLists.txt
source/build-cmake/j3100sl/CMakeLists.txt
source/build-cmake/jx/CMakeLists.txt
source/src/debugger.cpp
source/src/emu.cpp
source/src/emu.h

index e10783f..e301958 100644 (file)
@@ -71,7 +71,7 @@ elseif(BUILD_J3100SL)
 #               i86.cpp 
               rp5c01.cpp
               )
-set(FLAG_USE_I86 ON)
+set(FLAG_USE_I86 OFF)
 elseif(BUILD_J3100SS)
   set(EXEC_TARGET emuj3100ss)
   set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/j3100ss.qrc)
index 893ff03..b44d9bf 100644 (file)
@@ -72,7 +72,7 @@ elseif(BUILD_J3100SL)
 #               i86.cpp 
               rp5c01.cpp
               )
-set(FLAG_USE_I86 ON)
+set(FLAG_USE_I86 OFF)
 elseif(BUILD_J3100SS)
   set(EXEC_TARGET emuj3100ss)
   set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/j3100ss.qrc)
index 8496619..0f4b701 100644 (file)
@@ -22,7 +22,7 @@ set(WITH_JOYSTICK ON)
 set(WITH_MOUSE ON)
 
 set(VMFILES_BASE
-#      i86.cpp
+      i286.cpp
       io.cpp
       memory.cpp
       event.cpp
@@ -41,7 +41,7 @@ set(VMFILES_LIB
       upd765a.cpp
       sn76489an.cpp
 )
-set(FLAG_USE_I86 ON)
+set(FLAG_USE_I86 OFF)
 
 set(WITH_DEBUGGER ON CACHE BOOL "Build with debugger")
 include(detect_target_cpu)
index 413b226..312c2b1 100644 (file)
@@ -1466,30 +1466,10 @@ void EMU::close_debugger()
                now_debugging = false;
        }
 }
-
+// Some functions move to emu.cpp . 20190221 K.O.
 bool EMU::is_debugger_enabled(int cpu_index)
 {
        return (vm->get_cpu(cpu_index) != NULL && vm->get_cpu(cpu_index)->get_debugger() != NULL);
 }
-
-void EMU::start_waiting_in_debugger()
-{
-       now_waiting_in_debugger = true;
-       osd->mute_sound();
-       osd->start_waiting_in_debugger();
-}
-
-void EMU::finish_waiting_in_debugger()
-{
-       osd->finish_waiting_in_debugger();
-       now_waiting_in_debugger = false;
-}
-
-void EMU::process_waiting_in_debugger()
-{
-       osd->process_waiting_in_debugger();
-       osd->sleep(10);
-}
-
 #endif
 
index 5a48fff..87bd7ea 100644 (file)
@@ -147,6 +147,8 @@ EMU::~EMU()
 #endif
 }
 
+
+
 #ifdef OSD_QT
 EmuThreadClass *EMU::get_parent_handler()
 {
@@ -1831,6 +1833,38 @@ void EMU::recv_socket_data(int ch)
 }
 #endif
 
+// ---------------------------------------------------------------------------
+// debugger (some functions needed by libCSPcommon_vm 20190221 K.O)
+// ---------------------------------------------------------------------------
+
+void EMU::start_waiting_in_debugger()
+{
+#ifdef USE_DEBUGGER
+       now_waiting_in_debugger = true;
+#endif
+       osd->mute_sound();
+#ifdef USE_DEBUGGER
+       osd->start_waiting_in_debugger();
+#endif
+}
+
+void EMU::finish_waiting_in_debugger()
+{
+#ifdef USE_DEBUGGER
+       osd->finish_waiting_in_debugger();
+       now_waiting_in_debugger = false;
+#endif
+}
+
+void EMU::process_waiting_in_debugger()
+{
+#ifdef USE_DEBUGGER
+       osd->process_waiting_in_debugger();
+#else
+       osd->sleep(10);
+#endif
+}
+
 // ----------------------------------------------------------------------------
 // debug log
 // ----------------------------------------------------------------------------
index 8340f9f..3fae94a 100644 (file)
@@ -380,9 +380,9 @@ public:
 #ifdef USE_DEBUGGER
        void open_debugger(int cpu_index);
        void close_debugger();
-       bool is_debugger_enabled(int cpu_index);
        bool now_debugging;
        debugger_thread_t debugger_thread_param;
+       bool is_debugger_enabled(int cpu_index);
 #if defined(OSD_QT)
        pthread_t debugger_thread_id;
        CSP_Debugger *hDebugger;