OSDN Git Service

[VM] MEMORY:: class within some VM will change Foo_MEMORY:: to reduce misundestanding...
[csp-qt/common_source_project-fm7.git] / source / src / vm / fmr30 / floppy.h
index 63e9327..5ca11ef 100644 (file)
 
 #define SIG_FLOPPY_IRQ 0
 
+class MB8877;
+
 class FLOPPY : public DEVICE
 {
 private:
-       DEVICE *d_fdc, *d_pic;
+       MB8877 *d_fdc;
+       DEVICE *d_pic;
        
        uint8_t fdcr, fdsl, fdst;
        int drvsel;
@@ -27,19 +30,22 @@ private:
        void update_intr();
        
 public:
-       FLOPPY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
+       FLOPPY(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+       {
+               set_device_name(_T("Floppy I/F"));
+       }
        ~FLOPPY() {}
        
        // common functions
        void initialize();
+       void reset();
        void write_io8(uint32_t addr, uint32_t data);
        uint32_t read_io8(uint32_t addr);
        void write_signal(int id, uint32_t data, uint32_t mask);
-       void save_state(FILEIO* state_fio);
-       bool load_state(FILEIO* state_fio);
+       bool process_state(FILEIO* state_fio, bool loading);
        
        // unique functions
-       void set_context_fdc(DEVICE* device)
+       void set_context_fdc(MB8877* device)
        {
                d_fdc = device;
        }