Previous 199869 Revisions Next

r21577 Monday 4th March, 2013 at 23:20:23 UTC by Angelo Salese
Cleaned up a4r4g4b4 operation, nw
[src/mame/drivers]chihiro.c gunpey.c

trunk/src/mame/drivers/gunpey.c
r21576r21577
621621   m_latched_bits_left--;
622622
623623   int bit = (m_latched_byte >> (7-m_latched_bits_left))&1;
624   
624
625625   if (bit==0) m_zero_bit_count++;
626626   else m_zero_bit_count=0;
627627
r21576r21577
668668
669669
67067002 08 00 8c|6c 06 73 06|80 03 00 00|27 00 ef 00
671data:
671data:
672672 000101 010 001011 011 111111110
673
673
674674 (this is 239 repeats)
675675 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
676676 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
r21576r21577
687687 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
688688 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
689689 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
692692 1001 1001 000010
693
693
694694 (this is 239 repeats)
695695 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
696696 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
r21576r21577
708708 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
709709 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
710710 110010110 110010110 110010110 110010110 110010110 110010110
711 
712 
711
712
713713 1001 1001 000010
714
714
715715 (this is 239 repeats)
716716 110010110 110010110 110010110 110010110 110010110 110010110 110010110
717717 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
r21576r21577
729729 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
730730 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
731731 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
732
732
733733 1001 1001 000010
734
734
735735 (this is 239 repeats)
736736 110010110 110010110 110010110 110010110 110010110
737737 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
r21576r21577
749749 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
750750 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
751751 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
752
752
753753 1001 1001 000010
754
754
755755 (this is 239 repeats)
756756 110010110 110010110 110010110
757757 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
r21576r21577
769769 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
770770 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
771771 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
772
772
773773 1001 1001 000010
774
774
775775 (this is 239 repeats)
776776 110010110
777777 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
r21576r21577
789789 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
790790 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
791791 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110 110010110
792
792
793793 (then what happens?! is this part of the same sprite or just running past the end of the compressed source block?)
794794 1001 110000000
795795 1010 1000 1001 010 1000 1001 010 1000 1001 010 1000 1001 010 1000 1001 010
r21576r21577
865865
866866      m_dstx<<=1;
867867      m_xsize<<=1;
868   
868
869869      if(rle)
870870      {
871871         if(rle == 8)
r21576r21577
886886            int linespacer = 0;
887887#endif
888888
889           
889
890890            m_dstxbase = m_dstx;
891891            m_dstxcount = 0;
892892            m_dstycount = 0;
r21576r21577
895895            m_srcycount = 0;
896896
897897            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..
899899            m_latched_bits_left = 0;
900900            m_zero_bit_count = 0;
901901
r21576r21577
903903
904904            for (;;)
905905            {
906               
906
907907               int test = gunpey_state_get_stream_bits(2);
908908               int data;
909909               int getbits = 1;
r21576r21577
938938               {
939939                  #ifdef SHOW_COMPRESSED_DATA_DEBUG
940940                  if (count<512)
941                  {           
941                  {
942942                     {
943943
944944                        if (test==0x0)
r21576r21577
962962                        {
963963                           printf("%d", (data>>((getbits-1)-z))&1);
964964                        }
965   
965
966966                        linespacer++;
967967                        if ((linespacer%16) == 0) printf("\n");
968                             
968
969969                        printf(" ");
970970
971971                     }
trunk/src/mame/drivers/chihiro.c
r21576r21577
11201120   UINT32 a8r8g8b8;
11211121   int ca,cr,cg,cb;
11221122
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
11281128   return a8r8g8b8;
11291129}
11301130
r21576r21577
14801480            float z[4],w[4];
14811481            UINT32 c[4];
14821482
1483            printf("draw quad\n\r");
1483            //printf("draw quad\n\r");
14841484            for (m=0;m < 4;m++) {
14851485               *((UINT32 *)(&xy[m].x))=space.read_dword(vtxbuf_address[0]+(n+m+offset)*vtxbuf_stride[0]+0);
14861486               *((UINT32 *)(&xy[m].y))=space.read_dword(vtxbuf_address[0]+(n+m+offset)*vtxbuf_stride[0]+4);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team