trunk/src/mame/drivers/coolridr.c
| r21356 | r21357 | |
| 644 | 644 | int realx = ((x*incx)>>21); \ |
| 645 | 645 | |
| 646 | 646 | |
| 647 | | |
| 647 | /* the two tables that the patent claims are located at: |
| 648 | 0x1ec800 |
| 649 | 0x1f0000 |
| 650 | 0x3ec800 |
| 651 | 0x3f0000 |
| 652 | of each rom ... ROM 1 + 2 gives the full palette data for each pixel, in even/odd order. |
| 653 | TODO: fix anything that isn't text. |
| 654 | */ |
| 648 | 655 | #define DRAW_PIX \ |
| 649 | 656 | if (pix) \ |
| 650 | 657 | { \ |
| 651 | 658 | { \ |
| 652 | | if (!line[drawx]) line[drawx] = clut[pix+0x4000]; \ |
| 659 | if (!line[drawx]) \ |
| 660 | { \ |
| 661 | int r,g,b; \ |
| 662 | int dot; \ |
| 663 | int color_offs; \ |
| 664 | color_offs = (b1colorNumber & 0x3ff)*0x40; \ |
| 665 | color_offs+= pix & 0x3e; \ |
| 666 | color_offs+= (pix & 0x01)*0x400000; \ |
| 667 | color_offs+= 0x1ec800; \ |
| 668 | dot = (m_compressedgfx[color_offs+0]<<8) | m_compressedgfx[color_offs+1]; \ |
| 669 | r = pal5bit((dot >> 10) & 0x1f); \ |
| 670 | g = pal5bit((dot >> 5) & 0x1f); \ |
| 671 | b = pal5bit((dot >> 0) & 0x1f); \ |
| 672 | line[drawx] = r<<16 | g<<8 | b; \ |
| 673 | } \ |
| 653 | 674 | } \ |
| 654 | 675 | } \ |
| 655 | 676 | |
| 656 | 677 | /* This is a RLE-based sprite blitter (US Patent #6,141,122), very unusual from Sega... */ |
| 657 | 678 | void coolridr_state::blit_current_sprite(address_space &space) |
| 658 | 679 | { |
| 659 | | const pen_t *clut = &machine().pens[0]; |
| 680 | // const pen_t *clut = &machine().pens[0]; |
| 660 | 681 | |
| 661 | 682 | // Serialized 32-bit words in order of appearance: |
| 662 | 683 | // 0: 00000000 - unknown, 0x00000000 or 0x00000001, 0 seems to be regular sprite, 1 seems to change meaning of below, possible clip area? |
| r21356 | r21357 | |
| 766 | 787 | // 000u0ccc - c = colour? u = 0/1 |
| 767 | 788 | UINT32 blit1_unused = m_spriteblit[1] & 0xfffef800; |
| 768 | 789 | UINT32 b1mode = (m_spriteblit[1] & 0x00010000)>>16; |
| 769 | | //UINT32 b1colorNumber = (m_spriteblit[1] & 0x000007ff); // Probably more bits |
| 790 | UINT32 b1colorNumber = (m_spriteblit[1] & 0x000007ff); // Probably more bits |
| 770 | 791 | |
| 771 | 792 | if (blit1_unused!=0) printf("blit1 unknown bits set %08x\n", m_spriteblit[1]); |
| 772 | 793 | |
| r21356 | r21357 | |
| 775 | 796 | // seems to be more complex than just transparency |
| 776 | 797 | UINT32 blit2_unused = m_spriteblit[2]&0xff80f800; |
| 777 | 798 | UINT32 b2tpen = (m_spriteblit[2] & 0x007f0000)>>16; |
| 778 | | //UINT32 b2colorNumber = (m_spriteblit[2] & 0x000007ff); |
| 799 | // UINT32 b2colorNumber = (m_spriteblit[2] & 0x000001ff); |
| 779 | 800 | |
| 801 | // if(b1colorNumber > 0x60 || b2colorNumber) |
| 802 | // printf("%08x %08x\n",b1colorNumber,b2colorNumber); |
| 803 | |
| 804 | |
| 780 | 805 | if (blit2_unused!=0) printf("blit1 unknown bits set %08x\n", m_spriteblit[2]); |
| 781 | 806 | if (b1mode) |
| 782 | 807 | { |
| r21356 | r21357 | |
| 796 | 821 | UINT32 blit3_unused = m_spriteblit[3] & 0xffe00000; |
| 797 | 822 | UINT32 b3romoffset = (m_spriteblit[3] & 0x001fffff)*16; |
| 798 | 823 | |
| 799 | | |
| 800 | 824 | if (blit3_unused) printf("unknown bits in blit word %d - %08x\n", 3, blit3_unused); |
| 801 | 825 | |
| 802 | 826 | |
| r21356 | r21357 | |
| 867 | 891 | |
| 868 | 892 | UINT32 textlookup = m_spriteblit[11]; |
| 869 | 893 | |
| 894 | |
| 895 | |
| 870 | 896 | /* DRAW */ |
| 871 | 897 | UINT16 used_hCellCount = hCellCount; |
| 872 | 898 | UINT16 used_vCellCount = vCellCount; |
| r21356 | r21357 | |
| 1001 | 1027 | } |
| 1002 | 1028 | |
| 1003 | 1029 | } |
| 1030 | // printf("%08x %08x %08x %04x %04x\n",textlookup,m_spriteblit[3],b3romoffset,b1colorNumber,b2colorNumber); |
| 1004 | 1031 | |
| 1005 | 1032 | |
| 1006 | 1033 | for (int h = 0; h < used_hCellCount; h++) |
| r21356 | r21357 | |
| 2290 | 2317 | // machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); |
| 2291 | 2318 | m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 2292 | 2319 | |
| 2320 | |
| 2321 | |
| 2293 | 2322 | // memcpy(m_soundram, memregion("soundcpu")->base()+0x80000, 0x80000); |
| 2294 | 2323 | // m_soundcpu->reset(); |
| 2295 | 2324 | |
| r21356 | r21357 | |
| 2440 | 2469 | ROM_LOAD16_WORD_SWAP( "mpr-17646.ic7", 0x2000000, 0x0400000, CRC(b77eb2ad) SHA1(b832c0f1798aca39adba840d56ae96a75346670a) ) // 0490 |
| 2441 | 2470 | ROM_LOAD16_WORD_SWAP( "mpr-17645.ic6", 0x2400000, 0x0400000, CRC(56968d07) SHA1(e88c3d66ea05affb4681a25d155f097bd1b5a84b) ) // 0049 |
| 2442 | 2471 | |
| 2443 | | |
| 2444 | 2472 | ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */ |
| 2445 | 2473 | ROM_FILL( 0x000000, 0x80000, 0 ) |
| 2446 | 2474 | |