OSDN Git Service

[VM][WIP] Pre-process to apply new state framework.Still not buildable.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz700 / floppy.cpp
index c3bcb92..93069ca 100644 (file)
@@ -146,3 +146,17 @@ bool FLOPPY::load_state(FILEIO* state_fio)
        return true;
 }
 
+bool FLOPPY::process_state(FILEIO* state_fio, bool loading)
+{
+       if(!state_fio->StateCheckUint32(STATE_VERSION)) {
+               return false;
+       }
+       if(!state_fio->StateCheckInt32(this_device_id)) {
+               return false;
+       }
+       state_fio->StateUint32(prev_dc);
+       state_fio->StateInt32(register_id);
+       state_fio->StateBool(motor_on);
+       state_fio->StateBool(irq_enabled);
+       return true;
+}