2 Skelton for retropc emulator
4 Author : Takeda.Toshiya
11 #include "../fileio.h"
13 void OR::write_signal(int id, uint32 data, uint32 mask)
20 bool next = (bits_in != 0);
21 if(prev != next || first) {
22 write_signals(&outputs, next ? 0xffffffff : 0);
28 #define STATE_VERSION 1
30 void OR::save_state(FILEIO* state_fio)
32 state_fio->FputUint32(STATE_VERSION);
33 state_fio->FputInt32(this_device_id);
35 state_fio->FputUint32(bits_in);
36 state_fio->FputBool(prev);
37 state_fio->FputBool(first);
40 bool OR::load_state(FILEIO* state_fio)
42 if(state_fio->FgetUint32() != STATE_VERSION) {
45 if(state_fio->FgetInt32() != this_device_id) {
48 bits_in = state_fio->FgetUint32();
49 prev = state_fio->FgetBool();
50 first = state_fio->FgetBool();