Debian Codegraph @

src/kc/muglerpc/ctc.cc

raw
1 /*
2 * KCemu -- The emulator for the KC85 homecomputer series and much more.
3 * Copyright (C) 1997-2010 Torsten Paul
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include <iostream>
21 #include <iomanip>
22
23 #include "kc/system.h"
24
25 #include "kc/z80.h"
26
27 #include "kc/muglerpc/ctc.h"
28
29 #include "libdbg/dbg.h"
30
31 CTCMuglerPCSystem::CTCMuglerPCSystem(void)
32 {
33 }
34
35 CTCMuglerPCSystem::~CTCMuglerPCSystem(void)
36 {
37 }
38
39 byte_t
40 CTCMuglerPCSystem::in(word_t addr)
41 {
42 DBG(2, form("KCemu/CTC/muglerpc_system/in",
43 "CTCMuglerPCSystem::in(): addr = %04x\n",
44 addr));
45
46 switch (addr & 3)
47 {
48 case 0:
49 return c_in(0);
50 case 1:
51 return c_in(1);
52 case 2:
53 return c_in(2);
54 case 3:
55 return c_in(3);
56 }
57
58 return 0; // shouldn't be reached
59 }
60
61 void
62 CTCMuglerPCSystem::out(word_t addr, byte_t val)
63 {
64 DBG(2, form("KCemu/CTC/muglerpc_system/out",
65 "CTCMuglerPCSystem::out(): addr = %04x, val = %02x\n",
66 addr, val));
67
68 switch (addr & 3)
69 {
70 case 0:
71 c_out(0, val);
72 break;
73 case 1:
74 c_out(1, val);
75 break;
76 case 2:
77 c_out(2, val);
78 break;
79 case 3:
80 c_out(3, val);
81 break;
82 }
83 }
84
85 bool
86 CTCMuglerPCSystem::irq_0(void)
87 {
88 return false;
89 }
90
91 bool
92 CTCMuglerPCSystem::irq_1(void)
93 {
94 return false;
95 }
96
97 bool
98 CTCMuglerPCSystem::irq_2(void)
99 {
100 return false;
101 }
102
103 bool
104 CTCMuglerPCSystem::irq_3(void)
105 {
106 return false;
107 }
108
109 long
110 CTCMuglerPCSystem::counter_value_0(void)
111 {
112 return 0;
113 }
114
115 long
116 CTCMuglerPCSystem::counter_value_1(void)
117 {
118 return 0;
119 }
120
121 long
122 CTCMuglerPCSystem::counter_value_2(void)
123 {
124 return 0;
125 }
126
127 long
128 CTCMuglerPCSystem::counter_value_3(void)
129 {
130 return 0;
131 }
132
133 CTCMuglerPCUser::CTCMuglerPCUser(void)
134 {
135 }
136
137 CTCMuglerPCUser::~CTCMuglerPCUser(void)
138 {
139 }
140
141 byte_t
142 CTCMuglerPCUser::in(word_t addr)
143 {
144 DBG(2, form("KCemu/CTC/muglerpc_user/in",
145 "CTCMuglerPCUser::in(): addr = %04x\n",
146 addr));
147
148 switch (addr & 3)
149 {
150 case 0:
151 return c_in(0);
152 case 1:
153 return c_in(1);
154 case 2:
155 return c_in(2);
156 case 3:
157 return c_in(3);
158 }
159
160 return 0; // shouldn't be reached
161 }
162
163 void
164 CTCMuglerPCUser::out(word_t addr, byte_t val)
165 {
166 DBG(2, form("KCemu/CTC/muglerpc_user/out",
167 "CTCMuglerPCUser::out(): addr = %04x, val = %02x\n",
168 addr, val));
169
170 switch (addr & 3)
171 {
172 case 0:
173 c_out(0, val);
174 break;
175 case 1:
176 c_out(1, val);
177 break;
178 case 2:
179 c_out(2, val);
180 break;
181 case 3:
182 c_out(3, val);
183 break;
184 }
185 }
186
187 bool
188 CTCMuglerPCUser::irq_0(void)
189 {
190 return false;
191 }
192
193 bool
194 CTCMuglerPCUser::irq_1(void)
195 {
196 return false;
197 }
198
199 bool
200 CTCMuglerPCUser::irq_2(void)
201 {
202 return false;
203 }
204
205 bool
206 CTCMuglerPCUser::irq_3(void)
207 {
208 return false;
209 }
210
211 long
212 CTCMuglerPCUser::counter_value_0(void)
213 {
214 return 0;
215 }
216
217 long
218 CTCMuglerPCUser::counter_value_1(void)
219 {
220 return 0;
221 }
222
223 long
224 CTCMuglerPCUser::counter_value_2(void)
225 {
226 return 0;
227 }
228
229 long
230 CTCMuglerPCUser::counter_value_3(void)
231 {
232 return 0;
233 }