2 Skelton for retropc emulator
4 Author : Takeda.Toshiya
12 void NAND::write_signal(int id, uint32 data, uint32 mask)
19 bool next = (bits_mask != bits_in);
20 if(prev != next || first) {
21 write_signals(&outputs, next ? 0xffffffff : 0);
27 #define STATE_VERSION 1
29 void NAND::save_state(FILEIO* state_fio)
31 state_fio->FputUint32(STATE_VERSION);
32 state_fio->FputInt32(this_device_id);
34 state_fio->FputUint32(bits_mask);
35 state_fio->FputUint32(bits_in);
36 state_fio->FputBool(prev);
37 state_fio->FputBool(first);
40 bool NAND::load_state(FILEIO* state_fio)
42 if(state_fio->FgetUint32() != STATE_VERSION) {
45 if(state_fio->FgetInt32() != this_device_id) {
48 bits_mask = state_fio->FgetUint32();
49 bits_in = state_fio->FgetUint32();
50 prev = state_fio->FgetBool();
51 first = state_fio->FgetBool();