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
37 class TIMER : public DEVICE
40 DEVICE *d_cpu, *d_sub;
42 PC6001::MEMORY *d_mem;
49 #if defined(_PC6601SR) || defined(_PC6001MK2SR)
50 uint8_t sr_vectors[8];
63 TIMER(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
70 void write_io8(uint32_t addr, uint32_t data);
71 uint32_t read_io8(uint32_t addr);
73 void event_callback(int event_id, int err);
74 void write_signal(int id, uint32_t data, uint32_t mask);
75 uint32_t get_intr_ack();
76 void notify_intr_reti();
77 bool process_state(FILEIO* state_fio, bool loading);
80 void set_context_cpu(DEVICE* device)
84 void set_context_sub(DEVICE* device)
89 void set_context_memory(PC6001::MEMORY* device)
94 void set_portB0(uint32_t data);