OSDN Git Service

[VM] Floppy / CMT : Add Write protection feature, but testing is not enough X-)
[csp-qt/common_source_project-fm7.git] / source / src / vm / upd765a.h
index da4ab72..e522441 100644 (file)
@@ -187,6 +187,14 @@ public:
        void set_drive_rpm(int drv, int rpm);\r
        void set_drive_mfm(int drv, bool mfm);\r
        bool raise_irq_when_media_changed;\r
+       void write_protect_fd(int drive, bool flag) {\r
+         if((drive >= 4) || (drive < 0)) return;\r
+         disk[drive]->write_protected = flag;\r
+       }\r
+       bool is_write_protect_fd(int drive) {\r
+         if((drive >= 4) || (drive < 0)) return true; // Protected\r
+         return disk[drive]->write_protected;\r
+       }\r
 };\r
 \r
 #endif\r