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->StateBool(scan_line);
+ state_fio->StateBool(scan_tmp);
+ state_fio->StateBool(monitor_200line);
+ state_fio->StateBool(monitor_digital);
+ state_fio->StateBool(monitor_tmp);
+ state_fio->StateUint8(textreg_num);
+ state_fio->StateBuffer(textreg, sizeof(textreg), 1);
+ state_fio->StateUint8(cgreg_num);
+ state_fio->StateBuffer(cgreg, sizeof(cgreg), 1);
+ state_fio->StateUint8(scrn_size);
+ state_fio->StateUint8(cg_mask);
+ state_fio->StateUint8(cg_mask256);
+ state_fio->StateBool(cg_mask256_init);
+ state_fio->StateBool(font_size);
+ state_fio->StateBool(column_size);
+ state_fio->StateBuffer(latch, sizeof(latch), 1);
+ state_fio->StateUint16(GDEVS);
+ state_fio->StateUint16(GDEVE);
+ state_fio->StateUint8(GDEHS);
+ state_fio->StateUint8(GDEHE);
+ state_fio->StateInt32(GDEHSC);
+ state_fio->StateInt32(GDEHEC);
+ state_fio->StateBool(hblank);
+ state_fio->StateBool(vblank);
+ state_fio->StateBool(blink);
+ state_fio->StateUint8(clear_flag);
+ state_fio->StateBuffer(palette_reg, sizeof(palette_reg), 1);
+ state_fio->StateBool(pal_select);
+ state_fio->StateBool(screen_mask);
+ state_fio->StateBuffer(priority16, sizeof(priority16), 1);
+ state_fio->StateBuffer(palette16, sizeof(palette16), 1);
+ state_fio->StateBuffer(palette4096, sizeof(palette4096), 1);
+ state_fio->StateBuffer(palette4096r, sizeof(palette4096r), 1);
+ state_fio->StateBuffer(palette4096g, sizeof(palette4096g), 1);
+ state_fio->StateBuffer(palette4096b, sizeof(palette4096b), 1);
+ state_fio->StateBuffer(palette16txt, sizeof(palette16txt), 1);
+ state_fio->StateBuffer(palette4096txt, sizeof(palette4096txt), 1);
+ state_fio->StateBuffer(palette16pri, sizeof(palette16pri), 1);
+ state_fio->StateBuffer(palette4096pri, sizeof(palette4096pri), 1);
+ state_fio->StateUint8(prev16);
+ state_fio->StateBool(update16);
+ state_fio->StateBuffer(priority256, sizeof(priority256), 1);
+ state_fio->StateBuffer(palette256, sizeof(palette256), 1);
+ state_fio->StateBuffer(palette256txt, sizeof(palette256txt), 1);
+ state_fio->StateBuffer(palette256pri, sizeof(palette256pri), 1);
+ state_fio->StateUint32((uint32_t)prev256);
+ state_fio->StateBool(update256);
+ state_fio->StateBuffer(map_addr, sizeof(map_addr), 1);
+ state_fio->StateBuffer(map_hdsc, sizeof(map_hdsc), 1);
+ state_fio->StateBuffer(text_matrix, sizeof(text_matrix), 1);
+ state_fio->StateBuffer(text_matrixw, sizeof(text_matrixw), 1);
+ state_fio->StateUint8(trans_color);
+ state_fio->StateBool(map_init);
+ state_fio->StateBool(trans_init);
+ return true;
+}