2 TOSHIBA PASOPIA 7 Emulator 'EmuPIA7'
4 Author : Takeda.Toshiya
17 void IOBUS::write_io8(uint32_t addr, uint32_t data)
21 ram[addr & 0xffff] = data;
23 d_io->write_io8(addr, data);
27 uint32_t IOBUS::read_io8(uint32_t addr)
31 return ram[addr & 0xffff];
33 return d_io->read_io8(addr);
37 void IOBUS::write_signal(int id, uint32_t data, uint32_t mask)
39 if(id == SIG_IOBUS_MIO) {
40 mio = ((data & mask) != 0);
44 #define STATE_VERSION 1
46 #include "../../statesub.h"
48 void IOBUS::decl_state()
50 enter_decl_state(STATE_VERSION);
52 DECL_STATE_ENTRY_BOOL(mio);
57 void IOBUS::save_state(FILEIO* state_fio)
59 if(state_entry != NULL) {
60 state_entry->save_state(state_fio);
62 // state_fio->FputUint32(STATE_VERSION);
63 // state_fio->FputInt32(this_device_id);
65 // state_fio->FputBool(mio);
68 bool IOBUS::load_state(FILEIO* state_fio)
71 if(state_entry != NULL) {
72 mb = state_entry->load_state(state_fio);
75 // if(state_fio->FgetUint32() != STATE_VERSION) {
78 // if(state_fio->FgetInt32() != this_device_id) {
81 // mio = state_fio->FgetBool();
85 bool IOBUS::process_state(FILEIO* state_fio, bool loading)
87 if(!state_fio->StateCheckUint32(STATE_VERSION)) {
90 if(!state_fio->StateCheckInt32(this_device_id)) {
93 state_fio->StateBool(mio);