2 FUJITSU FMR-30 Emulator 'eFMR-30'
4 Author : Takeda.Toshiya
12 void SYSTEM::initialize()
18 void SYSTEM::write_io8(uint32_t addr, uint32_t data)
20 switch(addr & 0xffff) {
33 uint32_t SYSTEM::read_io8(uint32_t addr)
35 switch(addr & 0xffff) {
57 #define STATE_VERSION 1
59 #include "../../statesub.h"
61 void SYSTEM::decl_state()
63 enter_decl_state(STATE_VERSION);
65 DECL_STATE_ENTRY_UINT8(arr);
66 DECL_STATE_ENTRY_UINT8(nmistat);
67 DECL_STATE_ENTRY_UINT8(nmimask);
72 void SYSTEM::save_state(FILEIO* state_fio)
74 if(state_entry != NULL) {
75 state_entry->save_state(state_fio);
78 // state_fio->FputUint32(STATE_VERSION);
79 // state_fio->FputInt32(this_device_id);
81 // state_fio->FputUint8(arr);
82 // state_fio->FputUint8(nmistat);
83 // state_fio->FputUint8(nmimask);
86 bool SYSTEM::load_state(FILEIO* state_fio)
89 if(state_entry != NULL) {
90 mb = state_entry->load_state(state_fio);
96 // if(state_fio->FgetUint32() != STATE_VERSION) {
99 // if(state_fio->FgetInt32() != this_device_id) {
102 // arr = state_fio->FgetUint8();
103 // nmistat = state_fio->FgetUint8();
104 // nmimask = state_fio->FgetUint8();
108 bool SYSTEM::process_state(FILEIO* state_fio, bool loading)
110 if(!state_fio->StateCheckUint32(STATE_VERSION)) {
113 if(!state_fio->StateCheckInt32(this_device_id)) {
116 state_fio->StateUint8(arr);
117 state_fio->StateUint8(nmistat);
118 state_fio->StateUint8(nmimask);