2 SHARP MZ-5500 Emulator 'EmuZ-5500'
4 Author : Takeda.Toshiya
12 void SYSPORT::initialize()
15 register_frame_event(this);
18 void SYSPORT::write_io8(uint32_t addr, uint32_t data)
20 switch(addr & 0x3f0) {
26 #if defined(_MZ6500) || defined(_MZ6550)
33 d_ctc->notify_intr_reti();
39 uint32_t SYSPORT::read_io8(uint32_t addr)
41 switch(addr & 0x3ff) {
44 #if defined(_MZ6500) || defined(_MZ6550)
45 return 0xfc | (rst ? 0 : 2) | (highden ? 1 : 0);
47 return 0xfd | (rst ? 0 : 2);
51 return d_ctc->get_intr_ack();
54 return d_sio->get_intr_ack();
62 void SYSPORT::event_frame()
69 #define STATE_VERSION 1
71 #include "../../statesub.h"
73 void SYSPORT::decl_state()
76 enter_decl_state(STATE_VERSION);
78 DECL_STATE_ENTRY_INT32(rst);
79 DECL_STATE_ENTRY_INT32(highden);
84 void SYSPORT::save_state(FILEIO* state_fio)
86 if(state_entry != NULL) {
87 state_entry->save_state(state_fio);
89 // state_fio->FputUint32(STATE_VERSION);
90 // state_fio->FputInt32(this_device_id);
92 // state_fio->FputInt32(rst);
93 // state_fio->FputInt32(highden);
96 bool SYSPORT::load_state(FILEIO* state_fio)
99 if(state_entry != NULL) {
100 mb = state_entry->load_state(state_fio);
105 // if(state_fio->FgetUint32() != STATE_VERSION) {
108 // if(state_fio->FgetInt32() != this_device_id) {
111 // rst = state_fio->FgetInt32();
112 // highden = state_fio->FgetInt32();