trunk/src/mame/video/jagobj.c
r17621 | r17622 | |
12 | 12 | #define LOG_OBJECTS 0 |
13 | 13 | |
14 | 14 | |
15 | | static UINT16 *scanline; |
16 | | static UINT16 *clutbase; |
17 | | static UINT8 *blend_y, *blend_cc; |
18 | | |
19 | | |
20 | | |
21 | 15 | /************************************* |
22 | 16 | * |
23 | 17 | * Object processor init |
24 | 18 | * |
25 | 19 | *************************************/ |
26 | 20 | |
27 | | void jagobj_init(running_machine &machine) |
| 21 | void jaguar_state::jagobj_init() |
28 | 22 | { |
29 | 23 | int i; |
30 | 24 | |
31 | | /* allocate memory for tables */ |
32 | | blend_y = auto_alloc_array(machine, UINT8, 256 * 256); |
33 | | blend_cc = auto_alloc_array(machine, UINT8, 256 * 256); |
34 | | |
35 | 25 | /* fill tables */ |
36 | 26 | for (i = 0; i < 256 * 256; i++) |
37 | 27 | { |
r17621 | r17622 | |
45 | 35 | y += dy; |
46 | 36 | if (y < 0) y = 0; |
47 | 37 | else if (y > 0xff) y = 0xff; |
48 | | blend_y[i] = y; |
| 38 | m_blend_y[i] = y; |
49 | 39 | |
50 | 40 | c1 += dc1; |
51 | 41 | if (c1 < 0) c1 = 0; |
r17621 | r17622 | |
53 | 43 | c2 += dc2; |
54 | 44 | if (c2 < 0) c2 = 0; |
55 | 45 | else if (c2 > 0x0f) c2 = 0x0f; |
56 | | blend_cc[i] = (c2 << 4) | c1; |
| 46 | m_blend_cc[i] = (c2 << 4) | c1; |
57 | 47 | } |
58 | 48 | } |
59 | 49 | |
r17621 | r17622 | |
66 | 56 | *************************************/ |
67 | 57 | |
68 | 58 | #define BLEND(dst, src) \ |
69 | | (dst) = (blend_cc[((dst) & 0xff00) | (((src) >> 8) & 0xff)] << 8) | blend_y[(((dst) & 0xff) << 8) | ((src) & 0xff)]; |
| 59 | (dst) = (m_blend_cc[((dst) & 0xff00) | (((src) >> 8) & 0xff)] << 8) | m_blend_y[(((dst) & 0xff) << 8) | ((src) & 0xff)]; |
70 | 60 | |
71 | 61 | |
72 | 62 | |
r17621 | r17622 | |
76 | 66 | * |
77 | 67 | *************************************/ |
78 | 68 | |
79 | | INLINE void bitmap_4_draw(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos) |
| 69 | inline void jaguar_state::bitmap_4_draw(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos, UINT16 *clutbase) |
80 | 70 | { |
81 | 71 | if (firstpix & 7) |
82 | 72 | { |
r17621 | r17622 | |
182 | 172 | } |
183 | 173 | } |
184 | 174 | |
185 | | static void bitmap_4_0(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 175 | void jaguar_state::bitmap_4_0(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
186 | 176 | { |
187 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 0, 1); |
| 177 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 0, 1, clutbase); |
188 | 178 | } |
189 | 179 | |
190 | | static void bitmap_4_1(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 180 | void jaguar_state::bitmap_4_1(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
191 | 181 | { |
192 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 1, -1); |
| 182 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 1, -1, clutbase); |
193 | 183 | } |
194 | 184 | |
195 | | static void bitmap_4_2(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 185 | void jaguar_state::bitmap_4_2(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
196 | 186 | { |
197 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 2, 1); |
| 187 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 2, 1, clutbase); |
198 | 188 | } |
199 | 189 | |
200 | | static void bitmap_4_3(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 190 | void jaguar_state::bitmap_4_3(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
201 | 191 | { |
202 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 3, -1); |
| 192 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 3, -1, clutbase); |
203 | 193 | } |
204 | 194 | |
205 | | static void bitmap_4_4(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 195 | void jaguar_state::bitmap_4_4(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
206 | 196 | { |
207 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 4, 1); |
| 197 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 4, 1, clutbase); |
208 | 198 | } |
209 | 199 | |
210 | | static void bitmap_4_5(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 200 | void jaguar_state::bitmap_4_5(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
211 | 201 | { |
212 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 5, -1); |
| 202 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 5, -1, clutbase); |
213 | 203 | } |
214 | 204 | |
215 | | static void bitmap_4_6(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 205 | void jaguar_state::bitmap_4_6(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
216 | 206 | { |
217 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 6, 1); |
| 207 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 6, 1, clutbase); |
218 | 208 | } |
219 | 209 | |
220 | | static void bitmap_4_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 210 | void jaguar_state::bitmap_4_7(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
221 | 211 | { |
222 | | bitmap_4_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 212 | bitmap_4_draw(scanline, firstpix, iwidth, src, xpos, 7, -1, clutbase); |
223 | 213 | } |
224 | 214 | |
225 | | static void (*const bitmap4[8])(INT32, INT32, UINT32 *, INT32) = |
| 215 | void (jaguar_state::*const jaguar_state::bitmap4[8])(UINT16 *, INT32, INT32, UINT32 *, INT32, UINT16 *) = |
226 | 216 | { |
227 | | bitmap_4_0, |
228 | | bitmap_4_1, |
229 | | bitmap_4_2, |
230 | | bitmap_4_3, |
231 | | bitmap_4_4, |
232 | | bitmap_4_5, |
233 | | bitmap_4_6, |
234 | | bitmap_4_7 |
| 217 | &jaguar_state::bitmap_4_0, |
| 218 | &jaguar_state::bitmap_4_1, |
| 219 | &jaguar_state::bitmap_4_2, |
| 220 | &jaguar_state::bitmap_4_3, |
| 221 | &jaguar_state::bitmap_4_4, |
| 222 | &jaguar_state::bitmap_4_5, |
| 223 | &jaguar_state::bitmap_4_6, |
| 224 | &jaguar_state::bitmap_4_7 |
235 | 225 | }; |
236 | 226 | |
237 | 227 | |
r17621 | r17622 | |
242 | 232 | * |
243 | 233 | *************************************/ |
244 | 234 | |
245 | | INLINE void bitmap_8_draw(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos) |
| 235 | inline void jaguar_state::bitmap_8_draw(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos, UINT16 *clutbase) |
246 | 236 | { |
247 | 237 | if (firstpix & 3) |
248 | 238 | { |
r17621 | r17622 | |
312 | 302 | } |
313 | 303 | } |
314 | 304 | |
315 | | static void bitmap_8_0(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 305 | void jaguar_state::bitmap_8_0(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
316 | 306 | { |
317 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 0, 1); |
| 307 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 0, 1, clutbase); |
318 | 308 | } |
319 | 309 | |
320 | | static void bitmap_8_1(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 310 | void jaguar_state::bitmap_8_1(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
321 | 311 | { |
322 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 1, -1); |
| 312 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 1, -1, clutbase); |
323 | 313 | } |
324 | 314 | |
325 | | static void bitmap_8_2(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 315 | void jaguar_state::bitmap_8_2(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
326 | 316 | { |
327 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 2, 1); |
| 317 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 2, 1, clutbase); |
328 | 318 | } |
329 | 319 | |
330 | | static void bitmap_8_3(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 320 | void jaguar_state::bitmap_8_3(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
331 | 321 | { |
332 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 3, -1); |
| 322 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 3, -1, clutbase); |
333 | 323 | } |
334 | 324 | |
335 | | static void bitmap_8_4(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 325 | void jaguar_state::bitmap_8_4(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
336 | 326 | { |
337 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 4, 1); |
| 327 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 4, 1, clutbase); |
338 | 328 | } |
339 | 329 | |
340 | | static void bitmap_8_5(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 330 | void jaguar_state::bitmap_8_5(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
341 | 331 | { |
342 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 5, -1); |
| 332 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 5, -1, clutbase); |
343 | 333 | } |
344 | 334 | |
345 | | static void bitmap_8_6(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 335 | void jaguar_state::bitmap_8_6(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
346 | 336 | { |
347 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 6, 1); |
| 337 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 6, 1, clutbase); |
348 | 338 | } |
349 | 339 | |
350 | | static void bitmap_8_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 340 | void jaguar_state::bitmap_8_7(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT16 *clutbase) |
351 | 341 | { |
352 | | bitmap_8_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 342 | bitmap_8_draw(scanline, firstpix, iwidth, src, xpos, 7, -1, clutbase); |
353 | 343 | } |
354 | 344 | |
355 | | static void (*const bitmap8[8])(INT32, INT32, UINT32 *, INT32) = |
| 345 | void (jaguar_state::*const jaguar_state::bitmap8[8])(UINT16 *, INT32, INT32, UINT32 *, INT32, UINT16 *) = |
356 | 346 | { |
357 | | bitmap_8_0, |
358 | | bitmap_8_1, |
359 | | bitmap_8_2, |
360 | | bitmap_8_3, |
361 | | bitmap_8_4, |
362 | | bitmap_8_5, |
363 | | bitmap_8_6, |
364 | | bitmap_8_7 |
| 347 | &jaguar_state::bitmap_8_0, |
| 348 | &jaguar_state::bitmap_8_1, |
| 349 | &jaguar_state::bitmap_8_2, |
| 350 | &jaguar_state::bitmap_8_3, |
| 351 | &jaguar_state::bitmap_8_4, |
| 352 | &jaguar_state::bitmap_8_5, |
| 353 | &jaguar_state::bitmap_8_6, |
| 354 | &jaguar_state::bitmap_8_7 |
365 | 355 | }; |
366 | 356 | |
367 | 357 | |
r17621 | r17622 | |
372 | 362 | * |
373 | 363 | *************************************/ |
374 | 364 | |
375 | | INLINE void bitmap_16_draw(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos) |
| 365 | inline void jaguar_state::bitmap_16_draw(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos) |
376 | 366 | { |
377 | 367 | if (firstpix & 1) |
378 | 368 | { |
r17621 | r17622 | |
419 | 409 | } |
420 | 410 | } |
421 | 411 | |
422 | | static void bitmap_16_0(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 412 | void jaguar_state::bitmap_16_0(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
423 | 413 | { |
424 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 0, 1); |
| 414 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 0, 1); |
425 | 415 | } |
426 | 416 | |
427 | | static void bitmap_16_1(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 417 | void jaguar_state::bitmap_16_1(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
428 | 418 | { |
429 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 1, -1); |
| 419 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 1, -1); |
430 | 420 | } |
431 | 421 | |
432 | | static void bitmap_16_2(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 422 | void jaguar_state::bitmap_16_2(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
433 | 423 | { |
434 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 2, 1); |
| 424 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 2, 1); |
435 | 425 | } |
436 | 426 | |
437 | | static void bitmap_16_3(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 427 | void jaguar_state::bitmap_16_3(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
438 | 428 | { |
439 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 3, -1); |
| 429 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 3, -1); |
440 | 430 | } |
441 | 431 | |
442 | | static void bitmap_16_4(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 432 | void jaguar_state::bitmap_16_4(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
443 | 433 | { |
444 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 4, 1); |
| 434 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 4, 1); |
445 | 435 | } |
446 | 436 | |
447 | | static void bitmap_16_5(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 437 | void jaguar_state::bitmap_16_5(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
448 | 438 | { |
449 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 5, -1); |
| 439 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 5, -1); |
450 | 440 | } |
451 | 441 | |
452 | | static void bitmap_16_6(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 442 | void jaguar_state::bitmap_16_6(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
453 | 443 | { |
454 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 6, 1); |
| 444 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 6, 1); |
455 | 445 | } |
456 | 446 | |
457 | | static void bitmap_16_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 447 | void jaguar_state::bitmap_16_7(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
458 | 448 | { |
459 | | bitmap_16_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 449 | bitmap_16_draw(scanline, firstpix, iwidth, src, xpos, 7, -1); |
460 | 450 | } |
461 | 451 | |
462 | | static void (*const bitmap16[8])(INT32, INT32, UINT32 *, INT32) = |
| 452 | void (jaguar_state::*const jaguar_state::bitmap16[8])(UINT16 *, INT32, INT32, UINT32 *, INT32) = |
463 | 453 | { |
464 | | bitmap_16_0, |
465 | | bitmap_16_1, |
466 | | bitmap_16_2, |
467 | | bitmap_16_3, |
468 | | bitmap_16_4, |
469 | | bitmap_16_5, |
470 | | bitmap_16_6, |
471 | | bitmap_16_7 |
| 454 | &jaguar_state::bitmap_16_0, |
| 455 | &jaguar_state::bitmap_16_1, |
| 456 | &jaguar_state::bitmap_16_2, |
| 457 | &jaguar_state::bitmap_16_3, |
| 458 | &jaguar_state::bitmap_16_4, |
| 459 | &jaguar_state::bitmap_16_5, |
| 460 | &jaguar_state::bitmap_16_6, |
| 461 | &jaguar_state::bitmap_16_7 |
472 | 462 | }; |
473 | 463 | |
474 | 464 | |
r17621 | r17622 | |
481 | 471 | * |
482 | 472 | *************************************/ |
483 | 473 | |
484 | | INLINE void bitmap_32_draw(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos) |
| 474 | inline void jaguar_state::bitmap_32_draw(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos, UINT8 flags, INT32 dxpos) |
485 | 475 | { |
486 | 476 | iwidth -= firstpix; |
487 | 477 | |
r17621 | r17622 | |
497 | 487 | } |
498 | 488 | } |
499 | 489 | |
500 | | static void bitmap_32_0(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 490 | void jaguar_state::bitmap_32_0(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
501 | 491 | { |
502 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 0, 1); |
| 492 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 0, 1); |
503 | 493 | } |
504 | 494 | |
505 | | static void bitmap_32_1(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 495 | void jaguar_state::bitmap_32_1(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
506 | 496 | { |
507 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 1, -1); |
| 497 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 1, -1); |
508 | 498 | } |
509 | 499 | |
510 | | static void bitmap_32_2(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 500 | void jaguar_state::bitmap_32_2(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
511 | 501 | { |
512 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 2, 1); |
| 502 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 2, 1); |
513 | 503 | } |
514 | 504 | |
515 | | static void bitmap_32_3(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 505 | void jaguar_state::bitmap_32_3(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
516 | 506 | { |
517 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 3, -1); |
| 507 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 3, -1); |
518 | 508 | } |
519 | 509 | |
520 | | static void bitmap_32_4(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 510 | void jaguar_state::bitmap_32_4(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
521 | 511 | { |
522 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 4, 1); |
| 512 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 4, 1); |
523 | 513 | } |
524 | 514 | |
525 | | static void bitmap_32_5(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 515 | void jaguar_state::bitmap_32_5(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
526 | 516 | { |
527 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 5, -1); |
| 517 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 5, -1); |
528 | 518 | } |
529 | 519 | |
530 | | static void bitmap_32_6(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 520 | void jaguar_state::bitmap_32_6(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
531 | 521 | { |
532 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 6, 1); |
| 522 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 6, 1); |
533 | 523 | } |
534 | 524 | |
535 | | static void bitmap_32_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
| 525 | void jaguar_state::bitmap_32_7(UINT16 *scanline, INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos) |
536 | 526 | { |
537 | | bitmap_32_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 527 | bitmap_32_draw(scanline, firstpix, iwidth, src, xpos, 7, -1); |
538 | 528 | } |
539 | 529 | |
540 | | static void (*const bitmap32[8])(INT32, INT32, UINT32 *, INT32) = |
| 530 | void (jaguar_state::*const jaguar_state::bitmap32[8])(UINT16 *, INT32, INT32, UINT32 *, INT32) = |
541 | 531 | { |
542 | | bitmap_32_0, |
543 | | bitmap_32_1, |
544 | | bitmap_32_2, |
545 | | bitmap_32_3, |
546 | | bitmap_32_4, |
547 | | bitmap_32_5, |
548 | | bitmap_32_6, |
549 | | bitmap_32_7 |
| 532 | &jaguar_state::bitmap_32_0, |
| 533 | &jaguar_state::bitmap_32_1, |
| 534 | &jaguar_state::bitmap_32_2, |
| 535 | &jaguar_state::bitmap_32_3, |
| 536 | &jaguar_state::bitmap_32_4, |
| 537 | &jaguar_state::bitmap_32_5, |
| 538 | &jaguar_state::bitmap_32_6, |
| 539 | &jaguar_state::bitmap_32_7 |
550 | 540 | }; |
551 | 541 | |
552 | 542 | |
553 | 543 | |
554 | | INLINE UINT8 lookup_pixel(const UINT32 *src, int i, int pitch, int depth) |
| 544 | static inline UINT8 lookup_pixel(const UINT32 *src, int i, int pitch, int depth) |
555 | 545 | { |
556 | 546 | int ppl = 32 / depth; |
557 | 547 | UINT32 data = src[((i & ppl) / ppl) + ((i / (ppl<<1)) * (pitch<<1))]; |
r17621 | r17622 | |
567 | 557 | * |
568 | 558 | *************************************/ |
569 | 559 | |
570 | | static UINT32 *process_bitmap(running_machine &machine, UINT32 *objdata, int vc, int logit) |
| 560 | UINT32 *jaguar_state::process_bitmap(UINT16 *scanline, UINT32 *objdata, int vc, int logit) |
571 | 561 | { |
572 | 562 | /* extract minimal data */ |
573 | 563 | UINT32 upper = objdata[0]; |
r17621 | r17622 | |
576 | 566 | UINT32 height = (lower >> 14) & 0x3ff; |
577 | 567 | UINT32 link = (lower >> 24) | ((upper & 0x7ff) << 8); |
578 | 568 | UINT32 data = (upper >> 11); |
579 | | UINT32 *src = (UINT32 *)get_jaguar_memory(machine, data << 3); |
| 569 | UINT32 *src = (UINT32 *)memory_base(data << 3); |
580 | 570 | |
581 | 571 | if (logit) |
582 | 572 | { |
r17621 | r17622 | |
625 | 615 | /* 1bpp case */ |
626 | 616 | case 0: |
627 | 617 | { |
628 | | UINT16 *clut = (UINT16 *)jaguar_gpu_clut + _index; |
| 618 | UINT16 *clut = (UINT16 *)&m_gpu_clut[0] + _index; |
629 | 619 | |
630 | 620 | /* non-blending */ |
631 | 621 | if (!(flags & 2)) |
r17621 | r17622 | |
658 | 648 | /* 2bpp case */ |
659 | 649 | case 1: |
660 | 650 | { |
661 | | UINT16 *clut = (UINT16 *)jaguar_gpu_clut + (_index & 0xfc); |
| 651 | UINT16 *clut = (UINT16 *)&m_gpu_clut[0] + (_index & 0xfc); |
662 | 652 | |
663 | 653 | /* non-blending */ |
664 | 654 | if (!(flags & 2)) |
r17621 | r17622 | |
694 | 684 | if (pitch != 1) |
695 | 685 | logerror("Unhandled pitch = %d\n", pitch); |
696 | 686 | |
697 | | clutbase = (UINT16 *)jaguar_gpu_clut + (_index & 0xf8); |
698 | | (*bitmap4[flags])(firstpix, iwidth, src, xpos); |
| 687 | (this->*bitmap4[flags])(scanline, firstpix, iwidth, src, xpos, (UINT16 *)&m_gpu_clut[0] + (_index & 0xf8)); |
699 | 688 | break; |
700 | 689 | |
701 | 690 | /* 8bpp case */ |
r17621 | r17622 | |
704 | 693 | if (pitch != 1) |
705 | 694 | logerror("Unhandled pitch = %d\n", pitch); |
706 | 695 | |
707 | | clutbase = (UINT16 *)jaguar_gpu_clut; |
708 | | (*bitmap8[flags])(firstpix, iwidth, src, xpos); |
| 696 | (this->*bitmap8[flags])(scanline, firstpix, iwidth, src, xpos, (UINT16 *)&m_gpu_clut[0]); |
709 | 697 | break; |
710 | 698 | |
711 | 699 | /* 16bpp case */ |
r17621 | r17622 | |
714 | 702 | if (pitch != 1) |
715 | 703 | logerror("Unhandled pitch = %d\n", pitch); |
716 | 704 | |
717 | | (*bitmap16[flags])(firstpix, iwidth, src, xpos); |
| 705 | (this->*bitmap16[flags])(scanline, firstpix, iwidth, src, xpos); |
718 | 706 | break; |
719 | 707 | |
720 | 708 | /* 32bpp case */ |
r17621 | r17622 | |
723 | 711 | if (pitch != 1) |
724 | 712 | logerror("Unhandled pitch = %d\n", pitch); |
725 | 713 | |
726 | | (*bitmap32[flags])(firstpix, iwidth, src, xpos); |
| 714 | (this->*bitmap32[flags])(scanline, firstpix, iwidth, src, xpos); |
727 | 715 | break; |
728 | 716 | |
729 | 717 | default: |
r17621 | r17622 | |
736 | 724 | objdata[1] = lower - (1 << 14); |
737 | 725 | } |
738 | 726 | |
739 | | return (UINT32 *)get_jaguar_memory(machine, link << 3); |
| 727 | return (UINT32 *)memory_base(link << 3); |
740 | 728 | } |
741 | 729 | |
742 | 730 | |
r17621 | r17622 | |
747 | 735 | * |
748 | 736 | *************************************/ |
749 | 737 | |
750 | | static UINT32 *process_scaled_bitmap(running_machine &machine, UINT32 *objdata, int vc, int logit) |
| 738 | UINT32 *jaguar_state::process_scaled_bitmap(UINT16 *scanline, UINT32 *objdata, int vc, int logit) |
751 | 739 | { |
752 | 740 | /* extract data */ |
753 | 741 | UINT32 upper = objdata[0]; |
r17621 | r17622 | |
756 | 744 | UINT32 height = (lower >> 14) & 0x3ff; |
757 | 745 | UINT32 link = (lower >> 24) | ((upper & 0x7ff) << 8); |
758 | 746 | UINT32 data = (upper >> 11); |
759 | | UINT32 *src = (UINT32 *)get_jaguar_memory(machine, data << 3); |
| 747 | UINT32 *src = (UINT32 *)memory_base(data << 3); |
760 | 748 | |
761 | 749 | /* third phrase */ |
762 | 750 | UINT32 lower3 = objdata[5]; |
r17621 | r17622 | |
829 | 817 | { |
830 | 818 | case 0: |
831 | 819 | { |
832 | | UINT16 *clut = (UINT16 *)jaguar_gpu_clut + _index; |
| 820 | UINT16 *clut = (UINT16 *)&m_gpu_clut[0] + _index; |
833 | 821 | |
834 | 822 | /* render in phrases */ |
835 | 823 | while (xpix < iwidth) |
r17621 | r17622 | |
851 | 839 | |
852 | 840 | case 1: |
853 | 841 | { |
854 | | UINT16 *clut = (UINT16 *)jaguar_gpu_clut + (_index & 0xfc); |
| 842 | UINT16 *clut = (UINT16 *)&m_gpu_clut[0] + (_index & 0xfc); |
855 | 843 | |
856 | 844 | /* render in phrases */ |
857 | 845 | while (xpix < iwidth) |
r17621 | r17622 | |
873 | 861 | |
874 | 862 | case 2: |
875 | 863 | { |
876 | | UINT16 *clut = (UINT16 *)jaguar_gpu_clut + (_index & 0xf8); |
| 864 | UINT16 *clut = (UINT16 *)&m_gpu_clut[0] + (_index & 0xf8); |
877 | 865 | |
878 | 866 | /* render in phrases */ |
879 | 867 | while (xpix < iwidth) |
r17621 | r17622 | |
895 | 883 | |
896 | 884 | case 3: |
897 | 885 | { |
898 | | UINT16 *clut = (UINT16 *)jaguar_gpu_clut; |
| 886 | UINT16 *clut = (UINT16 *)&m_gpu_clut[0]; |
899 | 887 | |
900 | 888 | /* render in phrases */ |
901 | 889 | while (xpix < iwidth) |
r17621 | r17622 | |
952 | 940 | objdata[5] = (lower3 & ~0xff0000) | ((remainder & 0xff) << 16); |
953 | 941 | } |
954 | 942 | |
955 | | return (UINT32 *)get_jaguar_memory(machine, link << 3); |
| 943 | return (UINT32 *)memory_base(link << 3); |
956 | 944 | } |
957 | 945 | |
958 | 946 | |
r17621 | r17622 | |
963 | 951 | * |
964 | 952 | *************************************/ |
965 | 953 | |
966 | | static UINT32 *process_branch(running_machine &machine, UINT32 *objdata, int vc, int logit) |
| 954 | UINT32 *jaguar_state::process_branch(UINT32 *objdata, int vc, int logit) |
967 | 955 | { |
968 | 956 | UINT32 upper = objdata[0]; |
969 | 957 | UINT32 lower = objdata[1]; |
r17621 | r17622 | |
998 | 986 | /* 3: branch if object processor flag is set */ |
999 | 987 | case 3: |
1000 | 988 | if (logit) logerror(" branch if object flag set to %06X\n", link << 3); |
1001 | | taken = gpu_regs[OBF] & 1; |
| 989 | taken = m_gpu_regs[OBF] & 1; |
1002 | 990 | break; |
1003 | 991 | |
1004 | 992 | /* 4: branch on second half of display line */ |
r17621 | r17622 | |
1014 | 1002 | } |
1015 | 1003 | |
1016 | 1004 | /* handle the branch */ |
1017 | | return taken ? (UINT32 *)get_jaguar_memory(machine, link << 3) : (objdata + 2); |
| 1005 | return taken ? (UINT32 *)memory_base(link << 3) : (objdata + 2); |
1018 | 1006 | } |
1019 | 1007 | |
1020 | 1008 | |
r17621 | r17622 | |
1025 | 1013 | * |
1026 | 1014 | *************************************/ |
1027 | 1015 | |
1028 | | static void process_object_list(running_machine &machine, int vc, UINT16 *_scanline) |
| 1016 | void jaguar_state::process_object_list(int vc, UINT16 *scanline) |
1029 | 1017 | { |
1030 | 1018 | int done = 0, count = 0; |
1031 | 1019 | UINT32 *objdata; |
r17621 | r17622 | |
1033 | 1021 | int x; |
1034 | 1022 | |
1035 | 1023 | /* erase the scanline first */ |
1036 | | scanline = _scanline; |
1037 | 1024 | for (x = 0; x < 760; x++) |
1038 | | scanline[x] = gpu_regs[BG]; |
| 1025 | scanline[x] = m_gpu_regs[BG]; |
1039 | 1026 | |
1040 | 1027 | logit = LOG_OBJECTS; |
1041 | 1028 | |
1042 | 1029 | /* fetch the object pointer */ |
1043 | | objdata = (UINT32 *)get_jaguar_memory(machine, (gpu_regs[OLP_H] << 16) | gpu_regs[OLP_L]); |
| 1030 | objdata = (UINT32 *)memory_base((m_gpu_regs[OLP_H] << 16) | m_gpu_regs[OLP_L]); |
1044 | 1031 | while (!done && objdata && count++ < 100) |
1045 | 1032 | { |
1046 | 1033 | /* the low 3 bits determine the command */ |
r17621 | r17622 | |
1050 | 1037 | case 0: |
1051 | 1038 | if (logit) |
1052 | 1039 | logerror("bitmap = %08X-%08X %08X-%08X\n", objdata[0], objdata[1], objdata[2], objdata[3]); |
1053 | | objdata = process_bitmap(machine, objdata, vc, logit); |
| 1040 | objdata = process_bitmap(scanline, objdata, vc, logit); |
1054 | 1041 | break; |
1055 | 1042 | |
1056 | 1043 | /* scaled bitmap object */ |
1057 | 1044 | case 1: |
1058 | 1045 | if (logit) |
1059 | 1046 | logerror("scaled = %08X-%08X %08X-%08X %08X-%08X\n", objdata[0], objdata[1], objdata[2], objdata[3], objdata[4], objdata[5]); |
1060 | | objdata = process_scaled_bitmap(machine, objdata, vc, logit); |
| 1047 | objdata = process_scaled_bitmap(scanline, objdata, vc, logit); |
1061 | 1048 | break; |
1062 | 1049 | |
1063 | 1050 | |
1064 | 1051 | /* GPU interrupt */ |
1065 | 1052 | case 2: |
1066 | | gpu_regs[OB_HH]=(objdata[1]&0xffff0000)>>16; |
1067 | | gpu_regs[OB_HL]=objdata[1]&0xffff; |
1068 | | gpu_regs[OB_LH]=(objdata[0]&0xffff0000)>>16; |
1069 | | gpu_regs[OB_LL]=objdata[0]&0xffff; |
1070 | | cpu_irq_state |= 2; |
1071 | | update_cpu_irq(machine); |
| 1053 | m_gpu_regs[OB_HH]=(objdata[1]&0xffff0000)>>16; |
| 1054 | m_gpu_regs[OB_HL]=objdata[1]&0xffff; |
| 1055 | m_gpu_regs[OB_LH]=(objdata[0]&0xffff0000)>>16; |
| 1056 | m_gpu_regs[OB_LL]=objdata[0]&0xffff; |
| 1057 | m_cpu_irq_state |= 2; |
| 1058 | update_cpu_irq(); |
1072 | 1059 | done=1; |
1073 | 1060 | break; |
1074 | 1061 | |
r17621 | r17622 | |
1076 | 1063 | case 3: |
1077 | 1064 | if (logit) |
1078 | 1065 | logerror("branch = %08X-%08X\n", objdata[0], objdata[1]); |
1079 | | objdata = process_branch(machine, objdata, vc, logit); |
| 1066 | objdata = process_branch(objdata, vc, logit); |
1080 | 1067 | break; |
1081 | 1068 | |
1082 | 1069 | /* stop */ |
r17621 | r17622 | |
1090 | 1077 | if (interrupt) |
1091 | 1078 | { |
1092 | 1079 | // fprintf(stderr, "stop int=%d\n", interrupt); |
1093 | | cpu_irq_state |= 4; |
1094 | | update_cpu_irq(machine); |
| 1080 | m_cpu_irq_state |= 4; |
| 1081 | update_cpu_irq(); |
1095 | 1082 | } |
1096 | 1083 | break; |
1097 | 1084 | } |
trunk/src/mame/video/jaguar.c
r17621 | r17622 | |
151 | 151 | #define LOG_UNHANDLED_BLITS 0 |
152 | 152 | |
153 | 153 | |
| 154 | // FIXME: this should be 1, but then MAME performance will be s*** with this |
| 155 | // (i.e. it drops the performance from 400% to 6% on an i5 machine). |
| 156 | // But the PIT irq is definitely needed by some games (for example Pitfall refuses |
| 157 | // to enter into gameplay without this enabled). |
| 158 | const int PIT_MULT_DBG_HACK = 64; |
| 159 | |
| 160 | |
154 | 161 | // interrupts to main CPU: |
155 | 162 | // 0 = video (on the VI scanline) |
156 | 163 | // 1 = GPU (write from GPU coprocessor) |
r17621 | r17622 | |
183 | 190 | |
184 | 191 | /************************************* |
185 | 192 | * |
186 | | * Local variables |
187 | | * |
188 | | *************************************/ |
189 | | |
190 | | /* blitter variables */ |
191 | | static UINT32 blitter_regs[BLITTER_REGS]; |
192 | | static UINT16 gpu_regs[GPU_REGS]; |
193 | | |
194 | | static emu_timer *object_timer; |
195 | | static UINT8 cpu_irq_state; |
196 | | |
197 | | static bitmap_rgb32 *screen_bitmap; |
198 | | |
199 | | static pen_t *pen_table; |
200 | | static int pixel_clock; |
201 | | |
202 | | UINT8 blitter_status; |
203 | | |
204 | | |
205 | | /************************************* |
206 | | * |
207 | 193 | * Prototypes |
208 | 194 | * |
209 | 195 | *************************************/ |
210 | 196 | |
211 | | /* from jagobj.c */ |
212 | | static void jagobj_init(running_machine &machine); |
213 | | static void process_object_list(running_machine &machine, int vc, UINT16 *_scanline); |
214 | 197 | |
215 | | /* from jagblit.c */ |
216 | | static void generic_blitter(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
217 | | static void blitter_09800001_010020_010020(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
218 | | static void blitter_09800009_000020_000020(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
219 | | static void blitter_01800009_000028_000028(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
220 | | static void blitter_01800001_000018_000018(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
221 | | static void blitter_01c00001_000018_000018(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
222 | | static void blitter_00010000_xxxxxx_xxxxxx(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
223 | | static void blitter_01800001_xxxxxx_xxxxxx(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
224 | | static void blitter_x1800x01_xxxxxx_xxxxxx(running_machine &machine, UINT32 command, UINT32 a1flags, UINT32 a2flags); |
225 | 198 | |
226 | | |
227 | | |
228 | 199 | /************************************* |
229 | 200 | * |
230 | 201 | * Compute X/Y coordinates |
231 | 202 | * |
232 | 203 | *************************************/ |
233 | 204 | |
234 | | INLINE void get_crosshair_xy(running_machine &machine, int player, int *x, int *y) |
| 205 | inline void jaguar_state::get_crosshair_xy(int player, int &x, int &y) |
235 | 206 | { |
236 | | const rectangle &visarea = machine.primary_screen->visible_area(); |
| 207 | const rectangle &visarea = machine().primary_screen->visible_area(); |
237 | 208 | |
238 | | int width = visarea.width(); |
239 | | int height = visarea.height(); |
240 | 209 | /* only 2 lightguns are connected */ |
241 | | *x = visarea.min_x + (((machine.root_device().ioport(player ? "FAKE2_X" : "FAKE1_X")->read() & 0xff) * width) >> 8); |
242 | | *y = visarea.min_y + (((machine.root_device().ioport(player ? "FAKE2_Y" : "FAKE1_Y")->read() & 0xff) * height) >> 8); |
| 210 | x = visarea.min_x + (((ioport(player ? "FAKE2_X" : "FAKE1_X")->read() & 0xff) * visarea.width()) >> 8); |
| 211 | y = visarea.min_y + (((ioport(player ? "FAKE2_Y" : "FAKE1_Y")->read() & 0xff) * visarea.height()) >> 8); |
243 | 212 | } |
244 | 213 | |
245 | 214 | |
r17621 | r17622 | |
250 | 219 | * |
251 | 220 | *************************************/ |
252 | 221 | |
253 | | INLINE int effective_hvalue(int value) |
| 222 | inline int jaguar_state::effective_hvalue(int value) |
254 | 223 | { |
255 | 224 | if (!(value & 0x400)) |
256 | 225 | return value & 0x3ff; |
257 | 226 | else |
258 | | return (value & 0x3ff) + (gpu_regs[HP] & 0x3ff) + 1; |
| 227 | return (value & 0x3ff) + (m_gpu_regs[HP] & 0x3ff) + 1; |
259 | 228 | } |
260 | 229 | |
261 | 230 | |
r17621 | r17622 | |
266 | 235 | * |
267 | 236 | *************************************/ |
268 | 237 | |
269 | | INLINE int adjust_object_timer(running_machine &machine, int vc) |
| 238 | inline bool jaguar_state::adjust_object_timer(int vc) |
270 | 239 | { |
| 240 | /* extract the display begin registers */ |
271 | 241 | int hdbpix[2]; |
272 | | int hdb = 0; |
| 242 | hdbpix[0] = (m_gpu_regs[HDB1] & 0x7ff) / 2; |
| 243 | hdbpix[1] = (m_gpu_regs[HDB2] & 0x7ff) / 2; |
273 | 244 | |
274 | | /* extract the display begin registers */ |
275 | | hdbpix[0] = (gpu_regs[HDB1] & 0x7ff) / 2; |
276 | | hdbpix[1] = (gpu_regs[HDB2] & 0x7ff) / 2; |
277 | | |
278 | 245 | /* sort */ |
279 | 246 | if (hdbpix[0] > hdbpix[1]) |
280 | 247 | { |
r17621 | r17622 | |
284 | 251 | } |
285 | 252 | |
286 | 253 | /* select the target one */ |
287 | | hdb = hdbpix[vc % 2]; |
| 254 | int hdb = hdbpix[vc % 2]; |
288 | 255 | |
289 | 256 | /* if setting the second one in a line, make sure we will ever actually hit it */ |
290 | | if (vc % 2 == 1 && (hdbpix[1] == hdbpix[0] || hdbpix[1] >= machine.primary_screen->width())) |
291 | | return FALSE; |
| 257 | if (vc % 2 == 1 && (hdbpix[1] == hdbpix[0] || hdbpix[1] >= machine().primary_screen->width())) |
| 258 | return false; |
292 | 259 | |
293 | 260 | /* adjust the timer */ |
294 | | object_timer->adjust(machine.primary_screen->time_until_pos(vc / 2, hdb), vc | (hdb << 16)); |
295 | | return TRUE; |
| 261 | m_object_timer->adjust(machine().primary_screen->time_until_pos(vc / 2, hdb), vc | (hdb << 16)); |
| 262 | return true; |
296 | 263 | } |
297 | 264 | |
298 | 265 | |
299 | 266 | |
300 | 267 | /************************************* |
301 | 268 | * |
302 | | * GPU optimization control |
303 | | * |
304 | | *************************************/ |
305 | | |
306 | | void jaguar_gpu_suspend(running_machine &machine) |
307 | | { |
308 | | machine.device<cpu_device>("gpu")->suspend(SUSPEND_REASON_SPIN, 1); |
309 | | } |
310 | | |
311 | | |
312 | | void jaguar_gpu_resume(running_machine &machine) |
313 | | { |
314 | | machine.device<cpu_device>("gpu")->resume(SUSPEND_REASON_SPIN); |
315 | | } |
316 | | |
317 | | |
318 | | |
319 | | /************************************* |
320 | | * |
321 | 269 | * Main CPU interrupts |
322 | 270 | * |
323 | 271 | *************************************/ |
324 | 272 | |
325 | | static void update_cpu_irq(running_machine &machine) |
| 273 | void jaguar_state::update_cpu_irq() |
326 | 274 | { |
327 | | if (cpu_irq_state & gpu_regs[INT1] & 0x1f) |
328 | | cputag_set_input_line(machine, "maincpu", cojag_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, ASSERT_LINE); |
| 275 | if ((m_cpu_irq_state & m_gpu_regs[INT1] & 0x1f) != 0) |
| 276 | m_main_cpu->set_input_line(m_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, ASSERT_LINE); |
329 | 277 | else |
330 | | cputag_set_input_line(machine, "maincpu", cojag_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, CLEAR_LINE); |
| 278 | m_main_cpu->set_input_line(m_is_r3000 ? R3000_IRQ4 : M68K_IRQ_6, CLEAR_LINE); |
331 | 279 | } |
332 | 280 | |
333 | 281 | |
334 | | void jaguar_gpu_cpu_int(device_t *device) |
| 282 | void jaguar_state::gpu_cpu_int(device_t *device) |
335 | 283 | { |
336 | | cpu_irq_state |= 2; |
337 | | update_cpu_irq(device->machine()); |
| 284 | jaguar_state &state = *device->machine().driver_data<jaguar_state>(); |
| 285 | state.m_cpu_irq_state |= 2; |
| 286 | state.update_cpu_irq(); |
338 | 287 | } |
339 | 288 | |
340 | | |
341 | | void jaguar_dsp_cpu_int(device_t *device) |
| 289 | void jaguar_state::dsp_cpu_int(device_t *device) |
342 | 290 | { |
343 | | cpu_irq_state |= 16; |
344 | | update_cpu_irq(device->machine()); |
| 291 | jaguar_state &state = *device->machine().driver_data<jaguar_state>(); |
| 292 | state.m_cpu_irq_state |= 16; |
| 293 | state.update_cpu_irq(); |
345 | 294 | } |
346 | 295 | |
347 | 296 | |
r17621 | r17622 | |
352 | 301 | * |
353 | 302 | *************************************/ |
354 | 303 | |
355 | | static void jaguar_set_palette(UINT16 vmode) |
| 304 | void jaguar_state::set_palette(UINT16 vmode) |
356 | 305 | { |
357 | 306 | static const UINT8 red_lookup[256] = |
358 | 307 | { |
r17621 | r17622 | |
428 | 377 | UINT8 r = (red_lookup[i >> 8] * (i & 0xff)) >> 8; |
429 | 378 | UINT8 g = (grn_lookup[i >> 8] * (i & 0xff)) >> 8; |
430 | 379 | UINT8 b = (blu_lookup[i >> 8] * (i & 0xff)) >> 8; |
431 | | pen_table[i] = MAKE_RGB(r, g, b); |
| 380 | m_pen_table[i] = MAKE_RGB(r, g, b); |
432 | 381 | } |
433 | 382 | break; |
434 | 383 | |
r17621 | r17622 | |
450 | 399 | g = (g << 3) | (g >> 2); |
451 | 400 | b = (b << 3) | (b >> 2); |
452 | 401 | } |
453 | | pen_table[i] = MAKE_RGB(r, g, b); |
| 402 | m_pen_table[i] = MAKE_RGB(r, g, b); |
454 | 403 | } |
455 | 404 | break; |
456 | 405 | |
r17621 | r17622 | |
459 | 408 | for (i = 0; i < 65536; i++) |
460 | 409 | { |
461 | 410 | if (i & 1) // FIXME: controls RGB 5-5-5 / 5-6-5 format or it's just ignored? Used by UBI Soft logo in Rayman |
462 | | pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal5bit(i >> 1), pal5bit(i >> 6)); |
| 411 | m_pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal5bit(i >> 1), pal5bit(i >> 6)); |
463 | 412 | else |
464 | | pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6)); |
| 413 | m_pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6)); |
465 | 414 | } |
466 | 415 | break; |
467 | 416 | |
468 | 417 | /* RGB full */ |
469 | 418 | case 0x006: |
470 | 419 | for (i = 0; i < 65536; i++) |
471 | | pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6)); |
| 420 | m_pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6)); |
472 | 421 | break; |
473 | 422 | |
474 | 423 | /* others */ |
r17621 | r17622 | |
483 | 432 | |
484 | 433 | /************************************* |
485 | 434 | * |
486 | | * Fast memory accessors |
487 | | * |
488 | | *************************************/ |
489 | | |
490 | | static UINT8 *get_jaguar_memory(running_machine &machine, UINT32 offset) |
491 | | { |
492 | | address_space *space = machine.device("gpu")->memory().space(AS_PROGRAM); |
493 | | return (UINT8 *)space->get_read_ptr(offset); |
494 | | } |
495 | | |
496 | | |
497 | | |
498 | | /************************************* |
499 | | * |
500 | 435 | * 32-bit access to the blitter |
501 | 436 | * |
502 | 437 | *************************************/ |
503 | 438 | |
504 | | static void blitter_run(running_machine &machine) |
| 439 | void jaguar_state::blitter_run() |
505 | 440 | { |
506 | | UINT32 command = blitter_regs[B_CMD] & STATIC_COMMAND_MASK; |
507 | | UINT32 a1flags = blitter_regs[A1_FLAGS] & STATIC_FLAGS_MASK; |
508 | | UINT32 a2flags = blitter_regs[A2_FLAGS] & STATIC_FLAGS_MASK; |
| 441 | UINT32 command = m_blitter_regs[B_CMD] & STATIC_COMMAND_MASK; |
| 442 | UINT32 a1flags = m_blitter_regs[A1_FLAGS] & STATIC_FLAGS_MASK; |
| 443 | UINT32 a2flags = m_blitter_regs[A2_FLAGS] & STATIC_FLAGS_MASK; |
509 | 444 | |
510 | 445 | g_profiler.start(PROFILER_USER1); |
511 | 446 | |
r17621 | r17622 | |
513 | 448 | { |
514 | 449 | if (command == 0x09800001 && a1flags == 0x010020) |
515 | 450 | { |
516 | | blitter_09800001_010020_010020(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 451 | blitter_09800001_010020_010020(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
517 | 452 | return; |
518 | 453 | } |
519 | 454 | if (command == 0x09800009 && a1flags == 0x000020) |
520 | 455 | { |
521 | | blitter_09800009_000020_000020(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 456 | blitter_09800009_000020_000020(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
522 | 457 | return; |
523 | 458 | } |
524 | 459 | if (command == 0x01800009 && a1flags == 0x000028) |
525 | 460 | { |
526 | | blitter_01800009_000028_000028(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 461 | blitter_01800009_000028_000028(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
527 | 462 | return; |
528 | 463 | } |
529 | 464 | |
530 | 465 | if (command == 0x01800001 && a1flags == 0x000018) |
531 | 466 | { |
532 | | blitter_01800001_000018_000018(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 467 | blitter_01800001_000018_000018(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
533 | 468 | return; |
534 | 469 | } |
535 | 470 | |
536 | 471 | if (command == 0x01c00001 && a1flags == 0x000018) |
537 | 472 | { |
538 | | blitter_01c00001_000018_000018(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 473 | blitter_01c00001_000018_000018(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
539 | 474 | return; |
540 | 475 | } |
541 | 476 | } |
542 | 477 | |
543 | 478 | if (command == 0x00010000) |
544 | 479 | { |
545 | | blitter_00010000_xxxxxx_xxxxxx(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 480 | blitter_00010000_xxxxxx_xxxxxx(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
546 | 481 | return; |
547 | 482 | } |
548 | 483 | |
549 | 484 | if (command == 0x01800001) |
550 | 485 | { |
551 | | blitter_01800001_xxxxxx_xxxxxx(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 486 | blitter_01800001_xxxxxx_xxxxxx(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
552 | 487 | return; |
553 | 488 | } |
554 | 489 | |
555 | 490 | if ((command & 0x0ffff0ff) == 0x01800001) |
556 | 491 | { |
557 | | blitter_x1800x01_xxxxxx_xxxxxx(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 492 | blitter_x1800x01_xxxxxx_xxxxxx(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
558 | 493 | return; |
559 | 494 | } |
560 | 495 | |
r17621 | r17622 | |
566 | 501 | static int reps = 0; |
567 | 502 | int i; |
568 | 503 | for (i = 0; i < blitter_count; i++) |
569 | | if (blitter_stats[i][0] == (blitter_regs[B_CMD] & STATIC_COMMAND_MASK) && |
570 | | blitter_stats[i][1] == (blitter_regs[A1_FLAGS] & STATIC_FLAGS_MASK) && |
571 | | blitter_stats[i][2] == (blitter_regs[A2_FLAGS] & STATIC_FLAGS_MASK)) |
| 504 | if (blitter_stats[i][0] == (m_blitter_regs[B_CMD] & STATIC_COMMAND_MASK) && |
| 505 | blitter_stats[i][1] == (m_blitter_regs[A1_FLAGS] & STATIC_FLAGS_MASK) && |
| 506 | blitter_stats[i][2] == (m_blitter_regs[A2_FLAGS] & STATIC_FLAGS_MASK)) |
572 | 507 | break; |
573 | 508 | if (i == blitter_count) |
574 | 509 | { |
575 | | blitter_stats[i][0] = blitter_regs[B_CMD] & STATIC_COMMAND_MASK; |
576 | | blitter_stats[i][1] = blitter_regs[A1_FLAGS] & STATIC_FLAGS_MASK; |
577 | | blitter_stats[i][2] = blitter_regs[A2_FLAGS] & STATIC_FLAGS_MASK; |
| 510 | blitter_stats[i][0] = m_blitter_regs[B_CMD] & STATIC_COMMAND_MASK; |
| 511 | blitter_stats[i][1] = m_blitter_regs[A1_FLAGS] & STATIC_FLAGS_MASK; |
| 512 | blitter_stats[i][2] = m_blitter_regs[A2_FLAGS] & STATIC_FLAGS_MASK; |
578 | 513 | blitter_stats[i][3] = 0; |
579 | 514 | blitter_pixels[i] = 0; |
580 | 515 | blitter_count++; |
581 | 516 | } |
582 | 517 | blitter_stats[i][3]++; |
583 | | blitter_pixels[i] += (blitter_regs[B_COUNT] & 0xffff) * (blitter_regs[B_COUNT] >> 16); |
| 518 | blitter_pixels[i] += (m_blitter_regs[B_COUNT] & 0xffff) * (m_blitter_regs[B_COUNT] >> 16); |
584 | 519 | if (++reps % 100 == 99) |
585 | 520 | { |
586 | 521 | mame_printf_debug("---\nBlitter stats:\n"); |
r17621 | r17622 | |
592 | 527 | } |
593 | 528 | } |
594 | 529 | |
595 | | generic_blitter(machine, blitter_regs[B_CMD], blitter_regs[A1_FLAGS], blitter_regs[A2_FLAGS]); |
| 530 | generic_blitter(m_blitter_regs[B_CMD], m_blitter_regs[A1_FLAGS], m_blitter_regs[A2_FLAGS]); |
596 | 531 | g_profiler.stop(); |
597 | 532 | } |
598 | 533 | |
599 | | static TIMER_CALLBACK( blitter_done ) |
| 534 | READ32_MEMBER( jaguar_state::blitter_r ) |
600 | 535 | { |
601 | | blitter_status = 1; |
602 | | } |
603 | | |
604 | | READ32_HANDLER( jaguar_blitter_r ) |
605 | | { |
606 | 536 | switch (offset) |
607 | 537 | { |
608 | 538 | case B_CMD: /* B_CMD */ |
609 | | return blitter_status & 3; |
| 539 | return m_blitter_status & 3; |
610 | 540 | |
611 | 541 | default: |
612 | | logerror("%08X:Blitter read register @ F022%02X\n", cpu_get_previouspc(&space->device()), offset * 4); |
| 542 | logerror("%08X:Blitter read register @ F022%02X\n", cpu_get_previouspc(&space.device()), offset * 4); |
613 | 543 | return 0; |
614 | 544 | } |
615 | 545 | } |
616 | 546 | |
617 | 547 | |
618 | | WRITE32_HANDLER( jaguar_blitter_w ) |
| 548 | WRITE32_MEMBER( jaguar_state::blitter_w ) |
619 | 549 | { |
620 | | COMBINE_DATA(&blitter_regs[offset]); |
| 550 | COMBINE_DATA(&m_blitter_regs[offset]); |
621 | 551 | if ((offset == B_CMD) && (mem_mask & 0x0000ffff)) |
622 | 552 | { |
623 | | blitter_status = 0; |
624 | | space->machine().scheduler().timer_set(attotime::from_usec(100), FUNC(blitter_done)); |
625 | | blitter_run(space->machine()); |
| 553 | m_blitter_status = 0; |
| 554 | timer_set(attotime::from_usec(100), TID_BLITTER_DONE); |
| 555 | blitter_run(); |
626 | 556 | } |
627 | 557 | |
628 | 558 | if (LOG_BLITTER_WRITE) |
629 | | logerror("%08X:Blitter write register @ F022%02X = %08X\n", cpu_get_previouspc(&space->device()), offset * 4, data); |
| 559 | logerror("%08X:Blitter write register @ F022%02X = %08X\n", cpu_get_previouspc(&space.device()), offset * 4, data); |
630 | 560 | } |
631 | 561 | |
632 | 562 | |
r17621 | r17622 | |
637 | 567 | * |
638 | 568 | *************************************/ |
639 | 569 | |
640 | | READ16_HANDLER( jaguar_tom_regs_r ) |
| 570 | READ16_MEMBER( jaguar_state::tom_regs_r ) |
641 | 571 | { |
642 | 572 | if (offset != INT1 && offset != INT2 && offset != HC && offset != VC) |
643 | | logerror("%08X:TOM read register @ F00%03X\n", cpu_get_previouspc(&space->device()), offset * 2); |
| 573 | logerror("%08X:TOM read register @ F00%03X\n", cpu_get_previouspc(&space.device()), offset * 2); |
644 | 574 | |
645 | 575 | switch (offset) |
646 | 576 | { |
647 | 577 | case INT1: |
648 | | return cpu_irq_state; |
| 578 | return m_cpu_irq_state; |
649 | 579 | |
650 | 580 | case HC: |
651 | | return space->machine().primary_screen->hpos() % (space->machine().primary_screen->width() / 2); |
| 581 | return machine().primary_screen->hpos() % (machine().primary_screen->width() / 2); |
652 | 582 | |
653 | 583 | case VC: |
654 | 584 | { |
655 | 585 | UINT8 half_line; |
656 | 586 | |
657 | | if(space->machine().primary_screen->hpos() >= (space->machine().primary_screen->width() / 2)) |
| 587 | if(machine().primary_screen->hpos() >= (machine().primary_screen->width() / 2)) |
658 | 588 | half_line = 1; |
659 | 589 | else |
660 | 590 | half_line = 0; |
661 | 591 | |
662 | | return space->machine().primary_screen->vpos() * 2 + half_line; |
| 592 | return machine().primary_screen->vpos() * 2 + half_line; |
663 | 593 | } |
664 | 594 | } |
665 | 595 | |
666 | | return gpu_regs[offset]; |
| 596 | return m_gpu_regs[offset]; |
667 | 597 | } |
668 | 598 | |
669 | | /* |
670 | | FIXME: this should be 1, but then MAME performance will be s*** with this (i.e. it drops the performance from 400% to 6% on an i5 machine). |
671 | | But the PIT irq is definitely needed by some games (for example Pitfall refuses to enter into gameplay without this enabled). |
672 | | */ |
673 | | #define PIT_MULT_DBG_HACK 64 |
674 | | |
675 | | static TIMER_CALLBACK( jaguar_pit ) |
| 599 | WRITE16_MEMBER( jaguar_state::tom_regs_w ) |
676 | 600 | { |
| 601 | UINT32 reg_store = m_gpu_regs[offset]; |
677 | 602 | attotime sample_period; |
678 | | cpu_irq_state |= 4; |
679 | | update_cpu_irq(machine); |
680 | | |
681 | | if (gpu_regs[PIT0]) |
682 | | { |
683 | | sample_period = attotime::from_nsec(((machine.device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1])); |
684 | | machine.scheduler().timer_set(sample_period, FUNC(jaguar_pit)); |
685 | | } |
686 | | } |
687 | | |
688 | | |
689 | | WRITE16_HANDLER( jaguar_tom_regs_w ) |
690 | | { |
691 | | UINT32 reg_store = gpu_regs[offset]; |
692 | | attotime sample_period; |
693 | 603 | if (offset < GPU_REGS) |
694 | 604 | { |
695 | | COMBINE_DATA(&gpu_regs[offset]); |
| 605 | COMBINE_DATA(&m_gpu_regs[offset]); |
696 | 606 | |
697 | 607 | switch (offset) |
698 | 608 | { |
699 | 609 | case MEMCON1: |
700 | | if((gpu_regs[offset] & 1) == 0) |
| 610 | if((m_gpu_regs[offset] & 1) == 0) |
701 | 611 | printf("Warning: ROMHI = 0!\n"); |
702 | 612 | |
703 | 613 | break; |
704 | 614 | case PIT0: |
705 | 615 | case PIT1: |
706 | | if (gpu_regs[PIT0] && gpu_regs[PIT0] != 0xffff) //FIXME: avoid too much small timers for now |
| 616 | if (m_gpu_regs[PIT0] && m_gpu_regs[PIT0] != 0xffff) //FIXME: avoid too much small timers for now |
707 | 617 | { |
708 | | sample_period = attotime::from_nsec(((space->machine().device("gpu")->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+gpu_regs[PIT0])) / (1+gpu_regs[PIT1])); |
709 | | space->machine().scheduler().timer_set(sample_period, FUNC(jaguar_pit)); |
| 618 | sample_period = attotime::from_nsec(((m_gpu->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+m_gpu_regs[PIT0])) / (1+m_gpu_regs[PIT1])); |
| 619 | timer_set(sample_period, TID_PIT); |
710 | 620 | } |
711 | 621 | break; |
712 | 622 | |
713 | 623 | case INT1: |
714 | | cpu_irq_state &= ~(gpu_regs[INT1] >> 8); |
715 | | update_cpu_irq(space->machine()); |
| 624 | m_cpu_irq_state &= ~(m_gpu_regs[INT1] >> 8); |
| 625 | update_cpu_irq(); |
716 | 626 | break; |
717 | 627 | |
718 | 628 | case VMODE: |
719 | | if (reg_store != gpu_regs[offset]) |
720 | | jaguar_set_palette(gpu_regs[VMODE]); |
| 629 | if (reg_store != m_gpu_regs[offset]) |
| 630 | set_palette(m_gpu_regs[VMODE]); |
721 | 631 | break; |
722 | 632 | |
723 | 633 | case OBF: /* clear GPU interrupt */ |
724 | | cpu_irq_state &= 0xfd; |
725 | | update_cpu_irq(space->machine()); |
| 634 | m_cpu_irq_state &= 0xfd; |
| 635 | update_cpu_irq(); |
726 | 636 | break; |
727 | 637 | |
728 | 638 | case HP: |
r17621 | r17622 | |
737 | 647 | case VDB: |
738 | 648 | case VDE: |
739 | 649 | { |
740 | | if (reg_store != gpu_regs[offset]) |
| 650 | if (reg_store != m_gpu_regs[offset]) |
741 | 651 | { |
742 | | int hperiod = 2 * ((gpu_regs[HP] & 0x3ff) + 1); |
743 | | int hbend = effective_hvalue(ENABLE_BORDERS ? gpu_regs[HBE] : MIN(gpu_regs[HDB1], gpu_regs[HDB2])); |
744 | | int hbstart = effective_hvalue(gpu_regs[ENABLE_BORDERS ? HBB : HDE]); |
745 | | int vperiod = (gpu_regs[VP] & 0x7ff) + 1; |
746 | | int vbend = MAX(gpu_regs[VBE],gpu_regs[VDB]) & 0x7ff; |
747 | | int vbstart = gpu_regs[VBB] & 0x7ff; |
| 652 | int hperiod = 2 * ((m_gpu_regs[HP] & 0x3ff) + 1); |
| 653 | int hbend = effective_hvalue(ENABLE_BORDERS ? m_gpu_regs[HBE] : MIN(m_gpu_regs[HDB1], m_gpu_regs[HDB2])); |
| 654 | int hbstart = effective_hvalue(m_gpu_regs[ENABLE_BORDERS ? HBB : HDE]); |
| 655 | int vperiod = (m_gpu_regs[VP] & 0x7ff) + 1; |
| 656 | int vbend = MAX(m_gpu_regs[VBE],m_gpu_regs[VDB]) & 0x7ff; |
| 657 | int vbstart = m_gpu_regs[VBB] & 0x7ff; |
748 | 658 | |
749 | 659 | /* adjust for the half-lines */ |
750 | 660 | if (hperiod != 0 && vperiod != 0 && hbend < hbstart && vbend < vbstart && hbstart < hperiod) |
751 | 661 | { |
752 | 662 | rectangle visarea(hbend / 2, hbstart / 2 - 1, vbend / 2, vbstart / 2 - 1); |
753 | | space->machine().primary_screen->configure(hperiod / 2, vperiod / 2, visarea, HZ_TO_ATTOSECONDS((double)pixel_clock * 2 / hperiod / vperiod)); |
| 663 | machine().primary_screen->configure(hperiod / 2, vperiod / 2, visarea, HZ_TO_ATTOSECONDS(double(m_pixel_clock) * 2 / hperiod / vperiod)); |
754 | 664 | } |
755 | 665 | } |
756 | 666 | break; |
r17621 | r17622 | |
759 | 669 | } |
760 | 670 | |
761 | 671 | if (offset != INT2 && offset != VI && offset != INT1) |
762 | | logerror("%08X:TOM write register @ F00%03X = %04X\n", cpu_get_previouspc(&space->device()), offset * 2, data); |
| 672 | logerror("%08X:TOM write register @ F00%03X = %04X\n", cpu_get_previouspc(&space.device()), offset * 2, data); |
763 | 673 | } |
764 | 674 | |
765 | 675 | |
r17621 | r17622 | |
770 | 680 | * |
771 | 681 | *************************************/ |
772 | 682 | |
773 | | READ32_HANDLER( cojag_gun_input_r ) |
| 683 | READ32_MEMBER( jaguar_state::cojag_gun_input_r ) |
774 | 684 | { |
775 | 685 | int beamx, beamy; |
776 | 686 | |
777 | 687 | switch (offset) |
778 | 688 | { |
779 | 689 | case 0: |
780 | | get_crosshair_xy(space->machine(), 1, &beamx, &beamy); |
| 690 | get_crosshair_xy(1, beamx, beamy); |
781 | 691 | return (beamy << 16) | (beamx ^ 0x1ff); |
782 | 692 | |
783 | 693 | case 1: |
784 | | get_crosshair_xy(space->machine(), 0, &beamx, &beamy); |
| 694 | get_crosshair_xy(0, beamx, beamy); |
785 | 695 | return (beamy << 16) | (beamx ^ 0x1ff); |
786 | 696 | |
787 | 697 | case 2: |
788 | | return space->machine().root_device().ioport("IN3")->read(); |
| 698 | return ioport("IN3")->read(); |
789 | 699 | } |
790 | 700 | return 0; |
791 | 701 | } |
r17621 | r17622 | |
798 | 708 | * |
799 | 709 | *************************************/ |
800 | 710 | |
801 | | static TIMER_CALLBACK( cojag_scanline_update ) |
| 711 | void jaguar_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
802 | 712 | { |
| 713 | switch (id) |
| 714 | { |
| 715 | case TID_SCANLINE: |
| 716 | scanline_update(param); |
| 717 | break; |
| 718 | |
| 719 | case TID_BLITTER_DONE: |
| 720 | m_blitter_status = 1; |
| 721 | break; |
| 722 | |
| 723 | case TID_PIT: |
| 724 | m_cpu_irq_state |= 4; |
| 725 | update_cpu_irq(); |
| 726 | if (m_gpu_regs[PIT0] != 0) |
| 727 | { |
| 728 | attotime sample_period = attotime::from_nsec(((m_gpu->unscaled_clock()*PIT_MULT_DBG_HACK) / (1+m_gpu_regs[PIT0])) / (1+m_gpu_regs[PIT1])); |
| 729 | timer_set(sample_period, TID_PIT); |
| 730 | } |
| 731 | break; |
| 732 | |
| 733 | case TID_SERIAL: |
| 734 | serial_update(); |
| 735 | break; |
| 736 | |
| 737 | case TID_GPU_SYNC: |
| 738 | // if a command is still pending, and we haven't maxed out our timer, set a new one |
| 739 | if (m_gpu_command_pending && param < 1000) |
| 740 | timer_set(attotime::from_usec(50), TID_GPU_SYNC, ++param); |
| 741 | break; |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | void jaguar_state::scanline_update(int param) |
| 746 | { |
803 | 747 | int vc = param & 0xffff; |
804 | 748 | int hdb = param >> 16; |
805 | | const rectangle &visarea = machine.primary_screen->visible_area(); |
| 749 | const rectangle &visarea = machine().primary_screen->visible_area(); |
806 | 750 | |
807 | 751 | /* only run if video is enabled and we are past the "display begin" */ |
808 | | if ((gpu_regs[VMODE] & 1) && vc >= (gpu_regs[VDB] & 0x7ff)) |
| 752 | if ((m_gpu_regs[VMODE] & 1) && vc >= (m_gpu_regs[VDB] & 0x7ff)) |
809 | 753 | { |
810 | | UINT32 *dest = &screen_bitmap->pix32(vc >> 1); |
| 754 | UINT32 *dest = &m_screen_bitmap.pix32(vc >> 1); |
811 | 755 | int maxx = visarea.max_x; |
812 | | int hde = effective_hvalue(gpu_regs[HDE]) >> 1; |
| 756 | int hde = effective_hvalue(m_gpu_regs[HDE]) >> 1; |
813 | 757 | UINT16 x,scanline[760]; |
814 | | UINT8 y,pixel_width = ((gpu_regs[VMODE]>>10)&3)+1; |
| 758 | UINT8 y,pixel_width = ((m_gpu_regs[VMODE]>>10)&3)+1; |
815 | 759 | |
816 | 760 | /* if we are first on this scanline, clear to the border color */ |
817 | 761 | if (ENABLE_BORDERS && vc % 2 == 0) |
818 | 762 | { |
819 | | rgb_t border = MAKE_RGB(gpu_regs[BORD1] & 0xff, gpu_regs[BORD1] >> 8, gpu_regs[BORD2] & 0xff); |
| 763 | rgb_t border = MAKE_RGB(m_gpu_regs[BORD1] & 0xff, m_gpu_regs[BORD1] >> 8, m_gpu_regs[BORD2] & 0xff); |
820 | 764 | for (x = visarea.min_x; x <= visarea.max_x; x++) |
821 | 765 | dest[x] = border; |
822 | 766 | } |
823 | 767 | |
824 | 768 | /* process the object list for this counter value */ |
825 | | process_object_list(machine, vc, scanline); |
| 769 | process_object_list(vc, scanline); |
826 | 770 | |
827 | 771 | /* copy the data to the target, clipping */ |
828 | | if ((gpu_regs[VMODE] & 0x106) == 0x002) /* RGB24 */ |
| 772 | if ((m_gpu_regs[VMODE] & 0x106) == 0x002) /* RGB24 */ |
829 | 773 | { |
830 | 774 | for (x = 0; x < 760 && hdb <= maxx && hdb < hde; x+=2) |
831 | 775 | for (y = 0; y < pixel_width; y++) |
832 | 776 | { |
833 | | UINT8 r = pen_table[(scanline[x]&0xff)|256]; |
834 | | UINT8 g = pen_table[(scanline[x]>>8)|512]; |
835 | | UINT8 b = pen_table[scanline[x+1]&0xff]; |
| 777 | UINT8 r = m_pen_table[(scanline[x]&0xff)|256]; |
| 778 | UINT8 g = m_pen_table[(scanline[x]>>8)|512]; |
| 779 | UINT8 b = m_pen_table[scanline[x+1]&0xff]; |
836 | 780 | dest[hdb++] = MAKE_RGB(r, g, b); |
837 | 781 | } |
838 | 782 | } |
r17621 | r17622 | |
840 | 784 | { |
841 | 785 | for (x = 0; x < 760 && hdb <= maxx && hdb < hde; x++) |
842 | 786 | for (y = 0; y < pixel_width; y++) |
843 | | dest[hdb++] = pen_table[scanline[x]]; |
| 787 | dest[hdb++] = m_pen_table[scanline[x]]; |
844 | 788 | } |
845 | 789 | } |
846 | 790 | |
r17621 | r17622 | |
848 | 792 | do |
849 | 793 | { |
850 | 794 | /* handle vertical interrupts */ |
851 | | if (vc == gpu_regs[VI]) |
| 795 | if (vc == m_gpu_regs[VI]) |
852 | 796 | { |
853 | | cpu_irq_state |= 1; |
854 | | update_cpu_irq(machine); |
| 797 | m_cpu_irq_state |= 1; |
| 798 | update_cpu_irq(); |
855 | 799 | } |
856 | 800 | |
857 | 801 | /* point to the next counter value */ |
858 | | if (++vc / 2 >= machine.primary_screen->height()) |
| 802 | if (++vc / 2 >= machine().primary_screen->height()) |
859 | 803 | vc = 0; |
860 | 804 | |
861 | | } while (!adjust_object_timer(machine, vc)); |
| 805 | } while (!adjust_object_timer(vc)); |
862 | 806 | } |
863 | 807 | |
864 | | VIDEO_START( cojag ) |
| 808 | void jaguar_state::video_start() |
865 | 809 | { |
866 | | memset(&blitter_regs, 0, sizeof(blitter_regs)); |
867 | | memset(&gpu_regs, 0, sizeof(gpu_regs)); |
868 | | cpu_irq_state = 0; |
| 810 | memset(&m_blitter_regs, 0, sizeof(m_blitter_regs)); |
| 811 | memset(&m_gpu_regs, 0, sizeof(m_gpu_regs)); |
| 812 | m_cpu_irq_state = 0; |
869 | 813 | |
870 | | object_timer = machine.scheduler().timer_alloc(FUNC(cojag_scanline_update)); |
871 | | adjust_object_timer(machine, 0); |
| 814 | m_object_timer = timer_alloc(TID_SCANLINE); |
| 815 | adjust_object_timer(0); |
872 | 816 | |
873 | | screen_bitmap = auto_bitmap_rgb32_alloc(machine, 760, 512); |
| 817 | m_screen_bitmap.allocate(760, 512); |
874 | 818 | |
875 | | jagobj_init(machine); |
| 819 | jagobj_init(); |
876 | 820 | |
877 | | pen_table = auto_alloc_array(machine, pen_t, 65536); |
878 | | |
879 | | state_save_register_global_pointer(machine, pen_table, 65536); |
880 | | state_save_register_global_array(machine, blitter_regs); |
881 | | state_save_register_global_array(machine, gpu_regs); |
882 | | state_save_register_global(machine, cpu_irq_state); |
883 | | machine.save().register_postload(save_prepost_delegate(FUNC(update_cpu_irq), &machine)); |
884 | | pixel_clock = COJAG_PIXEL_CLOCK; |
| 821 | save_item(NAME(m_pen_table)); |
| 822 | save_item(NAME(m_blitter_regs)); |
| 823 | save_item(NAME(m_gpu_regs)); |
| 824 | save_item(NAME(m_cpu_irq_state)); |
| 825 | m_pixel_clock = m_is_cojag ? COJAG_PIXEL_CLOCK : JAGUAR_CLOCK; |
885 | 826 | } |
886 | 827 | |
887 | | VIDEO_START( jaguar ) |
| 828 | |
| 829 | void jaguar_state::device_postload() |
888 | 830 | { |
889 | | VIDEO_START_CALL( cojag ); |
890 | | pixel_clock = JAGUAR_CLOCK; |
| 831 | update_cpu_irq(); |
891 | 832 | } |
892 | 833 | |
893 | 834 | |
r17621 | r17622 | |
897 | 838 | * |
898 | 839 | *************************************/ |
899 | 840 | |
900 | | SCREEN_UPDATE_RGB32( cojag ) |
| 841 | UINT32 jaguar_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
901 | 842 | { |
902 | 843 | /* if not enabled, just blank */ |
903 | | if (!(gpu_regs[VMODE] & 1)) |
| 844 | if (!(m_gpu_regs[VMODE] & 1)) |
904 | 845 | { |
905 | 846 | bitmap.fill(0, cliprect); |
906 | 847 | return 0; |
907 | 848 | } |
908 | 849 | |
909 | 850 | /* render the object list */ |
910 | | copybitmap(bitmap, *screen_bitmap, 0, 0, 0, 0, cliprect); |
| 851 | copybitmap(bitmap, m_screen_bitmap, 0, 0, 0, 0, cliprect); |
911 | 852 | return 0; |
912 | 853 | } |
913 | 854 | |
trunk/src/mame/drivers/jaguar.c
r17621 | r17622 | |
335 | 335 | #include "cpu/mips/r3000.h" |
336 | 336 | #include "cpu/jaguar/jaguar.h" |
337 | 337 | #include "machine/idectrl.h" |
338 | | #include "machine/nvram.h" |
339 | 338 | #include "sound/dac.h" |
340 | 339 | #include "includes/jaguar.h" |
341 | 340 | #include "emuopts.h" |
r17621 | r17622 | |
353 | 352 | static DEVICE_IMAGE_LOAD( jaguar ); |
354 | 353 | |
355 | 354 | |
356 | | class cojag_state : public driver_device |
357 | | { |
358 | | public: |
359 | | cojag_state(const machine_config &mconfig, device_type type, const char *tag) |
360 | | : driver_device(mconfig, type, tag), |
361 | | m_nvram(*this, "nvram") , |
362 | | m_rom_base(*this, "robase"){ } |
363 | 355 | |
364 | | optional_shared_ptr<UINT32> m_nvram; |
365 | | cpu_device *m_main_cpu; |
366 | | UINT32 m_misc_control_data; |
367 | | UINT8 m_eeprom_enable; |
368 | | optional_shared_ptr<UINT32> m_rom_base; |
369 | | UINT32 *m_gpu_jump_address; |
370 | | UINT8 m_gpu_command_pending; |
371 | | UINT32 m_gpu_spin_pc; |
372 | | UINT32 *m_main_speedup; |
373 | | int m_main_speedup_hits; |
374 | | UINT64 m_main_speedup_last_cycles; |
375 | | UINT64 m_main_speedup_max_cycles; |
376 | | UINT32 *m_main_gpu_wait; |
377 | | DECLARE_WRITE32_MEMBER(jaguar_eeprom_w); |
378 | | DECLARE_READ32_MEMBER(jaguar_eeprom_clk); |
379 | | DECLARE_READ32_MEMBER(jaguar_eeprom_cs); |
380 | | DECLARE_READ32_MEMBER(misc_control_r); |
381 | | DECLARE_WRITE32_MEMBER(misc_control_w); |
382 | | DECLARE_READ32_MEMBER(gpuctrl_r); |
383 | | DECLARE_WRITE32_MEMBER(gpuctrl_w); |
384 | | DECLARE_READ32_MEMBER(dspctrl_r); |
385 | | DECLARE_WRITE32_MEMBER(dspctrl_w); |
386 | | DECLARE_READ32_MEMBER(jaguar_wave_rom_r); |
387 | | DECLARE_READ32_MEMBER(joystick_r); |
388 | | DECLARE_WRITE32_MEMBER(joystick_w); |
389 | | DECLARE_WRITE32_MEMBER(latch_w); |
390 | | DECLARE_READ32_MEMBER(eeprom_data_r); |
391 | | DECLARE_WRITE32_MEMBER(eeprom_enable_w); |
392 | | DECLARE_WRITE32_MEMBER(eeprom_data_w); |
393 | | DECLARE_WRITE32_MEMBER(gpu_jump_w); |
394 | | DECLARE_READ32_MEMBER(gpu_jump_r); |
395 | | DECLARE_READ32_MEMBER(cojagr3k_main_speedup_r); |
396 | | DECLARE_READ32_MEMBER(main_gpu_wait_r); |
397 | | DECLARE_WRITE32_MEMBER(area51_main_speedup_w); |
398 | | DECLARE_WRITE32_MEMBER(area51mx_main_speedup_w); |
399 | | DECLARE_READ16_MEMBER(gpuctrl_r16); |
400 | | DECLARE_WRITE16_MEMBER(gpuctrl_w16); |
401 | | DECLARE_READ16_MEMBER(jaguar_blitter_r16); |
402 | | DECLARE_WRITE16_MEMBER(jaguar_blitter_w16); |
403 | | DECLARE_READ16_MEMBER(jaguar_serial_r16); |
404 | | DECLARE_WRITE16_MEMBER(jaguar_serial_w16); |
405 | | DECLARE_READ16_MEMBER(dspctrl_r16); |
406 | | DECLARE_WRITE16_MEMBER(dspctrl_w16); |
407 | | DECLARE_READ16_MEMBER(jaguar_eeprom_cs16); |
408 | | DECLARE_READ16_MEMBER(jaguar_eeprom_clk16); |
409 | | DECLARE_WRITE16_MEMBER(jaguar_eeprom_w16); |
410 | | DECLARE_READ16_MEMBER(joystick_r16); |
411 | | DECLARE_WRITE16_MEMBER(joystick_w16); |
412 | | DECLARE_READ32_MEMBER(jaguar_shared_ram_r); |
413 | | DECLARE_WRITE32_MEMBER(jaguar_shared_ram_w); |
414 | | DECLARE_READ32_MEMBER(jaguar_rom_base_r); |
415 | | DECLARE_WRITE32_MEMBER(jaguar_rom_base_w); |
416 | | DECLARE_READ32_MEMBER(jaguar_cart_base_r); |
417 | | DECLARE_WRITE32_MEMBER(jaguar_cart_base_w); |
418 | | DECLARE_READ32_MEMBER(high_rom_base_r); |
419 | | DECLARE_WRITE32_MEMBER(high_rom_base_w); |
420 | | DECLARE_READ32_MEMBER(jaguar_dsp_ram_r); |
421 | | DECLARE_WRITE32_MEMBER(jaguar_dsp_ram_w); |
422 | | DECLARE_READ32_MEMBER(jaguar_gpu_clut_r); |
423 | | DECLARE_WRITE32_MEMBER(jaguar_gpu_clut_w); |
424 | | DECLARE_READ32_MEMBER(jaguar_gpu_ram_r); |
425 | | DECLARE_WRITE32_MEMBER(jaguar_gpu_ram_w); |
426 | | DECLARE_READ16_MEMBER(jaguar_shared_ram_r16); |
427 | | DECLARE_WRITE16_MEMBER(jaguar_shared_ram_w16); |
428 | | DECLARE_READ16_MEMBER(jaguar_rom_base_r16); |
429 | | DECLARE_WRITE16_MEMBER(jaguar_rom_base_w16); |
430 | | DECLARE_READ16_MEMBER(jaguar_cart_base_r16); |
431 | | DECLARE_WRITE16_MEMBER(jaguar_cart_base_w16); |
432 | | DECLARE_READ16_MEMBER(high_rom_base_r16); |
433 | | DECLARE_WRITE16_MEMBER(high_rom_base_w16); |
434 | | DECLARE_READ16_MEMBER(jaguar_dsp_ram_r16); |
435 | | DECLARE_WRITE16_MEMBER(jaguar_dsp_ram_w16); |
436 | | DECLARE_READ16_MEMBER(jaguar_gpu_clut_r16); |
437 | | DECLARE_WRITE16_MEMBER(jaguar_gpu_clut_w16); |
438 | | DECLARE_READ16_MEMBER(jaguar_gpu_ram_r16); |
439 | | DECLARE_WRITE16_MEMBER(jaguar_gpu_ram_w16); |
440 | | DECLARE_DRIVER_INIT(jaguar); |
441 | | DECLARE_DRIVER_INIT(area51mx); |
442 | | DECLARE_DRIVER_INIT(maxforce); |
443 | | DECLARE_DRIVER_INIT(freezeat); |
444 | | DECLARE_DRIVER_INIT(fishfren); |
445 | | DECLARE_DRIVER_INIT(a51mxr3k); |
446 | | DECLARE_DRIVER_INIT(area51); |
447 | | DECLARE_DRIVER_INIT(freezeat4); |
448 | | DECLARE_DRIVER_INIT(freezeat5); |
449 | | DECLARE_DRIVER_INIT(freezeat6); |
450 | | DECLARE_DRIVER_INIT(vcircle); |
451 | | DECLARE_DRIVER_INIT(freezeat3); |
452 | | DECLARE_DRIVER_INIT(freezeat2); |
453 | | DECLARE_DRIVER_INIT(area51a); |
454 | | }; |
455 | | |
456 | | |
457 | | |
458 | 356 | /************************************* |
459 | 357 | * |
460 | | * Global variables |
461 | | * |
462 | | *************************************/ |
463 | | |
464 | | UINT32 *jaguar_shared_ram; |
465 | | UINT32 *jaguar_gpu_ram; |
466 | | UINT32 *jaguar_gpu_clut; |
467 | | UINT32 *jaguar_dsp_ram; |
468 | | UINT32 *jaguar_wave_rom; |
469 | | UINT32* high_rom_base; |
470 | | UINT8 cojag_is_r3000; |
471 | | bool jaguar_hacks_enabled; |
472 | | static int is_jaguar; |
473 | | |
474 | | |
475 | | |
476 | | /************************************* |
477 | | * |
478 | 358 | * Local variables |
479 | 359 | * |
480 | 360 | *************************************/ |
481 | 361 | |
482 | | static UINT32 joystick_data; |
483 | | static UINT32 *rom_base; |
484 | | static size_t rom_size; |
485 | | static UINT32 *cart_base; |
486 | | static size_t cart_size; |
487 | | static UINT8 eeprom_bit_count; |
488 | | static UINT8 protection_check = 0; /* 0 = check hasn't started yet; 1= check in progress; 2 = check is finished. */ |
489 | | extern UINT8 blitter_status; |
490 | | static UINT8 using_cart = 0; |
491 | | |
492 | 362 | static IRQ_CALLBACK(jaguar_irq_callback) |
493 | 363 | { |
494 | 364 | return (irqline == 6) ? 0x40 : -1; |
r17621 | r17622 | |
502 | 372 | * |
503 | 373 | *************************************/ |
504 | 374 | |
505 | | static MACHINE_RESET( cojag ) |
| 375 | void jaguar_state::machine_reset() |
506 | 376 | { |
507 | | cojag_state *state = machine.driver_data<cojag_state>(); |
508 | | UINT8 *rom = state->memregion("user2")->base(); |
| 377 | if (!m_is_cojag) |
| 378 | m_main_cpu->set_irq_acknowledge_callback(jaguar_irq_callback); |
509 | 379 | |
| 380 | m_protection_check = 0; |
| 381 | |
510 | 382 | /* 68020 only: copy the interrupt vectors into RAM */ |
511 | | if (!cojag_is_r3000) |
512 | | memcpy(jaguar_shared_ram, state->m_rom_base, 0x10); |
| 383 | if (!m_is_r3000) |
| 384 | { |
| 385 | memcpy(m_shared_ram, m_rom_base, 0x400); // do not increase, or Doom breaks |
| 386 | m_main_cpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); |
| 387 | } |
513 | 388 | |
514 | 389 | /* configure banks for gfx/sound ROMs */ |
515 | | if (rom) |
| 390 | UINT8 *romboard = memregion("romboard")->base(); |
| 391 | if (romboard != NULL) |
516 | 392 | { |
517 | 393 | /* graphics banks */ |
518 | | if (cojag_is_r3000) |
| 394 | if (m_is_r3000) |
519 | 395 | { |
520 | | state->membank("bank1")->configure_entries(0, 2, rom + 0x800000, 0x400000); |
521 | | state->membank("bank1")->set_entry(0); |
| 396 | membank("maingfxbank")->configure_entries(0, 2, romboard + 0x800000, 0x400000); |
| 397 | membank("maingfxbank")->set_entry(0); |
522 | 398 | } |
523 | | state->membank("bank8")->configure_entries(0, 2, rom + 0x800000, 0x400000); |
524 | | state->membank("bank8")->set_entry(0); |
| 399 | membank("gpugfxbank")->configure_entries(0, 2, romboard + 0x800000, 0x400000); |
| 400 | membank("gpugfxbank")->set_entry(0); |
525 | 401 | |
526 | 402 | /* sound banks */ |
527 | | state->membank("bank2")->configure_entries(0, 8, rom + 0x000000, 0x200000); |
528 | | state->membank("bank9")->configure_entries(0, 8, rom + 0x000000, 0x200000); |
529 | | state->membank("bank2")->set_entry(0); |
530 | | state->membank("bank9")->set_entry(0); |
| 403 | membank("mainsndbank")->configure_entries(0, 8, romboard + 0x000000, 0x200000); |
| 404 | membank("mainsndbank")->set_entry(0); |
| 405 | membank("dspsndbank")->configure_entries(0, 8, romboard + 0x000000, 0x200000); |
| 406 | membank("dspsndbank")->set_entry(0); |
531 | 407 | } |
532 | 408 | |
533 | 409 | /* clear any spinuntil stuff */ |
534 | | jaguar_gpu_resume(machine); |
535 | | jaguar_dsp_resume(machine); |
| 410 | gpu_resume(); |
| 411 | dsp_resume(); |
536 | 412 | |
537 | 413 | /* halt the CPUs */ |
538 | | jaguargpu_ctrl_w(machine.device("gpu"), G_CTRL, 0, 0xffffffff); |
539 | | jaguardsp_ctrl_w(machine.device("audiocpu"), D_CTRL, 0, 0xffffffff); |
| 414 | jaguargpu_ctrl_w(m_gpu, G_CTRL, 0, 0xffffffff); |
| 415 | jaguardsp_ctrl_w(m_dsp, D_CTRL, 0, 0xffffffff); |
540 | 416 | |
541 | 417 | /* set blitter idle flag */ |
542 | | blitter_status = 1; |
| 418 | m_blitter_status = 1; |
| 419 | m_joystick_data = 0xffffffff; |
| 420 | m_eeprom_bit_count = 0; |
543 | 421 | |
544 | | // normal handling of 'protection' |
545 | | is_jaguar = 0; |
546 | | } |
547 | | |
548 | | |
549 | | static MACHINE_RESET( jaguar ) |
550 | | { |
551 | | device_set_irq_callback(machine.device("maincpu"), jaguar_irq_callback); |
552 | | |
553 | | protection_check = 0; |
554 | | |
555 | | /* Set up pointers for Jaguar logo */ |
556 | | |
557 | | memcpy(jaguar_shared_ram, rom_base, 0x400); // do not increase, or Doom breaks |
558 | | |
559 | | device_set_input_line(machine.device("maincpu"), INPUT_LINE_RESET, PULSE_LINE); |
560 | | |
561 | | /* clear any spinuntil stuff */ |
562 | | jaguar_gpu_resume(machine); |
563 | | jaguar_dsp_resume(machine); |
564 | | |
565 | | /* halt the CPUs */ |
566 | | jaguargpu_ctrl_w(machine.device("gpu"), G_CTRL, 0, 0xffffffff); |
567 | | jaguardsp_ctrl_w(machine.device("audiocpu"), D_CTRL, 0, 0xffffffff); |
568 | | |
569 | | joystick_data = 0xffffffff; |
570 | | eeprom_bit_count = 0; |
571 | | blitter_status = 1; |
572 | | if ((using_cart) && (machine.root_device().ioport("CONFIG")->read() & 2)) |
| 422 | if ((m_using_cart) && (ioport("CONFIG")->read() & 2)) |
573 | 423 | { |
574 | | cart_base[0x102] = 1; |
575 | | using_cart = 0; |
| 424 | m_cart_base[0x102] = 1; |
| 425 | m_using_cart = false; |
576 | 426 | } |
577 | | |
578 | | // custom handling of 'protection' |
579 | | is_jaguar = 1; |
580 | 427 | } |
581 | 428 | |
582 | 429 | |
r17621 | r17622 | |
659 | 506 | } |
660 | 507 | } |
661 | 508 | */ |
662 | | WRITE32_MEMBER(cojag_state::jaguar_eeprom_w) |
| 509 | WRITE32_MEMBER(jaguar_state::eeprom_w) |
663 | 510 | { |
664 | 511 | eeprom_device *eeprom = machine().device<eeprom_device>("eeprom"); |
665 | | eeprom_bit_count++; |
666 | | if (eeprom_bit_count != 9) /* kill extra bit at end of address */ |
| 512 | m_eeprom_bit_count++; |
| 513 | if (m_eeprom_bit_count != 9) /* kill extra bit at end of address */ |
667 | 514 | { |
668 | 515 | eeprom->write_bit(data >> 31); |
669 | 516 | eeprom->set_clock_line(PULSE_LINE); |
670 | 517 | } |
671 | 518 | } |
672 | 519 | |
673 | | READ32_MEMBER(cojag_state::jaguar_eeprom_clk) |
| 520 | READ32_MEMBER(jaguar_state::eeprom_clk) |
674 | 521 | { |
675 | 522 | eeprom_device *eeprom = machine().device<eeprom_device>("eeprom"); |
676 | 523 | eeprom->set_clock_line(PULSE_LINE); /* get next bit when reading */ |
677 | 524 | return 0; |
678 | 525 | } |
679 | 526 | |
680 | | READ32_MEMBER(cojag_state::jaguar_eeprom_cs) |
| 527 | READ32_MEMBER(jaguar_state::eeprom_cs) |
681 | 528 | { |
682 | 529 | eeprom_device *eeprom = machine().device<eeprom_device>("eeprom"); |
683 | 530 | eeprom->set_cs_line(ASSERT_LINE); /* must do at end of an operation */ |
684 | 531 | eeprom->set_cs_line(CLEAR_LINE); /* enable chip for next operation */ |
685 | 532 | eeprom->write_bit(1); /* write a start bit */ |
686 | 533 | eeprom->set_clock_line(PULSE_LINE); |
687 | | eeprom_bit_count = 0; |
| 534 | m_eeprom_bit_count = 0; |
688 | 535 | return 0; |
689 | 536 | } |
690 | 537 | |
r17621 | r17622 | |
696 | 543 | * |
697 | 544 | *************************************/ |
698 | 545 | |
699 | | READ32_MEMBER(cojag_state::misc_control_r) |
| 546 | READ32_MEMBER(jaguar_state::misc_control_r) |
700 | 547 | { |
701 | 548 | /* D7 = board reset (low) |
702 | 549 | D6 = audio must & reset (high) |
r17621 | r17622 | |
709 | 556 | } |
710 | 557 | |
711 | 558 | |
712 | | WRITE32_MEMBER(cojag_state::misc_control_w) |
| 559 | WRITE32_MEMBER(jaguar_state::misc_control_w) |
713 | 560 | { |
714 | 561 | logerror("%08X:misc_control_w(%02X)\n", cpu_get_previouspc(&space.device()), data); |
715 | 562 | |
r17621 | r17622 | |
724 | 571 | if (!(data & 0x80)) |
725 | 572 | { |
726 | 573 | /* clear any spinuntil stuff */ |
727 | | jaguar_gpu_resume(machine()); |
728 | | jaguar_dsp_resume(machine()); |
| 574 | gpu_resume(); |
| 575 | dsp_resume(); |
729 | 576 | |
730 | 577 | /* halt the CPUs */ |
731 | | jaguargpu_ctrl_w(machine().device("gpu"), G_CTRL, 0, 0xffffffff); |
732 | | jaguardsp_ctrl_w(machine().device("audiocpu"), D_CTRL, 0, 0xffffffff); |
| 578 | jaguargpu_ctrl_w(m_gpu, G_CTRL, 0, 0xffffffff); |
| 579 | jaguardsp_ctrl_w(m_dsp, D_CTRL, 0, 0xffffffff); |
733 | 580 | } |
734 | 581 | |
735 | 582 | /* adjust banking */ |
736 | | if (machine().root_device().memregion("user2")->base()) |
| 583 | if (machine().root_device().memregion("romboard")->base()) |
737 | 584 | { |
738 | | membank("bank2")->set_entry((data >> 1) & 7); |
739 | | membank("bank9")->set_entry((data >> 1) & 7); |
| 585 | membank("mainsndbank")->set_entry((data >> 1) & 7); |
| 586 | membank("dspsndbank")->set_entry((data >> 1) & 7); |
740 | 587 | } |
741 | 588 | |
742 | 589 | COMBINE_DATA(&m_misc_control_data); |
r17621 | r17622 | |
750 | 597 | *************************************/ |
751 | 598 | |
752 | 599 | // shouldn't the DSPs be doing this calc, why is this needed for Jaguar? |
753 | | READ32_MEMBER(cojag_state::gpuctrl_r) |
| 600 | READ32_MEMBER(jaguar_state::gpuctrl_r) |
754 | 601 | { |
755 | | UINT32 result = jaguargpu_ctrl_r(machine().device("gpu"), offset); |
| 602 | UINT32 result = jaguargpu_ctrl_r(m_gpu, offset); |
756 | 603 | |
757 | | if (is_jaguar) |
| 604 | if (!m_is_cojag) |
758 | 605 | { |
759 | | if (protection_check != 1) return result; |
| 606 | if (m_protection_check != 1) return result; |
760 | 607 | |
761 | | protection_check++; |
762 | | jaguar_gpu_ram[0] = 0x3d0dead; |
| 608 | m_protection_check++; |
| 609 | m_gpu_ram[0] = 0x3d0dead; |
763 | 610 | return 0x80000000; |
764 | 611 | } |
765 | 612 | else |
r17621 | r17622 | |
767 | 614 | } |
768 | 615 | |
769 | 616 | |
770 | | WRITE32_MEMBER(cojag_state::gpuctrl_w) |
| 617 | WRITE32_MEMBER(jaguar_state::gpuctrl_w) |
771 | 618 | { |
772 | | if (is_jaguar) |
773 | | if ((!protection_check) && (offset == 5) && (data == 1)) protection_check++; |
| 619 | if (!m_is_cojag) |
| 620 | if ((!m_protection_check) && (offset == 5) && (data == 1)) m_protection_check++; |
774 | 621 | |
775 | | jaguargpu_ctrl_w(machine().device("gpu"), offset, data, mem_mask); |
| 622 | jaguargpu_ctrl_w(m_gpu, offset, data, mem_mask); |
776 | 623 | } |
777 | 624 | |
778 | 625 | |
r17621 | r17622 | |
783 | 630 | * |
784 | 631 | *************************************/ |
785 | 632 | |
786 | | READ32_MEMBER(cojag_state::dspctrl_r) |
| 633 | READ32_MEMBER(jaguar_state::dspctrl_r) |
787 | 634 | { |
788 | | return jaguardsp_ctrl_r(machine().device("audiocpu"), offset); |
| 635 | return jaguardsp_ctrl_r(machine().device("dsp"), offset); |
789 | 636 | } |
790 | 637 | |
791 | 638 | |
792 | | WRITE32_MEMBER(cojag_state::dspctrl_w) |
| 639 | WRITE32_MEMBER(jaguar_state::dspctrl_w) |
793 | 640 | { |
794 | | jaguardsp_ctrl_w(machine().device("audiocpu"), offset, data, mem_mask); |
| 641 | jaguardsp_ctrl_w(machine().device("dsp"), offset, data, mem_mask); |
795 | 642 | } |
796 | 643 | |
797 | 644 | |
798 | | READ32_MEMBER(cojag_state::jaguar_wave_rom_r) |
799 | | { |
800 | | return jaguar_wave_rom[offset]; |
801 | | } |
802 | | |
803 | | |
804 | 645 | /************************************* |
805 | 646 | * |
806 | 647 | * Input ports |
r17621 | r17622 | |
810 | 651 | * |
811 | 652 | *************************************/ |
812 | 653 | |
813 | | READ32_MEMBER(cojag_state::joystick_r) |
| 654 | READ32_MEMBER(jaguar_state::joystick_r) |
814 | 655 | { |
815 | 656 | UINT16 joystick_result = 0xfffe; |
816 | 657 | UINT16 joybuts_result = 0xffef; |
r17621 | r17622 | |
837 | 678 | |
838 | 679 | for (i = 0; i < 8; i++) |
839 | 680 | { |
840 | | if ((joystick_data & (0x10000 << i)) == 0) |
| 681 | if ((m_joystick_data & (0x10000 << i)) == 0) |
841 | 682 | { |
842 | 683 | joystick_result &= ioport(keynames[0][i])->read(); |
843 | 684 | joybuts_result &= ioport(keynames[1][i])->read(); |
r17621 | r17622 | |
850 | 691 | return (joystick_result << 16) | joybuts_result; |
851 | 692 | } |
852 | 693 | |
853 | | WRITE32_MEMBER(cojag_state::joystick_w) |
| 694 | WRITE32_MEMBER(jaguar_state::joystick_w) |
854 | 695 | { |
855 | 696 | /* |
856 | 697 | * 16 12 8 4 0 |
r17621 | r17622 | |
898 | 739 | * Set this bit to read from the joysticks, clear it to write |
899 | 740 | * to them. |
900 | 741 | */ |
901 | | COMBINE_DATA(&joystick_data); |
| 742 | COMBINE_DATA(&m_joystick_data); |
902 | 743 | } |
903 | 744 | |
904 | 745 | |
r17621 | r17622 | |
908 | 749 | * |
909 | 750 | *************************************/ |
910 | 751 | |
911 | | WRITE32_MEMBER(cojag_state::latch_w) |
| 752 | WRITE32_MEMBER(jaguar_state::latch_w) |
912 | 753 | { |
913 | 754 | logerror("%08X:latch_w(%X)\n", cpu_get_previouspc(&space.device()), data); |
914 | 755 | |
915 | 756 | /* adjust banking */ |
916 | | if (machine().root_device().memregion("user2")->base()) |
| 757 | if (machine().root_device().memregion("romboard")->base()) |
917 | 758 | { |
918 | | if (cojag_is_r3000) |
919 | | membank("bank1")->set_entry(data & 1); |
920 | | membank("bank8")->set_entry(data & 1); |
| 759 | if (m_is_r3000) |
| 760 | membank("maingfxbank")->set_entry(data & 1); |
| 761 | membank("gpugfxbank")->set_entry(data & 1); |
921 | 762 | } |
922 | 763 | } |
923 | 764 | |
r17621 | r17622 | |
929 | 770 | * |
930 | 771 | *************************************/ |
931 | 772 | |
932 | | READ32_MEMBER(cojag_state::eeprom_data_r) |
| 773 | READ32_MEMBER(jaguar_state::eeprom_data_r) |
933 | 774 | { |
934 | | if (cojag_is_r3000) |
| 775 | if (m_is_r3000) |
935 | 776 | return m_nvram[offset] | 0xffffff00; |
936 | 777 | else |
937 | 778 | return m_nvram[offset] | 0x00ffffff; |
938 | 779 | } |
939 | 780 | |
940 | 781 | |
941 | | WRITE32_MEMBER(cojag_state::eeprom_enable_w) |
| 782 | WRITE32_MEMBER(jaguar_state::eeprom_enable_w) |
942 | 783 | { |
943 | | m_eeprom_enable = 1; |
| 784 | m_eeprom_enable = true; |
944 | 785 | } |
945 | 786 | |
946 | 787 | |
947 | | WRITE32_MEMBER(cojag_state::eeprom_data_w) |
| 788 | WRITE32_MEMBER(jaguar_state::eeprom_data_w) |
948 | 789 | { |
949 | 790 | // if (m_eeprom_enable) |
950 | 791 | { |
951 | | if (cojag_is_r3000) |
| 792 | if (m_is_r3000) |
952 | 793 | m_nvram[offset] = data & 0x000000ff; |
953 | 794 | else |
954 | 795 | m_nvram[offset] = data & 0xff000000; |
955 | 796 | } |
956 | 797 | // else |
957 | 798 | // logerror("%08X:error writing to disabled EEPROM\n", cpu_get_previouspc(&space.device())); |
958 | | m_eeprom_enable = 0; |
| 799 | m_eeprom_enable = false; |
959 | 800 | } |
960 | 801 | |
961 | 802 | |
r17621 | r17622 | |
988 | 829 | */ |
989 | 830 | |
990 | 831 | |
991 | | static TIMER_CALLBACK( gpu_sync_timer ) |
| 832 | WRITE32_MEMBER(jaguar_state::gpu_jump_w) |
992 | 833 | { |
993 | | cojag_state *state = machine.driver_data<cojag_state>(); |
994 | | /* if a command is still pending, and we haven't maxed out our timer, set a new one */ |
995 | | if (state->m_gpu_command_pending && param < 1000) |
996 | | machine.scheduler().timer_set(attotime::from_usec(50), FUNC(gpu_sync_timer), ++param); |
997 | | } |
998 | | |
999 | | |
1000 | | WRITE32_MEMBER(cojag_state::gpu_jump_w) |
1001 | | { |
1002 | 834 | /* update the data in memory */ |
1003 | 835 | COMBINE_DATA(m_gpu_jump_address); |
1004 | 836 | logerror("%08X:GPU jump address = %08X\n", cpu_get_previouspc(&space.device()), *m_gpu_jump_address); |
1005 | 837 | |
1006 | 838 | /* if the GPU is suspended, release it now */ |
1007 | | jaguar_gpu_resume(machine()); |
| 839 | gpu_resume(); |
1008 | 840 | |
1009 | 841 | /* start the sync timer going, and note that there is a command pending */ |
1010 | | machine().scheduler().synchronize(FUNC(gpu_sync_timer)); |
1011 | | m_gpu_command_pending = 1; |
| 842 | synchronize(TID_GPU_SYNC); |
| 843 | m_gpu_command_pending = true; |
1012 | 844 | } |
1013 | 845 | |
1014 | 846 | |
1015 | | READ32_MEMBER(cojag_state::gpu_jump_r) |
| 847 | READ32_MEMBER(jaguar_state::gpu_jump_r) |
1016 | 848 | { |
1017 | 849 | /* if the current GPU command is just pointing back to the spin loop, and */ |
1018 | 850 | /* we're reading it from the spin loop, we can optimize */ |
r17621 | r17622 | |
1020 | 852 | { |
1021 | 853 | #if ENABLE_SPEEDUP_HACKS |
1022 | 854 | /* spin if we're allowed */ |
1023 | | if (jaguar_hacks_enabled) jaguar_gpu_suspend(machine()); |
| 855 | if (m_hacks_enabled) gpu_suspend(); |
1024 | 856 | #endif |
1025 | 857 | |
1026 | 858 | /* no command is pending */ |
1027 | | m_gpu_command_pending = 0; |
| 859 | m_gpu_command_pending = false; |
1028 | 860 | } |
1029 | 861 | |
1030 | 862 | /* return the current value */ |
r17621 | r17622 | |
1053 | 885 | #if ENABLE_SPEEDUP_HACKS |
1054 | 886 | |
1055 | 887 | |
1056 | | READ32_MEMBER(cojag_state::cojagr3k_main_speedup_r) |
| 888 | READ32_MEMBER(jaguar_state::cojagr3k_main_speedup_r) |
1057 | 889 | { |
1058 | 890 | UINT64 curcycles = m_main_cpu->total_cycles(); |
1059 | 891 | |
r17621 | r17622 | |
1101 | 933 | #if ENABLE_SPEEDUP_HACKS |
1102 | 934 | |
1103 | 935 | |
1104 | | READ32_MEMBER(cojag_state::main_gpu_wait_r) |
| 936 | READ32_MEMBER(jaguar_state::main_gpu_wait_r) |
1105 | 937 | { |
1106 | 938 | if (m_gpu_command_pending) |
1107 | 939 | device_spin_until_interrupt(&space.device()); |
r17621 | r17622 | |
1127 | 959 | |
1128 | 960 | #if ENABLE_SPEEDUP_HACKS |
1129 | 961 | |
1130 | | WRITE32_MEMBER(cojag_state::area51_main_speedup_w) |
| 962 | WRITE32_MEMBER(jaguar_state::area51_main_speedup_w) |
1131 | 963 | { |
1132 | 964 | UINT64 curcycles = m_main_cpu->total_cycles(); |
1133 | 965 | |
r17621 | r17622 | |
1161 | 993 | against 0 must handle that explicitly. |
1162 | 994 | */ |
1163 | 995 | |
1164 | | WRITE32_MEMBER(cojag_state::area51mx_main_speedup_w) |
| 996 | WRITE32_MEMBER(jaguar_state::area51mx_main_speedup_w) |
1165 | 997 | { |
1166 | 998 | UINT64 curcycles = m_main_cpu->total_cycles(); |
1167 | 999 | |
r17621 | r17622 | |
1203 | 1035 | // surely these should be 16-bit natively if the standard Jaguar is driven by a plain 68k? |
1204 | 1036 | // all these trampolines are not good for performance ;-) |
1205 | 1037 | |
1206 | | READ16_MEMBER(cojag_state::gpuctrl_r16){ if (!(offset&1)) { return gpuctrl_r(space, offset>>1, mem_mask<<16) >> 16; } else { return gpuctrl_r(space, offset>>1, mem_mask); } } |
1207 | | WRITE16_MEMBER(cojag_state::gpuctrl_w16){ if (!(offset&1)) { gpuctrl_w(space, offset>>1, data << 16, mem_mask << 16); } else { gpuctrl_w(space, offset>>1, data, mem_mask); } } |
1208 | | READ16_MEMBER(cojag_state::jaguar_blitter_r16){ if (!(offset&1)) { return jaguar_blitter_r(&space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_blitter_r(&space, offset>>1, mem_mask); } } |
1209 | | WRITE16_MEMBER(cojag_state::jaguar_blitter_w16){ if (!(offset&1)) { jaguar_blitter_w(&space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_blitter_w(&space, offset>>1, data, mem_mask); } } |
1210 | | READ16_MEMBER(cojag_state::jaguar_serial_r16){ if (!(offset&1)) { return jaguar_serial_r(&space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_serial_r(&space, offset>>1, mem_mask); } } |
1211 | | WRITE16_MEMBER(cojag_state::jaguar_serial_w16){ if (!(offset&1)) { jaguar_serial_w(&space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_serial_w(&space, offset>>1, data, mem_mask); } } |
1212 | | READ16_MEMBER(cojag_state::dspctrl_r16){ if (!(offset&1)) { return dspctrl_r(space, offset>>1, mem_mask<<16) >> 16; } else { return dspctrl_r(space, offset>>1, mem_mask); } } |
1213 | | WRITE16_MEMBER(cojag_state::dspctrl_w16){ if (!(offset&1)) { dspctrl_w(space, offset>>1, data << 16, mem_mask << 16); } else { dspctrl_w(space, offset>>1, data, mem_mask); } } |
1214 | | READ16_MEMBER(cojag_state::jaguar_eeprom_cs16){ if (!(offset&1)) { return jaguar_eeprom_cs(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_eeprom_cs(space, offset>>1, mem_mask); } } |
1215 | | READ16_MEMBER(cojag_state::jaguar_eeprom_clk16){ if (!(offset&1)) { return jaguar_eeprom_clk(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_eeprom_clk(space, offset>>1, mem_mask); } } |
1216 | | WRITE16_MEMBER(cojag_state::jaguar_eeprom_w16){ if (!(offset&1)) { jaguar_eeprom_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_eeprom_w(space, offset>>1, data, mem_mask); } } |
1217 | | READ16_MEMBER(cojag_state::joystick_r16){ if (!(offset&1)) { return joystick_r(space, offset>>1, mem_mask<<16) >> 16; } else { return joystick_r(space, offset>>1, mem_mask); } } |
1218 | | WRITE16_MEMBER(cojag_state::joystick_w16){ if (!(offset&1)) { joystick_w(space, offset>>1, data << 16, mem_mask << 16); } else { joystick_w(space, offset>>1, data, mem_mask); } } |
| 1038 | READ16_MEMBER(jaguar_state::gpuctrl_r16){ if (!(offset&1)) { return gpuctrl_r(space, offset>>1, mem_mask<<16) >> 16; } else { return gpuctrl_r(space, offset>>1, mem_mask); } } |
| 1039 | WRITE16_MEMBER(jaguar_state::gpuctrl_w16){ if (!(offset&1)) { gpuctrl_w(space, offset>>1, data << 16, mem_mask << 16); } else { gpuctrl_w(space, offset>>1, data, mem_mask); } } |
| 1040 | READ16_MEMBER(jaguar_state::blitter_r16){ if (!(offset&1)) { return blitter_r(space, offset>>1, mem_mask<<16) >> 16; } else { return blitter_r(space, offset>>1, mem_mask); } } |
| 1041 | WRITE16_MEMBER(jaguar_state::blitter_w16){ if (!(offset&1)) { blitter_w(space, offset>>1, data << 16, mem_mask << 16); } else { blitter_w(space, offset>>1, data, mem_mask); } } |
| 1042 | READ16_MEMBER(jaguar_state::serial_r16){ if (!(offset&1)) { return serial_r(space, offset>>1, mem_mask<<16) >> 16; } else { return serial_r(space, offset>>1, mem_mask); } } |
| 1043 | WRITE16_MEMBER(jaguar_state::serial_w16){ if (!(offset&1)) { serial_w(space, offset>>1, data << 16, mem_mask << 16); } else { serial_w(space, offset>>1, data, mem_mask); } } |
| 1044 | READ16_MEMBER(jaguar_state::dspctrl_r16){ if (!(offset&1)) { return dspctrl_r(space, offset>>1, mem_mask<<16) >> 16; } else { return dspctrl_r(space, offset>>1, mem_mask); } } |
| 1045 | WRITE16_MEMBER(jaguar_state::dspctrl_w16){ if (!(offset&1)) { dspctrl_w(space, offset>>1, data << 16, mem_mask << 16); } else { dspctrl_w(space, offset>>1, data, mem_mask); } } |
| 1046 | READ16_MEMBER(jaguar_state::eeprom_cs16){ if (!(offset&1)) { return eeprom_cs(space, offset>>1, mem_mask<<16) >> 16; } else { return eeprom_cs(space, offset>>1, mem_mask); } } |
| 1047 | READ16_MEMBER(jaguar_state::eeprom_clk16){ if (!(offset&1)) { return eeprom_clk(space, offset>>1, mem_mask<<16) >> 16; } else { return eeprom_clk(space, offset>>1, mem_mask); } } |
| 1048 | WRITE16_MEMBER(jaguar_state::eeprom_w16){ if (!(offset&1)) { eeprom_w(space, offset>>1, data << 16, mem_mask << 16); } else { eeprom_w(space, offset>>1, data, mem_mask); } } |
| 1049 | READ16_MEMBER(jaguar_state::joystick_r16){ if (!(offset&1)) { return joystick_r(space, offset>>1, mem_mask<<16) >> 16; } else { return joystick_r(space, offset>>1, mem_mask); } } |
| 1050 | WRITE16_MEMBER(jaguar_state::joystick_w16){ if (!(offset&1)) { joystick_w(space, offset>>1, data << 16, mem_mask << 16); } else { joystick_w(space, offset>>1, data, mem_mask); } } |
1219 | 1051 | |
1220 | | READ32_MEMBER(cojag_state::jaguar_shared_ram_r){ return jaguar_shared_ram[offset]; } |
1221 | | WRITE32_MEMBER(cojag_state::jaguar_shared_ram_w){ COMBINE_DATA(&jaguar_shared_ram[offset]); } |
1222 | | READ32_MEMBER(cojag_state::jaguar_rom_base_r){ return rom_base[offset]; } |
1223 | | WRITE32_MEMBER(cojag_state::jaguar_rom_base_w){ /*ROM!*/ } |
1224 | | READ32_MEMBER(cojag_state::jaguar_cart_base_r){ return cart_base[offset]; } |
1225 | | WRITE32_MEMBER(cojag_state::jaguar_cart_base_w){ /*ROM!*/ } |
1226 | | READ32_MEMBER(cojag_state::high_rom_base_r){ return high_rom_base[offset]; } |
1227 | | WRITE32_MEMBER(cojag_state::high_rom_base_w){ /*ROM!*/ } |
1228 | | READ32_MEMBER(cojag_state::jaguar_dsp_ram_r){ return jaguar_dsp_ram[offset]; } |
1229 | | WRITE32_MEMBER(cojag_state::jaguar_dsp_ram_w){ COMBINE_DATA(&jaguar_dsp_ram[offset]); } |
1230 | | READ32_MEMBER(cojag_state::jaguar_gpu_clut_r){ return jaguar_gpu_clut[offset]; } |
1231 | | WRITE32_MEMBER(cojag_state::jaguar_gpu_clut_w){ COMBINE_DATA(&jaguar_gpu_clut[offset]); } |
1232 | | READ32_MEMBER(cojag_state::jaguar_gpu_ram_r){ return jaguar_gpu_ram[offset]; } |
1233 | | WRITE32_MEMBER(cojag_state::jaguar_gpu_ram_w){ COMBINE_DATA(&jaguar_gpu_ram[offset]); } |
| 1052 | READ32_MEMBER(jaguar_state::shared_ram_r){ return m_shared_ram[offset]; } |
| 1053 | WRITE32_MEMBER(jaguar_state::shared_ram_w){ COMBINE_DATA(&m_shared_ram[offset]); } |
| 1054 | READ32_MEMBER(jaguar_state::rom_base_r){ return m_rom_base[offset]; } |
| 1055 | WRITE32_MEMBER(jaguar_state::rom_base_w){ /*ROM!*/ } |
| 1056 | READ32_MEMBER(jaguar_state::cart_base_r){ return m_cart_base[offset]; } |
| 1057 | WRITE32_MEMBER(jaguar_state::cart_base_w){ /*ROM!*/ } |
| 1058 | READ32_MEMBER(jaguar_state::wave_rom_r){ return m_wave_rom[offset]; } |
| 1059 | WRITE32_MEMBER(jaguar_state::wave_rom_w){ /*ROM!*/ } |
| 1060 | READ32_MEMBER(jaguar_state::dsp_ram_r){ return m_dsp_ram[offset]; } |
| 1061 | WRITE32_MEMBER(jaguar_state::dsp_ram_w){ COMBINE_DATA(&m_dsp_ram[offset]); } |
| 1062 | READ32_MEMBER(jaguar_state::gpu_clut_r){ return m_gpu_clut[offset]; } |
| 1063 | WRITE32_MEMBER(jaguar_state::gpu_clut_w){ COMBINE_DATA(&m_gpu_clut[offset]); } |
| 1064 | READ32_MEMBER(jaguar_state::gpu_ram_r){ return m_gpu_ram[offset]; } |
| 1065 | WRITE32_MEMBER(jaguar_state::gpu_ram_w){ COMBINE_DATA(&m_gpu_ram[offset]); } |
1234 | 1066 | |
1235 | | READ16_MEMBER(cojag_state::jaguar_shared_ram_r16){ if (!(offset&1)) { return jaguar_shared_ram_r(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_shared_ram_r(space, offset>>1, mem_mask); } } |
1236 | | WRITE16_MEMBER(cojag_state::jaguar_shared_ram_w16){ if (!(offset&1)) { jaguar_shared_ram_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_shared_ram_w(space, offset>>1, data, mem_mask); } } |
1237 | | READ16_MEMBER(cojag_state::jaguar_rom_base_r16){ if (!(offset&1)) { return jaguar_rom_base_r(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_rom_base_r(space, offset>>1, mem_mask); } } |
1238 | | WRITE16_MEMBER(cojag_state::jaguar_rom_base_w16){ if (!(offset&1)) { jaguar_rom_base_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_rom_base_w(space, offset>>1, data, mem_mask); } } |
1239 | | READ16_MEMBER(cojag_state::jaguar_cart_base_r16){ if (!(offset&1)) { return jaguar_cart_base_r(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_cart_base_r(space, offset>>1, mem_mask); } } |
1240 | | WRITE16_MEMBER(cojag_state::jaguar_cart_base_w16){ if (!(offset&1)) { jaguar_cart_base_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_cart_base_w(space, offset>>1, data, mem_mask); } } |
1241 | | READ16_MEMBER(cojag_state::high_rom_base_r16){ if (!(offset&1)) { return high_rom_base_r(space, offset>>1, mem_mask<<16) >> 16; } else { return high_rom_base_r(space, offset>>1, mem_mask); } } |
1242 | | WRITE16_MEMBER(cojag_state::high_rom_base_w16){ if (!(offset&1)) { high_rom_base_w(space, offset>>1, data << 16, mem_mask << 16); } else { high_rom_base_w(space, offset>>1, data, mem_mask); } } |
| 1067 | READ16_MEMBER(jaguar_state::shared_ram_r16){ if (!(offset&1)) { return shared_ram_r(space, offset>>1, mem_mask<<16) >> 16; } else { return shared_ram_r(space, offset>>1, mem_mask); } } |
| 1068 | WRITE16_MEMBER(jaguar_state::shared_ram_w16){ if (!(offset&1)) { shared_ram_w(space, offset>>1, data << 16, mem_mask << 16); } else { shared_ram_w(space, offset>>1, data, mem_mask); } } |
| 1069 | READ16_MEMBER(jaguar_state::rom_base_r16){ if (!(offset&1)) { return rom_base_r(space, offset>>1, mem_mask<<16) >> 16; } else { return rom_base_r(space, offset>>1, mem_mask); } } |
| 1070 | WRITE16_MEMBER(jaguar_state::rom_base_w16){ if (!(offset&1)) { rom_base_w(space, offset>>1, data << 16, mem_mask << 16); } else { rom_base_w(space, offset>>1, data, mem_mask); } } |
| 1071 | READ16_MEMBER(jaguar_state::cart_base_r16){ if (!(offset&1)) { return cart_base_r(space, offset>>1, mem_mask<<16) >> 16; } else { return cart_base_r(space, offset>>1, mem_mask); } } |
| 1072 | WRITE16_MEMBER(jaguar_state::cart_base_w16){ if (!(offset&1)) { cart_base_w(space, offset>>1, data << 16, mem_mask << 16); } else { cart_base_w(space, offset>>1, data, mem_mask); } } |
| 1073 | READ16_MEMBER(jaguar_state::wave_rom_r16){ if (!(offset&1)) { return wave_rom_r(space, offset>>1, mem_mask<<16) >> 16; } else { return wave_rom_r(space, offset>>1, mem_mask); } } |
| 1074 | WRITE16_MEMBER(jaguar_state::wave_rom_w16){ if (!(offset&1)) { wave_rom_w(space, offset>>1, data << 16, mem_mask << 16); } else { wave_rom_w(space, offset>>1, data, mem_mask); } } |
1243 | 1075 | |
1244 | | READ16_MEMBER(cojag_state::jaguar_dsp_ram_r16){ if (!(offset&1)) { return jaguar_dsp_ram_r(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_dsp_ram_r(space, offset>>1, mem_mask); } } |
1245 | | WRITE16_MEMBER(cojag_state::jaguar_dsp_ram_w16){ if (!(offset&1)) { jaguar_dsp_ram_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_dsp_ram_w(space, offset>>1, data, mem_mask); } } |
1246 | | READ16_MEMBER(cojag_state::jaguar_gpu_clut_r16){ if (!(offset&1)) { return jaguar_gpu_clut_r(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_gpu_clut_r(space, offset>>1, mem_mask); } } |
1247 | | WRITE16_MEMBER(cojag_state::jaguar_gpu_clut_w16){ if (!(offset&1)) { jaguar_gpu_clut_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_gpu_clut_w(space, offset>>1, data, mem_mask); } } |
1248 | | READ16_MEMBER(cojag_state::jaguar_gpu_ram_r16){ if (!(offset&1)) { return jaguar_gpu_ram_r(space, offset>>1, mem_mask<<16) >> 16; } else { return jaguar_gpu_ram_r(space, offset>>1, mem_mask); } } |
1249 | | WRITE16_MEMBER(cojag_state::jaguar_gpu_ram_w16){ if (!(offset&1)) { jaguar_gpu_ram_w(space, offset>>1, data << 16, mem_mask << 16); } else { jaguar_gpu_ram_w(space, offset>>1, data, mem_mask); } } |
| 1076 | READ16_MEMBER(jaguar_state::dsp_ram_r16){ if (!(offset&1)) { return dsp_ram_r(space, offset>>1, mem_mask<<16) >> 16; } else { return dsp_ram_r(space, offset>>1, mem_mask); } } |
| 1077 | WRITE16_MEMBER(jaguar_state::dsp_ram_w16){ if (!(offset&1)) { dsp_ram_w(space, offset>>1, data << 16, mem_mask << 16); } else { dsp_ram_w(space, offset>>1, data, mem_mask); } } |
| 1078 | READ16_MEMBER(jaguar_state::gpu_clut_r16){ if (!(offset&1)) { return gpu_clut_r(space, offset>>1, mem_mask<<16) >> 16; } else { return gpu_clut_r(space, offset>>1, mem_mask); } } |
| 1079 | WRITE16_MEMBER(jaguar_state::gpu_clut_w16){ if (!(offset&1)) { gpu_clut_w(space, offset>>1, data << 16, mem_mask << 16); } else { gpu_clut_w(space, offset>>1, data, mem_mask); } } |
| 1080 | READ16_MEMBER(jaguar_state::gpu_ram_r16){ if (!(offset&1)) { return gpu_ram_r(space, offset>>1, mem_mask<<16) >> 16; } else { return gpu_ram_r(space, offset>>1, mem_mask); } } |
| 1081 | WRITE16_MEMBER(jaguar_state::gpu_ram_w16){ if (!(offset&1)) { gpu_ram_w(space, offset>>1, data << 16, mem_mask << 16); } else { gpu_ram_w(space, offset>>1, data, mem_mask); } } |
1250 | 1082 | |
1251 | | static ADDRESS_MAP_START( jaguar_map, AS_PROGRAM, 16, cojag_state ) |
| 1083 | static ADDRESS_MAP_START( jaguar_map, AS_PROGRAM, 16, jaguar_state ) |
1252 | 1084 | ADDRESS_MAP_GLOBAL_MASK(0xffffff) |
1253 | | AM_RANGE(0x000000, 0x1fffff) AM_MIRROR(0x200000) AM_READWRITE(jaguar_shared_ram_r16, jaguar_shared_ram_w16 ); |
1254 | | AM_RANGE(0x800000, 0xdfffff) AM_READWRITE(jaguar_cart_base_r16, jaguar_cart_base_w16 ) |
1255 | | AM_RANGE(0xe00000, 0xe1ffff) AM_READWRITE(jaguar_rom_base_r16, jaguar_rom_base_w16 ) |
1256 | | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE_LEGACY(jaguar_tom_regs_r, jaguar_tom_regs_w) // might be reversed endian of the others.. |
1257 | | AM_RANGE(0xf00400, 0xf005ff) AM_MIRROR(0x000200) AM_READWRITE(jaguar_gpu_clut_r16, jaguar_gpu_clut_w16 ) |
| 1085 | AM_RANGE(0x000000, 0x1fffff) AM_MIRROR(0x200000) AM_READWRITE(shared_ram_r16, shared_ram_w16 ); |
| 1086 | AM_RANGE(0x800000, 0xdfffff) AM_READWRITE(cart_base_r16, cart_base_w16 ) |
| 1087 | AM_RANGE(0xe00000, 0xe1ffff) AM_READWRITE(rom_base_r16, rom_base_w16 ) |
| 1088 | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE(tom_regs_r, tom_regs_w) // might be reversed endian of the others.. |
| 1089 | AM_RANGE(0xf00400, 0xf005ff) AM_MIRROR(0x000200) AM_READWRITE(gpu_clut_r16, gpu_clut_w16 ) |
1258 | 1090 | AM_RANGE(0xf02100, 0xf021ff) AM_MIRROR(0x008000) AM_READWRITE(gpuctrl_r16, gpuctrl_w16) |
1259 | | AM_RANGE(0xf02200, 0xf022ff) AM_MIRROR(0x008000) AM_READWRITE(jaguar_blitter_r16, jaguar_blitter_w16) |
1260 | | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_READWRITE(jaguar_gpu_ram_r16, jaguar_gpu_ram_w16 ) |
1261 | | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w) // might be reversed endian of the others.. |
| 1091 | AM_RANGE(0xf02200, 0xf022ff) AM_MIRROR(0x008000) AM_READWRITE(blitter_r16, blitter_w16) |
| 1092 | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_READWRITE(gpu_ram_r16, gpu_ram_w16 ) |
| 1093 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE(jerry_regs_r, jerry_regs_w) // might be reversed endian of the others.. |
1262 | 1094 | AM_RANGE(0xf14000, 0xf14003) AM_READWRITE(joystick_r16, joystick_w16) |
1263 | | AM_RANGE(0xf14800, 0xf14803) AM_READWRITE(jaguar_eeprom_clk16,jaguar_eeprom_w16) // GPI00 |
1264 | | AM_RANGE(0xf15000, 0xf15003) AM_READ(jaguar_eeprom_cs16) // GPI01 |
| 1095 | AM_RANGE(0xf14800, 0xf14803) AM_READWRITE(eeprom_clk16,eeprom_w16) // GPI00 |
| 1096 | AM_RANGE(0xf15000, 0xf15003) AM_READ(eeprom_cs16) // GPI01 |
1265 | 1097 | AM_RANGE(0xf1a100, 0xf1a13f) AM_READWRITE(dspctrl_r16, dspctrl_w16) |
1266 | | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE(jaguar_serial_r16, jaguar_serial_w16) |
1267 | | AM_RANGE(0xf1b000, 0xf1cfff) AM_READWRITE(jaguar_dsp_ram_r16, jaguar_dsp_ram_w16) |
1268 | | AM_RANGE(0xf1d000, 0xf1dfff) AM_READWRITE(high_rom_base_r16, high_rom_base_w16 ) |
| 1098 | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE(serial_r16, serial_w16) |
| 1099 | AM_RANGE(0xf1b000, 0xf1cfff) AM_READWRITE(dsp_ram_r16, dsp_ram_w16) |
| 1100 | AM_RANGE(0xf1d000, 0xf1dfff) AM_READWRITE(wave_rom_r16, wave_rom_w16 ) |
1269 | 1101 | ADDRESS_MAP_END |
1270 | 1102 | |
1271 | 1103 | |
r17621 | r17622 | |
1276 | 1108 | * |
1277 | 1109 | *************************************/ |
1278 | 1110 | |
1279 | | static ADDRESS_MAP_START( r3000_map, AS_PROGRAM, 32, cojag_state ) |
1280 | | AM_RANGE(0x04000000, 0x047fffff) AM_RAM AM_BASE_LEGACY(&jaguar_shared_ram) AM_SHARE("share1") |
1281 | | AM_RANGE(0x04800000, 0x04bfffff) AM_ROMBANK("bank1") |
1282 | | AM_RANGE(0x04c00000, 0x04dfffff) AM_ROMBANK("bank2") |
| 1111 | static ADDRESS_MAP_START( r3000_map, AS_PROGRAM, 32, jaguar_state ) |
| 1112 | AM_RANGE(0x04000000, 0x047fffff) AM_RAM AM_SHARE("sharedram") |
| 1113 | AM_RANGE(0x04800000, 0x04bfffff) AM_ROMBANK("maingfxbank") |
| 1114 | AM_RANGE(0x04c00000, 0x04dfffff) AM_ROMBANK("mainsndbank") |
1283 | 1115 | AM_RANGE(0x04e00000, 0x04e003ff) AM_DEVREADWRITE_LEGACY("ide", ide_controller32_r, ide_controller32_w) |
1284 | | AM_RANGE(0x04f00000, 0x04f003ff) AM_READWRITE16_LEGACY(jaguar_tom_regs_r, jaguar_tom_regs_w, 0xffffffff) |
1285 | | AM_RANGE(0x04f00400, 0x04f007ff) AM_RAM AM_BASE_LEGACY(&jaguar_gpu_clut) AM_SHARE("share2") |
| 1116 | AM_RANGE(0x04f00000, 0x04f003ff) AM_READWRITE16(tom_regs_r, tom_regs_w, 0xffffffff) |
| 1117 | AM_RANGE(0x04f00400, 0x04f007ff) AM_RAM AM_SHARE("gpuclut") |
1286 | 1118 | AM_RANGE(0x04f02100, 0x04f021ff) AM_READWRITE(gpuctrl_r, gpuctrl_w) |
1287 | | AM_RANGE(0x04f02200, 0x04f022ff) AM_READWRITE_LEGACY(jaguar_blitter_r, jaguar_blitter_w) |
1288 | | AM_RANGE(0x04f03000, 0x04f03fff) AM_MIRROR(0x00008000) AM_RAM AM_BASE_LEGACY(&jaguar_gpu_ram) AM_SHARE("share3") |
1289 | | AM_RANGE(0x04f10000, 0x04f103ff) AM_READWRITE16_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w, 0xffffffff) |
1290 | | AM_RANGE(0x04f16000, 0x04f1600b) AM_READ_LEGACY(cojag_gun_input_r) // GPI02 |
| 1119 | AM_RANGE(0x04f02200, 0x04f022ff) AM_READWRITE(blitter_r, blitter_w) |
| 1120 | AM_RANGE(0x04f03000, 0x04f03fff) AM_MIRROR(0x00008000) AM_RAM AM_SHARE("gpuram") |
| 1121 | AM_RANGE(0x04f10000, 0x04f103ff) AM_READWRITE16(jerry_regs_r, jerry_regs_w, 0xffffffff) |
| 1122 | AM_RANGE(0x04f16000, 0x04f1600b) AM_READ(cojag_gun_input_r) // GPI02 |
1291 | 1123 | AM_RANGE(0x04f17000, 0x04f17003) AM_READ_PORT("SYSTEM") // GPI03 |
1292 | 1124 | AM_RANGE(0x04f17800, 0x04f17803) AM_WRITE(latch_w) // GPI04 |
1293 | 1125 | AM_RANGE(0x04f17c00, 0x04f17c03) AM_READ_PORT("P1_P2") // GPI05 |
1294 | 1126 | AM_RANGE(0x04f1a100, 0x04f1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
1295 | | AM_RANGE(0x04f1a140, 0x04f1a17f) AM_READWRITE_LEGACY(jaguar_serial_r, jaguar_serial_w) |
1296 | | AM_RANGE(0x04f1b000, 0x04f1cfff) AM_RAM AM_BASE_LEGACY(&jaguar_dsp_ram) AM_SHARE("share4") |
| 1127 | AM_RANGE(0x04f1a140, 0x04f1a17f) AM_READWRITE(serial_r, serial_w) |
| 1128 | AM_RANGE(0x04f1b000, 0x04f1cfff) AM_RAM AM_SHARE("dspram") |
1297 | 1129 | |
1298 | 1130 | AM_RANGE(0x06000000, 0x06000003) AM_READWRITE(misc_control_r, misc_control_w) |
1299 | 1131 | AM_RANGE(0x10000000, 0x1007ffff) AM_RAM |
r17621 | r17622 | |
1301 | 1133 | AM_RANGE(0x14000004, 0x14000007) AM_WRITE(watchdog_reset32_w) |
1302 | 1134 | AM_RANGE(0x16000000, 0x16000003) AM_WRITE(eeprom_enable_w) |
1303 | 1135 | AM_RANGE(0x18000000, 0x18001fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_SHARE("nvram") |
1304 | | AM_RANGE(0x1fc00000, 0x1fdfffff) AM_ROM AM_REGION("user1", 0) AM_SHARE("robase") |
| 1136 | AM_RANGE(0x1fc00000, 0x1fdfffff) AM_ROM AM_REGION("maincpu", 0) AM_SHARE("rom") |
1305 | 1137 | ADDRESS_MAP_END |
1306 | 1138 | |
1307 | 1139 | |
1308 | | static ADDRESS_MAP_START( m68020_map, AS_PROGRAM, 32, cojag_state ) |
1309 | | AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_BASE_LEGACY(&jaguar_shared_ram) AM_SHARE("share1") |
1310 | | AM_RANGE(0x800000, 0x9fffff) AM_ROM AM_REGION("user1", 0) AM_SHARE("robase") |
| 1140 | static ADDRESS_MAP_START( m68020_map, AS_PROGRAM, 32, jaguar_state ) |
| 1141 | AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_SHARE("sharedram") |
| 1142 | AM_RANGE(0x800000, 0x9fffff) AM_ROM AM_REGION("maincpu", 0) AM_SHARE("rom") |
1311 | 1143 | AM_RANGE(0xa00000, 0xa1ffff) AM_RAM |
1312 | 1144 | AM_RANGE(0xa20000, 0xa21fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_SHARE("nvram") |
1313 | 1145 | AM_RANGE(0xa30000, 0xa30003) AM_WRITE(watchdog_reset32_w) |
1314 | 1146 | AM_RANGE(0xa40000, 0xa40003) AM_WRITE(eeprom_enable_w) |
1315 | 1147 | AM_RANGE(0xb70000, 0xb70003) AM_READWRITE(misc_control_r, misc_control_w) |
1316 | | AM_RANGE(0xc00000, 0xdfffff) AM_ROMBANK("bank2") |
| 1148 | AM_RANGE(0xc00000, 0xdfffff) AM_ROMBANK("mainsndbank") |
1317 | 1149 | AM_RANGE(0xe00000, 0xe003ff) AM_DEVREADWRITE_LEGACY("ide", ide_controller32_r, ide_controller32_w) |
1318 | | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16_LEGACY(jaguar_tom_regs_r, jaguar_tom_regs_w, 0xffffffff) |
1319 | | AM_RANGE(0xf00400, 0xf007ff) AM_RAM AM_BASE_LEGACY(&jaguar_gpu_clut) AM_SHARE("share2") |
| 1150 | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16(tom_regs_r, tom_regs_w, 0xffffffff) |
| 1151 | AM_RANGE(0xf00400, 0xf007ff) AM_RAM AM_SHARE("gpuclut") |
1320 | 1152 | AM_RANGE(0xf02100, 0xf021ff) AM_READWRITE(gpuctrl_r, gpuctrl_w) |
1321 | | AM_RANGE(0xf02200, 0xf022ff) AM_READWRITE_LEGACY(jaguar_blitter_r, jaguar_blitter_w) |
1322 | | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_RAM AM_BASE_LEGACY(&jaguar_gpu_ram) AM_SHARE("share3") |
1323 | | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w, 0xffffffff) |
1324 | | AM_RANGE(0xf16000, 0xf1600b) AM_READ_LEGACY(cojag_gun_input_r) // GPI02 |
| 1153 | AM_RANGE(0xf02200, 0xf022ff) AM_READWRITE(blitter_r, blitter_w) |
| 1154 | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_RAM AM_SHARE("gpuram") |
| 1155 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16(jerry_regs_r, jerry_regs_w, 0xffffffff) |
| 1156 | AM_RANGE(0xf16000, 0xf1600b) AM_READ(cojag_gun_input_r) // GPI02 |
1325 | 1157 | AM_RANGE(0xf17000, 0xf17003) AM_READ_PORT("SYSTEM") // GPI03 |
1326 | 1158 | // AM_RANGE(0xf17800, 0xf17803) AM_WRITE(latch_w) // GPI04 |
1327 | 1159 | AM_RANGE(0xf17c00, 0xf17c03) AM_READ_PORT("P1_P2") // GPI05 |
1328 | 1160 | AM_RANGE(0xf1a100, 0xf1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
1329 | | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE_LEGACY(jaguar_serial_r, jaguar_serial_w) |
1330 | | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_BASE_LEGACY(&jaguar_dsp_ram) AM_SHARE("share4") |
| 1161 | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE(serial_r, serial_w) |
| 1162 | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_SHARE("dspram") |
1331 | 1163 | ADDRESS_MAP_END |
1332 | 1164 | |
1333 | 1165 | |
r17621 | r17622 | |
1338 | 1170 | * |
1339 | 1171 | *************************************/ |
1340 | 1172 | |
1341 | | static ADDRESS_MAP_START( gpu_map, AS_PROGRAM, 32, cojag_state ) |
1342 | | AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_SHARE("share1") |
1343 | | AM_RANGE(0x800000, 0xbfffff) AM_ROMBANK("bank8") |
1344 | | AM_RANGE(0xc00000, 0xdfffff) AM_ROMBANK("bank9") |
| 1173 | static ADDRESS_MAP_START( gpu_map, AS_PROGRAM, 32, jaguar_state ) |
| 1174 | AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_SHARE("sharedram") |
| 1175 | AM_RANGE(0x800000, 0xbfffff) AM_ROMBANK("gpugfxbank") |
| 1176 | AM_RANGE(0xc00000, 0xdfffff) AM_ROMBANK("dspsndbank") |
1345 | 1177 | AM_RANGE(0xe00000, 0xe003ff) AM_DEVREADWRITE_LEGACY("ide", ide_controller32_r, ide_controller32_w) |
1346 | | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16_LEGACY(jaguar_tom_regs_r, jaguar_tom_regs_w, 0xffffffff) |
1347 | | AM_RANGE(0xf00400, 0xf007ff) AM_RAM AM_SHARE("share2") |
| 1178 | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16(tom_regs_r, tom_regs_w, 0xffffffff) |
| 1179 | AM_RANGE(0xf00400, 0xf007ff) AM_RAM AM_SHARE("gpuclut") |
1348 | 1180 | AM_RANGE(0xf02100, 0xf021ff) AM_READWRITE(gpuctrl_r, gpuctrl_w) |
1349 | | AM_RANGE(0xf02200, 0xf022ff) AM_READWRITE_LEGACY(jaguar_blitter_r, jaguar_blitter_w) |
1350 | | AM_RANGE(0xf03000, 0xf03fff) AM_RAM AM_SHARE("share3") |
1351 | | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w, 0xffffffff) |
| 1181 | AM_RANGE(0xf02200, 0xf022ff) AM_READWRITE(blitter_r, blitter_w) |
| 1182 | AM_RANGE(0xf03000, 0xf03fff) AM_RAM AM_SHARE("gpuram") |
| 1183 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16(jerry_regs_r, jerry_regs_w, 0xffffffff) |
1352 | 1184 | ADDRESS_MAP_END |
1353 | 1185 | |
1354 | 1186 | |
r17621 | r17622 | |
1359 | 1191 | * |
1360 | 1192 | *************************************/ |
1361 | 1193 | |
1362 | | static ADDRESS_MAP_START( dsp_map, AS_PROGRAM, 32, cojag_state ) |
1363 | | AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_SHARE("share1") |
1364 | | AM_RANGE(0x800000, 0xbfffff) AM_ROMBANK("bank8") |
1365 | | AM_RANGE(0xc00000, 0xdfffff) AM_ROMBANK("bank9") |
1366 | | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w, 0xffffffff) |
| 1194 | static ADDRESS_MAP_START( dsp_map, AS_PROGRAM, 32, jaguar_state ) |
| 1195 | AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_SHARE("sharedram") |
| 1196 | AM_RANGE(0x800000, 0xbfffff) AM_ROMBANK("gpugfxbank") |
| 1197 | AM_RANGE(0xc00000, 0xdfffff) AM_ROMBANK("dspsndbank") |
| 1198 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16(jerry_regs_r, jerry_regs_w, 0xffffffff) |
1367 | 1199 | AM_RANGE(0xf1a100, 0xf1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
1368 | | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE_LEGACY(jaguar_serial_r, jaguar_serial_w) |
1369 | | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_SHARE("share4") |
1370 | | AM_RANGE(0xf1d000, 0xf1dfff) AM_READ(jaguar_wave_rom_r) AM_BASE_LEGACY(&jaguar_wave_rom) |
| 1200 | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE(serial_r, serial_w) |
| 1201 | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_SHARE("dspram") |
| 1202 | AM_RANGE(0xf1d000, 0xf1dfff) AM_READ(wave_rom_r) AM_SHARE("waverom") AM_REGION("waverom", 0) |
1371 | 1203 | ADDRESS_MAP_END |
1372 | 1204 | |
1373 | 1205 | /* ToDo, these maps SHOULD be merged with the ones above */ |
1374 | 1206 | |
1375 | | static ADDRESS_MAP_START( jag_gpu_map, AS_PROGRAM, 32, cojag_state ) |
| 1207 | static ADDRESS_MAP_START( jag_gpu_map, AS_PROGRAM, 32, jaguar_state ) |
1376 | 1208 | ADDRESS_MAP_GLOBAL_MASK(0xffffff) |
1377 | | AM_RANGE(0x000000, 0x1fffff) AM_RAM AM_BASE_LEGACY(&jaguar_shared_ram) AM_MIRROR(0x200000) AM_SHARE("share1") AM_REGION("maincpu", 0) |
1378 | | AM_RANGE(0x800000, 0xdfffff) AM_ROM AM_BASE_LEGACY(&cart_base) AM_SIZE_LEGACY(&cart_size) AM_SHARE("share15") AM_REGION("maincpu", 0x800000) |
1379 | | AM_RANGE(0xe00000, 0xe1ffff) AM_ROM AM_BASE_LEGACY(&rom_base) AM_SIZE_LEGACY(&rom_size) AM_SHARE("share16") AM_REGION("maincpu", 0xe00000) |
1380 | | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16_LEGACY(jaguar_tom_regs_r, jaguar_tom_regs_w, 0xffffffff) |
1381 | | AM_RANGE(0xf00400, 0xf005ff) AM_BASE_LEGACY(&jaguar_gpu_clut) AM_MIRROR(0x000200) AM_RAM AM_SHARE("share2") |
| 1209 | AM_RANGE(0x000000, 0x1fffff) AM_RAM AM_MIRROR(0x200000) AM_SHARE("sharedram") AM_REGION("maincpu", 0) |
| 1210 | AM_RANGE(0x800000, 0xdfffff) AM_ROM AM_SHARE("cart") AM_REGION("maincpu", 0x800000) |
| 1211 | AM_RANGE(0xe00000, 0xe1ffff) AM_ROM AM_SHARE("rom") AM_REGION("maincpu", 0xe00000) |
| 1212 | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16(tom_regs_r, tom_regs_w, 0xffffffff) |
| 1213 | AM_RANGE(0xf00400, 0xf005ff) AM_MIRROR(0x000200) AM_RAM AM_SHARE("gpuclut") |
1382 | 1214 | AM_RANGE(0xf02100, 0xf021ff) AM_MIRROR(0x008000) AM_READWRITE(gpuctrl_r, gpuctrl_w) |
1383 | | AM_RANGE(0xf02200, 0xf022ff) AM_MIRROR(0x008000) AM_READWRITE_LEGACY(jaguar_blitter_r, jaguar_blitter_w) |
1384 | | AM_RANGE(0xf03000, 0xf03fff) AM_BASE_LEGACY(&jaguar_gpu_ram) AM_MIRROR(0x008000) AM_RAM AM_SHARE("share3") |
1385 | | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w, 0xffffffff) |
| 1215 | AM_RANGE(0xf02200, 0xf022ff) AM_MIRROR(0x008000) AM_READWRITE(blitter_r, blitter_w) |
| 1216 | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_RAM AM_SHARE("gpuram") |
| 1217 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16(jerry_regs_r, jerry_regs_w, 0xffffffff) |
1386 | 1218 | AM_RANGE(0xf14000, 0xf14003) AM_READWRITE(joystick_r, joystick_w) |
1387 | 1219 | AM_RANGE(0xf1a100, 0xf1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
1388 | | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE_LEGACY(jaguar_serial_r, jaguar_serial_w) |
1389 | | AM_RANGE(0xf1b000, 0xf1cfff) AM_BASE_LEGACY(&jaguar_dsp_ram) AM_RAM AM_SHARE("share4") |
1390 | | AM_RANGE(0xf1d000, 0xf1dfff) AM_ROM AM_BASE_LEGACY(&high_rom_base) AM_REGION("maincpu", 0xf1d000) |
| 1220 | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE(serial_r, serial_w) |
| 1221 | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_SHARE("dspram") |
| 1222 | AM_RANGE(0xf1d000, 0xf1dfff) AM_ROM AM_SHARE("waverom") AM_REGION("waverom", 0) |
1391 | 1223 | ADDRESS_MAP_END |
1392 | 1224 | |
1393 | | static ADDRESS_MAP_START( jag_dsp_map, AS_PROGRAM, 32, cojag_state ) |
| 1225 | static ADDRESS_MAP_START( jag_dsp_map, AS_PROGRAM, 32, jaguar_state ) |
1394 | 1226 | ADDRESS_MAP_GLOBAL_MASK(0xffffff) |
1395 | | AM_RANGE(0x000000, 0x1fffff) AM_MIRROR(0x200000) AM_RAM AM_SHARE("share1") AM_REGION("maincpu", 0) |
1396 | | AM_RANGE(0x800000, 0xdfffff) AM_ROM AM_SHARE("share15") AM_REGION("maincpu", 0x800000) |
1397 | | AM_RANGE(0xe00000, 0xe1ffff) AM_ROM AM_SHARE("share16") AM_REGION("maincpu", 0xe00000) |
1398 | | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16_LEGACY(jaguar_tom_regs_r, jaguar_tom_regs_w, 0xffffffff) |
1399 | | AM_RANGE(0xf00400, 0xf005ff) AM_MIRROR(0x000200) AM_RAM AM_SHARE("share2") |
| 1227 | AM_RANGE(0x000000, 0x1fffff) AM_MIRROR(0x200000) AM_RAM AM_SHARE("sharedram") AM_REGION("maincpu", 0) |
| 1228 | AM_RANGE(0x800000, 0xdfffff) AM_ROM AM_SHARE("cart") AM_REGION("maincpu", 0x800000) |
| 1229 | AM_RANGE(0xe00000, 0xe1ffff) AM_ROM AM_SHARE("rom") AM_REGION("maincpu", 0xe00000) |
| 1230 | AM_RANGE(0xf00000, 0xf003ff) AM_READWRITE16(tom_regs_r, tom_regs_w, 0xffffffff) |
| 1231 | AM_RANGE(0xf00400, 0xf005ff) AM_MIRROR(0x000200) AM_RAM AM_SHARE("gpuclut") |
1400 | 1232 | AM_RANGE(0xf02100, 0xf021ff) AM_MIRROR(0x008000) AM_READWRITE(gpuctrl_r, gpuctrl_w) |
1401 | | AM_RANGE(0xf02200, 0xf022ff) AM_MIRROR(0x008000) AM_READWRITE_LEGACY(jaguar_blitter_r, jaguar_blitter_w) |
1402 | | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_RAM AM_SHARE("share3") |
1403 | | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16_LEGACY(jaguar_jerry_regs_r, jaguar_jerry_regs_w, 0xffffffff) |
| 1233 | AM_RANGE(0xf02200, 0xf022ff) AM_MIRROR(0x008000) AM_READWRITE(blitter_r, blitter_w) |
| 1234 | AM_RANGE(0xf03000, 0xf03fff) AM_MIRROR(0x008000) AM_RAM AM_SHARE("gpuram") |
| 1235 | AM_RANGE(0xf10000, 0xf103ff) AM_READWRITE16(jerry_regs_r, jerry_regs_w, 0xffffffff) |
1404 | 1236 | AM_RANGE(0xf14000, 0xf14003) AM_READWRITE(joystick_r, joystick_w) |
1405 | 1237 | AM_RANGE(0xf1a100, 0xf1a13f) AM_READWRITE(dspctrl_r, dspctrl_w) |
1406 | | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE_LEGACY(jaguar_serial_r, jaguar_serial_w) |
1407 | | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_SHARE("share4") |
1408 | | AM_RANGE(0xf1d000, 0xf1dfff) AM_ROM AM_REGION("maincpu", 0xf1d000) |
| 1238 | AM_RANGE(0xf1a140, 0xf1a17f) AM_READWRITE(serial_r, serial_w) |
| 1239 | AM_RANGE(0xf1b000, 0xf1cfff) AM_RAM AM_SHARE("dspram") |
| 1240 | AM_RANGE(0xf1d000, 0xf1dfff) AM_ROM AM_REGION("waverom", 0) |
1409 | 1241 | ADDRESS_MAP_END |
1410 | 1242 | |
1411 | 1243 | /************************************* |
r17621 | r17622 | |
1723 | 1555 | |
1724 | 1556 | static const jaguar_cpu_config gpu_config = |
1725 | 1557 | { |
1726 | | jaguar_gpu_cpu_int |
| 1558 | &jaguar_state::gpu_cpu_int |
1727 | 1559 | }; |
1728 | 1560 | |
1729 | 1561 | |
1730 | 1562 | static const jaguar_cpu_config dsp_config = |
1731 | 1563 | { |
1732 | | jaguar_dsp_cpu_int |
| 1564 | &jaguar_state::dsp_cpu_int |
1733 | 1565 | }; |
1734 | 1566 | |
1735 | 1567 | static const ide_config ide_intf = |
1736 | 1568 | { |
1737 | | jaguar_external_int, |
| 1569 | &jaguar_state::external_int, |
1738 | 1570 | NULL, |
1739 | 1571 | 0 |
1740 | 1572 | }; |
1741 | 1573 | |
1742 | | static MACHINE_CONFIG_START( cojagr3k, cojag_state ) |
| 1574 | static MACHINE_CONFIG_START( cojagr3k, jaguar_state ) |
1743 | 1575 | |
1744 | 1576 | /* basic machine hardware */ |
1745 | 1577 | MCFG_CPU_ADD("maincpu", R3041BE, R3000_CLOCK) |
r17621 | r17622 | |
1750 | 1582 | MCFG_CPU_CONFIG(gpu_config) |
1751 | 1583 | MCFG_CPU_PROGRAM_MAP(gpu_map) |
1752 | 1584 | |
1753 | | MCFG_CPU_ADD("audiocpu", JAGUARDSP, COJAG_CLOCK/2) |
| 1585 | MCFG_CPU_ADD("dsp", JAGUARDSP, COJAG_CLOCK/2) |
1754 | 1586 | MCFG_CPU_CONFIG(dsp_config) |
1755 | 1587 | MCFG_CPU_PROGRAM_MAP(dsp_map) |
1756 | 1588 | |
1757 | | MCFG_MACHINE_RESET(cojag) |
1758 | 1589 | MCFG_NVRAM_ADD_1FILL("nvram") |
1759 | 1590 | |
1760 | 1591 | MCFG_IDE_CONTROLLER_ADD("ide", ide_intf, ide_devices, "hdd", NULL, true) |
1761 | 1592 | |
1762 | | MCFG_TIMER_ADD("serial_timer", jaguar_serial_callback) |
1763 | | |
1764 | 1593 | /* video hardware */ |
1765 | 1594 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
1766 | 1595 | |
1767 | 1596 | MCFG_SCREEN_ADD("screen", RASTER) |
1768 | 1597 | MCFG_SCREEN_RAW_PARAMS(COJAG_PIXEL_CLOCK/2, 456, 42, 402, 262, 17, 257) |
1769 | | MCFG_SCREEN_UPDATE_STATIC(cojag) |
| 1598 | MCFG_SCREEN_UPDATE_DRIVER(jaguar_state,screen_update) |
1770 | 1599 | |
1771 | | MCFG_VIDEO_START(cojag) |
1772 | | |
1773 | 1600 | /* sound hardware */ |
1774 | 1601 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
1775 | 1602 | |
r17621 | r17622 | |
1793 | 1620 | MACHINE_CONFIG_END |
1794 | 1621 | |
1795 | 1622 | |
1796 | | static MACHINE_CONFIG_START( jaguar, cojag_state ) |
| 1623 | static MACHINE_CONFIG_START( jaguar, jaguar_state ) |
1797 | 1624 | |
1798 | 1625 | /* basic machine hardware */ |
1799 | 1626 | MCFG_CPU_ADD("maincpu", M68000, JAGUAR_CLOCK/2) |
r17621 | r17622 | |
1803 | 1630 | MCFG_CPU_CONFIG(gpu_config) |
1804 | 1631 | MCFG_CPU_PROGRAM_MAP(jag_gpu_map) |
1805 | 1632 | |
1806 | | MCFG_CPU_ADD("audiocpu", JAGUARDSP, JAGUAR_CLOCK) |
| 1633 | MCFG_CPU_ADD("dsp", JAGUARDSP, JAGUAR_CLOCK) |
1807 | 1634 | MCFG_CPU_CONFIG(dsp_config) |
1808 | 1635 | MCFG_CPU_PROGRAM_MAP(jag_dsp_map) |
1809 | 1636 | |
1810 | | MCFG_MACHINE_RESET(jaguar) |
1811 | 1637 | // MCFG_NVRAM_HANDLER(jaguar) |
1812 | 1638 | |
1813 | | MCFG_TIMER_ADD("serial_timer", jaguar_serial_callback) |
1814 | | |
1815 | 1639 | /* video hardware */ |
1816 | 1640 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
1817 | 1641 | MCFG_SCREEN_ADD("screen", RASTER) |
1818 | 1642 | MCFG_SCREEN_REFRESH_RATE(60) |
1819 | 1643 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
1820 | 1644 | MCFG_SCREEN_RAW_PARAMS(JAGUAR_CLOCK, 456, 42, 402, 262, 17, 257) |
1821 | | MCFG_SCREEN_UPDATE_STATIC(cojag) |
| 1645 | MCFG_SCREEN_UPDATE_DRIVER(jaguar_state,screen_update) |
1822 | 1646 | |
1823 | | MCFG_VIDEO_START(jaguar) |
1824 | | |
1825 | 1647 | /* sound hardware */ |
1826 | 1648 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
1827 | 1649 | MCFG_DAC_ADD("dac1") |
r17621 | r17622 | |
1853 | 1675 | * |
1854 | 1676 | *************************************/ |
1855 | 1677 | |
1856 | | static void jaguar_fix_endian( running_machine &machine, UINT32 addr, UINT32 size ) |
| 1678 | void jaguar_state::fix_endian( UINT32 addr, UINT32 size ) |
1857 | 1679 | { |
1858 | | UINT8 j[4], *RAM = machine.root_device().memregion("maincpu")->base(); |
| 1680 | UINT8 j[4], *ram = memregion("maincpu")->base(); |
1859 | 1681 | UINT32 i; |
1860 | 1682 | size += addr; |
1861 | 1683 | logerror("File Loaded to address range %X to %X\n",addr,size-1); |
1862 | 1684 | for (i = addr; i < size; i+=4) |
1863 | 1685 | { |
1864 | | j[0] = RAM[i]; |
1865 | | j[1] = RAM[i+1]; |
1866 | | j[2] = RAM[i+2]; |
1867 | | j[3] = RAM[i+3]; |
1868 | | RAM[i] = j[3]; |
1869 | | RAM[i+1] = j[2]; |
1870 | | RAM[i+2] = j[1]; |
1871 | | RAM[i+3] = j[0]; |
| 1686 | j[0] = ram[i]; |
| 1687 | j[1] = ram[i+1]; |
| 1688 | j[2] = ram[i+2]; |
| 1689 | j[3] = ram[i+3]; |
| 1690 | ram[i] = j[3]; |
| 1691 | ram[i+1] = j[2]; |
| 1692 | ram[i+2] = j[1]; |
| 1693 | ram[i+3] = j[0]; |
1872 | 1694 | } |
1873 | 1695 | } |
1874 | 1696 | |
1875 | | DRIVER_INIT_MEMBER(cojag_state,jaguar) |
| 1697 | DRIVER_INIT_MEMBER(jaguar_state,jaguar) |
1876 | 1698 | { |
1877 | | jaguar_hacks_enabled = false; |
1878 | | state_save_register_global(machine(), joystick_data); |
1879 | | using_cart = 0; |
| 1699 | m_hacks_enabled = false; |
| 1700 | save_item(NAME(m_joystick_data)); |
| 1701 | m_using_cart = false; |
1880 | 1702 | |
1881 | 1703 | for (int i=0;i<0x20000/4;i++) // the cd bios is bigger.. check |
1882 | 1704 | { |
1883 | | rom_base[i] = ((rom_base[i] & 0xffff0000)>>16) | ((rom_base[i] & 0x0000ffff)<<16); |
| 1705 | m_rom_base[i] = ((m_rom_base[i] & 0xffff0000)>>16) | ((m_rom_base[i] & 0x0000ffff)<<16); |
1884 | 1706 | } |
1885 | 1707 | |
1886 | 1708 | for (int i=0;i<0x1000/4;i++) |
1887 | 1709 | { |
1888 | | high_rom_base[i] = ((high_rom_base[i] & 0xffff0000)>>16) | ((high_rom_base[i] & 0x0000ffff)<<16); |
| 1710 | m_wave_rom[i] = ((m_wave_rom[i] & 0xffff0000)>>16) | ((m_wave_rom[i] & 0x0000ffff)<<16); |
1889 | 1711 | } |
1890 | 1712 | } |
1891 | 1713 | |
1892 | | static QUICKLOAD_LOAD( jaguar ) |
| 1714 | QUICKLOAD_LOAD( jaguar ) |
1893 | 1715 | { |
| 1716 | return image.device().machine().driver_data<jaguar_state>()->quickload(image, file_type, quickload_size); |
| 1717 | } |
| 1718 | |
| 1719 | int jaguar_state::quickload(device_image_interface &image, const char *file_type, int quickload_size) |
| 1720 | { |
1894 | 1721 | offs_t quickload_begin = 0x4000, start = quickload_begin, skip = 0; |
1895 | | memset(jaguar_shared_ram, 0, 0x200000); |
| 1722 | |
| 1723 | memset(m_shared_ram, 0, 0x200000); |
1896 | 1724 | quickload_size = MIN(quickload_size, 0x200000 - quickload_begin); |
1897 | 1725 | |
1898 | | image.fread( &image.device().machine().root_device().memregion("maincpu")->base()[quickload_begin], quickload_size); |
| 1726 | image.fread( &memregion("maincpu")->base()[quickload_begin], quickload_size); |
1899 | 1727 | |
1900 | | jaguar_fix_endian(image.device().machine(), quickload_begin, quickload_size); |
| 1728 | fix_endian(quickload_begin, quickload_size); |
1901 | 1729 | |
1902 | 1730 | /* Deal with some of the numerous homebrew header systems */ |
1903 | 1731 | /* COF */ |
1904 | | if ((jaguar_shared_ram[0x1000] & 0xffff0000) == 0x01500000) |
| 1732 | if ((m_shared_ram[0x1000] & 0xffff0000) == 0x01500000) |
1905 | 1733 | { |
1906 | | start = jaguar_shared_ram[0x100e]; |
1907 | | skip = jaguar_shared_ram[0x1011]; |
| 1734 | start = m_shared_ram[0x100e]; |
| 1735 | skip = m_shared_ram[0x1011]; |
1908 | 1736 | } |
1909 | 1737 | else /* PRG */ |
1910 | | if (((jaguar_shared_ram[0x1000] & 0xffff0000) == 0x601A0000) && (jaguar_shared_ram[0x1007] == 0x4A414752)) |
| 1738 | if (((m_shared_ram[0x1000] & 0xffff0000) == 0x601A0000) && (m_shared_ram[0x1007] == 0x4A414752)) |
1911 | 1739 | { |
1912 | | UINT32 type = jaguar_shared_ram[0x1008] >> 16; |
1913 | | start = ((jaguar_shared_ram[0x1008] & 0xffff) << 16) | (jaguar_shared_ram[0x1009] >> 16); |
| 1740 | UINT32 type = m_shared_ram[0x1008] >> 16; |
| 1741 | start = ((m_shared_ram[0x1008] & 0xffff) << 16) | (m_shared_ram[0x1009] >> 16); |
1914 | 1742 | skip = 28; |
1915 | 1743 | if (type == 2) skip = 42; |
1916 | 1744 | else if (type == 3) skip = 46; |
1917 | 1745 | } |
1918 | 1746 | else /* ABS with header */ |
1919 | | if ((jaguar_shared_ram[0x1000] & 0xffff0000) == 0x601B0000) |
| 1747 | if ((m_shared_ram[0x1000] & 0xffff0000) == 0x601B0000) |
1920 | 1748 | { |
1921 | | start = ((jaguar_shared_ram[0x1005] & 0xffff) << 16) | (jaguar_shared_ram[0x1006] >> 16); |
| 1749 | start = ((m_shared_ram[0x1005] & 0xffff) << 16) | (m_shared_ram[0x1006] >> 16); |
1922 | 1750 | skip = 36; |
1923 | 1751 | } |
1924 | 1752 | |
1925 | 1753 | else /* A header used by Badcoder */ |
1926 | | if ((jaguar_shared_ram[0x1000] & 0xffff0000) == 0x72000000) |
| 1754 | if ((m_shared_ram[0x1000] & 0xffff0000) == 0x72000000) |
1927 | 1755 | skip = 96; |
1928 | 1756 | |
1929 | 1757 | else /* ABS binary */ |
r17621 | r17622 | |
1938 | 1766 | /* Now that we have the info, reload the file */ |
1939 | 1767 | if ((start != quickload_begin) || (skip)) |
1940 | 1768 | { |
1941 | | memset(jaguar_shared_ram, 0, 0x200000); |
| 1769 | memset(m_shared_ram, 0, 0x200000); |
1942 | 1770 | image.fseek(0, SEEK_SET); |
1943 | | image.fread( &image.device().machine().root_device().memregion("maincpu")->base()[start-skip], quickload_size); |
| 1771 | image.fread( &memregion("maincpu")->base()[start-skip], quickload_size); |
1944 | 1772 | quickload_begin = start; |
1945 | | jaguar_fix_endian(image.device().machine(), (start-skip)&0xfffffc, quickload_size); |
| 1773 | fix_endian((start-skip)&0xfffffc, quickload_size); |
1946 | 1774 | } |
1947 | 1775 | |
1948 | 1776 | |
1949 | 1777 | /* Some programs are too lazy to set a stack pointer */ |
1950 | | cpu_set_reg(image.device().machine().device("maincpu"), STATE_GENSP, 0x1000); |
1951 | | jaguar_shared_ram[0]=0x1000; |
| 1778 | m_main_cpu->set_state(STATE_GENSP, 0x1000); |
| 1779 | m_shared_ram[0]=0x1000; |
1952 | 1780 | |
1953 | 1781 | /* Transfer control to image */ |
1954 | | cpu_set_reg(image.device().machine().device("maincpu"), STATE_GENPC, quickload_begin); |
1955 | | jaguar_shared_ram[1]=quickload_begin; |
| 1782 | m_main_cpu->set_state(STATE_GENPC, quickload_begin); |
| 1783 | m_shared_ram[1]=quickload_begin; |
1956 | 1784 | return IMAGE_INIT_PASS; |
1957 | 1785 | } |
1958 | 1786 | |
1959 | 1787 | static DEVICE_START( jaguar_cart ) |
1960 | 1788 | { |
| 1789 | device->machine().driver_data<jaguar_state>()->cart_start(); |
| 1790 | } |
| 1791 | |
| 1792 | void jaguar_state::cart_start() |
| 1793 | { |
1961 | 1794 | /* Initialize for no cartridge present */ |
1962 | | using_cart = 0; |
1963 | | memset( cart_base, 0, cart_size ); |
| 1795 | m_using_cart = false; |
| 1796 | memset( m_cart_base, 0, memshare("cart")->bytes() ); |
1964 | 1797 | } |
1965 | 1798 | |
1966 | 1799 | static DEVICE_IMAGE_LOAD( jaguar ) |
1967 | 1800 | { |
| 1801 | return image.device().machine().driver_data<jaguar_state>()->cart_load(image); |
| 1802 | } |
| 1803 | |
| 1804 | int jaguar_state::cart_load(device_image_interface &image) |
| 1805 | { |
1968 | 1806 | UINT32 size, load_offset = 0; |
1969 | 1807 | |
1970 | 1808 | if (image.software_entry() == NULL) |
r17621 | r17622 | |
1975 | 1813 | if (!mame_stricmp(image.filetype(), "rom")) |
1976 | 1814 | { |
1977 | 1815 | load_offset = 0x2000; // fix load address |
1978 | | cart_base[0x101]=0x802000; // fix exec address |
| 1816 | m_cart_base[0x101]=0x802000; // fix exec address |
1979 | 1817 | } |
1980 | 1818 | |
1981 | 1819 | /* Load cart into memory */ |
1982 | | image.fread( &image.device().machine().root_device().memregion("maincpu")->base()[0x800000+load_offset], size); |
| 1820 | image.fread( &memregion("maincpu")->base()[0x800000+load_offset], size); |
1983 | 1821 | } |
1984 | 1822 | else |
1985 | 1823 | { |
1986 | 1824 | size = image.get_software_region_length("rom"); |
1987 | 1825 | |
1988 | | memcpy(cart_base, image.get_software_region("rom"), size); |
| 1826 | memcpy(m_cart_base, image.get_software_region("rom"), size); |
1989 | 1827 | } |
1990 | 1828 | |
1991 | | memset(jaguar_shared_ram, 0, 0x200000); |
| 1829 | memset(m_shared_ram, 0, 0x200000); |
1992 | 1830 | |
1993 | | jaguar_fix_endian(image.device().machine(), 0x800000+load_offset, size); |
| 1831 | fix_endian(0x800000+load_offset, size); |
1994 | 1832 | |
1995 | 1833 | /* Skip the logo */ |
1996 | | using_cart = 1; |
1997 | | // cart_base[0x102] = 1; |
| 1834 | m_using_cart = true; |
| 1835 | // m_cart_base[0x102] = 1; |
1998 | 1836 | |
1999 | 1837 | /* Transfer control to the bios */ |
2000 | | cpu_set_reg(image.device().machine().device("maincpu"), STATE_GENPC, rom_base[1]); |
| 1838 | m_main_cpu->set_state(STATE_GENPC, m_rom_base[1]); |
2001 | 1839 | return IMAGE_INIT_PASS; |
2002 | 1840 | } |
2003 | 1841 | |
r17621 | r17622 | |
2017 | 1855 | ROM_REGION( 0x1000000, "maincpu", 0 ) /* 4MB for RAM at 0 */ |
2018 | 1856 | ROM_LOAD16_WORD( "jagboot.rom", 0xe00000, 0x020000, CRC(fb731aaa) SHA1(f8991b0c385f4e5002fa2a7e2f5e61e8c5213356) ) |
2019 | 1857 | ROM_CART_LOAD("cart", 0x800000, 0x600000, ROM_NOMIRROR) |
2020 | | ROM_LOAD16_WORD("jagwave.rom", 0xf1d000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1858 | |
| 1859 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1860 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
2021 | 1861 | ROM_END |
2022 | 1862 | |
2023 | 1863 | ROM_START( jaguarcd ) |
r17621 | r17622 | |
2027 | 1867 | ROM_SYSTEM_BIOS( 1, "dev", "Jaguar Developer CD" ) |
2028 | 1868 | ROMX_LOAD( "jagdevcd.bin", 0xe00000, 0x040000, CRC(55a0669c) SHA1(d61b7b5912118f114ef00cf44966a5ef62e455a5), ROM_BIOS(2) ) |
2029 | 1869 | ROM_CART_LOAD("cart", 0x800000, 0x600000, ROM_NOMIRROR) |
2030 | | ROM_LOAD16_WORD("jagwave.rom", 0xf1d000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1870 | |
| 1871 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1872 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
2031 | 1873 | ROM_END |
2032 | 1874 | |
2033 | 1875 | |
r17621 | r17622 | |
2040 | 1882 | /* There is known to exist an Area 51 set with "136105-000x Q" labels - currently not dumped */ |
2041 | 1883 | |
2042 | 1884 | ROM_START( area51t ) /* 68020 based, Area51 Time Warner License Date: Nov 15, 1995 */ |
2043 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for 68020 code */ |
| 1885 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for 68020 code */ |
2044 | 1886 | ROM_LOAD32_BYTE( "136105-0003c.3h", 0x00000, 0x80000, CRC(e70a97c4) SHA1(39dabf6bf3dc6f717a587f362d040bfb332be9e1) ) /* Usually found with "green" labels */ |
2045 | 1887 | ROM_LOAD32_BYTE( "136105-0002c.3p", 0x00001, 0x80000, CRC(e9c9f4bd) SHA1(7c6c50372d45dca8929767241b092339f3bab4d2) ) |
2046 | 1888 | ROM_LOAD32_BYTE( "136105-0001c.3m", 0x00002, 0x80000, CRC(6f135a81) SHA1(2d9660f240b14481e8c46bc98713e9dc12035063) ) |
2047 | 1889 | ROM_LOAD32_BYTE( "136105-0000c.3k", 0x00003, 0x80000, CRC(94f50c14) SHA1(a54552e3ac5c4f481ba4f2fc7d724534576fe76c) ) |
2048 | 1890 | |
| 1891 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1892 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1893 | |
2049 | 1894 | DISK_REGION( "drive_0" ) |
2050 | 1895 | DISK_IMAGE( "area51t", 0, SHA1(d2865cc7b1bb08a4393a72013a90e18d8a8f9860) ) |
2051 | 1896 | ROM_END |
2052 | 1897 | |
2053 | 1898 | ROM_START( area51a ) /* 68020 based, Area51 Atari Games License Date: Oct 25, 1995 */ |
2054 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for 68020 code */ |
| 1899 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for 68020 code */ |
2055 | 1900 | ROM_LOAD32_BYTE( "136105-0003a.3h", 0x00000, 0x80000, CRC(116d37e6) SHA1(5d36cae792dd349faa77cd2d8018722a28ee55c1) ) /* Usually found with "orange" labels */ |
2056 | 1901 | ROM_LOAD32_BYTE( "136105-0002a.3p", 0x00001, 0x80000, CRC(eb10f539) SHA1(dadc4be5a442dd4bd17385033056555e528ed994) ) |
2057 | 1902 | ROM_LOAD32_BYTE( "136105-0001a.3m", 0x00002, 0x80000, CRC(c6d8322b) SHA1(90cf848a4195c51b505653cc2c74a3b9e3c851b8) ) |
2058 | 1903 | ROM_LOAD32_BYTE( "136105-0000a.3k", 0x00003, 0x80000, CRC(729eb1b7) SHA1(21864b4281b1ad17b2903e3aa294e4be74161e80) ) |
2059 | 1904 | |
| 1905 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1906 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1907 | |
2060 | 1908 | DISK_REGION( "drive_0" ) |
2061 | 1909 | DISK_IMAGE( "area51", 0, SHA1(3b303bc37e206a6d7339352c869f050d04186f11) ) |
2062 | 1910 | ROM_END |
2063 | 1911 | |
2064 | 1912 | ROM_START( area51 ) /* R3000 based, labeled as "Area51 2-C" Date: Nov 11 1996 */ |
2065 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for IDT 79R3041 code */ |
| 1913 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ |
2066 | 1914 | ROM_LOAD32_BYTE( "a51_2-c.hh", 0x00000, 0x80000, CRC(13af6a1e) SHA1(69da54ed6886e825156bbcc256e8d7abd4dc1ff8) ) /* Usually found with "green" labels */ |
2067 | 1915 | ROM_LOAD32_BYTE( "a51_2-c.hl", 0x00001, 0x80000, CRC(8ab6649b) SHA1(9b4945bc04f8a73161638a2c5fa2fd84c6fd31b4) ) |
2068 | 1916 | ROM_LOAD32_BYTE( "a51_2-c.lh", 0x00002, 0x80000, CRC(a6524f73) SHA1(ae377a6803a4f7d1bbcc111725af121a3e82317d) ) |
2069 | 1917 | ROM_LOAD32_BYTE( "a51_2-c.ll", 0x00003, 0x80000, CRC(471b15d2) SHA1(4b5f45ee140b03a6be61475cae1c2dbef0f07457) ) |
2070 | 1918 | |
| 1919 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1920 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1921 | |
2071 | 1922 | DISK_REGION( "drive_0" ) |
2072 | 1923 | DISK_IMAGE( "area51", 0, SHA1(3b303bc37e206a6d7339352c869f050d04186f11) ) |
2073 | 1924 | ROM_END |
2074 | 1925 | |
2075 | 1926 | ROM_START( maxforce ) /* R3000 based, labeled as "Maximum Force 5-23-97 v1.05" */ |
2076 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for IDT 79R3041 code */ |
| 1927 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ |
2077 | 1928 | ROM_LOAD32_BYTE( "maxf_105.hh", 0x00000, 0x80000, CRC(ec7f8167) SHA1(0cf057bfb1f30c2c9621d3ed25021e7ba7bdd46e) ) /* Usually found with "light grey" labels */ |
2078 | 1929 | ROM_LOAD32_BYTE( "maxf_105.hl", 0x00001, 0x80000, CRC(3172611c) SHA1(00f14f871b737c66c20f95743740d964d0be3f24) ) |
2079 | 1930 | ROM_LOAD32_BYTE( "maxf_105.lh", 0x00002, 0x80000, CRC(84d49423) SHA1(88d9a6724f1118f2bbef5dfa27accc2b65c5ba1d) ) |
2080 | 1931 | ROM_LOAD32_BYTE( "maxf_105.ll", 0x00003, 0x80000, CRC(16d0768d) SHA1(665a6d7602a7f2f5b1f332b0220b1533143d56b1) ) |
2081 | 1932 | |
| 1933 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1934 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1935 | |
2082 | 1936 | DISK_REGION( "drive_0" ) |
2083 | 1937 | DISK_IMAGE( "maxforce", 0, SHA1(d54e7a8f3866bb2a1d28ae637e7c92ffa4dbe558) ) |
2084 | 1938 | ROM_END |
2085 | 1939 | |
2086 | 1940 | |
2087 | 1941 | ROM_START( maxf_102 ) /* R3000 based, labeled as "Maximum Force 2-27-97 v1.02" */ |
2088 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for IDT 79R3041 code */ |
| 1942 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ |
2089 | 1943 | ROM_LOAD32_BYTE( "maxf_102.hh", 0x00000, 0x80000, CRC(8ff7009d) SHA1(da22eae298a6e0e36f503fa091ac3913423dcd0f) ) /* Usually found with "yellow" labels */ |
2090 | 1944 | ROM_LOAD32_BYTE( "maxf_102.hl", 0x00001, 0x80000, CRC(96c2cc1d) SHA1(b332b8c042b92c736131c478cefac1c3c2d2673b) ) |
2091 | 1945 | ROM_LOAD32_BYTE( "maxf_102.lh", 0x00002, 0x80000, CRC(459ffba5) SHA1(adb40db6904e84c17f32ac6518fd2e994da7883f) ) |
2092 | 1946 | ROM_LOAD32_BYTE( "maxf_102.ll", 0x00003, 0x80000, CRC(e491be7f) SHA1(cbe281c099a4aa87067752d68cf2bb0ab3900531) ) |
2093 | 1947 | |
| 1948 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1949 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1950 | |
2094 | 1951 | DISK_REGION( "drive_0" ) |
2095 | 1952 | DISK_IMAGE( "maxforce", 0, SHA1(d54e7a8f3866bb2a1d28ae637e7c92ffa4dbe558) ) |
2096 | 1953 | ROM_END |
2097 | 1954 | |
2098 | 1955 | |
2099 | 1956 | ROM_START( maxf_ng ) /* R3000 based, stickers say 'NO GORE' */ |
2100 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for IDT 79R3041 code */ |
| 1957 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ |
2101 | 1958 | ROM_LOAD32_BYTE( "mf_ng_hh.21v", 0x00000, 0x80000, CRC(08791c02) SHA1(9befbff3201c7d345109b26c296fd8548dbfc95b) ) |
2102 | 1959 | ROM_LOAD32_BYTE( "mf_ng_hl.17v", 0x00001, 0x80000, CRC(52cf482c) SHA1(ff98b3f04987acef82a97a2ad35a9085fa84e6d5) ) |
2103 | 1960 | ROM_LOAD32_BYTE( "mf_ng_lh.21y", 0x00002, 0x80000, CRC(ab4ee992) SHA1(69f0fe111d3f5f31151d2922579e5073e484b1e1) ) |
2104 | 1961 | ROM_LOAD32_BYTE( "mf_ng_ll.17y", 0x00003, 0x80000, CRC(674aab43) SHA1(f79d790538756d1100b7e4ffed192a62a031a2cb) ) |
2105 | 1962 | |
| 1963 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1964 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1965 | |
2106 | 1966 | ROM_REGION( 0x800, "user2", 0 ) /* 28C16 style eeprom, currently loaded but not used */ |
2107 | 1967 | ROM_LOAD( "28c16.17z", 0x000, 0x800, CRC(1cdd9088) SHA1(4f01f02ff95f31ced87a3cdd7f171afd92551266) ) |
2108 | 1968 | |
r17621 | r17622 | |
2112 | 1972 | |
2113 | 1973 | |
2114 | 1974 | ROM_START( area51mx ) /* 68020 based, Labeled as "68020 MAX/A51 KIT 2.0" Date: Apr 22, 1998 */ |
2115 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for 68020 code */ |
| 1975 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for 68020 code */ |
2116 | 1976 | ROM_LOAD32_BYTE( "area51mx.3h", 0x00000, 0x80000, CRC(47cbf30b) SHA1(23377bcc65c0fc330d5bc7e76e233bae043ac364) ) |
2117 | 1977 | ROM_LOAD32_BYTE( "area51mx.3p", 0x00001, 0x80000, CRC(a3c93684) SHA1(f6b3357bb69900a176fd6bc6b819b2f57b7d0f59) ) |
2118 | 1978 | ROM_LOAD32_BYTE( "area51mx.3m", 0x00002, 0x80000, CRC(d800ac17) SHA1(3d515c8608d8101ee9227116175b3c3f1fe22e0c) ) |
2119 | 1979 | ROM_LOAD32_BYTE( "area51mx.3k", 0x00003, 0x80000, CRC(0e78f308) SHA1(adc4c8e441eb8fe525d0a6220eb3a2a8791a7289) ) |
2120 | 1980 | |
| 1981 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1982 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1983 | |
2121 | 1984 | DISK_REGION( "drive_0" ) |
2122 | 1985 | DISK_IMAGE( "area51mx", 0, SHA1(5ff10f4e87094d4449eabf3de7549564ca568c7e) ) |
2123 | 1986 | ROM_END |
2124 | 1987 | |
2125 | 1988 | |
2126 | 1989 | ROM_START( a51mxr3k ) /* R3000 based, Labeled as "R3K Max/A51 Kit Ver 1.0" */ |
2127 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for IDT 79R3041 code */ |
| 1990 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ |
2128 | 1991 | ROM_LOAD32_BYTE( "a51mxr3k.hh", 0x00000, 0x80000, CRC(a984dab2) SHA1(debb3bc11ff49e87a52e89a69533a1bab7db700e) ) |
2129 | 1992 | ROM_LOAD32_BYTE( "a51mxr3k.hl", 0x00001, 0x80000, CRC(0af49d74) SHA1(c19f26056a823fd32293e9a7b3ea868640eabf49) ) |
2130 | 1993 | ROM_LOAD32_BYTE( "a51mxr3k.lh", 0x00002, 0x80000, CRC(d7d94dac) SHA1(2060a74715f36a0d7f5dd0855eda48ad1f20f095) ) |
2131 | 1994 | ROM_LOAD32_BYTE( "a51mxr3k.ll", 0x00003, 0x80000, CRC(ece9e5ae) SHA1(7e44402726f5afa6d1670b27aa43ad13d21c4ad9) ) |
2132 | 1995 | |
| 1996 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 1997 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 1998 | |
2133 | 1999 | DISK_REGION( "drive_0" ) |
2134 | 2000 | DISK_IMAGE( "area51mx", 0, SHA1(5ff10f4e87094d4449eabf3de7549564ca568c7e) ) |
2135 | 2001 | ROM_END |
2136 | 2002 | |
2137 | 2003 | |
2138 | 2004 | ROM_START( vcircle ) |
2139 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2005 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2140 | 2006 | ROM_LOAD32_BYTE( "hh", 0x00000, 0x80000, CRC(7276f5f5) SHA1(716287e370a4f300b1743103f8031afc82de38ca) ) |
2141 | 2007 | ROM_LOAD32_BYTE( "hl", 0x00001, 0x80000, CRC(146060a1) SHA1(f291989f1f0ef228757f1990fb14da5ff8f3cf8d) ) |
2142 | 2008 | ROM_LOAD32_BYTE( "lh", 0x00002, 0x80000, CRC(be4b2ef6) SHA1(4332b3036e9cb12685e914d085d9a63aa856f0be) ) |
2143 | 2009 | ROM_LOAD32_BYTE( "ll", 0x00003, 0x80000, CRC(ba8753eb) SHA1(0322e0e37d814a38d08ba191b1a97fb1a55fe461) ) |
2144 | 2010 | |
| 2011 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2012 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2013 | |
2145 | 2014 | DISK_REGION( "drive_0" ) |
2146 | 2015 | DISK_IMAGE( "vcircle", 0, SHA1(bfa79c4cacdc9c2cd6362f62a23056b3e35a2034) ) |
2147 | 2016 | ROM_END |
r17621 | r17622 | |
2156 | 2025 | |
2157 | 2026 | |
2158 | 2027 | ROM_START( fishfren ) |
2159 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2028 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2160 | 2029 | ROM_LOAD32_BYTE( "hh", 0x00000, 0x80000, CRC(2ef79767) SHA1(abcea584f2cbd71b05f9d7e61f40ca9da6799215) ) |
2161 | 2030 | ROM_LOAD32_BYTE( "hl", 0x00001, 0x80000, CRC(7eefd4a2) SHA1(181be04836704098082fd78cacc68ffa70e77892) ) |
2162 | 2031 | ROM_LOAD32_BYTE( "lh", 0x00002, 0x80000, CRC(bbe9ed15) SHA1(889af29afe6d984b39105aa238400392a5dfb2c5) ) |
2163 | 2032 | ROM_LOAD32_BYTE( "ll", 0x00003, 0x80000, CRC(d70d0f2c) SHA1(2689cbe56ae3d491348b241528b0fe345fa8484c) ) |
2164 | 2033 | |
2165 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2034 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2035 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2036 | |
| 2037 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2166 | 2038 | ROMX_LOAD( "l63-56", 0x000000, 0x100000, CRC(42764ea5) SHA1(805245f01006bd974fbac56f688cfcf137ddc914), ROM_SKIP(7) ) |
2167 | 2039 | ROMX_LOAD( "l55-48", 0x000001, 0x100000, CRC(0c7592bb) SHA1(d5bd6b872abad58947842205f9eac46fd065e88f), ROM_SKIP(7) ) |
2168 | 2040 | ROMX_LOAD( "l47-40", 0x000002, 0x100000, CRC(6d7dcdb1) SHA1(914dae3b9df5c861f794b683571c5fb0c2c3c3fd), ROM_SKIP(7) ) |
r17621 | r17622 | |
2179 | 2051 | ROMX_LOAD( "h23-16", 0x800005, 0x080000, CRC(ab477a76) SHA1(ae9aa97dbc758cd741710fe08c6ea94a0a318451), ROM_SKIP(7) ) |
2180 | 2052 | ROMX_LOAD( "h15-08", 0x800006, 0x080000, CRC(25a423f1) SHA1(7530cf2e28e0755bfcbd70789ef5cbbfb3d94f9f), ROM_SKIP(7) ) |
2181 | 2053 | ROMX_LOAD( "h07-00", 0x800007, 0x080000, CRC(0f5f4cc6) SHA1(caa2b514fb1f2a815e63f7b8c6b79ce2dfa308c4), ROM_SKIP(7) ) |
2182 | | ROM_COPY( "user2", 0x800000, 0xc00000, 0x400000 ) |
| 2054 | ROM_COPY( "romboard", 0x800000, 0xc00000, 0x400000 ) |
2183 | 2055 | ROM_END |
2184 | 2056 | |
2185 | 2057 | ROM_START( freezeat ) |
2186 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2058 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2187 | 2059 | ROM_LOAD32_BYTE( "prog_eng.hh", 0x000000, 0x040000, CRC(f7cffafd) SHA1(62369de4cf0a5abab86f6bcf9621028b9e171ec3) ) |
2188 | 2060 | ROM_LOAD32_BYTE( "prog_eng.hl", 0x000001, 0x040000, CRC(17150705) SHA1(c5a32d334bffb58a816920cc1251a21acc5a6f92) ) |
2189 | 2061 | ROM_LOAD32_BYTE( "prog_eng.lh", 0x000002, 0x040000, CRC(12a903bf) SHA1(41f5949d7ed2081917af8411f92666b754564b37) ) |
2190 | 2062 | ROM_LOAD32_BYTE( "prog_eng.ll", 0x000003, 0x040000, CRC(cf69f971) SHA1(132b06f5fb49801fff7e5deb7aa71b44d5b1c6ca) ) |
2191 | 2063 | |
2192 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2064 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2065 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2066 | |
| 2067 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2193 | 2068 | ROMX_LOAD( "fish_gr0.63-56", 0x000000, 0x100000, CRC(b61061c5) SHA1(aeb409aa5073232d80ed81b27946e753290234f4), ROM_SKIP(7) ) |
2194 | 2069 | ROMX_LOAD( "fish_gr0.55-48", 0x000001, 0x100000, CRC(c85acf42) SHA1(c3365caeb126a83a7e7afcda25f05849ceb5c98b), ROM_SKIP(7) ) |
2195 | 2070 | ROMX_LOAD( "fish_gr0.47-40", 0x000002, 0x100000, CRC(67f78f59) SHA1(40b256a8939fad365c7e896cff4a959fcc70a477), ROM_SKIP(7) ) |
r17621 | r17622 | |
2209 | 2084 | ROM_END |
2210 | 2085 | |
2211 | 2086 | ROM_START( freezeatjp ) |
2212 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2087 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2213 | 2088 | ROM_LOAD32_BYTE( "prog_jpn.hh", 0x000000, 0x040000, CRC(989302bf) SHA1(232927ec0a52b8bb587a3c206af8e1c6cde67860) ) |
2214 | 2089 | ROM_LOAD32_BYTE( "prog_jpn.hl", 0x000001, 0x040000, CRC(6262b760) SHA1(12ca749f5cdc6db7d19f88a21f5f955b80206784) ) |
2215 | 2090 | ROM_LOAD32_BYTE( "prog_jpn.lh", 0x000002, 0x040000, CRC(c6a12b0c) SHA1(971242b5b09e15164e7c335e684b5043510c6462) ) |
2216 | 2091 | ROM_LOAD32_BYTE( "prog_jpn.ll", 0x000003, 0x040000, CRC(241ea755) SHA1(0db3cfbe577fc78387528390ebb14dbb7a09c97d) ) |
2217 | 2092 | |
2218 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2093 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2094 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2095 | |
| 2096 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2219 | 2097 | ROMX_LOAD( "fish_gr0.63-56", 0x000000, 0x100000, CRC(b61061c5) SHA1(aeb409aa5073232d80ed81b27946e753290234f4), ROM_SKIP(7) ) |
2220 | 2098 | ROMX_LOAD( "fish_gr0.55-48", 0x000001, 0x100000, CRC(c85acf42) SHA1(c3365caeb126a83a7e7afcda25f05849ceb5c98b), ROM_SKIP(7) ) |
2221 | 2099 | ROMX_LOAD( "fish_gr0.47-40", 0x000002, 0x100000, CRC(67f78f59) SHA1(40b256a8939fad365c7e896cff4a959fcc70a477), ROM_SKIP(7) ) |
r17621 | r17622 | |
2235 | 2113 | ROM_END |
2236 | 2114 | |
2237 | 2115 | ROM_START( freezeat2 ) |
2238 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2116 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2239 | 2117 | ROM_LOAD32_BYTE( "prog(__961018).hh", 0x000000, 0x040000, CRC(a8aefa52) SHA1(ba95da93035520de4b15245f68217c59dfb69dbd) ) |
2240 | 2118 | ROM_LOAD32_BYTE( "prog(__961018).hl", 0x000001, 0x040000, CRC(152dd641) SHA1(52fa260baf1979ed8f15f8abcbbeebd8e595d0e4) ) |
2241 | 2119 | ROM_LOAD32_BYTE( "prog(__961018).lh", 0x000002, 0x040000, CRC(416d26ed) SHA1(11cf3b88415a8a5d0bb8e1df08603a85202186ef) ) |
2242 | 2120 | ROM_LOAD32_BYTE( "prog(__961018).ll", 0x000003, 0x040000, CRC(d6a5dbc8) SHA1(0e2176c35cbc59b2a5283366210409d0e930bac7) ) |
2243 | 2121 | |
2244 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2122 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2123 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2124 | |
| 2125 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2245 | 2126 | ROMX_LOAD( "fish_gr0(__961018).63-56", 0x000000, 0x100000, CRC(99d0dc75) SHA1(b32126eea70c7584d1c34a6ca33282fbaf4b03aa), ROM_SKIP(7) ) |
2246 | 2127 | ROMX_LOAD( "fish_gr0(__961018).55-48", 0x000001, 0x100000, CRC(2dfdfe62) SHA1(e0554d36ef5cf4b6ce171857ea4f2737f11286a5), ROM_SKIP(7) ) |
2247 | 2128 | ROMX_LOAD( "fish_gr0(__961018).47-40", 0x000002, 0x100000, CRC(722aee2a) SHA1(bc79433131bed5b08453d1b80324a28a552783de), ROM_SKIP(7) ) |
r17621 | r17622 | |
2261 | 2142 | ROM_END |
2262 | 2143 | |
2263 | 2144 | ROM_START( freezeat3 ) |
2264 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2145 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2265 | 2146 | ROM_LOAD32_BYTE( "prog(__961007).hh", 0x000000, 0x040000, CRC(863942e6) SHA1(c7429c8a5c86ff93c64950e201cffca83dd7b7b0) ) |
2266 | 2147 | ROM_LOAD32_BYTE( "prog(__961007).hl", 0x000001, 0x040000, CRC(2acc18ef) SHA1(ead02566f7641b1d1066bd2e257b695e5c7e8437) ) |
2267 | 2148 | ROM_LOAD32_BYTE( "prog(__961007).lh", 0x000002, 0x040000, CRC(948cf20c) SHA1(86c757aa3c849ef5ba94ed4d5dbf10e833dab6bd) ) |
2268 | 2149 | ROM_LOAD32_BYTE( "prog(__961007).ll", 0x000003, 0x040000, CRC(5f44969e) SHA1(32345d7c56a3a890e71f8c71f25414d442b60af8) ) |
2269 | 2150 | |
2270 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2151 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2152 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2153 | |
| 2154 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2271 | 2155 | ROMX_LOAD( "fish_gr0(__961007).63-56", 0x000000, 0x100000, CRC(36799449) SHA1(bb706fe7fdc68f840702a127eed7d4519dd45869), ROM_SKIP(7) ) |
2272 | 2156 | ROMX_LOAD( "fish_gr0(__961007).55-48", 0x000001, 0x100000, CRC(23959947) SHA1(a35a6e62c7b2be57d41b1b64be93713cbf897f0a), ROM_SKIP(7) ) |
2273 | 2157 | ROMX_LOAD( "fish_gr0(__961007).47-40", 0x000002, 0x100000, CRC(4657e4e0) SHA1(b6c07182babcb0a106bf4a8f2e3f524371dd882d), ROM_SKIP(7) ) |
r17621 | r17622 | |
2287 | 2171 | ROM_END |
2288 | 2172 | |
2289 | 2173 | ROM_START( freezeat4 ) |
2290 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2174 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2291 | 2175 | ROM_LOAD32_BYTE( "prog(__961003).hh", 0x000000, 0x040000, CRC(80336f5e) SHA1(9946e8eebec2cd68db059f40f535ea212f41913d) ) |
2292 | 2176 | ROM_LOAD32_BYTE( "prog(__961003).hl", 0x000001, 0x040000, CRC(55125520) SHA1(13be4fbf32bcd94a2ea97fd690bd1dfdff146d33) ) |
2293 | 2177 | ROM_LOAD32_BYTE( "prog(__961003).lh", 0x000002, 0x040000, CRC(9d99c794) SHA1(f443f05a5979db66d61ef4174f0369a1cf4b7793) ) |
2294 | 2178 | ROM_LOAD32_BYTE( "prog(__961003).ll", 0x000003, 0x040000, CRC(e03700e0) SHA1(24d41750f02ee7e8fb379e517751b661400aa521) ) |
2295 | 2179 | |
2296 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2180 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2181 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2182 | |
| 2183 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2297 | 2184 | ROMX_LOAD( "fish_gr0(__961003).63-56", 0x000000, 0x100000, CRC(36799449) SHA1(bb706fe7fdc68f840702a127eed7d4519dd45869), ROM_SKIP(7) ) |
2298 | 2185 | ROMX_LOAD( "fish_gr0(__961003).55-48", 0x000001, 0x100000, CRC(23959947) SHA1(a35a6e62c7b2be57d41b1b64be93713cbf897f0a), ROM_SKIP(7) ) |
2299 | 2186 | ROMX_LOAD( "fish_gr0(__961003).47-40", 0x000002, 0x100000, CRC(4657e4e0) SHA1(b6c07182babcb0a106bf4a8f2e3f524371dd882d), ROM_SKIP(7) ) |
r17621 | r17622 | |
2313 | 2200 | ROM_END |
2314 | 2201 | |
2315 | 2202 | ROM_START( freezeat5 ) |
2316 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2203 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2317 | 2204 | ROM_LOAD32_BYTE( "prog(__960920).hh", 0x000000, 0x040000, CRC(95c4fc64) SHA1(cd00efe7f760ef1e4cdc4bc8a3b368427cb15d8a) ) |
2318 | 2205 | ROM_LOAD32_BYTE( "prog(__960920).hl", 0x000001, 0x040000, CRC(ffb9cb71) SHA1(35d6a5440d63bc5b94c4447645365039169da368) ) |
2319 | 2206 | ROM_LOAD32_BYTE( "prog(__960920).lh", 0x000002, 0x040000, CRC(3ddacd80) SHA1(79f9650531847eefd83908b6ea1e8362688b377c) ) |
2320 | 2207 | ROM_LOAD32_BYTE( "prog(__960920).ll", 0x000003, 0x040000, CRC(95ebefb0) SHA1(b88b12adabd7b0902c3a78919bcec8d9a2b04168) ) |
2321 | 2208 | |
2322 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2209 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2210 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2211 | |
| 2212 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2323 | 2213 | ROMX_LOAD( "fish_gr0(__960920).63-56", 0x000000, 0x100000, CRC(404a10c3) SHA1(8e353ac7608bd54f0fea610c85166ad14f2faadb), ROM_SKIP(7) ) |
2324 | 2214 | ROMX_LOAD( "fish_gr0(__960920).55-48", 0x000001, 0x100000, CRC(0b262f2f) SHA1(2a963cb5c3344091406d090edfdda498709c6aa6), ROM_SKIP(7) ) |
2325 | 2215 | ROMX_LOAD( "fish_gr0(__960920).47-40", 0x000002, 0x100000, CRC(43f86d26) SHA1(b31d36b11052514b5bcd5bf8e400457ca572c306), ROM_SKIP(7) ) |
r17621 | r17622 | |
2339 | 2229 | ROM_END |
2340 | 2230 | |
2341 | 2231 | ROM_START( freezeat6 ) |
2342 | | ROM_REGION32_BE( 0x200000, "user1", 0 ) /* 2MB for R3000 code */ |
| 2232 | ROM_REGION32_BE( 0x200000, "maincpu", 0 ) /* 2MB for R3000 code */ |
2343 | 2233 | ROM_LOAD32_BYTE( "prog(__960907).hh", 0x000000, 0x040000, CRC(120711fe) SHA1(387e3cc8a1a9ea7d65c528387891d09ed9889fe3) ) |
2344 | 2234 | ROM_LOAD32_BYTE( "prog(__960907).hl", 0x000001, 0x040000, CRC(18dd292a) SHA1(00e79851140716985f43594142c97e510a06b24a) ) |
2345 | 2235 | ROM_LOAD32_BYTE( "prog(__960907).lh", 0x000002, 0x040000, CRC(ce387e72) SHA1(021a274da0b828550a47c3778e1059d4e759693a) ) |
2346 | 2236 | ROM_LOAD32_BYTE( "prog(__960907).ll", 0x000003, 0x040000, CRC(9b307b7c) SHA1(71b696802fe7c867525d2626351dcfacedabd696) ) |
2347 | 2237 | |
2348 | | ROM_REGION32_BE( 0x1000000, "user2", 0 ) /* 16MB for 64-bit ROM data */ |
| 2238 | ROM_REGION( 0x1000, "waverom", 0 ) |
| 2239 | ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) |
| 2240 | |
| 2241 | ROM_REGION32_BE( 0x1000000, "romboard", 0 ) /* 16MB for 64-bit ROM data */ |
2349 | 2242 | ROMX_LOAD( "fish_gr0(__960907).63-56", 0x000000, 0x100000, CRC(293a3308) SHA1(e4c88759c3b8f8a359db83817dbd0428350b4f7e), ROM_SKIP(7) ) |
2350 | 2243 | ROMX_LOAD( "fish_gr0(__960907).55-48", 0x000001, 0x100000, CRC(18bb4bdf) SHA1(1f6c49b3b5946390fa7582b531f8d9af3baa2567), ROM_SKIP(7) ) |
2351 | 2244 | ROMX_LOAD( "fish_gr0(__960907).47-40", 0x000002, 0x100000, CRC(1faedcc6) SHA1(1e4ecbe4553fb3ebfbd03bd7e16066ccb531d00b), ROM_SKIP(7) ) |
r17621 | r17622 | |
2371 | 2264 | * |
2372 | 2265 | *************************************/ |
2373 | 2266 | |
2374 | | static void cojag_common_init(running_machine &machine, UINT16 gpu_jump_offs, UINT16 spin_pc) |
| 2267 | void jaguar_state::cojag_common_init(UINT16 gpu_jump_offs, UINT16 spin_pc) |
2375 | 2268 | { |
2376 | | cojag_state *state = machine.driver_data<cojag_state>(); |
| 2269 | m_is_cojag = true; |
| 2270 | |
2377 | 2271 | /* copy over the ROM */ |
2378 | | state->m_main_cpu = machine.device<cpu_device>("maincpu"); |
2379 | | cojag_is_r3000 = (state->m_main_cpu->type() == R3041BE); |
| 2272 | m_is_r3000 = (m_main_cpu->type() == R3041BE); |
2380 | 2273 | |
2381 | 2274 | /* install synchronization hooks for GPU */ |
2382 | | if (cojag_is_r3000) |
2383 | | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0x04f0b000 + gpu_jump_offs, 0x04f0b003 + gpu_jump_offs, write32_delegate(FUNC(cojag_state::gpu_jump_w),state)); |
| 2275 | if (m_is_r3000) |
| 2276 | m_main_cpu->space(AS_PROGRAM)->install_write_handler(0x04f0b000 + gpu_jump_offs, 0x04f0b003 + gpu_jump_offs, write32_delegate(FUNC(jaguar_state::gpu_jump_w), this)); |
2384 | 2277 | else |
2385 | | machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xf0b000 + gpu_jump_offs, 0xf0b003 + gpu_jump_offs, write32_delegate(FUNC(cojag_state::gpu_jump_w),state)); |
2386 | | machine.device("gpu")->memory().space(AS_PROGRAM)->install_read_handler(0xf03000 + gpu_jump_offs, 0xf03003 + gpu_jump_offs, read32_delegate(FUNC(cojag_state::gpu_jump_r),state)); |
2387 | | state->m_gpu_jump_address = &jaguar_gpu_ram[gpu_jump_offs/4]; |
2388 | | state->m_gpu_spin_pc = 0xf03000 + spin_pc; |
| 2278 | m_main_cpu->space(AS_PROGRAM)->install_write_handler(0xf0b000 + gpu_jump_offs, 0xf0b003 + gpu_jump_offs, write32_delegate(FUNC(jaguar_state::gpu_jump_w), this)); |
| 2279 | m_gpu->space(AS_PROGRAM)->install_read_handler(0xf03000 + gpu_jump_offs, 0xf03003 + gpu_jump_offs, read32_delegate(FUNC(jaguar_state::gpu_jump_r), this)); |
| 2280 | m_gpu_jump_address = &m_gpu_ram[gpu_jump_offs/4]; |
| 2281 | m_gpu_spin_pc = 0xf03000 + spin_pc; |
2389 | 2282 | |
2390 | | /* init the sound system and install DSP speedups */ |
2391 | | cojag_sound_init(machine); |
| 2283 | for (int i=0;i<0x1000/4;i++) |
| 2284 | { |
| 2285 | m_wave_rom[i] = ((m_wave_rom[i] & 0xffff0000)>>16) | ((m_wave_rom[i] & 0x0000ffff)<<16); |
| 2286 | } |
2392 | 2287 | } |
2393 | 2288 | |
2394 | 2289 | |
2395 | | DRIVER_INIT_MEMBER(cojag_state,area51a) |
| 2290 | DRIVER_INIT_MEMBER(jaguar_state,area51a) |
2396 | 2291 | { |
2397 | | jaguar_hacks_enabled = true; |
2398 | | cojag_common_init(machine(), 0x5c4, 0x5a0); |
| 2292 | m_hacks_enabled = true; |
| 2293 | cojag_common_init(0x5c4, 0x5a0); |
2399 | 2294 | |
2400 | 2295 | #if ENABLE_SPEEDUP_HACKS |
2401 | | { |
2402 | | |
2403 | | /* install speedup for main CPU */ |
2404 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xa02030, 0xa02033, write32_delegate(FUNC(cojag_state::area51_main_speedup_w),this)); |
2405 | | } |
| 2296 | /* install speedup for main CPU */ |
| 2297 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_write_handler(0xa02030, 0xa02033, write32_delegate(FUNC(jaguar_state::area51_main_speedup_w),this)); |
2406 | 2298 | #endif |
2407 | 2299 | } |
2408 | 2300 | |
2409 | 2301 | |
2410 | | DRIVER_INIT_MEMBER(cojag_state,area51) |
| 2302 | DRIVER_INIT_MEMBER(jaguar_state,area51) |
2411 | 2303 | { |
2412 | | jaguar_hacks_enabled = true; |
2413 | | cojag_common_init(machine(), 0x0c0, 0x09e); |
| 2304 | m_hacks_enabled = true; |
| 2305 | cojag_common_init(0x0c0, 0x09e); |
2414 | 2306 | |
2415 | 2307 | #if ENABLE_SPEEDUP_HACKS |
2416 | | { |
2417 | | |
2418 | | /* install speedup for main CPU */ |
2419 | | m_main_speedup_max_cycles = 120; |
2420 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x100062e8, 0x100062eb, read32_delegate(FUNC(cojag_state::cojagr3k_main_speedup_r),this)); |
2421 | | } |
| 2308 | /* install speedup for main CPU */ |
| 2309 | m_main_speedup_max_cycles = 120; |
| 2310 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_read_handler(0x100062e8, 0x100062eb, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this)); |
2422 | 2311 | #endif |
2423 | 2312 | } |
2424 | 2313 | |
2425 | | DRIVER_INIT_MEMBER(cojag_state,maxforce) |
| 2314 | DRIVER_INIT_MEMBER(jaguar_state,maxforce) |
2426 | 2315 | { |
2427 | | jaguar_hacks_enabled = true; |
2428 | | cojag_common_init(machine(), 0x0c0, 0x09e); |
| 2316 | m_hacks_enabled = true; |
| 2317 | cojag_common_init(0x0c0, 0x09e); |
2429 | 2318 | |
2430 | 2319 | /* patch the protection */ |
2431 | 2320 | m_rom_base[0x220/4] = 0x03e00008; |
r17621 | r17622 | |
2433 | 2322 | #if ENABLE_SPEEDUP_HACKS |
2434 | 2323 | /* install speedup for main CPU */ |
2435 | 2324 | m_main_speedup_max_cycles = 120; |
2436 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x1000865c, 0x1000865f, read32_delegate(FUNC(cojag_state::cojagr3k_main_speedup_r),this)); |
| 2325 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_read_handler(0x1000865c, 0x1000865f, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this)); |
2437 | 2326 | #endif |
2438 | 2327 | } |
2439 | 2328 | |
2440 | 2329 | |
2441 | | DRIVER_INIT_MEMBER(cojag_state,area51mx) |
| 2330 | DRIVER_INIT_MEMBER(jaguar_state,area51mx) |
2442 | 2331 | { |
2443 | | jaguar_hacks_enabled = true; |
2444 | | cojag_common_init(machine(), 0x0c0, 0x09e); |
| 2332 | m_hacks_enabled = true; |
| 2333 | cojag_common_init(0x0c0, 0x09e); |
2445 | 2334 | |
2446 | 2335 | /* patch the protection */ |
2447 | 2336 | m_rom_base[0x418/4] = 0x4e754e75; |
2448 | 2337 | |
2449 | 2338 | #if ENABLE_SPEEDUP_HACKS |
2450 | 2339 | /* install speedup for main CPU */ |
2451 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xa19550, 0xa19557, write32_delegate(FUNC(cojag_state::area51mx_main_speedup_w),this)); |
| 2340 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_write_handler(0xa19550, 0xa19557, write32_delegate(FUNC(jaguar_state::area51mx_main_speedup_w),this)); |
2452 | 2341 | #endif |
2453 | 2342 | } |
2454 | 2343 | |
2455 | 2344 | |
2456 | | DRIVER_INIT_MEMBER(cojag_state,a51mxr3k) |
| 2345 | DRIVER_INIT_MEMBER(jaguar_state,a51mxr3k) |
2457 | 2346 | { |
2458 | | jaguar_hacks_enabled = true; |
2459 | | cojag_common_init(machine(), 0x0c0, 0x09e); |
| 2347 | m_hacks_enabled = true; |
| 2348 | cojag_common_init(0x0c0, 0x09e); |
2460 | 2349 | |
2461 | 2350 | /* patch the protection */ |
2462 | 2351 | m_rom_base[0x220/4] = 0x03e00008; |
r17621 | r17622 | |
2464 | 2353 | #if ENABLE_SPEEDUP_HACKS |
2465 | 2354 | /* install speedup for main CPU */ |
2466 | 2355 | m_main_speedup_max_cycles = 120; |
2467 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x10006f0c, 0x10006f0f, read32_delegate(FUNC(cojag_state::cojagr3k_main_speedup_r),this)); |
| 2356 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_read_handler(0x10006f0c, 0x10006f0f, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this)); |
2468 | 2357 | #endif |
2469 | 2358 | } |
2470 | 2359 | |
2471 | 2360 | |
2472 | | DRIVER_INIT_MEMBER(cojag_state,fishfren) |
| 2361 | DRIVER_INIT_MEMBER(jaguar_state,fishfren) |
2473 | 2362 | { |
2474 | | jaguar_hacks_enabled = true; |
2475 | | cojag_common_init(machine(), 0x578, 0x554); |
| 2363 | m_hacks_enabled = true; |
| 2364 | cojag_common_init(0x578, 0x554); |
2476 | 2365 | |
2477 | 2366 | #if ENABLE_SPEEDUP_HACKS |
2478 | | { |
2479 | | |
2480 | | /* install speedup for main CPU */ |
2481 | | m_main_speedup_max_cycles = 200; |
2482 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x10021b60, 0x10021b63, read32_delegate(FUNC(cojag_state::cojagr3k_main_speedup_r),this)); |
2483 | | } |
| 2367 | /* install speedup for main CPU */ |
| 2368 | m_main_speedup_max_cycles = 200; |
| 2369 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_read_handler(0x10021b60, 0x10021b63, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this)); |
2484 | 2370 | #endif |
2485 | 2371 | } |
2486 | 2372 | |
2487 | 2373 | |
2488 | | static void init_freeze_common(running_machine &machine, offs_t main_speedup_addr) |
| 2374 | void jaguar_state::init_freeze_common(offs_t main_speedup_addr) |
2489 | 2375 | { |
2490 | | cojag_common_init(machine, 0x0bc, 0x09c); |
| 2376 | cojag_common_init(0x0bc, 0x09c); |
2491 | 2377 | |
2492 | 2378 | #if ENABLE_SPEEDUP_HACKS |
2493 | | { |
2494 | | cojag_state *state = machine.driver_data<cojag_state>(); |
2495 | | |
2496 | | /* install speedup for main CPU */ |
2497 | | state->m_main_speedup_max_cycles = 200; |
2498 | | if (main_speedup_addr != 0) |
2499 | | state->m_main_speedup = machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(main_speedup_addr, main_speedup_addr + 3, read32_delegate(FUNC(cojag_state::cojagr3k_main_speedup_r),state)); |
2500 | | state->m_main_gpu_wait = machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x0400d900, 0x0400d900 + 3, read32_delegate(FUNC(cojag_state::main_gpu_wait_r),state)); |
2501 | | } |
| 2379 | /* install speedup for main CPU */ |
| 2380 | m_main_speedup_max_cycles = 200; |
| 2381 | if (main_speedup_addr != 0) |
| 2382 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_read_handler(main_speedup_addr, main_speedup_addr + 3, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r), this)); |
| 2383 | m_main_gpu_wait = m_main_cpu->space(AS_PROGRAM)->install_read_handler(0x0400d900, 0x0400d900 + 3, read32_delegate(FUNC(jaguar_state::main_gpu_wait_r), this)); |
2502 | 2384 | #endif |
2503 | 2385 | } |
2504 | 2386 | |
2505 | | DRIVER_INIT_MEMBER(cojag_state,freezeat) { jaguar_hacks_enabled = true; init_freeze_common(machine(), 0x1001a9f4); } |
2506 | | DRIVER_INIT_MEMBER(cojag_state,freezeat2) { jaguar_hacks_enabled = true; init_freeze_common(machine(), 0x1001a8c4); } |
2507 | | DRIVER_INIT_MEMBER(cojag_state,freezeat3) { jaguar_hacks_enabled = true; init_freeze_common(machine(), 0x1001a134); } |
2508 | | DRIVER_INIT_MEMBER(cojag_state,freezeat4) { jaguar_hacks_enabled = true; init_freeze_common(machine(), 0x1001a134); } |
2509 | | DRIVER_INIT_MEMBER(cojag_state,freezeat5) { jaguar_hacks_enabled = true; init_freeze_common(machine(), 0x10019b34); } |
2510 | | DRIVER_INIT_MEMBER(cojag_state,freezeat6) { jaguar_hacks_enabled = true; init_freeze_common(machine(), 0x10019684); } |
| 2387 | DRIVER_INIT_MEMBER(jaguar_state,freezeat) { m_hacks_enabled = true; init_freeze_common(0x1001a9f4); } |
| 2388 | DRIVER_INIT_MEMBER(jaguar_state,freezeat2) { m_hacks_enabled = true; init_freeze_common(0x1001a8c4); } |
| 2389 | DRIVER_INIT_MEMBER(jaguar_state,freezeat3) { m_hacks_enabled = true; init_freeze_common(0x1001a134); } |
| 2390 | DRIVER_INIT_MEMBER(jaguar_state,freezeat4) { m_hacks_enabled = true; init_freeze_common(0x1001a134); } |
| 2391 | DRIVER_INIT_MEMBER(jaguar_state,freezeat5) { m_hacks_enabled = true; init_freeze_common(0x10019b34); } |
| 2392 | DRIVER_INIT_MEMBER(jaguar_state,freezeat6) { m_hacks_enabled = true; init_freeze_common(0x10019684); } |
2511 | 2393 | |
2512 | | DRIVER_INIT_MEMBER(cojag_state,vcircle) |
| 2394 | DRIVER_INIT_MEMBER(jaguar_state,vcircle) |
2513 | 2395 | { |
2514 | | jaguar_hacks_enabled = true; |
2515 | | cojag_common_init(machine(), 0x5c0, 0x5a0); |
| 2396 | m_hacks_enabled = true; |
| 2397 | cojag_common_init(0x5c0, 0x5a0); |
2516 | 2398 | |
2517 | 2399 | #if ENABLE_SPEEDUP_HACKS |
2518 | | { |
2519 | | |
2520 | | /* install speedup for main CPU */ |
2521 | | m_main_speedup_max_cycles = 50; |
2522 | | m_main_speedup = machine().device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0x12005b34, 0x12005b37, read32_delegate(FUNC(cojag_state::cojagr3k_main_speedup_r),this)); |
2523 | | } |
| 2400 | /* install speedup for main CPU */ |
| 2401 | m_main_speedup_max_cycles = 50; |
| 2402 | m_main_speedup = m_main_cpu->space(AS_PROGRAM)->install_read_handler(0x12005b34, 0x12005b37, read32_delegate(FUNC(jaguar_state::cojagr3k_main_speedup_r),this)); |
2524 | 2403 | #endif |
2525 | 2404 | } |
2526 | 2405 | |
r17621 | r17622 | |
2533 | 2412 | *************************************/ |
2534 | 2413 | |
2535 | 2414 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
2536 | | CONS( 1993, jaguar, 0, 0, jaguar, jaguar, cojag_state, jaguar, "Atari", "Jaguar", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
2537 | | CONS( 1995, jaguarcd, jaguar, 0, jaguar, jaguar, cojag_state, jaguar, "Atari", "Jaguar CD", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 2415 | CONS( 1993, jaguar, 0, 0, jaguar, jaguar, jaguar_state, jaguar, "Atari", "Jaguar", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 2416 | CONS( 1995, jaguarcd, jaguar, 0, jaguar, jaguar, jaguar_state, jaguar, "Atari", "Jaguar CD", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
2538 | 2417 | |
2539 | | GAME( 1996, area51, 0, cojagr3k, area51, cojag_state, area51, ROT0, "Atari Games", "Area 51 (R3000)", 0 ) |
2540 | | GAME( 1995, area51t, area51, cojag68k, area51, cojag_state, area51a, ROT0, "Atari Games (Time Warner license)", "Area 51 (Time Warner license)", 0 ) |
2541 | | GAME( 1995, area51a, area51, cojag68k, area51, cojag_state, area51a, ROT0, "Atari Games", "Area 51 (Atari Games license)", 0 ) |
2542 | | GAME( 1995, fishfren, 0, cojagr3k_rom, fishfren, cojag_state, fishfren, ROT0, "Time Warner Interactive", "Fishin' Frenzy (prototype)", 0 ) |
2543 | | GAME( 1996, freezeat, 0, cojagr3k_rom, freezeat, cojag_state, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, English voice, 96/10/25)", 0 ) |
2544 | | GAME( 1996, freezeatjp,freezeat, cojagr3k_rom, freezeat, cojag_state, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, Japanese voice, 96/10/25)", 0 ) |
2545 | | GAME( 1996, freezeat2, freezeat, cojagr3k_rom, freezeat, cojag_state, freezeat2,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/18)", 0 ) |
2546 | | GAME( 1996, freezeat3, freezeat, cojagr3k_rom, freezeat, cojag_state, freezeat3,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/07)", 0 ) |
2547 | | GAME( 1996, freezeat4, freezeat, cojagr3k_rom, freezeat, cojag_state, freezeat4,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/03)", 0 ) |
2548 | | GAME( 1996, freezeat5, freezeat, cojagr3k_rom, freezeat, cojag_state, freezeat5,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/20, AMOA-96)", 0 ) |
2549 | | GAME( 1996, freezeat6, freezeat, cojagr3k_rom, freezeat, cojag_state, freezeat6,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/07, Jamma-96)", 0 ) |
2550 | | GAME( 1996, maxforce, 0, cojagr3k, area51, cojag_state, maxforce, ROT0, "Atari Games", "Maximum Force v1.05", 0 ) |
2551 | | GAME( 1996, maxf_102, maxforce, cojagr3k, area51, cojag_state, maxforce, ROT0, "Atari Games", "Maximum Force v1.02", 0 ) |
2552 | | GAME( 1996, maxf_ng, maxforce, cojagr3k, area51, cojag_state, maxforce, ROT0, "Atari Games", "Maximum Force (No Gore version)", 0 ) |
2553 | | GAME( 1998, area51mx, 0, cojag68k, area51, cojag_state, area51mx, ROT0, "Atari Games", "Area 51 / Maximum Force Duo v2.0", 0 ) |
2554 | | GAME( 1998, a51mxr3k, area51mx, cojagr3k, area51, cojag_state, a51mxr3k, ROT0, "Atari Games", "Area 51 / Maximum Force Duo (R3000)", 0 ) |
2555 | | GAME( 1996, vcircle, 0, cojagr3k, vcircle, cojag_state, vcircle, ROT0, "Atari Games", "Vicious Circle (prototype)", 0 ) |
| 2418 | GAME( 1996, area51, 0, cojagr3k, area51, jaguar_state, area51, ROT0, "Atari Games", "Area 51 (R3000)", 0 ) |
| 2419 | GAME( 1995, area51t, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games (Time Warner license)", "Area 51 (Time Warner license)", 0 ) |
| 2420 | GAME( 1995, area51a, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games", "Area 51 (Atari Games license)", 0 ) |
| 2421 | GAME( 1995, fishfren, 0, cojagr3k_rom, fishfren, jaguar_state, fishfren, ROT0, "Time Warner Interactive", "Fishin' Frenzy (prototype)", 0 ) |
| 2422 | GAME( 1996, freezeat, 0, cojagr3k_rom, freezeat, jaguar_state, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, English voice, 96/10/25)", 0 ) |
| 2423 | GAME( 1996, freezeatjp,freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, Japanese voice, 96/10/25)", 0 ) |
| 2424 | GAME( 1996, freezeat2, freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat2,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/18)", 0 ) |
| 2425 | GAME( 1996, freezeat3, freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat3,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/07)", 0 ) |
| 2426 | GAME( 1996, freezeat4, freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat4,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/10/03)", 0 ) |
| 2427 | GAME( 1996, freezeat5, freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat5,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/20, AMOA-96)", 0 ) |
| 2428 | GAME( 1996, freezeat6, freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat6,ROT0, "Atari Games", "Freeze (Atari) (prototype, 96/09/07, Jamma-96)", 0 ) |
| 2429 | GAME( 1996, maxforce, 0, cojagr3k, area51, jaguar_state, maxforce, ROT0, "Atari Games", "Maximum Force v1.05", 0 ) |
| 2430 | GAME( 1996, maxf_102, maxforce, cojagr3k, area51, jaguar_state, maxforce, ROT0, "Atari Games", "Maximum Force v1.02", 0 ) |
| 2431 | GAME( 1996, maxf_ng, maxforce, cojagr3k, area51, jaguar_state, maxforce, ROT0, "Atari Games", "Maximum Force (No Gore version)", 0 ) |
| 2432 | GAME( 1998, area51mx, 0, cojag68k, area51, jaguar_state, area51mx, ROT0, "Atari Games", "Area 51 / Maximum Force Duo v2.0", 0 ) |
| 2433 | GAME( 1998, a51mxr3k, area51mx, cojagr3k, area51, jaguar_state, a51mxr3k, ROT0, "Atari Games", "Area 51 / Maximum Force Duo (R3000)", 0 ) |
| 2434 | GAME( 1996, vcircle, 0, cojagr3k, vcircle, jaguar_state, vcircle, ROT0, "Atari Games", "Vicious Circle (prototype)", 0 ) |