OSDN Git Service

[VM][General] Merge Upstream 2017-12-15.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc6031.h
index 2e03be4..85100ae 100644 (file)
 #ifndef _PC6031_H_
 #define _PC6031_H_
 
-#include "vm.h"
-#include "../emu.h"
+//#include "vm.h"
+//#include "../emu.h"
 #include "device.h"
 
 class DISK;
+class NOISE;
 
 class PC6031 : public DEVICE
 {
 private:
        DISK* disk[2];
+       NOISE* d_noise_seek;
+//     NOISE* d_noise_head_down;
+//     NOISE* d_noise_head_up;
        
        int cur_trk[2];
        int cur_sct[2];
@@ -74,7 +78,13 @@ private:
        unsigned char InD3H_60();
        
 public:
-       PC6031(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
+       PC6031(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+       {
+               d_noise_seek = NULL;
+//             d_noise_head_down = NULL;
+//             d_noise_head_up = NULL;
+               set_device_name(_T("Pseudo PC-6031 FDD"));
+       }
        ~PC6031() {}
        
        // common functions
@@ -83,14 +93,35 @@ public:
        void write_io8(uint32_t addr, uint32_t data);
        uint32_t read_io8(uint32_t addr);
        uint32_t read_signal(int ch);
+       void update_config();
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
-       const _TCHAR *get_device_name()
-       {
-               return _T("Pseudo PC-6031");
-       }
        
        // unique functions
+       void set_context_noise_seek(NOISE* device)
+       {
+               d_noise_seek = device;
+       }
+       NOISE* get_context_noise_seek()
+       {
+               return d_noise_seek;
+       }
+//     void set_context_noise_head_down(NOISE* device)
+//     {
+//             d_noise_head_down = device;
+//     }
+//     NOISE* get_context_noise_head_down()
+//     {
+//             return d_noise_head_down;
+//     }
+//     void set_context_noise_head_up(NOISE* device)
+//     {
+//             d_noise_head_up = device;
+//     }
+//     NOISE* get_context_noise_head_up()
+//     {
+//             return d_noise_head_up;
+//     }
        DISK* get_disk_handler(int drv)
        {
                return disk[drv];