OSDN Git Service

[VM][J3100] Fix some FTBFS. I can't check works well.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 7 Jul 2015 08:28:11 +0000 (17:28 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 7 Jul 2015 08:28:11 +0000 (17:28 +0900)
source/src/vm/j3100/CMakeLists.txt [new file with mode: 0644]
source/src/vm/j3100/dmareg.cpp
source/src/vm/j3100/j3100.cpp
source/src/vm/j3100/j3100.h
source/src/vm/j3100/keyboard.cpp
source/src/vm/j3100/keyboard.h
source/src/vm/j3100/system.h
source/src/vm/vm.h

diff --git a/source/src/vm/j3100/CMakeLists.txt b/source/src/vm/j3100/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a05094d
--- /dev/null
@@ -0,0 +1,21 @@
+cmake_minimum_required (VERSION 2.6)
+
+message("* vm/j3100")
+
+set(VM_J3100_LIB_SRCS
+       display.cpp
+       dmareg.cpp
+       floppy.cpp
+       j3100.cpp
+       keyboard.cpp
+       memory.cpp
+       sasi.cpp
+       slkeyboard.cpp
+       slmemory.cpp
+       slsystem.cpp
+       system.cpp
+)
+
+add_library(vm_j3100
+       ${VM_J3100_LIB_SRCS}
+)
\ No newline at end of file
index 6291bad..349b1b6 100644 (file)
@@ -40,13 +40,13 @@ void DMAREG::write_io8(uint32 addr, uint32 data)
        case 0x89:
                d_dma2->write_signal(SIG_I8237_BANK2, data >> 1, 0x7f);
                break;
-       case 0x89:
+       case 0x8a:
                d_dma2->write_signal(SIG_I8237_BANK3, data >> 1, 0x7f);
                break;
-       case 0x89:
+       case 0x8b:
                d_dma2->write_signal(SIG_I8237_BANK1, data >> 1, 0x7f);
                break;
-       case 0x89:
+       case 0x8f:
                d_dma2->write_signal(SIG_I8237_BANK0, data >> 1, 0x7f);
                break;
 #endif
index 5ab7986..63c6e5a 100644 (file)
@@ -196,7 +196,11 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
                0x2e8, 0x42e8, 0x82e8, 0xc2e8,
 #endif
        };
+#ifdef _MSC_VER   
        for(int i = 0; i < _countof(ems_addr); i++) {
+#else
+       for(int i = 0; i < (sizeof(ems_addr) / sizeof(int)); i++) {
+#endif
                io->set_iomap_single_rw(ems_addr[i], memory);
 #ifdef TYPE_SL
                io->set_iomap_single_w(ems_addr[i] + 1, memory);
@@ -255,6 +259,12 @@ DEVICE* VM::get_device(int id)
        return NULL;
 }
 
+   
+void VM::register_frame_event(DEVICE* dev)
+{
+       this->event->register_frame_event(dev);
+}
+
 // ----------------------------------------------------------------------------
 // drive virtual machine
 // ----------------------------------------------------------------------------
index 65676c2..d75869f 100644 (file)
@@ -157,6 +157,7 @@ public:
        bool now_skip();
        
        void update_config();
+       void register_frame_event(DEVICE* dev);
        
        // ----------------------------------------
        // for each device
index 3b43d5b..1ee22f4 100644 (file)
@@ -37,6 +37,7 @@ void KEYBOARD::reset()
        kbic_cmd = kbsc_cmd = -1;
        cmd_param->clear();
        kbic_status = 0x12;
+       cmd_byte = 0x00;
 }
 
 void KEYBOARD::write_io8(uint32 addr, uint32 data)
index 00613cd..64ad0d1 100644 (file)
@@ -27,8 +27,9 @@ private:
        uint8 recv_data;
        
        int kbic_cmd, kbsc_cmd;
-       FIFO* cmd_param
+       FIFO* cmd_param;
        uint8 kbic_status;
+       uint8 cmd_byte;
        
 public:
        KEYBOARD(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
@@ -41,6 +42,7 @@ public:
        void write_io8(uint32 addr, uint32 data);
        uint32 read_io8(uint32 addr);
        void event_frame();
+       void process_cmd();
        
        // unique functions
        void set_context_pic(DEVICE* device)
index 8154e85..ab5e37d 100644 (file)
@@ -14,7 +14,7 @@
 #include "../../emu.h"
 #include "../device.h"
 
-#define SIG_SYSTEM_TC2O
+#define SIG_SYSTEM_TC2O 1
 
 class SYSTEM : public DEVICE
 {
index 3ee2400..a237492 100644 (file)
 #endif
 
 // TOSHIBA J-3100GT
-#ifdef _J3100SL
+#ifdef _J3100GT
 #include "j3100/j3100.h"
 #endif