2 SHARP MZ-5500 Emulator 'EmuZ-5500'
4 Author : Takeda.Toshiya
11 #include "../../fileio.h"
13 void SYSPORT::initialize()
16 register_frame_event(this);
19 void SYSPORT::write_io8(uint32 addr, uint32 data)
21 switch(addr & 0x3f0) {
27 #if defined(_MZ6500) || defined(_MZ6550)
40 uint32 SYSPORT::read_io8(uint32 addr)
42 switch(addr & 0x3ff) {
45 #if defined(_MZ6500) || defined(_MZ6550)
46 return 0xfc | (rst ? 0 : 2) | (highden ? 1 : 0);
48 return 0xfd | (rst ? 0 : 2);
52 return d_ctc->intr_ack();
55 return d_sio->intr_ack();
63 void SYSPORT::event_frame()
70 #define STATE_VERSION 1
72 void SYSPORT::save_state(FILEIO* state_fio)
74 state_fio->FputUint32(STATE_VERSION);
75 state_fio->FputInt32(this_device_id);
77 state_fio->FputInt32(rst);
78 state_fio->FputInt32(highden);
81 bool SYSPORT::load_state(FILEIO* state_fio)
83 if(state_fio->FgetUint32() != STATE_VERSION) {
86 if(state_fio->FgetInt32() != this_device_id) {
89 rst = state_fio->FgetInt32();
90 highden = state_fio->FgetInt32();