Previous 199869 Revisions Next

r26388 Saturday 23rd November, 2013 at 22:54:00 UTC by Jürgen Buchmüller
The JK-FF table lookup is actually slower than the static inline function. Need to make logprintf() global for a static member that needs debug output.
[/branches/alto2/src/emu/cpu]cpu.mak
[/branches/alto2/src/emu/cpu/alto2]a2disk.c a2disp.c a2emu.c a2ether.c a2jkff.c a2jkff.h a2mem.c alto2cpu.c alto2cpu.h
[/branches/alto2/src/emu/machine]diablo_hd.h
[/branches/alto2/src/mess/drivers]alto2.c

branches/alto2/src/emu/machine/diablo_hd.h
r26387r26388
1313#include "imagedev/diablo.h"
1414
1515#ifndef   DIABLO_DEBUG
16#define   DIABLO_DEBUG   0                         //!< set to 1 to enable debug log output
16#define   DIABLO_DEBUG   1                         //!< set to 1 to enable debug log output
1717#endif
1818
1919#define DIABLO_HD_0 "diablo0"
branches/alto2/src/emu/cpu/alto2/a2jkff.c
r26387r26388
1/*****************************************************************************
2 *
3 *   Xerox AltoII Dual J/K flip-flop 74109 emulation
4 *
5 *   Copyright © Jürgen Buchmüller <pullmoll@t-online.de>
6 *
7 *   Licenses: MAME, GPLv2
8 *
9 *****************************************************************************/
10#include "alto2cpu.h"
11
12#if   ALTO2_DEBUG
13static const char* raise_lower[2] = {"↗","↘"};
14#endif
15const char* jkff_name;
16
17#if   JKFF_FUNCTION
18
19/**
20 * @brief simulate a 74109 J-K flip-flop with set and reset inputs
21 *
22 * @param s0 is the previous state of the FF's in- and outputs
23 * @param s1 is the next state
24 * @return returns the next state and probably modified Q output
25 */
26jkff_t alto2_cpu_device::update_jkff(UINT8 s0, UINT8 s1)
27{
28   switch (s1 & (JKFF_C | JKFF_S))
29   {
30   case JKFF_C | JKFF_S:   /* C' is 1, and S' is 1 */
31      if (((s0 ^ s1) & s1) & JKFF_CLK) {
32         /* rising edge of the clock */
33         switch (s1 & (JKFF_J | JKFF_K))
34         {
35         case 0:
36            /* both J and K' are 0: set Q to 0, Q' to 1 */
37            s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
38            if (s0 & JKFF_Q) {
39               LOG((LOG_DISK,9,"%s J:0 K':0 → Q:0\n", jkff_name));
40            }
41            break;
42         case JKFF_J:
43            /* J is 1, and K' is 0: toggle Q */
44            if (s0 & JKFF_Q)
45               s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
46            else
47               s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
48            LOG((LOG_DISK,9,"%s J:0 K':1 flip-flop Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0));
49            break;
50         case JKFF_K:
51            if ((s0 ^ s1) & JKFF_Q) {
52               LOG((LOG_DISK,9,"%s J:0 K':1 keep Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0));
53            }
54            /* J is 0, and K' is 1: keep Q as is */
55            if (s0 & JKFF_Q)
56               s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
57            else
58               s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
59            break;
60         case JKFF_J | JKFF_K:
61            /* both J and K' are 1: set Q to 1 */
62            s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
63            if (!(s0 & JKFF_Q)) {
64               LOG((LOG_DISK,9,"%s J:1 K':1 → Q:1\n", jkff_name));
65            }
66            break;
67         }
68      } else {
69         /* keep Q */
70         s1 = (s1 & ~JKFF_Q) | (s0 & JKFF_Q);
71      }
72      break;
73   case JKFF_S:
74      /* S' is 1, C' is 0: set Q to 0, Q' to 1 */
75      s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
76      if (s0 & JKFF_Q) {
77         LOG((LOG_DISK,9,"%s C':0 → Q:0\n", jkff_name));
78      }
79      break;
80   case JKFF_C:
81      /* S' is 0, C' is 1: set Q to 1, Q' to 0 */
82      s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
83      if (!(s0 & JKFF_Q)) {
84         LOG((LOG_DISK,9,"%s S':0 → Q:1\n", jkff_name));
85      }
86      break;
87   case 0:
88   default:
89      /* unstable state (what to do?) */
90      s1 = s1 | JKFF_Q | JKFF_Q0;
91      LOG((LOG_DISK,9,"%s C':0 S':0 → Q:1 and Q':1 <unstable>\n", jkff_name));
92      break;
93   }
94   return static_cast<jkff_t>(s1);
95}
96
97#else
98
99/** @brief table constructed for update_jkff(s0,s1) */
100static UINT8 jkff_lookup[64][64] = {
101   {
102      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
103      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
104      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
105      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
106      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
107      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
108      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
109      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60
110   },{
111      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
112      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
113      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
114      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
115      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
116      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
117      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
118      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61
119   },{
120      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
121      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
122      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
123      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
124      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
125      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
126      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
127      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62
128   },{
129      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
130      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
131      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
132      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
133      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
134      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
135      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
136      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63
137   },{
138      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
139      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
140      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
141      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
142      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
143      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
144      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
145      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64
146   },{
147      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
148      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
149      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
150      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
151      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
152      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
153      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
154      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65
155   },{
156      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
157      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
158      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
159      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
160      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
161      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
162      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
163      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66
164   },{
165      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
166      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
167      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
168      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
169      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
170      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
171      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
172      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67
173   },{
174      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
175      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
176      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
177      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
178      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
179      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
180      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
181      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48
182   },{
183      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
184      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
185      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
186      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
187      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
188      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
189      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
190      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49
191   },{
192      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
193      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
194      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
195      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
196      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
197      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
198      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
199      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a
200   },{
201      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
202      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
203      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
204      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
205      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
206      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
207      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
208      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b
209   },{
210      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
211      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
212      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
213      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
214      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
215      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
216      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
217      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c
218   },{
219      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
220      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
221      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
222      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
223      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
224      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
225      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
226      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d
227   },{
228      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
229      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
230      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
231      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
232      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
233      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
234      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
235      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e
236   },{
237      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
238      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
239      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
240      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
241      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
242      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
243      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
244      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f
245   },{
246      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
247      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
248      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
249      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
250      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
251      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
252      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
253      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30
254   },{
255      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
256      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
257      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
258      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
259      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
260      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
261      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
262      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31
263   },{
264      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
265      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
266      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
267      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
268      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
269      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
270      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
271      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32
272   },{
273      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
274      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
275      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
276      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
277      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
278      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
279      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
280      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33
281   },{
282      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
283      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
284      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
285      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
286      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
287      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
288      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
289      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34
290   },{
291      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
292      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
293      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
294      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
295      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
296      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
297      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
298      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35
299   },{
300      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
301      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
302      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
303      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
304      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
305      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
306      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
307      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36
308   },{
309      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
310      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
311      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
312      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
313      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
314      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
315      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
316      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37
317   },{
318      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
319      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
320      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
321      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
322      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
323      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
324      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
325      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38
326   },{
327      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
328      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
329      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
330      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
331      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39,
332      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39,
333      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39,
334      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39
335   },{
336      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
337      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
338      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
339      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
340      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
341      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
342      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
343      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a
344   },{
345      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
346      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
347      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
348      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
349      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,
350      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,
351      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,
352      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b
353   },{
354      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
355      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
356      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
357      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
358      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
359      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
360      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
361      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c
362   },{
363      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
364      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
365      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
366      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
367      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
368      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
369      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
370      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d
371   },{
372      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
373      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
374      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
375      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
376      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
377      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
378      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
379      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e
380   },{
381      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
382      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
383      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
384      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
385      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
386      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
387      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
388      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f
389   },{
390      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
391      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
392      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
393      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
394      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
395      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
396      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
397      0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60
398   },{
399      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
400      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
401      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
402      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
403      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
404      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
405      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
406      0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61
407   },{
408      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
409      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
410      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
411      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
412      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
413      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
414      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
415      0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62
416   },{
417      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
418      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
419      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
420      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
421      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
422      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
423      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
424      0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63
425   },{
426      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
427      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
428      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
429      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
430      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
431      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
432      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
433      0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64
434   },{
435      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
436      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
437      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
438      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
439      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
440      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
441      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
442      0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65
443   },{
444      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
445      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
446      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
447      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
448      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
449      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
450      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
451      0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66
452   },{
453      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
454      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
455      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
456      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
457      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
458      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
459      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
460      0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67
461   },{
462      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
463      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
464      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
465      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
466      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
467      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
468      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
469      0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48
470   },{
471      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
472      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
473      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
474      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
475      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
476      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
477      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
478      0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49
479   },{
480      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
481      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
482      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
483      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
484      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
485      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
486      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
487      0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a
488   },{
489      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
490      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
491      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
492      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
493      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
494      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
495      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
496      0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b
497   },{
498      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
499      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
500      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
501      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
502      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
503      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
504      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
505      0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c
506   },{
507      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
508      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
509      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
510      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
511      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
512      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
513      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
514      0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d
515   },{
516      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
517      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
518      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
519      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
520      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
521      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
522      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
523      0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e
524   },{
525      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
526      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
527      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
528      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
529      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
530      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
531      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
532      0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f
533   },{
534      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
535      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
536      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
537      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
538      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
539      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
540      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
541      0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30
542   },{
543      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
544      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
545      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
546      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
547      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
548      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
549      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
550      0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31
551   },{
552      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
553      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
554      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
555      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
556      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
557      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
558      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
559      0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32
560   },{
561      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
562      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
563      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
564      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
565      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
566      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
567      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
568      0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33
569   },{
570      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
571      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
572      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
573      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
574      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
575      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
576      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
577      0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34
578   },{
579      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
580      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
581      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
582      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
583      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
584      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
585      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
586      0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35
587   },{
588      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
589      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
590      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
591      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
592      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
593      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
594      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
595      0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36
596   },{
597      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
598      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
599      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
600      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
601      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
602      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
603      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
604      0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37
605   },{
606      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
607      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
608      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
609      0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
610      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
611      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
612      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
613      0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38
614   },{
615      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
616      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
617      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
618      0x59,0x19,0x59,0x19,0x59,0x19,0x59,0x19,
619      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39,
620      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39,
621      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39,
622      0x59,0x39,0x59,0x39,0x59,0x39,0x59,0x39
623   },{
624      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
625      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
626      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
627      0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
628      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
629      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
630      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
631      0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a
632   },{
633      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
634      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
635      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
636      0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,0x3b,0x1b,
637      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,
638      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,
639      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,
640      0x5b,0x3b,0x5b,0x3b,0x5b,0x3b,0x5b,0x3b
641   },{
642      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
643      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
644      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
645      0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
646      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
647      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
648      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
649      0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c
650   },{
651      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
652      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
653      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
654      0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,0x5d,0x1d,
655      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
656      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
657      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
658      0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d
659   },{
660      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
661      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
662      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
663      0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
664      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
665      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
666      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
667      0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e
668   },{
669      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
670      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
671      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
672      0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,0x3f,0x1f,
673      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
674      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
675      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
676      0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f
677   }
678};
679
680jkff_t alto2_cpu_device::update_jkff(UINT8 s0, UINT8 s1)
681{
682   UINT8 result = jkff_lookup[s1 & 63][s0 & 63];
683#if   ALTO2_DEBUG
684   LOG((LOG_DISK,9,"%s : ", jkff_name));
685   if ((s0 ^ result) & JKFF_CLK)
686      LOG((LOG_DISK,9," CLK%s", raise_lower[result & 1]));
687   if ((s0 ^ result) & JKFF_J)
688      LOG((LOG_DISK,9," J%s", raise_lower[(result >> 1) & 1]));
689   if ((s0 ^ result) & JKFF_K)
690      LOG((LOG_DISK,9," K'%s", raise_lower[(result >> 2) & 1]));
691   if ((s0 ^ result) & JKFF_S)
692      LOG((LOG_DISK,9," S'%s", raise_lower[(result >> 3) & 1]));
693   if ((s0 ^ result) & JKFF_C)
694      LOG((LOG_DISK,9," C'%s", raise_lower[(result >> 4) & 1]));
695   if ((s0 ^ result) & JKFF_Q)
696      LOG((LOG_DISK,9," Q%s", raise_lower[(result >> 5) & 1]));
697   if ((s0 ^ result) & JKFF_Q0)
698      LOG((LOG_DISK,9," Q'%s", raise_lower[(result >> 6) & 1]));
699   LOG((LOG_DISK,9,"\n"));
700#endif
701   return static_cast<jkff_t>(result);
702}
703#endif
704
branches/alto2/src/emu/cpu/alto2/a2disk.c
r26387r26388
439439    * Q   to 53a J
440440    * </PRE>
441441    */
442   DEBUG_NAME("\t\t43b KWD   ");
443442   s0 = m_dsk.ff_43b;
444443   s1 = wddone ? JKFF_CLK : JKFF_0;
445444   s1 |= JKFF_J;
r26387r26388
448447      s1 |= JKFF_S;
449448   if (!(m_dsk.ff_43a & JKFF_Q))
450449      s1 |= JKFF_C;
451   m_dsk.ff_43b = update_jkff(s0, s1);
450   m_dsk.ff_43b = update_jkff(s0, s1, "43b KWD   ");
452451
453452   // loop over the 4 stages of sysclka and sysclkb transitions
454453   for (i = 0; i < 4; i++) {
455454
455#if   ALTO2_DEBUG
456456      if (m_sysclka0[i] != m_sysclka1[i]) {
457457         LOG((LOG_DISK,9,"   SYSCLKA' %s\n", raise_lower[m_sysclka1[i]]));
458458      }
459459      if (m_sysclkb0[i] != m_sysclkb1[i]) {
460460         LOG((LOG_DISK,9,"   SYSCLKB' %s\n", raise_lower[m_sysclkb1[i]]));
461461      }
462#endif
462463
463464      /**
464465       * JK flip-flop 53b (word task)
r26387r26388
471472       * Q   WDINIT
472473       * </PRE>
473474       */
474      DEBUG_NAME("\t\t53b KWD   ");
475475      s0 = m_dsk.ff_53b;
476476      s1 = m_sysclkb1[i];
477477      if (block != task_kwd)
r26387r26388
479479      if (WDALLOW)
480480         s1 |= JKFF_S;
481481      s1 |= JKFF_C;
482      m_dsk.ff_53b = update_jkff(s0, s1);
482      m_dsk.ff_53b = update_jkff(s0, s1, "53b KWD   ");
483483
484484      /**
485485       * JK flip-flop 53a (word task)
r26387r26388
492492       * Q   to 43a J and K'
493493       * </PRE>
494494       */
495      DEBUG_NAME("\t\t53a KWD   ");
496495      s0 = m_dsk.ff_53a;
497496      s1 = m_sysclkb1[i];
498497      if (m_dsk.ff_43b & JKFF_Q)
r26387r26388
502501      s1 |= JKFF_S;
503502      if (WDALLOW)
504503         s1 |= JKFF_C;
505      m_dsk.ff_53a = update_jkff(s0, s1);
504      m_dsk.ff_53a = update_jkff(s0, s1, "53a KWD   ");
506505
507506      /**
508507       * JK flip-flop 43a (word task)
r26387r26388
515514       * Q   WDTSKENA', Q' WDTSKENA
516515       * </PRE>
517516       */
518      DEBUG_NAME("\t\t43a KWD   ");
519517      s0 = m_dsk.ff_43a;
520518      s1 = m_sysclka1[i];
521519      if (m_dsk.ff_53a & JKFF_Q)
r26387r26388
525523      s1 |= JKFF_S;
526524      if (WDALLOW)
527525         s1 |= JKFF_C;
528      m_dsk.ff_43a = update_jkff(s0, s1);
526      m_dsk.ff_43a = update_jkff(s0, s1, "43a KWD   ");
529527
530528      /**
531529       * JK flip-flop 45a (ready latch)
r26387r26388
538536       * Q   RDYLAT'
539537       * </PRE>
540538       */
541      DEBUG_NAME("\t\t45a RDYLAT");
542539      s0 = m_dsk.ff_45a;
543540      s1 = m_sysclka1[i];
544541      if (dhd->get_ready_0())
r26387r26388
546543      s1 |= JKFF_K;
547544      s1 |= JKFF_S;
548545      s1 |= JKFF_C;      // FIXME: CLRSTAT' ?
549      m_dsk.ff_45a = update_jkff(s0, s1);
546      m_dsk.ff_45a = update_jkff(s0, s1, "45a RDYLAT");
550547
551548      /**
552549       * sets the seqerr flip-flop 45b (Q' is SEQERR)
r26387r26388
560557       * Q   to KSTAT[11] DATALATE
561558       * </PRE>
562559       */
563      DEBUG_NAME("\t\t45b SEQERR");
564560      s0 = m_dsk.ff_45b;
565561      s1 = m_sysclka1[i];
566562      s1 |= JKFF_J;
r26387r26388
568564         s1 |= JKFF_K;
569565      s1 |= JKFF_S;      // FIXME: CLRSTAT' ?
570566      s1 |= JKFF_C;
571      m_dsk.ff_45b = update_jkff(s0, s1);
567      m_dsk.ff_45b = update_jkff(s0, s1, "45b SEQERR");
572568
573569      /**
574570       * JK flip-flop 22b (sector task)
r26387r26388
581577       * Q   STSKENA; Q' WAKEKST'
582578       * </PRE>
583579       */
584      DEBUG_NAME("\t\t22b KSEC  ");
585580      s0 = m_dsk.ff_22b;
586581      s1 = m_sysclkb1[i];
587582      if (m_dsk.ff_22a & JKFF_Q)
r26387r26388
590585         s1 |= JKFF_K;
591586      s1 |= JKFF_S;   // FIXME: RESET' ?
592587      s1 |= JKFF_C;
593      m_dsk.ff_22b = update_jkff(s0, s1);
588      m_dsk.ff_22b = update_jkff(s0, s1, "22b KSEC  ");
594589
595590      /**
596591       * JK flip-flop 22a (sector task)
r26387r26388
603598       * Q   to 22b J
604599       * </PRE>
605600       */
606      DEBUG_NAME("\t\t22a KSEC  ");
607601      s0 = m_dsk.ff_22a;
608602      s1 = m_sysclkb1[i];
609603      if (m_dsk.ff_21b & JKFF_Q)
r26387r26388
612606      s1 |= JKFF_S;
613607      if (!(m_dsk.ff_22b & JKFF_Q))
614608         s1 |= JKFF_C;
615      m_dsk.ff_22a = update_jkff(s0, s1);
609      m_dsk.ff_22a = update_jkff(s0, s1, "22a KSEC  ");
616610
617611      /**
618612       * JK flip-flop 21b (sector task)
r26387r26388
625619       * Q   to 22a J
626620       * </PRE>
627621       */
628      DEBUG_NAME("\t\t21b KSEC  ");
629622      s0 = m_dsk.ff_21b;
630623      s1 = m_sysclkb1[i];
631624      if (m_dsk.ff_21a & JKFF_Q)
r26387r26388
634627      s1 |= JKFF_S;
635628      if (!(m_dsk.ff_22b & JKFF_Q))
636629         s1 |= JKFF_C;
637      m_dsk.ff_21b = update_jkff(s0, s1);
630      m_dsk.ff_21b = update_jkff(s0, s1, "21b KSEC  ");
638631   }
639632
640633   // The 53b FF Q output is the WDINIT signal.
r26387r26388
716709    * Q   to seclate monoflop
717710    * </PRE>
718711    */
719   DEBUG_NAME("\t\t21a KSEC  ");
720712   s0 = m_dsk.ff_21a;
721713   s1 = dhd->get_sector_mark_0() ? JKFF_CLK : JKFF_0;
722714   if (!(m_dsk.ff_22b & JKFF_Q))
r26387r26388
726718      s1 |= JKFF_S;
727719   if (!(m_dsk.ff_22b & JKFF_Q))
728720      s1 |= JKFF_C;
729   m_dsk.ff_21a = update_jkff(s0, s1);
721   m_dsk.ff_21a = update_jkff(s0, s1, "21a KSEC  ");
730722
731723   // If the KSEC FF 21a Q goes 1, pulse the SECLATE signal for some time.
732724   if (!(m_dsk.ff_21a_old & JKFF_Q) && (m_dsk.ff_21a & JKFF_Q)) {
r26387r26388
872864       * Q   to seekok
873865       * </PRE>
874866       */
875      DEBUG_NAME("\t\t44a LAI   ");
876867      s0 = m_dsk.ff_44a;
877868      s1 = lai ? JKFF_CLK : JKFF_0;
878869      s1 |= JKFF_J;
879870      s1 |= JKFF_K;
880871      s1 |= JKFF_S;
881872      s1 |= JKFF_C;
882      m_dsk.ff_44a = update_jkff(s0, s1);
873      m_dsk.ff_44a = update_jkff(s0, s1, "44a LAI   ");
883874      if (dhd->get_addx_acknowledge_0() == 0 && (m_dsk.ff_44a & JKFF_Q)) {
884875         /* if address is acknowledged, and Q' of FF 44a, clear the strobe */
885876         m_dsk.strobe = 0;
r26387r26388
10551046    */
10561047   for (int i = 0; i < 2; i++) {
10571048      UINT8 s0, s1;
1058      DEBUG_NAME("\t\t44b CKSUM ");
10591049      s0 = m_dsk.ff_44b;
10601050      s1 = i ? JKFF_CLK : JKFF_0;
10611051      if (!GET_KSTAT_CKSUM(m_bus))
r26387r26388
10631053      s1 |= JKFF_K;
10641054      s1 |= JKFF_S;
10651055      s1 |= JKFF_C;
1066      m_dsk.ff_44b = update_jkff(s0, s1);
1056      m_dsk.ff_44b = update_jkff(s0, s1, "44b CKSUM ");
10671057   }
10681058}
10691059
r26387r26388
11941184    * C'   CLRSTAT'
11951185    * Q   to seekok
11961186    */
1197   DEBUG_NAME("\t\t44a LAI   ");
11981187   s0 = m_dsk.ff_44a;
11991188   s1 = m_dsk.ff_44a & JKFF_CLK;
12001189   s1 |= JKFF_J;
12011190   s1 |= JKFF_K;
12021191   s1 |= JKFF_S;
12031192   s1 &= ~JKFF_C;
1204   m_dsk.ff_44a = update_jkff(s0, s1);
1193   m_dsk.ff_44a = update_jkff(s0, s1, "44a LAI   ");
12051194
12061195   /* clears the CKSUM flip-flop 44b
12071196    * JK flip-flop 44b (KSTAT← clocked)
r26387r26388
12121201    * C'   CLRSTAT'
12131202    * Q   to seekok
12141203    */
1215   DEBUG_NAME("\t\t44b CKSUM ");
12161204   s0 = m_dsk.ff_44b;
12171205   s1 = m_dsk.ff_44b & JKFF_CLK;
12181206   s1 |= m_dsk.ff_44b & JKFF_J;
12191207   s1 |= JKFF_K;
12201208   s1 |= JKFF_S;
12211209   s1 &= ~JKFF_C;
1222   m_dsk.ff_44b = update_jkff(s0, s1);
1210   m_dsk.ff_44b = update_jkff(s0, s1, "44b CKSUM ");
12231211
12241212   /* clears the rdylat flip-flop 45a
12251213    * JK flip-flop 45a (ready latch)
r26387r26388
12301218    * C'   CLRSTAT'
12311219    * Q   RDYLAT'
12321220    */
1233   DEBUG_NAME("\t\t45a RDYLAT");
12341221   s0 = m_dsk.ff_45a;
12351222   s1 = m_dsk.ff_45a & JKFF_CLK;
12361223   if (dhd->get_ready_0())
r26387r26388
12381225   s1 |= JKFF_K;
12391226   s1 |= JKFF_S;
12401227   s1 &= ~JKFF_C;
1241   m_dsk.ff_45a = update_jkff(s0, s1);
1228   m_dsk.ff_45a = update_jkff(s0, s1, "45a RDYLAT");
12421229
12431230   /* sets the seqerr flip-flop 45b (Q' is SEQERR)
12441231    * JK flip-flop 45b (seqerr latch)
r26387r26388
12491236    * C'   1
12501237    * Q   to KSTAT[11] DATALATE
12511238    */
1252   DEBUG_NAME("\t\t45b SEQERR");
12531239   s0 = m_dsk.ff_45b;
12541240   s1 = m_dsk.ff_45b & JKFF_CLK;
12551241   s1 |= JKFF_J;
r26387r26388
12571243      s1 |= JKFF_K;
12581244   s1 &= ~JKFF_S;
12591245   s1 |= JKFF_C;
1260   m_dsk.ff_45b = update_jkff(s0, s1);
1246   m_dsk.ff_45b = update_jkff(s0, s1, "45b SEQERR");
12611247
12621248   /* set or reset monoflop 31a, depending on drive READY' */
12631249   m_dsk.ready_mf31a = dhd->get_ready_0();
branches/alto2/src/emu/cpu/alto2/a2disp.c
r26387r26388
530530
531531void alto2_cpu_device::reset_disp()
532532{
533   save_item(NAME(m_dsp.hlc));
534   save_item(NAME(m_dsp.a63));
535   save_item(NAME(m_dsp.a66));
536   save_item(NAME(m_dsp.setmode));
537   save_item(NAME(m_dsp.inverse));
538   save_item(NAME(m_dsp.halfclock));
539   save_item(NAME(m_dsp.clr));
540   save_item(NAME(m_dsp.fifo));
541   save_item(NAME(m_dsp.fifo_wr));
542   save_item(NAME(m_dsp.fifo_rd));
543   save_item(NAME(m_dsp.dht_blocks));
544   save_item(NAME(m_dsp.dwt_blocks));
545   save_item(NAME(m_dsp.curt_blocks));
546   save_item(NAME(m_dsp.curt_wakeup));
547   save_item(NAME(m_dsp.vblank));
548   save_item(NAME(m_dsp.xpreg));
549   save_item(NAME(m_dsp.csr));
550   save_item(NAME(m_dsp.curword));
551   save_item(NAME(m_dsp.curdata));
552
533553   m_dsp.state = 020;
534554   m_dsp.hlc = ALTO2_DISPLAY_HLC_START;
535555   m_dsp.a63 = 0;
branches/alto2/src/emu/cpu/alto2/alto2cpu.c
r26387r26388
1717//**************************************************************************
1818
1919const device_type ALTO2 = &device_creator<alto2_cpu_device>;
20
2021//**************************************************************************
22//  LOGGING AND DEBUGGING
23//**************************************************************************
24#if   ALTO2_DEBUG
25int g_log_types = LOG_ETH;
26int g_log_level = 8;
27bool g_log_newline = true;
28
29void logprintf(int type, int level, const char* format, ...)
30{
31   static const char* type_name[] = {
32      "[CPU]",
33      "[EMU]",
34      "[T01]",
35      "[T02]",
36      "[T03]",
37      "[KSEC]",
38      "[T05]",
39      "[T06]",
40      "[ETH]",
41      "[MRT]",
42      "[DWT]",
43      "[CURT]",
44      "[DHT]",
45      "[DVT]",
46      "[PART]",
47      "[KWD]",
48      "[T17]",
49      "[MEM]",
50      "[RAM]",
51      "[DRIVE]",
52      "[DISK]",
53      "[DISPL]",
54      "[MOUSE]",
55      "[HW]",
56      "[KBD]"
57   };
58   if (!(g_log_types & type))
59      return;
60   if (level > g_log_level)
61      return;
62   if (g_log_newline) {
63      // last line had a \n - print type name
64      for (int i = 0; i < sizeof(type_name)/sizeof(type_name[0]); i++)
65         if (type & (1 << i))
66            logerror("%-7s ", type_name[i]);
67   }
68   va_list ap;
69   va_start(ap, format);
70   vlogerror(format, ap);
71   va_end(ap);
72   g_log_newline = format[strlen(format) - 1] == '\n';
73}
74#endif
75
76//**************************************************************************
2177//  LIVE DEVICE
2278//**************************************************************************
2379
r26387r26388
85141
86142alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
87143   cpu_device(mconfig, ALTO2, "Xerox Alto-II", tag, owner, clock, "alto2", __FILE__),
88#if   ALTO2_DEBUG
89   m_log_types(LOG_ETH),
90   m_log_level(8),
91   m_log_newline(true),
92#endif
93144   m_ucode_config("ucode", ENDIANNESS_BIG, 32, 12, -2 ),
94145   m_const_config("const", ENDIANNESS_BIG, 16,  8, -1 ),
95146   m_iomem_config("iomem", ENDIANNESS_BIG, 16, 17, -1 ),
r26387r26388
196247   exit_memory();
197248}
198249
199#if   ALTO2_DEBUG
200// FIXME: define types (sections) and print the section like [emu] [kwd] ...
201// FIXME: use the level to suppress messages if logging is less verbose than level
202void alto2_cpu_device::logprintf(int type, int level, const char* format, ...)
203{
204   static const char* type_name[] = {
205      "[CPU]",
206      "[EMU]",
207      "[T01]",
208      "[T02]",
209      "[T03]",
210      "[KSEC]",
211      "[T05]",
212      "[T06]",
213      "[ETH]",
214      "[MRT]",
215      "[DWT]",
216      "[CURT]",
217      "[DHT]",
218      "[DVT]",
219      "[PART]",
220      "[KWD]",
221      "[T17]",
222      "[MEM]",
223      "[RAM]",
224      "[DRIVE]",
225      "[DISK]",
226      "[DISPL]",
227      "[MOUSE]",
228      "[HW]",
229      "[KBD]"
230   };
231   if (!(m_log_types & type))
232      return;
233   if (level > m_log_level)
234      return;
235   if (m_log_newline) {
236      // last line had a \n - print type name
237      for (int i = 0; i < sizeof(type_name)/sizeof(type_name[0]); i++)
238         if (type & (1 << i))
239            logerror("%-7s %11lld ", type_name[i], cycle());
240   }
241   va_list ap;
242   va_start(ap, format);
243   vlogerror(format, ap);
244   va_end(ap);
245   m_log_newline = format[strlen(format) - 1] == '\n';
246}
247#endif
248
249250//-------------------------------------------------
250251// driver interface to set diablo_hd_device
251252//-------------------------------------------------
r26387r26388
812813//  device_start - device-specific startup
813814//-------------------------------------------------
814815
815// FIXME
816816void alto2_cpu_device::device_start()
817817{
818818   // get a pointer to the IO address space
r26387r26388
929929   save_item(NAME(m_dsk.ff_45a));
930930   save_item(NAME(m_dsk.ff_45b));
931931#endif
932   save_item(NAME(m_dsp.hlc));
933   save_item(NAME(m_dsp.a63));
934   save_item(NAME(m_dsp.a66));
935   save_item(NAME(m_dsp.setmode));
936   save_item(NAME(m_dsp.inverse));
937   save_item(NAME(m_dsp.halfclock));
938   save_item(NAME(m_dsp.clr));
939   save_item(NAME(m_dsp.fifo));
940   save_item(NAME(m_dsp.fifo_wr));
941   save_item(NAME(m_dsp.fifo_rd));
942   save_item(NAME(m_dsp.dht_blocks));
943   save_item(NAME(m_dsp.dwt_blocks));
944   save_item(NAME(m_dsp.curt_blocks));
945   save_item(NAME(m_dsp.curt_wakeup));
946   save_item(NAME(m_dsp.vblank));
947   save_item(NAME(m_dsp.xpreg));
948   save_item(NAME(m_dsp.csr));
949   save_item(NAME(m_dsp.curword));
950   save_item(NAME(m_dsp.curdata));
951   save_item(NAME(m_mem.mar));
952   save_item(NAME(m_mem.rmdd));
953   save_item(NAME(m_mem.wmdd));
954   save_item(NAME(m_mem.md));
955   save_item(NAME(m_mem.cycle));
956   save_item(NAME(m_mem.access));
957   save_item(NAME(m_mem.error));
958   save_item(NAME(m_mem.mear));
959   save_item(NAME(m_mem.mecr));
960   save_item(NAME(m_emu.ir));
961   save_item(NAME(m_emu.skip));
962   save_item(NAME(m_emu.cy));
963   save_item(NAME(m_eth.fifo));
964   save_item(NAME(m_eth.fifo_rd));
965   save_item(NAME(m_eth.fifo_wr));
966   save_item(NAME(m_eth.status));
967   save_item(NAME(m_eth.rx_crc));
968   save_item(NAME(m_eth.tx_crc));
969   save_item(NAME(m_eth.rx_count));
970   save_item(NAME(m_eth.tx_count));
971   save_item(NAME(m_eth.breath_of_life));
972932
973933   state_add( A2_TASK,    "TASK",    m_task).callimport().formatstr("%6s");
974934   state_add( A2_MPC,     "MPC",     m_mpc).formatstr("%06O");
branches/alto2/src/emu/cpu/alto2/alto2cpu.h
r26387r26388
9696   reg = ((reg) & ~mask) | (((val) << X_BITSHIFT(width,to)) & mask); \
9797} while (0)
9898
99#if   ALTO2_DEBUG
100   enum LOG_TYPE_ENUM {
101      LOG_0,
102      LOG_CPU      = (1 <<  0),
103      LOG_EMU      = (1 <<  1),
104      LOG_T01      = (1 <<  2),
105      LOG_T02      = (1 <<  3),
106      LOG_T03      = (1 <<  4),
107      LOG_KSEC   = (1 <<  5),
108      LOG_T05      = (1 <<  6),
109      LOG_T06      = (1 <<  7),
110      LOG_ETH      = (1 <<  8),
111      LOG_MRT      = (1 <<  9),
112      LOG_DWT      = (1 << 10),
113      LOG_CURT   = (1 << 11),
114      LOG_DHT      = (1 << 12),
115      LOG_DVT      = (1 << 13),
116      LOG_PART   = (1 << 14),
117      LOG_KWD      = (1 << 15),
118      LOG_T17      = (1 << 16),
119      LOG_MEM      = (1 << 17),
120      LOG_RAM      = (1 << 18),
121      LOG_DRIVE   = (1 << 19),
122      LOG_DISK   = (1 << 20),
123      LOG_DISPL   = (1 << 21),
124      LOG_MOUSE   = (1 << 22),
125      LOG_HW      = (1 << 23),
126      LOG_KBD      = (1 << 24),
127      LOG_ALL      = ((1 << 25) - 1)
128   };
129   extern int m_log_types;
130   extern int m_log_level;
131   extern bool m_log_newline;
132   void logprintf(int type, int level, const char* format, ...);
133#   define   LOG(x) logprintf x
134#else
135#   define   LOG(x)
136#endif
137
99138//*******************************************
100139// define constants from the sub-devices
101140//*******************************************
r26387r26388
181220   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
182221
183222private:
184#if   ALTO2_DEBUG
185   enum {
186      LOG_0,
187      LOG_CPU      = (1 <<  0),
188      LOG_EMU      = (1 <<  1),
189      LOG_T01      = (1 <<  2),
190      LOG_T02      = (1 <<  3),
191      LOG_T03      = (1 <<  4),
192      LOG_KSEC   = (1 <<  5),
193      LOG_T05      = (1 <<  6),
194      LOG_T06      = (1 <<  7),
195      LOG_ETH      = (1 <<  8),
196      LOG_MRT      = (1 <<  9),
197      LOG_DWT      = (1 << 10),
198      LOG_CURT   = (1 << 11),
199      LOG_DHT      = (1 << 12),
200      LOG_DVT      = (1 << 13),
201      LOG_PART   = (1 << 14),
202      LOG_KWD      = (1 << 15),
203      LOG_T17      = (1 << 16),
204      LOG_MEM      = (1 << 17),
205      LOG_RAM      = (1 << 18),
206      LOG_DRIVE   = (1 << 19),
207      LOG_DISK   = (1 << 20),
208      LOG_DISPL   = (1 << 21),
209      LOG_MOUSE   = (1 << 22),
210      LOG_HW      = (1 << 23),
211      LOG_KBD      = (1 << 24),
212      LOG_ALL      = ((1 << 25) - 1)
213   };
214   int m_log_types;
215   int m_log_level;
216   bool m_log_newline;
217   void logprintf(int type, int level, const char* format, ...);
218#   define   LOG(x) logprintf x
219#else
220#   define   LOG(x)
221#endif
222223
223224   void fatal(int level, const char *format, ...);
224225
branches/alto2/src/emu/cpu/alto2/a2mem.c
r26387r26388
826826
827827void alto2_cpu_device::reset_memory()
828828{
829   save_item(NAME(m_mem.mar));
830   save_item(NAME(m_mem.rmdd));
831   save_item(NAME(m_mem.wmdd));
832   save_item(NAME(m_mem.md));
833   save_item(NAME(m_mem.cycle));
834   save_item(NAME(m_mem.access));
835   save_item(NAME(m_mem.error));
836   save_item(NAME(m_mem.mear));
837   save_item(NAME(m_mem.mecr));
838
829839   if (m_mem.ram) {
830840      auto_free(machine(), m_mem.ram);
831841      m_mem.ram = 0;
branches/alto2/src/emu/cpu/alto2/a2jkff.h
r26387r26388
99 *****************************************************************************/
1010#ifdef  ALTO2_DEFINE_CONSTANTS
1111
12#define   JKFF_FUNCTION   0   //!< define 1 to debug the JK flip-flops, 0 to use a lookup table
12#define   JKFF_DEBUG      0   //!< define 1 to debug the transitions
1313
1414/**
1515 * @brief enumeration of the inputs and outputs of a JK flip-flop type 74109
r26387r26388
4444   JKFF_Q0      = (1 << 6)   //!< Q' output
4545}   jkff_t;
4646
47#if   ALTO2_DEBUG
48/** @brief macro to set the name of a FF in DEBUG=1 builds only */
49extern const char* jkff_name;
50#define   DEBUG_NAME(x)   jkff_name = x
51#else
52#define   DEBUG_NAME(x)
53#endif
54
5547#else   // ALTO2_DEFINE_CONSTANTS
5648
5749#ifndef _A2JKFF_H_
5850#define _A2JKFF_H_
5951
60jkff_t update_jkff(UINT8 s0, UINT8 s1);   //!< simulate a 74109 J-K flip-flop with set and reset inputs
52#if   JKFF_DEBUG
53/**
54 * @brief simulate a 74109 J-K flip-flop with set and reset inputs
55 *
56 * @param s0 is the previous state of the FF's in- and outputs
57 * @param s1 is the next state
58 * @return returns the next state and probably modified Q output
59 */
60static inline jkff_t update_jkff(UINT8 s0, UINT8 s1, const char* jkff_name)
61{
62   switch (s1 & (JKFF_C | JKFF_S))
63   {
64   case JKFF_C | JKFF_S:   /* C' is 1, and S' is 1 */
65      if (((s0 ^ s1) & s1) & JKFF_CLK) {
66         /* rising edge of the clock */
67         switch (s1 & (JKFF_J | JKFF_K))
68         {
69         case 0:
70            /* both J and K' are 0: set Q to 0, Q' to 1 */
71            s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
72            if (s0 & JKFF_Q) {
73               LOG((LOG_DISK,9,"\t\t%s J:0 K':0 → Q:0\n", jkff_name));
74            }
75            break;
76         case JKFF_J:
77            /* J is 1, and K' is 0: toggle Q */
78            if (s0 & JKFF_Q)
79               s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
80            else
81               s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
82            LOG((LOG_DISK,9,"\t\t%s J:0 K':1 flip-flop Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0));
83            break;
84         case JKFF_K:
85            if ((s0 ^ s1) & JKFF_Q) {
86               LOG((LOG_DISK,9,"\t\t%s J:0 K':1 keep Q:%d\n", jkff_name, (s1 & JKFF_Q) ? 1 : 0));
87            }
88            /* J is 0, and K' is 1: keep Q as is */
89            if (s0 & JKFF_Q)
90               s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
91            else
92               s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
93            break;
94         case JKFF_J | JKFF_K:
95            /* both J and K' are 1: set Q to 1 */
96            s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
97            if (!(s0 & JKFF_Q)) {
98               LOG((LOG_DISK,9,"\t\t%s J:1 K':1 → Q:1\n", jkff_name));
99            }
100            break;
101         }
102      } else {
103         /* keep Q */
104         s1 = (s1 & ~JKFF_Q) | (s0 & JKFF_Q);
105      }
106      break;
107   case JKFF_S:
108      /* S' is 1, C' is 0: set Q to 0, Q' to 1 */
109      s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
110      if (s0 & JKFF_Q) {
111         LOG((LOG_DISK,9,"\t\t%s C':0 → Q:0\n", jkff_name));
112      }
113      break;
114   case JKFF_C:
115      /* S' is 0, C' is 1: set Q to 1, Q' to 0 */
116      s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
117      if (!(s0 & JKFF_Q)) {
118         LOG((LOG_DISK,9,"\t\t%s S':0 → Q:1\n", jkff_name));
119      }
120      break;
121   case 0:
122   default:
123      /* unstable state (what to do?) */
124      s1 = s1 | JKFF_Q | JKFF_Q0;
125      LOG((LOG_DISK,9,"\t\t%s C':0 S':0 → Q:1 and Q':1 <unstable>\n", jkff_name));
126      break;
127   }
128   return static_cast<jkff_t>(s1);
129}
130#else   // JKFF_DEBUG
131/**
132 * @brief simulate a 74109 J-K flip-flop with set and reset inputs
133 *
134 * @param s0 is the previous state of the FF's in- and outputs
135 * @param s1 is the next state
136 * @return returns the next state and probably modified Q output
137 */
138static inline jkff_t update_jkff(UINT8 s0, UINT8 s1, const char*)
139{
140   switch (s1 & (JKFF_C | JKFF_S))
141   {
142   case JKFF_C | JKFF_S:   /* C' is 1, and S' is 1 */
143      if (((s0 ^ s1) & s1) & JKFF_CLK) {
144         /* rising edge of the clock */
145         switch (s1 & (JKFF_J | JKFF_K))
146         {
147         case 0:
148            /* both J and K' are 0: set Q to 0, Q' to 1 */
149            s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
150            break;
151         case JKFF_J:
152            /* J is 1, and K' is 0: toggle Q */
153            if (s0 & JKFF_Q)
154               s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
155            else
156               s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
157            break;
158         case JKFF_K:
159            /* J is 0, and K' is 1: keep Q as is */
160            if (s0 & JKFF_Q)
161               s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
162            else
163               s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
164            break;
165         case JKFF_J | JKFF_K:
166            /* both J and K' are 1: set Q to 1 */
167            s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
168            break;
169         }
170      } else {
171         /* keep Q */
172         s1 = (s1 & ~JKFF_Q) | (s0 & JKFF_Q);
173      }
174      break;
175   case JKFF_S:
176      /* S' is 1, C' is 0: set Q to 0, Q' to 1 */
177      s1 = (s1 & ~JKFF_Q) | JKFF_Q0;
178      break;
179   case JKFF_C:
180      /* S' is 0, C' is 1: set Q to 1, Q' to 0 */
181      s1 = (s1 | JKFF_Q) & ~JKFF_Q0;
182      break;
183   case 0:
184   default:
185      /* unstable state (what to do?) */
186      s1 = s1 | JKFF_Q | JKFF_Q0;
187      break;
188   }
189   return static_cast<jkff_t>(s1);
190}
191#endif   // JKFF_DEBUG
61192
62193#endif   // _A2JKFF_H_
63194#endif   // ALTO2_DEFINE_CONSTANTS
branches/alto2/src/emu/cpu/alto2/a2emu.c
r26387r26388
677677
678678void alto2_cpu_device::init_emu(int task)
679679{
680   save_item(NAME(m_emu.ir));
681   save_item(NAME(m_emu.skip));
682   save_item(NAME(m_emu.cy));
683
680684   init_ram(task);
681685
682686   set_bs(task, bs_emu_read_sreg,      &alto2_cpu_device::bs_early_read_sreg, 0);
branches/alto2/src/emu/cpu/alto2/a2ether.c
r26387r26388
840840 */
841841void alto2_cpu_device::init_ether(int task)
842842{
843   save_item(NAME(m_eth.fifo));
844   save_item(NAME(m_eth.fifo_rd));
845   save_item(NAME(m_eth.fifo_wr));
846   save_item(NAME(m_eth.status));
847   save_item(NAME(m_eth.rx_crc));
848   save_item(NAME(m_eth.tx_crc));
849   save_item(NAME(m_eth.rx_count));
850   save_item(NAME(m_eth.tx_count));
851   save_item(NAME(m_eth.breath_of_life));
852
843853   // intialize all ethernet variables
844854   memset(&m_eth, 0, sizeof(m_eth));
845855
branches/alto2/src/emu/cpu/cpu.mak
r26387r26388
22772277ifneq ($(filter ALTO2,$(CPUS)),)
22782278OBJDIRS += $(CPUOBJ)/alto2
22792279CPUOBJS += $(CPUOBJ)/alto2/alto2cpu.o \
2280   $(CPUOBJ)/alto2/a2jkff.o \
22812280   $(CPUOBJ)/alto2/a2disk.o \
22822281   $(CPUOBJ)/alto2/a2disp.o \
22832282   $(CPUOBJ)/alto2/a2curt.o \
r26387r26388
23032302$(CPUOBJ)/alto2/alto2cpu.o: $(CPUSRC)/alto2/alto2cpu.c \
23042303                     $(CPUSRC)/alto2/alto2cpu.h
23052304
2306$(CPUOBJ)/alto2/a2jkff.o:   $(CPUSRC)/alto2/a2jkff.c \
2307                     $(CPUSRC)/alto2/a2jkff.h \
2308                     $(CPUSRC)/alto2/alto2cpu.h
2309
23102305$(CPUOBJ)/alto2/a2disk.o:   $(CPUSRC)/alto2/a2disk.c \
23112306                     $(CPUSRC)/alto2/a2disk.h \
23122307                     $(CPUSRC)/alto2/alto2cpu.h
branches/alto2/src/mess/drivers/alto2.c
r26387r26388
1919
2020static INPUT_PORTS_START( alto2 )
2121   PORT_START("ROW0")
22   PORT_KEY(A2_KEY_5,          KEYCODE_5,          '5',    '%',  "5" SPACING "%")  //!< normal: 5    shifted: %
23   PORT_KEY(A2_KEY_4,          KEYCODE_4,          '4',    '$',  "4" SPACING "$")  //!< normal: 4    shifted: $
24   PORT_KEY(A2_KEY_6,          KEYCODE_6,          '6',    '~',  "6" SPACING "~")  //!< normal: 6    shifted: ~
25   PORT_KEY(A2_KEY_E,          KEYCODE_E,          'e',    'E',  "e" SPACING "E")  //!< normal: e    shifted: E
26   PORT_KEY(A2_KEY_7,          KEYCODE_7,          '7',    '&',  "7" SPACING "&")  //!< normal: 7    shifted: &
27   PORT_KEY(A2_KEY_D,          KEYCODE_D,          'd',    'D',  "d" SPACING "D")  //!< normal: d    shifted: D
28   PORT_KEY(A2_KEY_U,          KEYCODE_U,          'u',    'U',  "u" SPACING "U")  //!< normal: u    shifted: U
29   PORT_KEY(A2_KEY_V,          KEYCODE_V,          'v',    'V',  "v" SPACING "V")  //!< normal: v    shifted: V
30   PORT_KEY(A2_KEY_0,          KEYCODE_0,          '0',    ')',  "0" SPACING ")")  //!< normal: 0    shifted: )
31   PORT_KEY(A2_KEY_K,          KEYCODE_K,          'k',    'K',  "k" SPACING "K")  //!< normal: k    shifted: K
32   PORT_KEY(A2_KEY_MINUS,      KEYCODE_MINUS,      '-',    '_',  "-" SPACING "_")  //!< normal: -    shifted: _
33   PORT_KEY(A2_KEY_P,          KEYCODE_P,          'p',    'P',  "p" SPACING "P")  //!< normal: p    shifted: P
34   PORT_KEY(A2_KEY_SLASH,      KEYCODE_SLASH,      '/',    '?',  "/" SPACING "?")  //!< normal: /    shifted: ?
35   PORT_KEY(A2_KEY_BACKSLASH,  KEYCODE_BACKSLASH,  '\\',   '|', "\\" SPACING "|")  //!< normal: \    shifted: |
36   PORT_KEY(A2_KEY_LF,         KEYCODE_DOWN,       '\012', 0,    "LF"           )  //!< normal: LF   shifted: ?
37   PORT_KEY(A2_KEY_BS,         KEYCODE_BACKSPACE,  '\010', 0,    "BS"           )  //!< normal: BS   shifted: ?
22   PORT_KEY(A2_KEY_5,          KEYCODE_5,          '5',            '%',          "5" SPACING "%")  //!< normal: 5    shifted: %
23   PORT_KEY(A2_KEY_4,          KEYCODE_4,          '4',            '$',          "4" SPACING "$")  //!< normal: 4    shifted: $
24   PORT_KEY(A2_KEY_6,          KEYCODE_6,          '6',            '~',          "6" SPACING "~")  //!< normal: 6    shifted: ~
25   PORT_KEY(A2_KEY_E,          KEYCODE_E,          'e',            'E',          "e" SPACING "E")  //!< normal: e    shifted: E
26   PORT_KEY(A2_KEY_7,          KEYCODE_7,          '7',            '&',          "7" SPACING "&")  //!< normal: 7    shifted: &
27   PORT_KEY(A2_KEY_D,          KEYCODE_D,          'd',            'D',          "d" SPACING "D")  //!< normal: d    shifted: D
28   PORT_KEY(A2_KEY_U,          KEYCODE_U,          'u',            'U',          "u" SPACING "U")  //!< normal: u    shifted: U
29   PORT_KEY(A2_KEY_V,          KEYCODE_V,          'v',            'V',          "v" SPACING "V")  //!< normal: v    shifted: V
30   PORT_KEY(A2_KEY_0,          KEYCODE_0,          '0',            ')',          "0" SPACING ")")  //!< normal: 0    shifted: )
31   PORT_KEY(A2_KEY_K,          KEYCODE_K,          'k',            'K',          "k" SPACING "K")  //!< normal: k    shifted: K
32   PORT_KEY(A2_KEY_MINUS,      KEYCODE_MINUS,      '-',            '_',          "-" SPACING "_")  //!< normal: -    shifted: _
33   PORT_KEY(A2_KEY_P,          KEYCODE_P,          'p',            'P',          "p" SPACING "P")  //!< normal: p    shifted: P
34   PORT_KEY(A2_KEY_SLASH,      KEYCODE_SLASH,      '/',            '?',          "/" SPACING "?")  //!< normal: /    shifted: ?
35   PORT_KEY(A2_KEY_BACKSLASH,  KEYCODE_BACKSLASH,  '\\',           '|',         "\\" SPACING "|")  //!< normal: \    shifted: |
36   PORT_KEY(A2_KEY_LF,         KEYCODE_DOWN,       10,             10,           "LF"           )  //!< normal: LF   shifted: ?
37   PORT_KEY(A2_KEY_BS,         KEYCODE_BACKSPACE,  8,              8,            "BS"           )  //!< normal: BS   shifted: ?
3838
3939   PORT_START("ROW1")
40   PORT_KEY(A2_KEY_3,          KEYCODE_3,          '3',    '#',  "3" SPACING "#")  //!< normal: 3    shifted: #
41   PORT_KEY(A2_KEY_2,          KEYCODE_2,          '2',    '@',  "2" SPACING "@")  //!< normal: 2    shifted: @
42   PORT_KEY(A2_KEY_W,          KEYCODE_W,          'w',    'W',  "w" SPACING "W")  //!< normal: w    shifted: W
43   PORT_KEY(A2_KEY_Q,          KEYCODE_Q,          'q',    'Q',  "q" SPACING "Q")  //!< normal: q    shifted: Q
44   PORT_KEY(A2_KEY_S,          KEYCODE_S,          's',    'S',  "s" SPACING "S")  //!< normal: s    shifted: S
45   PORT_KEY(A2_KEY_A,          KEYCODE_A,          'a',    'A',  "a" SPACING "A")  //!< normal: a    shifted: A
46   PORT_KEY(A2_KEY_9,          KEYCODE_9,          '9',    '(',  "9" SPACING "(")  //!< normal: 9    shifted: (
47   PORT_KEY(A2_KEY_I,          KEYCODE_I,          'i',    'I',  "i" SPACING "I")  //!< normal: i    shifted: I
48   PORT_KEY(A2_KEY_X,          KEYCODE_X,          'x',    'X',  "x" SPACING "X")  //!< normal: x    shifted: X
49   PORT_KEY(A2_KEY_O,          KEYCODE_O,          'o',    'O',  "o" SPACING "O")  //!< normal: o    shifted: O
50   PORT_KEY(A2_KEY_L,          KEYCODE_L,          'l',    'L',  "l" SPACING "L")  //!< normal: l    shifted: L
51   PORT_KEY(A2_KEY_COMMA,      KEYCODE_COMMA,      ',',    '<',  "," SPACING "<")  //!< normal: ,    shifted: <
52   PORT_KEY(A2_KEY_QUOTE,      KEYCODE_QUOTE,      '\x27', '"',  "'" SPACING "\"") //!< normal: '    shifted: "
53   PORT_KEY(A2_KEY_RBRACKET,   KEYCODE_CLOSEBRACE, ']',    '}',  "]" SPACING "}")  //!< normal: ]    shifted: }
54   PORT_KEY(A2_KEY_BLANK_MID,  KEYCODE_END,        0,      0,    "MID"          )  //!< middle blank key
55   PORT_KEY(A2_KEY_BLANK_TOP,  KEYCODE_PGUP,       0,      0,    "TOP"          )  //!< top blank key
40   PORT_KEY(A2_KEY_3,          KEYCODE_3,          '3',            '#',          "3" SPACING "#")  //!< normal: 3    shifted: #
41   PORT_KEY(A2_KEY_2,          KEYCODE_2,          '2',            '@',          "2" SPACING "@")  //!< normal: 2    shifted: @
42   PORT_KEY(A2_KEY_W,          KEYCODE_W,          'w',            'W',          "w" SPACING "W")  //!< normal: w    shifted: W
43   PORT_KEY(A2_KEY_Q,          KEYCODE_Q,          'q',            'Q',          "q" SPACING "Q")  //!< normal: q    shifted: Q
44   PORT_KEY(A2_KEY_S,          KEYCODE_S,          's',            'S',          "s" SPACING "S")  //!< normal: s    shifted: S
45   PORT_KEY(A2_KEY_A,          KEYCODE_A,          'a',            'A',          "a" SPACING "A")  //!< normal: a    shifted: A
46   PORT_KEY(A2_KEY_9,          KEYCODE_9,          '9',            '(',          "9" SPACING "(")  //!< normal: 9    shifted: (
47   PORT_KEY(A2_KEY_I,          KEYCODE_I,          'i',            'I',          "i" SPACING "I")  //!< normal: i    shifted: I
48   PORT_KEY(A2_KEY_X,          KEYCODE_X,          'x',            'X',          "x" SPACING "X")  //!< normal: x    shifted: X
49   PORT_KEY(A2_KEY_O,          KEYCODE_O,          'o',            'O',          "o" SPACING "O")  //!< normal: o    shifted: O
50   PORT_KEY(A2_KEY_L,          KEYCODE_L,          'l',            'L',          "l" SPACING "L")  //!< normal: l    shifted: L
51   PORT_KEY(A2_KEY_COMMA,      KEYCODE_COMMA,      ',',            '<',          "," SPACING "<")  //!< normal: ,    shifted: <
52   PORT_KEY(A2_KEY_QUOTE,      KEYCODE_QUOTE,      39,             34,           "'" SPACING "\"") //!< normal: '    shifted: "
53   PORT_KEY(A2_KEY_RBRACKET,   KEYCODE_CLOSEBRACE, ']',            '}',          "]" SPACING "}")  //!< normal: ]    shifted: }
54   PORT_KEY(A2_KEY_BLANK_MID,  KEYCODE_END,        0,              0,            "MID"          )  //!< middle blank key
55   PORT_KEY(A2_KEY_BLANK_TOP,  KEYCODE_PGUP,       0,              0,            "TOP"          )  //!< top blank key
5656
5757   PORT_START("ROW2")
58   PORT_KEY(A2_KEY_1,          KEYCODE_1,          '1',    '!',  "1" SPACING "!")  //!< normal: 1    shifted: !
59   PORT_KEY(A2_KEY_ESCAPE,     KEYCODE_ESC,        '\x1b', 0,    "ESC"          )  //!< normal: ESC  shifted: ?
60   PORT_KEY(A2_KEY_TAB,        KEYCODE_TAB,        '\011', 0,    "TAB"          )  //!< normal: TAB  shifted: ?
61   PORT_KEY(A2_KEY_F,          KEYCODE_F,          'f',    'F',  "f" SPACING "F")  //!< normal: f    shifted: F
62   PORT_KEY(A2_KEY_CTRL,       KEYCODE_LCONTROL,   0,      0,    "CTRL"         )  //!< CTRL
63   PORT_KEY(A2_KEY_C,          KEYCODE_C,          'c',    'C',  "c" SPACING "C")  //!< normal: c    shifted: C
64   PORT_KEY(A2_KEY_J,          KEYCODE_J,          'j',    'J',  "j" SPACING "J")  //!< normal: j    shifted: J
65   PORT_KEY(A2_KEY_B,          KEYCODE_B,          'b',    'B',  "b" SPACING "B")  //!< normal: b    shifted: B
66   PORT_KEY(A2_KEY_Z,          KEYCODE_Z,          'z',    'Z',  "z" SPACING "Z")  //!< normal: z    shifted: Z
67   PORT_KEY(A2_KEY_LSHIFT,     KEYCODE_LSHIFT,     0,      0,    "LSHIFT"       )  //!< LSHIFT
68   PORT_KEY(A2_KEY_PERIOD,     KEYCODE_STOP,       '.',    '>',  "." SPACING ">")  //!< normal: .    shifted: >
69   PORT_KEY(A2_KEY_SEMICOLON,  KEYCODE_COLON,      ';',    ':',  ";" SPACING ":")  //!< normal: ;    shifted: :
70   PORT_KEY(A2_KEY_RETURN,     KEYCODE_ENTER,      '\013', 0,    "RETURN"       )  //!< RETURN
71   PORT_KEY(A2_KEY_LEFTARROW,  KEYCODE_LEFT,       0,      0,    "←" SPACING "↑")  //!< normal: left arrow   shifted: up arrow (caret)
72   PORT_KEY(A2_KEY_DEL,        KEYCODE_DEL,        0,      0,    "DEL"          )  //!< normal: DEL  shifted: ?
73   PORT_KEY(A2_KEY_MSW_2_17,   KEYCODE_MENU,       0,      0,    "MSW2/17"      )  //!< unused on Microswitch KDB
58   PORT_KEY(A2_KEY_1,          KEYCODE_1,          '1',            '!',          "1" SPACING "!")  //!< normal: 1    shifted: !
59   PORT_KEY(A2_KEY_ESCAPE,     KEYCODE_ESC,        27,             0,            "ESC"          )  //!< normal: ESC  shifted: ?
60   PORT_KEY(A2_KEY_TAB,        KEYCODE_TAB,        9,              0,            "TAB"          )  //!< normal: TAB  shifted: ?
61   PORT_KEY(A2_KEY_F,          KEYCODE_F,          'f',            'F',          "f" SPACING "F")  //!< normal: f    shifted: F
62   PORT_KEY(A2_KEY_CTRL,       KEYCODE_LCONTROL,   0,              0,            "CTRL"         )  //!< CTRL
63   PORT_KEY(A2_KEY_C,          KEYCODE_C,          'c',            'C',          "c" SPACING "C")  //!< normal: c    shifted: C
64   PORT_KEY(A2_KEY_J,          KEYCODE_J,          'j',            'J',          "j" SPACING "J")  //!< normal: j    shifted: J
65   PORT_KEY(A2_KEY_B,          KEYCODE_B,          'b',            'B',          "b" SPACING "B")  //!< normal: b    shifted: B
66   PORT_KEY(A2_KEY_Z,          KEYCODE_Z,          'z',            'Z',          "z" SPACING "Z")  //!< normal: z    shifted: Z
67   PORT_KEY(A2_KEY_LSHIFT,     KEYCODE_LSHIFT,     UCHAR_SHIFT_1,  0,            "LSHIFT"       )  //!< LSHIFT
68   PORT_KEY(A2_KEY_PERIOD,     KEYCODE_STOP,       '.',            '>',          "." SPACING ">")  //!< normal: .    shifted: >
69   PORT_KEY(A2_KEY_SEMICOLON,  KEYCODE_COLON,      ';',            ':',          ";" SPACING ":")  //!< normal: ;    shifted: :
70   PORT_KEY(A2_KEY_RETURN,     KEYCODE_ENTER,      13,             0,            "RETURN"       )  //!< RETURN
71   PORT_KEY(A2_KEY_LEFTARROW,  KEYCODE_LEFT,       0,              0,            "←" SPACING "↑")  //!< normal: left arrow   shifted: up arrow (caret)
72   PORT_KEY(A2_KEY_DEL,        KEYCODE_DEL,        UCHAR_MAMEKEY(DEL), 0,        "DEL"          )  //!< normal: DEL  shifted: ?
73   PORT_KEY(A2_KEY_MSW_2_17,   KEYCODE_MENU,       0,              0,            "MSW2/17"      )  //!< unused on Microswitch KDB
7474
7575   PORT_START("ROW3")
76   PORT_KEY(A2_KEY_R,          KEYCODE_R,          'r',    'R',  "r" SPACING "R")  //!< normal: r    shifted: R
77   PORT_KEY(A2_KEY_T,          KEYCODE_T,          't',    'T',  "t" SPACING "T")  //!< normal: t    shifted: T
78   PORT_KEY(A2_KEY_G,          KEYCODE_G,          'g',    'G',  "g" SPACING "G")  //!< normal: g    shifted: G
79   PORT_KEY(A2_KEY_Y,          KEYCODE_Y,          'y',    'Y',  "y" SPACING "Y")  //!< normal: y    shifted: Y
80   PORT_KEY(A2_KEY_H,          KEYCODE_H,          'h',    'H',  "h" SPACING "H")  //!< normal: h    shifted: H
81   PORT_KEY(A2_KEY_8,          KEYCODE_8,          '8',    '*',  "8" SPACING "*")  //!< normal: 8    shifted: *
82   PORT_KEY(A2_KEY_N,          KEYCODE_N,          'n',    'N',  "n" SPACING "N")  //!< normal: n    shifted: N
83   PORT_KEY(A2_KEY_M,          KEYCODE_M,          'm',    'M',  "m" SPACING "M")  //!< normal: m    shifted: M
84   PORT_KEY(A2_KEY_LOCK,       KEYCODE_SCRLOCK,    0,      0,    "LOCK"         )  //!< LOCK
85   PORT_KEY(A2_KEY_SPACE,      KEYCODE_SPACE,      ' ',    0,    "SPACE"        )  //!< SPACE
86   PORT_KEY(A2_KEY_LBRACKET,   KEYCODE_OPENBRACE,  '[',    '{',  "[" SPACING "{")  //!< normal: [    shifted: {
87   PORT_KEY(A2_KEY_EQUALS,     KEYCODE_EQUALS,     '=',    '+',  "=" SPACING "+")  //!< normal: =    shifted: +
88   PORT_KEY(A2_KEY_RSHIFT,     KEYCODE_RSHIFT,     0,      0,    "RSHIFT"       )  //!< RSHIFT
89   PORT_KEY(A2_KEY_BLANK_BOT,  KEYCODE_PGDN,       0,      0,    "BOT"          )  //!< bottom blank key
90   PORT_KEY(A2_KEY_MSW_3_16,   KEYCODE_HOME,       0,      0,    "MSW3/16"      )  //!< unused on Microswitch KDB
91   PORT_KEY(A2_KEY_MSW_3_17,   KEYCODE_INSERT,     0,      0,    "MSW3/17"      )  //!< unused on Microswitch KDB
76   PORT_KEY(A2_KEY_R,          KEYCODE_R,          'r',            'R',          "r" SPACING "R")  //!< normal: r    shifted: R
77   PORT_KEY(A2_KEY_T,          KEYCODE_T,          't',            'T',          "t" SPACING "T")  //!< normal: t    shifted: T
78   PORT_KEY(A2_KEY_G,          KEYCODE_G,          'g',            'G',          "g" SPACING "G")  //!< normal: g    shifted: G
79   PORT_KEY(A2_KEY_Y,          KEYCODE_Y,          'y',            'Y',          "y" SPACING "Y")  //!< normal: y    shifted: Y
80   PORT_KEY(A2_KEY_H,          KEYCODE_H,          'h',            'H',          "h" SPACING "H")  //!< normal: h    shifted: H
81   PORT_KEY(A2_KEY_8,          KEYCODE_8,          '8',            '*',          "8" SPACING "*")  //!< normal: 8    shifted: *
82   PORT_KEY(A2_KEY_N,          KEYCODE_N,          'n',            'N',          "n" SPACING "N")  //!< normal: n    shifted: N
83   PORT_KEY(A2_KEY_M,          KEYCODE_M,          'm',            'M',          "m" SPACING "M")  //!< normal: m    shifted: M
84   PORT_KEY(A2_KEY_LOCK,       KEYCODE_SCRLOCK,    0,              0,            "LOCK"         )  //!< LOCK
85   PORT_KEY(A2_KEY_SPACE,      KEYCODE_SPACE,      32,             0,            "SPACE"        )  //!< SPACE
86   PORT_KEY(A2_KEY_LBRACKET,   KEYCODE_OPENBRACE,  '[',            '{',          "[" SPACING "{")  //!< normal: [    shifted: {
87   PORT_KEY(A2_KEY_EQUALS,     KEYCODE_EQUALS,     '=',            '+',          "=" SPACING "+")  //!< normal: =    shifted: +
88   PORT_KEY(A2_KEY_RSHIFT,     KEYCODE_RSHIFT,     UCHAR_SHIFT_2,  0,            "RSHIFT"       )  //!< RSHIFT
89   PORT_KEY(A2_KEY_BLANK_BOT,  KEYCODE_PGDN,       0,              0,            "BOT"          )  //!< bottom blank key
90   PORT_KEY(A2_KEY_MSW_3_16,   KEYCODE_HOME,       0,              0,            "MSW3/16"      )  //!< unused on Microswitch KDB
91   PORT_KEY(A2_KEY_MSW_3_17,   KEYCODE_INSERT,     0,              0,            "MSW3/17"      )  //!< unused on Microswitch KDB
9292
9393   PORT_START("ROW4")
94   PORT_KEY(A2_KEY_FR2,        KEYCODE_F6,         0,      0,    "FR2"          )  //!< ADL right function key 2
95   PORT_KEY(A2_KEY_FL2,        KEYCODE_F2,         0,      0,    "FL2"          )  //!< ADL left function key 2
94   PORT_KEY(A2_KEY_FR2,        KEYCODE_F6,         0,              0,            "FR2"          )  //!< ADL right function key 2
95   PORT_KEY(A2_KEY_FL2,        KEYCODE_F2,         0,              0,            "FL2"          )  //!< ADL left function key 2
9696
9797   PORT_START("ROW5")
98   PORT_KEY(A2_KEY_FR4,        KEYCODE_F8,         0,      0,    "FR4"          )  //!< ADL right funtion key 4
99   PORT_KEY(A2_KEY_BW,         KEYCODE_F10,        0,      0,    "BW"           )  //!< ADL BW (?)
98   PORT_KEY(A2_KEY_FR4,        KEYCODE_F8,         0,              0,            "FR4"          )  //!< ADL right funtion key 4
99   PORT_KEY(A2_KEY_BW,         KEYCODE_F10,        0,              0,            "BW"           )  //!< ADL BW (?)
100100
101101   PORT_START("ROW6")
102   PORT_KEY(A2_KEY_FR3,        KEYCODE_F7,         0,      0,    "FR3"          )  //!< ADL right function key 3
103   PORT_KEY(A2_KEY_FL1,        KEYCODE_F1,         0,      0,    "FL1"          )  //!< ADL left function key 1
104   PORT_KEY(A2_KEY_FL3,        KEYCODE_F3,         0,      0,    "FL3"          )  //!< ADL left function key 3
102   PORT_KEY(A2_KEY_FR3,        KEYCODE_F7,         0,              0,            "FR3"          )  //!< ADL right function key 3
103   PORT_KEY(A2_KEY_FL1,        KEYCODE_F1,         0,              0,            "FL1"          )  //!< ADL left function key 1
104   PORT_KEY(A2_KEY_FL3,        KEYCODE_F3,         0,              0,            "FL3"          )  //!< ADL left function key 3
105105
106106   PORT_START("ROW7")
107   PORT_KEY(A2_KEY_FR1,        KEYCODE_F5,         0,      0,    "FR1"          )  //!< ADL right function key 1
108   PORT_KEY(A2_KEY_FL4,        KEYCODE_F4,         0,      0,    "FL4"          )  //!< ADL left function key 4
109   PORT_KEY(A2_KEY_FR5,        KEYCODE_F9,         0,      0,    "FR5"          )  //!< ADL right function key 5
107   PORT_KEY(A2_KEY_FR1,        KEYCODE_F5,         0,              0,            "FR1"          )  //!< ADL right function key 1
108   PORT_KEY(A2_KEY_FL4,        KEYCODE_F4,         0,              0,            "FL4"          )  //!< ADL left function key 4
109   PORT_KEY(A2_KEY_FR5,        KEYCODE_F9,         0,              0,            "FR5"          )  //!< ADL right function key 5
110110
111111   PORT_START("mouseb")   // Mouse buttons
112112   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse RED (left)")      PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER( ":maincpu", alto2_cpu_device, mouse_buttons, 0 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team