OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2800 / sysport.cpp
1 /*
2         SHARP MZ-2800 Emulator 'EmuZ-2800'
3
4         Author : Takeda.Toshiya
5         Date   : 2007.08.14 -
6
7         [ system poty ]
8 */
9
10 #include "sysport.h"
11 #include "../i8253.h"
12
13 namespace MZ2800 {
14
15 void SYSPORT::write_io8(uint32_t addr, uint32_t data)
16 {
17         switch(addr & 0x7fff) {
18         case 0xf0:
19         case 0xf1:
20         case 0xf2:
21         case 0xf3:
22                 // input gate signal to i8253 ch0 and ch1
23                 d_pit->write_signal(SIG_I8253_GATE_0, 1, 1);
24                 d_pit->write_signal(SIG_I8253_GATE_1, 1, 1);
25                 break;
26         }
27 }
28
29 uint32_t SYSPORT::read_io8(uint32_t addr)
30 {
31         switch(addr & 0x7fff) {
32         case 0xbe:
33                 // z80sio ack
34                 return d_sio->get_intr_ack();
35         }
36         return 0xff;
37 }
38
39 }