2 Skelton for retropc emulator
4 Author : Kyuma Ohta <whatisthis.sowhat _at_ gmail.com>
7 [ SERIAL I/O REDIRECTOR ]
9 This is redirection from some outputs to osd depended midi port.
12 #ifndef _SIO_REDIRECTOR_H_
13 #define _SIO_REDIRECTOR_H_
15 #include "midi_redirector.h"
17 #define SIG_SIO_RESET 1
18 #define SIG_SIO_SEND 2
19 #define SIG_SIO_ENABLE_TO_SEND 3
20 #define SIG_SIO_ENABLE_TO_RECEIVE 4
21 #define SIG_SIO_REMAIN_SEND 5
22 #define SIG_SIO_REMAIN_RECEIVE 6
24 class SIO_REDIRECTOR : public MIDI_REDIRECTOR {
26 SIO_REDIRECTOR(VM_TEMPLATE* parent_vm, EMU* parent_emu) : MIDI_REDIRECTOR(parent_vm, parent_emu)
28 set_device_name(_T("SERIAL I/O REDIRECTOR"));
32 virtual void initialize();
33 virtual void release();
34 virtual uint32_t __FASTCALL read_signal(int id);
35 virtual void __FASTCALL write_signal(int id, uint32_t data, uint32_t mask);
36 virtual bool process_state(FILEIO* state_fio, bool loading);
40 virtual bool __FASTCALL push_receive_data(int port_num, uint32_t data); // Push receive data by OSD.
41 virtual int __FASTCALL bind_receive_port(void); // Request bind port from OSD to DEVICE or VM.
42 virtual int __FASTCALL bind_send_port(void); // Request bind port from DEVICE or VM to OSD.
45 #endif /* _SIO_REDIRECTOR_H_ */