[ i/o ]
*/
-#ifndef _IO_H_
-#define _IO_H_
+#ifndef _HC40_IO_H_
+#define _HC40_IO_H_
#include "../vm.h"
#include "../../emu.h"
class FIFO;
+namespace HC40 {
+
class IO : public DEVICE
{
private:
uint8_t rec_from_7508();
FIFO *cmd_buf, *rsp_buf;
// rtc
- cur_time_t cur_time;
+ dll_cur_time_t cur_time;
int register_id_1sec;
bool onesec_intr, onesec_intr_enb;
bool alarm_intr, alarm_intr_enb;
scrntype_t pd, pb;
public:
- IO(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
+ IO(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
{
set_device_name(_T("I/O Bus"));
}
void write_io8(uint32_t addr, uint32_t data);
uint32_t read_io8(uint32_t addr);
uint32_t get_intr_ack();
- void save_state(FILEIO* state_fio);
- bool load_state(FILEIO* state_fio);
+ bool process_state(FILEIO* state_fio, bool loading);
// unique functions
void set_context_cpu(DEVICE* device)
void key_up(int code);
};
+}
#endif