OSDN Git Service

[VM][PC8801] Re-Fix slowdown (eat too many CPUs).
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 2 Mar 2016 12:29:31 +0000 (21:29 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 2 Mar 2016 12:29:31 +0000 (21:29 +0900)
source/src/vm/pc8801/pc8801.cpp
source/src/vm/pc8801/pc8801.h
source/src/vm/z80dma.cpp

index 63290a2..ef0a324 100644 (file)
@@ -94,6 +94,8 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        } else {
                pc88prn = dummy;
        }
+
+       dummycpu = new DEVICE(this, emu);
        pc88cpu = new Z80(this, emu);
 //     pc88cpu->set_context_event_manager(pc88event);
        
@@ -117,6 +119,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
 //     pc88pcm->set_context_event_manager(pc88event);
 #endif
        
+       pc88event->set_context_cpu(dummycpu, 3993624 / 4);
 #ifdef SUPPORT_PC88_HIGH_CLOCK
        pc88event->set_context_cpu(pc88cpu, (config.cpu_type != 0) ? 3993624 : 7987248);
 #else
index a6c6f28..85f3b8d 100644 (file)
@@ -178,6 +178,7 @@ protected:
 #ifdef SUPPORT_PC88_SB2
        YM2203* pc88sb2;
 #endif
+       DEVICE* dummycpu;
        Z80* pc88cpu;
        
        PC80S31K* pc88sub;
index 051afc3..60c48a5 100644 (file)
@@ -433,7 +433,7 @@ void Z80DMA::do_dma()
 
        // Workaround of MinGW's (older) GCC.
        // messages: crosses initialization of 'int wait_w' etc.
-       uint32 data = 0;
+       uint32_t data = 0;
        int wait_r = 0, wait_w = 0;
 #ifndef SINGLE_MODE_DMA
 restart: