trunk/src/mame/drivers/gunpey.c
| r21576 | r21577 | |
| 621 | 621 | m_latched_bits_left--; |
| 622 | 622 | |
| 623 | 623 | int bit = (m_latched_byte >> (7-m_latched_bits_left))&1; |
| 624 | | |
| 624 | |
| 625 | 625 | if (bit==0) m_zero_bit_count++; |
| 626 | 626 | else m_zero_bit_count=0; |
| 627 | 627 | |
| r21576 | r21577 | |
| 668 | 668 | |
| 669 | 669 | |
| 670 | 670 | 02 08 00 8c|6c 06 73 06|80 03 00 00|27 00 ef 00 |
| 671 | | data: |
| 671 | data: |
| 672 | 672 | 000101 010 001011 011 111111110 |
| 673 | | |
| 673 | |
| 674 | 674 | (this is 239 repeats) |
| 675 | 675 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 676 | 676 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| r21576 | r21577 | |
| 687 | 687 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 688 | 688 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 689 | 689 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 690 | | 110010110 110010110 110010110 110010110 |
| 691 | | |
| 690 | 110010110 110010110 110010110 110010110 |
| 691 | |
| 692 | 692 | 1001 1001 000010 |
| 693 | | |
| 693 | |
| 694 | 694 | (this is 239 repeats) |
| 695 | 695 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 696 | 696 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| r21576 | r21577 | |
| 708 | 708 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 709 | 709 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 710 | 710 | 110010110 110010110 110010110 110010110 110010110 110010110 |
| 711 | | |
| 712 | | |
| 711 | |
| 712 | |
| 713 | 713 | 1001 1001 000010 |
| 714 | | |
| 714 | |
| 715 | 715 | (this is 239 repeats) |
| 716 | 716 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 717 | 717 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| r21576 | r21577 | |
| 729 | 729 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 730 | 730 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 731 | 731 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 732 | | |
| 732 | |
| 733 | 733 | 1001 1001 000010 |
| 734 | | |
| 734 | |
| 735 | 735 | (this is 239 repeats) |
| 736 | 736 | 110010110 110010110 110010110 110010110 110010110 |
| 737 | 737 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| r21576 | r21577 | |
| 749 | 749 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 750 | 750 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 751 | 751 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 752 | | |
| 752 | |
| 753 | 753 | 1001 1001 000010 |
| 754 | | |
| 754 | |
| 755 | 755 | (this is 239 repeats) |
| 756 | 756 | 110010110 110010110 110010110 |
| 757 | 757 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| r21576 | r21577 | |
| 769 | 769 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 770 | 770 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 771 | 771 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 772 | | |
| 772 | |
| 773 | 773 | 1001 1001 000010 |
| 774 | | |
| 774 | |
| 775 | 775 | (this is 239 repeats) |
| 776 | 776 | 110010110 |
| 777 | 777 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| r21576 | r21577 | |
| 789 | 789 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 790 | 790 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 791 | 791 | 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 |
| 792 | | |
| 792 | |
| 793 | 793 | (then what happens?! is this part of the same sprite or just running past the end of the compressed source block?) |
| 794 | 794 | 1001 110000000 |
| 795 | 795 | 1010 1000 1001 010 1000 1001 010 1000 1001 010 1000 1001 010 1000 1001 010 |
| r21576 | r21577 | |
| 865 | 865 | |
| 866 | 866 | m_dstx<<=1; |
| 867 | 867 | m_xsize<<=1; |
| 868 | | |
| 868 | |
| 869 | 869 | if(rle) |
| 870 | 870 | { |
| 871 | 871 | if(rle == 8) |
| r21576 | r21577 | |
| 886 | 886 | int linespacer = 0; |
| 887 | 887 | #endif |
| 888 | 888 | |
| 889 | | |
| 889 | |
| 890 | 890 | m_dstxbase = m_dstx; |
| 891 | 891 | m_dstxcount = 0; |
| 892 | 892 | m_dstycount = 0; |
| r21576 | r21577 | |
| 895 | 895 | m_srcycount = 0; |
| 896 | 896 | |
| 897 | 897 | m_sourcewide = m_blit_rom[(((m_srcy)&0x7ff)*0x800)+((m_srcx)&0x7ff)]+1; |
| 898 | | m_srcx++;m_scrxcount++; // we don't want to decode the width as part of the data stream.. |
| 898 | m_srcx++;m_scrxcount++; // we don't want to decode the width as part of the data stream.. |
| 899 | 899 | m_latched_bits_left = 0; |
| 900 | 900 | m_zero_bit_count = 0; |
| 901 | 901 | |
| r21576 | r21577 | |
| 903 | 903 | |
| 904 | 904 | for (;;) |
| 905 | 905 | { |
| 906 | | |
| 906 | |
| 907 | 907 | int test = gunpey_state_get_stream_bits(2); |
| 908 | 908 | int data; |
| 909 | 909 | int getbits = 1; |
| r21576 | r21577 | |
| 938 | 938 | { |
| 939 | 939 | #ifdef SHOW_COMPRESSED_DATA_DEBUG |
| 940 | 940 | if (count<512) |
| 941 | | { |
| 941 | { |
| 942 | 942 | { |
| 943 | 943 | |
| 944 | 944 | if (test==0x0) |
| r21576 | r21577 | |
| 962 | 962 | { |
| 963 | 963 | printf("%d", (data>>((getbits-1)-z))&1); |
| 964 | 964 | } |
| 965 | | |
| 965 | |
| 966 | 966 | linespacer++; |
| 967 | 967 | if ((linespacer%16) == 0) printf("\n"); |
| 968 | | |
| 968 | |
| 969 | 969 | printf(" "); |
| 970 | 970 | |
| 971 | 971 | } |
trunk/src/mame/drivers/chihiro.c
| r21576 | r21577 | |
| 1120 | 1120 | UINT32 a8r8g8b8; |
| 1121 | 1121 | int ca,cr,cg,cb; |
| 1122 | 1122 | |
| 1123 | | cb=(a4r4g4b4 & 0xf)*17; // ((a4r4g4b4 & 0xf)*255)/15 |
| 1124 | | cg=((a4r4g4b4 & 0xf0)*816)/3; // (((a4r4g4b4 & 0xf0) >> 4)*255)/15) << 8 |
| 1125 | | cr=(a4r4g4b4 & 0xf00)*17*256; // (((a4r4g4b4 & 0xf00) >> 8)*255)/15) << 16 |
| 1126 | | ca=(a4r4g4b4 & 0xf000)*4096*17; //((a4r4g4b4 & 0xf000) >> 12)*255/15 << 24 |
| 1127 | | a8r8g8b8=ca+cb+cg+cr; // color converted to 8 bits per component |
| 1123 | cb=pal4bit(a4r4g4b4 & 0x000f);//(a4r4g4b4 & 0xf)*17; // ((a4r4g4b4 & 0xf)*255)/15 |
| 1124 | cg=pal4bit((a4r4g4b4 & 0x00f0) >> 4);//((a4r4g4b4 & 0xf0)*816)/3; // (((a4r4g4b4 & 0xf0) >> 4)*255)/15) << 8 |
| 1125 | cr=pal4bit((a4r4g4b4 & 0x0f00) >> 8);//(a4r4g4b4 & 0xf00)*17*256; // (((a4r4g4b4 & 0xf00) >> 8)*255)/15) << 16 |
| 1126 | ca=pal4bit((a4r4g4b4 & 0xf000) >> 12);//(a4r4g4b4 & 0xf000)*4096*17; //((a4r4g4b4 & 0xf000) >> 12)*255/15 << 24 |
| 1127 | a8r8g8b8=(ca<<24)|(cr<<16)|(cg<<8)|(cr); // color converted to 8 bits per component |
| 1128 | 1128 | return a8r8g8b8; |
| 1129 | 1129 | } |
| 1130 | 1130 | |
| r21576 | r21577 | |
| 1480 | 1480 | float z[4],w[4]; |
| 1481 | 1481 | UINT32 c[4]; |
| 1482 | 1482 | |
| 1483 | | printf("draw quad\n\r"); |
| 1483 | //printf("draw quad\n\r"); |
| 1484 | 1484 | for (m=0;m < 4;m++) { |
| 1485 | 1485 | *((UINT32 *)(&xy[m].x))=space.read_dword(vtxbuf_address[0]+(n+m+offset)*vtxbuf_stride[0]+0); |
| 1486 | 1486 | *((UINT32 *)(&xy[m].y))=space.read_dword(vtxbuf_address[0]+(n+m+offset)*vtxbuf_stride[0]+4); |