trunk/src/mame/drivers/coolridr.c
| r21209 | r21210 | |
| 300 | 300 | UINT16 m_hOrigin; |
| 301 | 301 | UINT16 m_vZoom; |
| 302 | 302 | UINT16 m_hZoom; |
| 303 | UINT32 m_blit0; // ? |
| 304 | UINT32 m_blit10; // an address |
| 303 | 305 | |
| 304 | | |
| 305 | 306 | required_device<cpu_device> m_maincpu; |
| 306 | 307 | required_device<cpu_device> m_subcpu; |
| 307 | 308 | required_device<cpu_device> m_soundcpu; |
| r21209 | r21210 | |
| 507 | 508 | m_textBytesToWrite = (data & 0xff000000) >> 24; |
| 508 | 509 | m_textOffset = (data & 0x0000ffff); |
| 509 | 510 | m_blitterSerialCount = 0; |
| 511 | |
| 512 | // this is ONLY used when there is text on the screen |
| 513 | |
| 514 | //printf("set mode %08x\n", data); |
| 515 | |
| 516 | |
| 510 | 517 | } |
| 511 | 518 | else if (m_blitterMode == 0x30 || m_blitterMode == 0x40 || m_blitterMode == 0x50 || m_blitterMode == 0x60 |
| 512 | 519 | || m_blitterMode == 0x90 || m_blitterMode == 0xa0 || m_blitterMode == 0xb0 || m_blitterMode == 0xc0) |
| r21209 | r21210 | |
| 515 | 522 | // After this is set a fixed count of 11 32-bit words are sent to the data register. |
| 516 | 523 | // The lower word always seems to be 0x0001 and the upper byte always 0xac. |
| 517 | 524 | m_blitterSerialCount = 0; |
| 525 | |
| 526 | // form 0xacMM-xxx ac = fixed value for this mode? MM = modes above. -xxx = some kind of offset? but it doesn't increment for each blit like the textOffset / paletteOffset stuff, investigate |
| 527 | |
| 518 | 528 | } |
| 519 | 529 | else if (m_blitterMode == 0x10) |
| 520 | 530 | { |
| r21209 | r21210 | |
| 575 | 585 | // 8: 00400040 - unknown : "Vertical|Horizontal Zoom Ratios"? |
| 576 | 586 | // 9: xxxx---- - "Display Vertical Position" |
| 577 | 587 | // 9: ----yyyy - "Display Horizontal Position" |
| 578 | | // 10: 00000000 - unknown : always seems to be zero |
| 579 | | // 11: ........ - complex - likely an address into bytes uploaded by mode 0xf4 |
| 588 | // 10: 00000000 - unknown : always seems to be zero - NO, for some things (not text) it's also a reference to 3f40000 region like #11 |
| 589 | // 11: ........ - complex - likely an address into bytes uploaded by mode 0xf4 (likely, it's only used when text is present otherwise it's always 0, some indirect tile mode I guess) |
| 580 | 590 | // (See ifdef'ed out code below for a closer examination) |
| 581 | 591 | |
| 582 | 592 | // Serialized counts |
| 583 | | if (m_blitterSerialCount == 1) |
| 593 | if (m_blitterSerialCount == 0) |
| 584 | 594 | { |
| 595 | // set to 0x00000001 on some objects during the 'film strip' part of attract, otherwise 0 |
| 596 | // those objects don't seem visible anyway so might have some special meaning |
| 597 | m_blit0 = data; |
| 598 | // if (data!=0) printf("blit %08x\n", data); |
| 599 | } |
| 600 | else if (m_blitterSerialCount == 1) |
| 601 | { |
| 585 | 602 | m_colorNumber = (data & 0x000000ff); // Probably more bits |
| 586 | 603 | } |
| 604 | else if (m_blitterSerialCount == 2) |
| 605 | { |
| 606 | } |
| 607 | else if (m_blitterSerialCount == 3) |
| 608 | { |
| 609 | } |
| 610 | else if (m_blitterSerialCount == 4) |
| 611 | { |
| 612 | } |
| 613 | else if (m_blitterSerialCount == 5) |
| 614 | { |
| 615 | } |
| 587 | 616 | else if (m_blitterSerialCount == 6) |
| 588 | 617 | { |
| 589 | 618 | m_vCellCount = (data & 0xffff0000) >> 16; |
| r21209 | r21210 | |
| 608 | 637 | if (m_hPosition & 0x8000) m_hPosition -= 0x10000; |
| 609 | 638 | if (m_vPosition & 0x8000) m_vPosition -= 0x10000; |
| 610 | 639 | } |
| 640 | else if (m_blitterSerialCount == 10) |
| 641 | { |
| 642 | // this is an address on some objects.. |
| 643 | // to be specific, the center line of the road (actual road object? which currently gets shown as a single pixel column?) |
| 644 | // and the horizontal road used in the background of the title screen (which currently looks normal) |
| 645 | // I guess it's some kind of indirect way to do a line effect? |
| 646 | m_blit10 = data; |
| 647 | |
| 648 | // if (data!=0) printf("blit %08x\n", data); |
| 649 | } |
| 611 | 650 | else if (m_blitterSerialCount == 11) |
| 612 | 651 | { |
| 652 | // for text objects this is an address containing the 8-bit tile numbers to use for ASCII text |
| 653 | // I guess the tiles are decoded by a DMA operation earlier, from the compressed ROM? |
| 654 | |
| 655 | // we also use this to trigger the actual draw operation |
| 656 | |
| 657 | //printf("blit %08x\n", data); |
| 658 | |
| 659 | // debug, hide objects without m_blit10 set |
| 660 | //if (m_blit10==0) return; |
| 661 | //if (m_blit0==0) return; |
| 662 | |
| 613 | 663 | const UINT32 memOffset = data; |
| 614 | 664 | bitmap_rgb32* drawbitmap; |
| 615 | 665 | |
| r21209 | r21210 | |
| 733 | 783 | } |
| 734 | 784 | } |
| 735 | 785 | } |
| 786 | else |
| 787 | { |
| 788 | printf("more than 11 dwords (%d) in blit?\n", m_blitterSerialCount); |
| 789 | } |
| 736 | 790 | |
| 791 | |
| 737 | 792 | m_blitterSerialCount++; |
| 738 | 793 | } |
| 739 | 794 | // ?? |