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 / mb8877.h
index 2b983e9..c9147fd 100644 (file)
@@ -140,6 +140,14 @@ public:
        void set_drive_rpm(int drv, int rpm);\r
        void set_drive_mfm(int drv, bool mfm);\r
        uint8 fdc_status();\r
+       void write_protect_fd(int drive, bool flag) {\r
+         if((drive >= MAX_DRIVE) || (drive < 0)) return;\r
+         disk[drive]->write_protected = flag;\r
+       }\r
+       bool is_write_protect_fd(int drive) {\r
+         if((drive >= MAX_DRIVE) || (drive < 0)) return true; // Protected\r
+         return disk[drive]->write_protected;\r
+       }\r
 };\r
 \r
 #endif\r