trunk/src/mame/machine/mathbox.c
r23306 | r23307 | |
8 | 8 | #include "emu.h" |
9 | 9 | #include "mathbox.h" |
10 | 10 | |
11 | | #define REG0 mb->reg [0x00] |
12 | | #define REG1 mb->reg [0x01] |
13 | | #define REG2 mb->reg [0x02] |
14 | | #define REG3 mb->reg [0x03] |
15 | | #define REG4 mb->reg [0x04] |
16 | | #define REG5 mb->reg [0x05] |
17 | | #define REG6 mb->reg [0x06] |
18 | | #define REG7 mb->reg [0x07] |
19 | | #define REG8 mb->reg [0x08] |
20 | | #define REG9 mb->reg [0x09] |
21 | | #define REGa mb->reg [0x0a] |
22 | | #define REGb mb->reg [0x0b] |
23 | | #define REGc mb->reg [0x0c] |
24 | | #define REGd mb->reg [0x0d] |
25 | | #define REGe mb->reg [0x0e] |
26 | | #define REGf mb->reg [0x0f] |
27 | 11 | |
| 12 | #define REG0 m_reg [0x00] |
| 13 | #define REG1 m_reg [0x01] |
| 14 | #define REG2 m_reg [0x02] |
| 15 | #define REG3 m_reg [0x03] |
| 16 | #define REG4 m_reg [0x04] |
| 17 | #define REG5 m_reg [0x05] |
| 18 | #define REG6 m_reg [0x06] |
| 19 | #define REG7 m_reg [0x07] |
| 20 | #define REG8 m_reg [0x08] |
| 21 | #define REG9 m_reg [0x09] |
| 22 | #define REGa m_reg [0x0a] |
| 23 | #define REGb m_reg [0x0b] |
| 24 | #define REGc m_reg [0x0c] |
| 25 | #define REGd m_reg [0x0d] |
| 26 | #define REGe m_reg [0x0e] |
| 27 | #define REGf m_reg [0x0f] |
28 | 28 | |
| 29 | |
29 | 30 | #define MB_TEST 0 |
30 | 31 | #define LOG(x) do { if (MB_TEST) logerror x; } while (0) |
31 | 32 | |
32 | | struct mathbox_state |
33 | | { |
34 | | device_t *device; |
35 | | /* math box scratch registers */ |
36 | | INT16 reg[16]; |
37 | 33 | |
38 | | /* math box result */ |
39 | | INT16 result; |
40 | | }; |
| 34 | //------------------------------------------------- |
| 35 | // mathbox_device - constructor |
| 36 | //------------------------------------------------- |
41 | 37 | |
| 38 | const device_type MATHBOX = &device_creator<mathbox_device>; |
42 | 39 | |
| 40 | mathbox_device::mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 41 | : device_t(mconfig, MATHBOX, "MATHBOX", tag, owner, clock) |
| 42 | { |
| 43 | } |
43 | 44 | |
44 | | /*************************************************************************** |
45 | | INLINE FUNCTIONS |
46 | | ***************************************************************************/ |
| 45 | //------------------------------------------------- |
| 46 | // device_config_complete - perform any |
| 47 | // operations now that the configuration is |
| 48 | // complete |
| 49 | //------------------------------------------------- |
47 | 50 | |
48 | | /*------------------------------------------------- |
49 | | get_safe_token - convert a device's token |
50 | | into a mathbox_state |
51 | | -------------------------------------------------*/ |
52 | | |
53 | | INLINE mathbox_state *get_safe_token(device_t *device) |
| 51 | void mathbox_device::device_config_complete() |
54 | 52 | { |
55 | | assert(device != NULL); |
56 | | assert(device->type() == MATHBOX); |
57 | | return (mathbox_state *)downcast<mathbox_device *>(device)->token(); |
58 | 53 | } |
59 | 54 | |
| 55 | //------------------------------------------------- |
| 56 | // device_start - device-specific startup |
| 57 | //------------------------------------------------- |
60 | 58 | |
| 59 | void mathbox_device::device_start() |
| 60 | { |
| 61 | /* register for save states */ |
| 62 | save_item(NAME(m_result)); |
| 63 | save_item(NAME(m_reg)); |
| 64 | } |
61 | 65 | |
| 66 | //------------------------------------------------- |
| 67 | // device_reset - device-specific reset |
| 68 | //------------------------------------------------- |
62 | 69 | |
63 | | WRITE8_DEVICE_HANDLER( mathbox_go_w ) |
| 70 | void mathbox_device::device_reset() |
64 | 71 | { |
65 | | mathbox_state *mb = get_safe_token(device); |
| 72 | m_result = 0; |
| 73 | memset(m_reg, 0, sizeof(INT16)*16); |
| 74 | } |
66 | 75 | |
| 76 | |
| 77 | WRITE8_MEMBER( mathbox_device::go_w ) |
| 78 | { |
67 | 79 | INT32 mb_temp; /* temp 32-bit multiply results */ |
68 | 80 | INT16 mb_q; /* temp used in division */ |
69 | 81 | int msb; |
r23306 | r23307 | |
72 | 84 | |
73 | 85 | switch (offset) |
74 | 86 | { |
75 | | case 0x00: mb->result = REG0 = (REG0 & 0xff00) | data; break; |
76 | | case 0x01: mb->result = REG0 = (REG0 & 0x00ff) | (data << 8); break; |
77 | | case 0x02: mb->result = REG1 = (REG1 & 0xff00) | data; break; |
78 | | case 0x03: mb->result = REG1 = (REG1 & 0x00ff) | (data << 8); break; |
79 | | case 0x04: mb->result = REG2 = (REG2 & 0xff00) | data; break; |
80 | | case 0x05: mb->result = REG2 = (REG2 & 0x00ff) | (data << 8); break; |
81 | | case 0x06: mb->result = REG3 = (REG3 & 0xff00) | data; break; |
82 | | case 0x07: mb->result = REG3 = (REG3 & 0x00ff) | (data << 8); break; |
83 | | case 0x08: mb->result = REG4 = (REG4 & 0xff00) | data; break; |
84 | | case 0x09: mb->result = REG4 = (REG4 & 0x00ff) | (data << 8); break; |
| 87 | case 0x00: m_result = REG0 = (REG0 & 0xff00) | data; break; |
| 88 | case 0x01: m_result = REG0 = (REG0 & 0x00ff) | (data << 8); break; |
| 89 | case 0x02: m_result = REG1 = (REG1 & 0xff00) | data; break; |
| 90 | case 0x03: m_result = REG1 = (REG1 & 0x00ff) | (data << 8); break; |
| 91 | case 0x04: m_result = REG2 = (REG2 & 0xff00) | data; break; |
| 92 | case 0x05: m_result = REG2 = (REG2 & 0x00ff) | (data << 8); break; |
| 93 | case 0x06: m_result = REG3 = (REG3 & 0xff00) | data; break; |
| 94 | case 0x07: m_result = REG3 = (REG3 & 0x00ff) | (data << 8); break; |
| 95 | case 0x08: m_result = REG4 = (REG4 & 0xff00) | data; break; |
| 96 | case 0x09: m_result = REG4 = (REG4 & 0x00ff) | (data << 8); break; |
85 | 97 | |
86 | | case 0x0a: mb->result = REG5 = (REG5 & 0xff00) | data; break; |
| 98 | case 0x0a: m_result = REG5 = (REG5 & 0xff00) | data; break; |
87 | 99 | /* note: no function loads low part of REG5 without performing a computation */ |
88 | 100 | |
89 | | case 0x0c: mb->result = REG6 = data; break; |
| 101 | case 0x0c: m_result = REG6 = data; break; |
90 | 102 | /* note: no function loads high part of REG6 */ |
91 | 103 | |
92 | | case 0x15: mb->result = REG7 = (REG7 & 0xff00) | data; break; |
93 | | case 0x16: mb->result = REG7 = (REG7 & 0x00ff) | (data << 8); break; |
| 104 | case 0x15: m_result = REG7 = (REG7 & 0xff00) | data; break; |
| 105 | case 0x16: m_result = REG7 = (REG7 & 0x00ff) | (data << 8); break; |
94 | 106 | |
95 | | case 0x1a: mb->result = REG8 = (REG8 & 0xff00) | data; break; |
96 | | case 0x1b: mb->result = REG8 = (REG8 & 0x00ff) | (data << 8); break; |
| 107 | case 0x1a: m_result = REG8 = (REG8 & 0xff00) | data; break; |
| 108 | case 0x1b: m_result = REG8 = (REG8 & 0x00ff) | (data << 8); break; |
97 | 109 | |
98 | | case 0x0d: mb->result = REGa = (REGa & 0xff00) | data; break; |
99 | | case 0x0e: mb->result = REGa = (REGa & 0x00ff) | (data << 8); break; |
100 | | case 0x0f: mb->result = REGb = (REGb & 0xff00) | data; break; |
101 | | case 0x10: mb->result = REGb = (REGb & 0x00ff) | (data << 8); break; |
| 110 | case 0x0d: m_result = REGa = (REGa & 0xff00) | data; break; |
| 111 | case 0x0e: m_result = REGa = (REGa & 0x00ff) | (data << 8); break; |
| 112 | case 0x0f: m_result = REGb = (REGb & 0xff00) | data; break; |
| 113 | case 0x10: m_result = REGb = (REGb & 0x00ff) | (data << 8); break; |
102 | 114 | |
103 | | case 0x17: mb->result = REG7; break; |
104 | | case 0x19: mb->result = REG8; break; |
105 | | case 0x18: mb->result = REG9; break; |
| 115 | case 0x17: m_result = REG7; break; |
| 116 | case 0x19: m_result = REG8; break; |
| 117 | case 0x18: m_result = REG9; break; |
106 | 118 | |
107 | 119 | case 0x0b: |
108 | 120 | |
r23306 | r23307 | |
129 | 141 | REGc = (mb_q >> 1) & 0x7fff; |
130 | 142 | mb_q = REGc + REGe; |
131 | 143 | if (mb_q < 0) |
132 | | REG7++; |
| 144 | REG7++; |
133 | 145 | |
134 | | mb->result = REG7; |
| 146 | m_result = REG7; |
135 | 147 | |
136 | 148 | if (REGf < 0) |
137 | | break; |
| 149 | break; |
138 | 150 | |
139 | 151 | REG7 += REG2; |
140 | 152 | |
r23306 | r23307 | |
157 | 169 | REGc = (mb_q >> 1) & 0x7fff; |
158 | 170 | REG9 += REGc; |
159 | 171 | if (REG9 < 0) |
160 | | REG8++; |
| 172 | REG8++; |
161 | 173 | REG9 <<= 1; /* why? only to get the desired load address? */ |
162 | 174 | |
163 | | mb->result = REG8; |
| 175 | m_result = REG8; |
164 | 176 | |
165 | 177 | if (REGf < 0) |
166 | | break; |
| 178 | break; |
167 | 179 | |
168 | 180 | REG8 += REG3; |
169 | 181 | |
r23306 | r23307 | |
186 | 198 | REGe = REG7 ^ mb_q; /* save sign of result */ |
187 | 199 | REGd = mb_q; |
188 | 200 | if (mb_q >= 0) |
189 | | mb_q = REGc; |
| 201 | mb_q = REGc; |
190 | 202 | else |
191 | | { |
192 | | REGd = - mb_q - 1; |
193 | | mb_q = - REGc - 1; |
194 | | if ((mb_q < 0) && ((mb_q + 1) < 0)) |
195 | | REGd++; |
196 | | mb_q++; |
197 | | } |
| 203 | { |
| 204 | REGd = - mb_q - 1; |
| 205 | mb_q = - REGc - 1; |
| 206 | if ((mb_q < 0) && ((mb_q + 1) < 0)) |
| 207 | REGd++; |
| 208 | mb_q++; |
| 209 | } |
198 | 210 | |
199 | 211 | /* step 0c9: */ |
200 | 212 | /* REGc = abs (REG7) */ |
201 | 213 | if (REG7 >= 0) |
202 | | REGc = REG7; |
| 214 | REGc = REG7; |
203 | 215 | else |
204 | | REGc = -REG7; |
| 216 | REGc = -REG7; |
205 | 217 | |
206 | 218 | REGf = REG6; /* step counter */ |
207 | 219 | |
208 | 220 | do |
209 | | { |
210 | | REGd -= REGc; |
211 | | msb = ((mb_q & 0x8000) != 0); |
212 | | mb_q <<= 1; |
213 | | if (REGd >= 0) |
214 | | mb_q++; |
215 | | else |
216 | | REGd += REGc; |
217 | | REGd <<= 1; |
218 | | REGd += msb; |
219 | | } |
| 221 | { |
| 222 | REGd -= REGc; |
| 223 | msb = ((mb_q & 0x8000) != 0); |
| 224 | mb_q <<= 1; |
| 225 | if (REGd >= 0) |
| 226 | mb_q++; |
| 227 | else |
| 228 | REGd += REGc; |
| 229 | REGd <<= 1; |
| 230 | REGd += msb; |
| 231 | } |
220 | 232 | while (--REGf >= 0); |
221 | 233 | |
222 | 234 | if (REGe >= 0) |
223 | | mb->result = mb_q; |
| 235 | m_result = mb_q; |
224 | 236 | else |
225 | | mb->result = - mb_q; |
| 237 | m_result = - mb_q; |
226 | 238 | break; |
227 | 239 | |
228 | 240 | case 0x11: |
r23306 | r23307 | |
235 | 247 | /* window test? */ |
236 | 248 | REG5 = (REG5 & 0x00ff) | (data << 8); |
237 | 249 | do |
238 | | { |
239 | | REGe = (REG4 + REG7) >> 1; |
240 | | REGf = (REG5 + REG8) >> 1; |
241 | | if ((REGb < REGe) && (REGf < REGe) && ((REGe + REGf) >= 0)) |
242 | | { REG7 = REGe; REG8 = REGf; } |
243 | | else |
244 | | { REG4 = REGe; REG5 = REGf; } |
245 | | } |
| 250 | { |
| 251 | REGe = (REG4 + REG7) >> 1; |
| 252 | REGf = (REG5 + REG8) >> 1; |
| 253 | if ((REGb < REGe) && (REGf < REGe) && ((REGe + REGf) >= 0)) |
| 254 | { REG7 = REGe; REG8 = REGf; } |
| 255 | else |
| 256 | { REG4 = REGe; REG5 = REGf; } |
| 257 | } |
246 | 258 | while (--REG6 >= 0); |
247 | 259 | |
248 | | mb->result = REG8; |
| 260 | m_result = REG8; |
249 | 261 | break; |
250 | 262 | |
251 | 263 | case 0x1d: |
r23306 | r23307 | |
253 | 265 | |
254 | 266 | REG2 -= REG0; |
255 | 267 | if (REG2 < 0) |
256 | | REG2 = -REG2; |
| 268 | REG2 = -REG2; |
257 | 269 | |
258 | 270 | REG3 -= REG1; |
259 | 271 | if (REG3 < 0) |
260 | | REG3 = -REG3; |
| 272 | REG3 = -REG3; |
261 | 273 | |
262 | 274 | /* fall into command 1e */ |
263 | 275 | |
r23306 | r23307 | |
266 | 278 | if (REG3 >= REG2) |
267 | 279 | { REGc = REG2; REGd = REG3; } |
268 | 280 | else |
269 | | { REGd = REG2; REGc = REG3; } |
| 281 | { REGd = REG2; REGc = REG3; } |
270 | 282 | REGc >>= 2; |
271 | 283 | REGd += REGc; |
272 | 284 | REGc >>= 1; |
273 | | mb->result = REGd = (REGc + REGd); |
| 285 | m_result = REGd = (REGc + REGd); |
274 | 286 | break; |
275 | 287 | |
276 | 288 | case 0x1f: |
r23306 | r23307 | |
279 | 291 | break; |
280 | 292 | } |
281 | 293 | |
282 | | LOG((" result %04x\n", mb->result & 0xffff)); |
| 294 | LOG((" result %04x\n", m_result & 0xffff)); |
283 | 295 | } |
284 | 296 | |
285 | | READ8_DEVICE_HANDLER( mathbox_status_r ) |
| 297 | READ8_MEMBER( mathbox_device::status_r ) |
286 | 298 | { |
287 | 299 | return 0x00; /* always done! */ |
288 | 300 | } |
289 | 301 | |
290 | | READ8_DEVICE_HANDLER( mathbox_lo_r ) |
| 302 | READ8_MEMBER( mathbox_device::lo_r ) |
291 | 303 | { |
292 | | mathbox_state *mb = get_safe_token(device); |
293 | | |
294 | | return mb->result & 0xff; |
| 304 | return m_result & 0xff; |
295 | 305 | } |
296 | 306 | |
297 | | READ8_DEVICE_HANDLER( mathbox_hi_r ) |
| 307 | READ8_MEMBER( mathbox_device::hi_r ) |
298 | 308 | { |
299 | | mathbox_state *mb = get_safe_token(device); |
300 | | |
301 | | return (mb->result >> 8) & 0xff; |
| 309 | return (m_result >> 8) & 0xff; |
302 | 310 | } |
303 | | |
304 | | |
305 | | |
306 | | /*************************************************************************** |
307 | | DEVICE INTERFACE |
308 | | ***************************************************************************/ |
309 | | |
310 | | /*------------------------------------------------- |
311 | | mathbox_portb_r - return port B output |
312 | | value |
313 | | -------------------------------------------------*/ |
314 | | |
315 | | static DEVICE_START( mathbox ) |
316 | | { |
317 | | mathbox_state *mb = get_safe_token(device); |
318 | | |
319 | | /* validate arguments */ |
320 | | assert(device != NULL); |
321 | | |
322 | | /* set static values */ |
323 | | mb->device = device; |
324 | | |
325 | | /* register for save states */ |
326 | | device->save_item(NAME(mb->result)); |
327 | | device->save_item(NAME(mb->reg)); |
328 | | } |
329 | | |
330 | | |
331 | | static DEVICE_RESET( mathbox ) |
332 | | { |
333 | | mathbox_state *mb = get_safe_token(device); |
334 | | |
335 | | mb->result = 0; |
336 | | memset(mb->reg, 0, sizeof(INT16)*16); |
337 | | } |
338 | | |
339 | | |
340 | | const device_type MATHBOX = &device_creator<mathbox_device>; |
341 | | |
342 | | mathbox_device::mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
343 | | : device_t(mconfig, MATHBOX, "MATHBOX", tag, owner, clock) |
344 | | { |
345 | | m_token = global_alloc_clear(mathbox_state); |
346 | | } |
347 | | |
348 | | //------------------------------------------------- |
349 | | // device_config_complete - perform any |
350 | | // operations now that the configuration is |
351 | | // complete |
352 | | //------------------------------------------------- |
353 | | |
354 | | void mathbox_device::device_config_complete() |
355 | | { |
356 | | } |
357 | | |
358 | | //------------------------------------------------- |
359 | | // device_start - device-specific startup |
360 | | //------------------------------------------------- |
361 | | |
362 | | void mathbox_device::device_start() |
363 | | { |
364 | | DEVICE_START_NAME( mathbox )(this); |
365 | | } |
366 | | |
367 | | //------------------------------------------------- |
368 | | // device_reset - device-specific reset |
369 | | //------------------------------------------------- |
370 | | |
371 | | void mathbox_device::device_reset() |
372 | | { |
373 | | DEVICE_RESET_NAME( mathbox )(this); |
374 | | } |
trunk/src/mame/drivers/mw8080bw.c
r23306 | r23307 | |
148 | 148 | #include "emu.h" |
149 | 149 | #include "cpu/i8085/i8085.h" |
150 | 150 | #include "machine/rescap.h" |
151 | | #include "machine/mb14241.h" |
152 | 151 | #include "includes/mw8080bw.h" |
153 | 152 | |
154 | 153 | #include "280zzzap.lh" |
r23306 | r23307 | |
173 | 172 | |
174 | 173 | READ8_MEMBER(mw8080bw_state::mw8080bw_shift_result_rev_r) |
175 | 174 | { |
176 | | UINT8 ret = mb14241_shift_result_r(m_mb14241, space, 0); |
| 175 | UINT8 ret = m_mb14241->shift_result_r(space, 0); |
177 | 176 | |
178 | 177 | return BITSWAP8(ret,0,1,2,3,4,5,6,7); |
179 | 178 | } |
r23306 | r23307 | |
189 | 188 | } |
190 | 189 | else |
191 | 190 | { |
192 | | ret = mb14241_shift_result_r(m_mb14241, space, 0); |
| 191 | ret = m_mb14241->shift_result_r(space, 0); |
193 | 192 | } |
194 | 193 | |
195 | 194 | return ret; |
r23306 | r23307 | |
197 | 196 | |
198 | 197 | WRITE8_MEMBER(mw8080bw_state::mw8080bw_reversable_shift_count_w) |
199 | 198 | { |
200 | | mb14241_shift_count_w(m_mb14241, space, offset, data); |
| 199 | m_mb14241->shift_count_w(space, offset, data); |
201 | 200 | |
202 | 201 | m_rev_shift_res = data & 0x08; |
203 | 202 | } |
r23306 | r23307 | |
331 | 330 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r) |
332 | 331 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
333 | 332 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
334 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 333 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
335 | 334 | |
336 | 335 | AM_RANGE(0x01, 0x01) AM_WRITE(seawolf_explosion_lamp_w) |
337 | 336 | AM_RANGE(0x02, 0x02) AM_WRITE(seawolf_periscope_lamp_w) |
338 | | AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
339 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 337 | AM_RANGE(0x03, 0x03) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
| 338 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
340 | 339 | AM_RANGE(0x05, 0x05) AM_WRITE(seawolf_audio_w) |
341 | 340 | ADDRESS_MAP_END |
342 | 341 | |
r23306 | r23307 | |
430 | 429 | gunfight_audio_w(space, 0, data); |
431 | 430 | |
432 | 431 | if (offset & 0x02) |
433 | | mb14241_shift_count_w(m_mb14241, space, 0, data); |
| 432 | m_mb14241->shift_count_w(space, 0, data); |
434 | 433 | |
435 | 434 | if (offset & 0x04) |
436 | | mb14241_shift_data_w(m_mb14241, space, 0, data); |
| 435 | m_mb14241->shift_data_w(space, 0, data); |
437 | 436 | |
438 | 437 | } |
439 | 438 | |
r23306 | r23307 | |
443 | 442 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
444 | 443 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
445 | 444 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
446 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 445 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
447 | 446 | |
448 | 447 | /* no decoder, just 3 AND gates */ |
449 | 448 | AM_RANGE(0x00, 0x07) AM_WRITE(gunfight_io_w) |
r23306 | r23307 | |
625 | 624 | tornbase_audio_w(space, 0, data); |
626 | 625 | |
627 | 626 | if (offset & 0x02) |
628 | | mb14241_shift_count_w(m_mb14241, space, 0, data); |
| 627 | m_mb14241->shift_count_w(space, 0, data); |
629 | 628 | |
630 | 629 | if (offset & 0x04) |
631 | | mb14241_shift_data_w(m_mb14241, space, 0, data); |
| 630 | m_mb14241->shift_data_w(space, 0, data); |
632 | 631 | } |
633 | 632 | |
634 | 633 | |
r23306 | r23307 | |
637 | 636 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
638 | 637 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
639 | 638 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
640 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 639 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
641 | 640 | |
642 | 641 | /* no decoder, just 3 AND gates */ |
643 | 642 | AM_RANGE(0x00, 0x07) AM_WRITE(tornbase_io_w) |
r23306 | r23307 | |
757 | 756 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
758 | 757 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
759 | 758 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
760 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 759 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
761 | 760 | |
762 | 761 | AM_RANGE(0x02, 0x02) AM_WRITE(zzzap_audio_1_w) |
763 | | AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
764 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 762 | AM_RANGE(0x03, 0x03) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
| 763 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
765 | 764 | AM_RANGE(0x05, 0x05) AM_WRITE(zzzap_audio_2_w) |
766 | 765 | AM_RANGE(0x07, 0x07) AM_WRITE(watchdog_reset_w) |
767 | 766 | ADDRESS_MAP_END |
r23306 | r23307 | |
983 | 982 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mw8080bw_reversable_shift_result_r) |
984 | 983 | |
985 | 984 | AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w) |
986 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 985 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
987 | 986 | AM_RANGE(0x03, 0x03) AM_WRITE(boothill_audio_w) |
988 | 987 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
989 | 988 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) |
r23306 | r23307 | |
1204 | 1203 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r) |
1205 | 1204 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
1206 | 1205 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
1207 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1206 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1208 | 1207 | |
1209 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1210 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1208 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1209 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1211 | 1210 | AM_RANGE(0x03, 0x03) AM_WRITE(desertgu_audio_1_w) |
1212 | 1211 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1213 | 1212 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) |
r23306 | r23307 | |
1326 | 1325 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
1327 | 1326 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
1328 | 1327 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
1329 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1328 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1330 | 1329 | |
1331 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1332 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1330 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1331 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1333 | 1332 | AM_RANGE(0x03, 0x03) AM_WRITE(dplay_audio_w) |
1334 | 1333 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1335 | 1334 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) |
r23306 | r23307 | |
1505 | 1504 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mw8080bw_reversable_shift_result_r) |
1506 | 1505 | |
1507 | 1506 | AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w) |
1508 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1507 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1509 | 1508 | AM_RANGE(0x03, 0x03) AM_WRITE(gmissile_audio_1_w) |
1510 | 1509 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1511 | 1510 | AM_RANGE(0x05, 0x05) AM_WRITE(gmissile_audio_2_w) |
r23306 | r23307 | |
1599 | 1598 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ(mw8080bw_reversable_shift_result_r) |
1600 | 1599 | |
1601 | 1600 | AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w) |
1602 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1601 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1603 | 1602 | AM_RANGE(0x03, 0x03) AM_WRITE(m4_audio_1_w) |
1604 | 1603 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1605 | 1604 | AM_RANGE(0x05, 0x05) AM_WRITE(m4_audio_2_w) |
r23306 | r23307 | |
1709 | 1708 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
1710 | 1709 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
1711 | 1710 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
1712 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1711 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1713 | 1712 | |
1714 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1715 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1713 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1714 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1716 | 1715 | AM_RANGE(0x03, 0x03) AM_WRITE(clowns_audio_1_w) |
1717 | 1716 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1718 | 1717 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) |
r23306 | r23307 | |
1847 | 1846 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
1848 | 1847 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1849 | 1848 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") |
1850 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1849 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1851 | 1850 | |
1852 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1853 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1851 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1852 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1854 | 1853 | AM_RANGE(0x03, 0x03) AM_WRITE(spacwalk_audio_1_w) |
1855 | 1854 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1856 | 1855 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) |
r23306 | r23307 | |
1937 | 1936 | |
1938 | 1937 | static ADDRESS_MAP_START( shuffle_io_map, AS_IO, 8, mw8080bw_state ) |
1939 | 1938 | ADDRESS_MAP_GLOBAL_MASK(0xf) /* yes, 4, and no mirroring on the read handlers */ |
1940 | | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1939 | AM_RANGE(0x01, 0x01) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1941 | 1940 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN0") |
1942 | 1941 | AM_RANGE(0x03, 0x03) AM_READ(mw8080bw_shift_result_rev_r) |
1943 | 1942 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN1") |
1944 | 1943 | AM_RANGE(0x05, 0x05) AM_READ_PORT("IN2") |
1945 | 1944 | AM_RANGE(0x06, 0x06) AM_READ_PORT("IN3") |
1946 | 1945 | |
1947 | | AM_RANGE(0x01, 0x01) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1948 | | AM_RANGE(0x02, 0x02) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1946 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x08) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1947 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x08) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1949 | 1948 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x08) AM_WRITE(watchdog_reset_w) |
1950 | 1949 | AM_RANGE(0x05, 0x05) AM_MIRROR(0x08) AM_WRITE(shuffle_audio_1_w) |
1951 | 1950 | AM_RANGE(0x06, 0x06) AM_MIRROR(0x08) AM_WRITE(shuffle_audio_2_w) |
r23306 | r23307 | |
2020 | 2019 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
2021 | 2020 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
2022 | 2021 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
2023 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 2022 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
2024 | 2023 | |
2025 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2026 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2024 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2025 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2027 | 2026 | AM_RANGE(0x03, 0x03) AM_WRITE(dogpatch_audio_w) |
2028 | 2027 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2029 | 2028 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) |
r23306 | r23307 | |
2281 | 2280 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r) |
2282 | 2281 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
2283 | 2282 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
2284 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 2283 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
2285 | 2284 | |
2286 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2287 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2285 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2286 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2288 | 2287 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2289 | 2288 | AM_RANGE(0x05, 0x05) AM_WRITE(phantom2_audio_1_w) |
2290 | 2289 | AM_RANGE(0x06, 0x06) AM_WRITE(phantom2_audio_2_w) |
r23306 | r23307 | |
2362 | 2361 | anything unusual on the schematics that would cause |
2363 | 2362 | the bits to flip */ |
2364 | 2363 | |
2365 | | return ~mb14241_shift_result_r(m_mb14241, space, 0); |
| 2364 | return ~m_mb14241->shift_result_r(space, 0); |
2366 | 2365 | } |
2367 | 2366 | |
2368 | 2367 | WRITE8_MEMBER(mw8080bw_state::bowler_lights_1_w) |
r23306 | r23307 | |
2410 | 2409 | AM_RANGE(0x05, 0x05) AM_READ_PORT("IN2") |
2411 | 2410 | AM_RANGE(0x06, 0x06) AM_READ_PORT("IN3") |
2412 | 2411 | |
2413 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2414 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2412 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2413 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2415 | 2414 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2416 | 2415 | AM_RANGE(0x05, 0x05) AM_WRITE(bowler_audio_1_w) |
2417 | 2416 | AM_RANGE(0x06, 0x06) AM_WRITE(bowler_audio_2_w) |
r23306 | r23307 | |
2590 | 2589 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
2591 | 2590 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
2592 | 2591 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
2593 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 2592 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
2594 | 2593 | |
2595 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 2594 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
2596 | 2595 | AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w) |
2597 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2596 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2598 | 2597 | AM_RANGE(0x05, 0x05) AM_WRITE(invaders_audio_2_w) |
2599 | 2598 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2600 | 2599 | ADDRESS_MAP_END |
r23306 | r23307 | |
2721 | 2720 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ(mw8080bw_shift_result_rev_r) |
2722 | 2721 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
2723 | 2722 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
2724 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 2723 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
2725 | 2724 | |
2726 | | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2727 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2725 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2726 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2728 | 2727 | AM_RANGE(0x03, 0x03) AM_WRITE(blueshrk_audio_w) |
2729 | 2728 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2730 | 2729 | ADDRESS_MAP_END |
r23306 | r23307 | |
2801 | 2800 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
2802 | 2801 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
2803 | 2802 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
2804 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 2803 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
2805 | 2804 | |
2806 | 2805 | AM_RANGE(0x01, 0x01) AM_WRITE(invad2ct_audio_3_w) |
2807 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 2806 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
2808 | 2807 | AM_RANGE(0x03, 0x03) AM_WRITE(invad2ct_audio_1_w) |
2809 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2808 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2810 | 2809 | AM_RANGE(0x05, 0x05) AM_WRITE(invad2ct_audio_2_w) |
2811 | 2810 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2812 | 2811 | AM_RANGE(0x07, 0x07) AM_WRITE(invad2ct_audio_4_w) |
trunk/src/mame/drivers/8080bw.c
r23306 | r23307 | |
175 | 175 | #include "emu.h" |
176 | 176 | #include "cpu/m6800/m6800.h" |
177 | 177 | #include "cpu/i8085/i8085.h" |
178 | | #include "machine/mb14241.h" |
179 | 178 | #include "machine/eeprom.h" |
180 | 179 | #include "sound/ay8910.h" |
181 | 180 | #include "sound/speaker.h" |
r23306 | r23307 | |
350 | 349 | static ADDRESS_MAP_START( invadpt2_io_map, AS_IO, 8, _8080bw_state ) |
351 | 350 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
352 | 351 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
353 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
354 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
355 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 352 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 353 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
| 354 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
356 | 355 | AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) |
357 | 356 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
358 | 357 | ADDRESS_MAP_END |
r23306 | r23307 | |
416 | 415 | static ADDRESS_MAP_START( spacerng_io_map, AS_IO, 8, _8080bw_state ) |
417 | 416 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
418 | 417 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
419 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
420 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
421 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 418 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 419 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
| 420 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
422 | 421 | AM_RANGE(0x05, 0x05) AM_WRITE(spacerng_sh_port_2_w) |
423 | 422 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
424 | 423 | ADDRESS_MAP_END |
r23306 | r23307 | |
441 | 440 | static ADDRESS_MAP_START( spcewars_io_map, AS_IO, 8, _8080bw_state ) |
442 | 441 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
443 | 442 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
444 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
445 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(spcewars_sh_port_w) |
446 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 443 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 444 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(spcewars_sh_port_w) |
| 445 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
447 | 446 | AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) |
448 | 447 | ADDRESS_MAP_END |
449 | 448 | |
r23306 | r23307 | |
794 | 793 | static ADDRESS_MAP_START( invrvnge_io_map, AS_IO, 8, _8080bw_state ) |
795 | 794 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
796 | 795 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
797 | | AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
798 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(invrvnge_sh_port_1_w) |
799 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 796 | AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 797 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invrvnge_sh_port_1_w) |
| 798 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
800 | 799 | AM_RANGE(0x05, 0x05) AM_WRITE(invrvnge_sh_port_2_w) |
801 | 800 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
802 | 801 | ADDRESS_MAP_END |
r23306 | r23307 | |
1003 | 1002 | static ADDRESS_MAP_START( lrescue_io_map, AS_IO, 8, _8080bw_state ) |
1004 | 1003 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
1005 | 1004 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1006 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1007 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(lrescue_sh_port_1_w) |
1008 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1005 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1006 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(lrescue_sh_port_1_w) |
| 1007 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1009 | 1008 | AM_RANGE(0x05, 0x05) AM_WRITE(lrescue_sh_port_2_w) |
1010 | 1009 | ADDRESS_MAP_END |
1011 | 1010 | |
r23306 | r23307 | |
1101 | 1100 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
1102 | 1101 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
1103 | 1102 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ(invrvnge_02_r) |
1104 | | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1103 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1105 | 1104 | |
1106 | | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 1105 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
1107 | 1106 | AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w) |
1108 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1107 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1109 | 1108 | AM_RANGE(0x05, 0x05) AM_WRITE(cosmicmo_05_w) |
1110 | 1109 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
1111 | 1110 | ADDRESS_MAP_END |
r23306 | r23307 | |
1207 | 1206 | static ADDRESS_MAP_START( rollingc_io_map, AS_IO, 8, _8080bw_state ) |
1208 | 1207 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(rollingc_sh_port_w) |
1209 | 1208 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1210 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1211 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
1212 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1209 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1210 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
| 1211 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1213 | 1212 | AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) |
1214 | 1213 | ADDRESS_MAP_END |
1215 | 1214 | |
r23306 | r23307 | |
1266 | 1265 | static ADDRESS_MAP_START( schaser_io_map, AS_IO, 8, _8080bw_state ) |
1267 | 1266 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
1268 | 1267 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1269 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1270 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(schaser_sh_port_1_w) |
1271 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1268 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1269 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(schaser_sh_port_1_w) |
| 1270 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1272 | 1271 | AM_RANGE(0x05, 0x05) AM_WRITE(schaser_sh_port_2_w) |
1273 | 1272 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
1274 | 1273 | ADDRESS_MAP_END |
r23306 | r23307 | |
1390 | 1389 | static ADDRESS_MAP_START( schasercv_io_map, AS_IO, 8, _8080bw_state ) |
1391 | 1390 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
1392 | 1391 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1393 | | AM_RANGE(0x02, 0x02) AM_READ(schasercv_02_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1394 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(schasercv_sh_port_1_w) |
1395 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1392 | AM_RANGE(0x02, 0x02) AM_READ(schasercv_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1393 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(schasercv_sh_port_1_w) |
| 1394 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1396 | 1395 | AM_RANGE(0x05, 0x05) AM_WRITE(schasercv_sh_port_2_w) |
1397 | 1396 | ADDRESS_MAP_END |
1398 | 1397 | |
r23306 | r23307 | |
1475 | 1474 | AM_RANGE(0x0000, 0x1fff) AM_RAM |
1476 | 1475 | AM_RANGE(0x4000, 0x5fff) AM_RAM AM_SHARE("main_ram") |
1477 | 1476 | AM_RANGE(0x8008, 0x8008) AM_READ_PORT("PADDLE") |
1478 | | AM_RANGE(0x8009, 0x8009) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 1477 | AM_RANGE(0x8009, 0x8009) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
1479 | 1478 | AM_RANGE(0x800a, 0x800a) AM_READ_PORT("IN2") |
1480 | 1479 | AM_RANGE(0x800b, 0x800b) AM_READ_PORT("IN0") |
1481 | | AM_RANGE(0x8018, 0x8018) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1482 | | AM_RANGE(0x8019, 0x8019) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 1480 | AM_RANGE(0x8018, 0x8018) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
| 1481 | AM_RANGE(0x8019, 0x8019) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
1483 | 1482 | AM_RANGE(0x801a, 0x801a) AM_WRITENOP |
1484 | 1483 | AM_RANGE(0x801c, 0x801c) AM_WRITENOP |
1485 | 1484 | AM_RANGE(0x801d, 0x801d) AM_WRITENOP |
r23306 | r23307 | |
1555 | 1554 | static ADDRESS_MAP_START( lupin3_io_map, AS_IO, 8, _8080bw_state ) |
1556 | 1555 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(lupin3_00_w) |
1557 | 1556 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1558 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1559 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(lupin3_sh_port_1_w) |
1560 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1557 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1558 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(lupin3_sh_port_1_w) |
| 1559 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1561 | 1560 | AM_RANGE(0x05, 0x05) AM_WRITE(lupin3_sh_port_2_w) |
1562 | 1561 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
1563 | 1562 | ADDRESS_MAP_END |
r23306 | r23307 | |
1717 | 1716 | // It sounds better then the actual circuit used. |
1718 | 1717 | // Probably an unfinished feature. |
1719 | 1718 | static ADDRESS_MAP_START( polaris_io_map, AS_IO, 8, _8080bw_state ) |
1720 | | AM_RANGE(0x00, 0x00) AM_READ(polaris_port00_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 1719 | AM_RANGE(0x00, 0x00) AM_READ(polaris_port00_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
1721 | 1720 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1722 | 1721 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(polaris_sh_port_1_w) |
1723 | | AM_RANGE(0x03, 0x03) AM_DEVREADWRITE_LEGACY("mb14241", mb14241_shift_result_r, mb14241_shift_data_w) |
| 1722 | AM_RANGE(0x03, 0x03) AM_DEVREADWRITE("mb14241", mb14241_device, shift_result_r, shift_data_w) |
1724 | 1723 | AM_RANGE(0x04, 0x04) AM_WRITE(polaris_sh_port_2_w) |
1725 | 1724 | AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w) |
1726 | 1725 | AM_RANGE(0x06, 0x06) AM_WRITE(polaris_sh_port_3_w) |
r23306 | r23307 | |
1890 | 1889 | static ADDRESS_MAP_START( ballbomb_io_map, AS_IO, 8, _8080bw_state ) |
1891 | 1890 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
1892 | 1891 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITE(ballbomb_01_w) |
1893 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1894 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(ballbomb_sh_port_1_w) |
1895 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1892 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 1893 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(ballbomb_sh_port_1_w) |
| 1894 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
1896 | 1895 | AM_RANGE(0x05, 0x05) AM_WRITE(ballbomb_sh_port_2_w) |
1897 | 1896 | ADDRESS_MAP_END |
1898 | 1897 | |
r23306 | r23307 | |
2129 | 2128 | static ADDRESS_MAP_START( indianbt_io_map, AS_IO, 8, _8080bw_state ) |
2130 | 2129 | AM_RANGE(0x00, 0x00) AM_READ(indianbt_r) |
2131 | 2130 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
2132 | | AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2133 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(indianbt_sh_port_1_w) |
2134 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2131 | AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2132 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(indianbt_sh_port_1_w) |
| 2133 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2135 | 2134 | AM_RANGE(0x05, 0x05) AM_WRITE(indianbt_sh_port_2_w) |
2136 | 2135 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2137 | 2136 | AM_RANGE(0x07, 0x07) AM_WRITE(indianbt_sh_port_3_w) |
r23306 | r23307 | |
2140 | 2139 | static ADDRESS_MAP_START( indianbtbr_io_map, AS_IO, 8, _8080bw_state ) |
2141 | 2140 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
2142 | 2141 | AM_RANGE(0x01, 0x01) AM_READ(indianbtbr_01_r) |
2143 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2144 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(indianbtbr_sh_port_1_w) |
2145 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2142 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2143 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(indianbtbr_sh_port_1_w) |
| 2144 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2146 | 2145 | AM_RANGE(0x05, 0x05) AM_WRITE(indianbtbr_sh_port_2_w) |
2147 | 2146 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2148 | 2147 | AM_RANGE(0x07, 0x07) AM_WRITENOP |
r23306 | r23307 | |
2205 | 2204 | |
2206 | 2205 | static ADDRESS_MAP_START( steelwkr_io_map, AS_IO, 8, _8080bw_state ) |
2207 | 2206 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
2208 | | AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2209 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
2210 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2207 | AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2208 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) |
| 2209 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2211 | 2210 | AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) |
2212 | 2211 | AM_RANGE(0x06, 0x06) AM_WRITE(steelwkr_sh_port_3_w) |
2213 | 2212 | ADDRESS_MAP_END |
r23306 | r23307 | |
2575 | 2574 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN0") |
2576 | 2575 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
2577 | 2576 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
2578 | | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
| 2577 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) |
2579 | 2578 | |
2580 | | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 2579 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
2581 | 2580 | AM_RANGE(0x01, 0x01) AM_WRITE(invaders_audio_1_w) |
2582 | | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2581 | AM_RANGE(0x06, 0x06) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2583 | 2582 | AM_RANGE(0x07, 0x07) AM_WRITE(invaders_audio_2_w) |
2584 | 2583 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2585 | 2584 | ADDRESS_MAP_END |
r23306 | r23307 | |
2858 | 2857 | |
2859 | 2858 | static ADDRESS_MAP_START( claybust_io_map, AS_IO, 8, _8080bw_state ) |
2860 | 2859 | //AM_RANGE(0x00, 0x00) AM_WRITENOP // ? |
2861 | | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2862 | | AM_RANGE(0x02, 0x02) AM_READ(claybust_gun_lo_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2863 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) //AM_WRITENOP // port3 write looks sound-related |
| 2860 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2861 | AM_RANGE(0x02, 0x02) AM_READ(claybust_gun_lo_r) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
| 2862 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) //AM_WRITENOP // port3 write looks sound-related |
2864 | 2863 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2865 | 2864 | //AM_RANGE(0x05, 0x05) AM_WRITENOP // ? |
2866 | 2865 | AM_RANGE(0x06, 0x06) AM_READ(claybust_gun_hi_r) |
r23306 | r23307 | |
2950 | 2949 | static ADDRESS_MAP_START( galactic_io_map, AS_IO, 8, _8080bw_state ) |
2951 | 2950 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
2952 | 2951 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
2953 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2954 | | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(galactic_sh_port_1_w) |
2955 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 2952 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2953 | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(galactic_sh_port_1_w) |
| 2954 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
2956 | 2955 | AM_RANGE(0x05, 0x05) AM_WRITE(galactic_sh_port_2_w) |
2957 | 2956 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2958 | 2957 | AM_RANGE(0x07, 0x07) AM_WRITE(galactic_07_w) |