2 NEC PC-6001 Emulator 'yaPC-6001'
3 NEC PC-6001mkII Emulator 'yaPC-6201'
4 NEC PC-6001mkIISR Emulator 'yaPC-6401'
5 NEC PC-6601 Emulator 'yaPC-6601'
6 NEC PC-6601SR Emulator 'yaPC-6801'
8 Author : Takeda.Toshiya
18 #include "../../emu.h"
19 #include "../device.h"
21 #define SIG_TIMER_IRQ_SUB_CPU 0
22 #define SIG_TIMER_IRQ_JOYSTICK 1
23 #define SIG_TIMER_IRQ_TIMER 2
24 #define SIG_TIMER_IRQ_VOICE 3
25 #define SIG_TIMER_IRQ_VRTC 4
26 #define SIG_TIMER_IRQ_RS_232C 5
27 #define SIG_TIMER_IRQ_PRINTER 6
28 #define SIG_TIMER_IRQ_EXT_INT 7
34 class TIMER : public DEVICE
37 DEVICE *d_cpu, *d_sub;
46 #if defined(_PC6601SR) || defined(_PC6001MK2SR)
47 uint8_t sr_vectors[8];
60 TIMER(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
67 void write_io8(uint32_t addr, uint32_t data);
68 uint32_t read_io8(uint32_t addr);
70 void event_callback(int event_id, int err);
71 void write_signal(int id, uint32_t data, uint32_t mask);
72 uint32_t get_intr_ack();
73 void notify_intr_reti();
74 bool process_state(FILEIO* state_fio, bool loading);
77 void set_context_cpu(DEVICE* device)
81 void set_context_sub(DEVICE* device)
86 void set_context_memory(PC6001_MEMORY* device)
91 void set_portB0(uint32_t data);