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 / pc100 / crtc.cpp
index 2f1b150..6aca8eb 100644 (file)
@@ -390,3 +390,27 @@ bool CRTC::load_state(FILEIO* state_fio)
        return true;
 }
 
+bool CRTC::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->StateBuffer(palette_pc, sizeof(palette_pc), 1);
+       state_fio->StateBuffer(palette, sizeof(palette), 1);
+       state_fio->StateUint8(sel);
+       state_fio->StateBuffer(regs, sizeof(regs), 1);
+       state_fio->StateUint16(vs);
+       state_fio->StateUint16(cmd);
+       state_fio->StateBuffer(vram, sizeof(vram), 1);
+       state_fio->StateUint32(shift);
+       state_fio->StateUint32(maskl);
+       state_fio->StateUint32(maskh);
+       state_fio->StateUint32(busl);
+       state_fio->StateUint32(bush);
+       state_fio->StateUint32(write_plane);
+       state_fio->StateUint32(read_plane);
+       return true;
+}