trunk/src/mame/drivers/coolridr.c
| r21232 | r21233 | |
| 763 | 763 | if (m_blit2_unused!=0) printf("blit1 unknown bits set %08x\n", data); |
| 764 | 764 | if (m_b1mode) |
| 765 | 765 | { |
| 766 | | if (m_b2tpen != 0x7f) printf("m_b1mode 1, m_b2tpen!=0x7f"); |
| 766 | if (m_b2tpen != 0x7f) printf("m_b1mode 1, m_b2tpen!=0x7f\n"); |
| 767 | 767 | } |
| 768 | 768 | else |
| 769 | 769 | { |
| 770 | | if (m_b2tpen != 0x00) printf("m_b1mode 0, m_b2tpen!=0x00"); |
| 770 | // 0x01/0x02 trips in rare cases (start of one of the attract levels) maybe this is some kind of alpha instead? |
| 771 | if ((m_b2tpen != 0x00) && (m_b2tpen != 0x01) && (m_b2tpen != 0x02)) printf("m_b1mode 0, m_b2tpen!=0x00,0x01 or 0x02 (is %02x)\n", m_b2tpen); |
| 771 | 772 | } |
| 772 | 773 | |
| 773 | 774 | // 00??0uuu |
| r21232 | r21233 | |
| 960 | 961 | |
| 961 | 962 | |
| 962 | 963 | // Splat some sprites |
| 963 | | for (int h = 0; h < m_hCellCount; h++) |
| 964 | for (int v = 0; v < m_vCellCount; v++) |
| 964 | 965 | { |
| 965 | | for (int v = 0; v < m_vCellCount; v++) |
| 966 | const int pixelOffsetY = ((m_vPosition) + (v* 16 * m_vZoom)) / 0x40; |
| 967 | if (pixelOffsetY>383) |
| 966 | 968 | { |
| 969 | v = m_vCellCount; |
| 970 | continue; |
| 971 | } |
| 972 | |
| 973 | for (int h = 0; h < m_hCellCount; h++) |
| 974 | { |
| 967 | 975 | const int pixelOffsetX = ((m_hPosition) + (h* 16 * m_hZoom)) / 0x40; |
| 968 | | const int pixelOffsetY = ((m_vPosition) + (v* 16 * m_vZoom)) / 0x40; |
| 976 | if (pixelOffsetX>495) |
| 977 | { |
| 978 | h = m_hCellCount; |
| 979 | continue; |
| 980 | } |
| 969 | 981 | |
| 970 | 982 | // It's unknown if it's row-major or column-major |
| 971 | 983 | // TODO: Study the CRT test and "Cool Riders" logo for clues. |
| r21232 | r21233 | |
| 1024 | 1036 | color = m_b1colorNumber; |
| 1025 | 1037 | |
| 1026 | 1038 | // DEBUG: Draw 16x16 block |
| 1039 | UINT32* line; |
| 1027 | 1040 | for (int y = 0; y < blockhigh; y++) |
| 1028 | 1041 | { |
| 1029 | | int drawy = pixelOffsetY+y; |
| 1042 | const int drawy = pixelOffsetY+y; |
| 1030 | 1043 | if ((drawy>383) || (drawy<0)) continue; |
| 1044 | line = &drawbitmap->pix32(drawy); |
| 1031 | 1045 | |
| 1032 | 1046 | for (int x = 0; x < blockwide; x++) |
| 1033 | 1047 | { |
| 1034 | | int drawx = pixelOffsetX+x; |
| 1048 | const int drawx = pixelOffsetX+x; |
| 1035 | 1049 | if ((drawx>=495 || drawx<0)) continue; |
| 1036 | 1050 | |
| 1037 | | if (drawbitmap->pix32(drawy,drawx)==0) drawbitmap->pix32(drawy, drawx) = color; |
| 1051 | if (line[drawx]==0) line[drawx] = color; |
| 1038 | 1052 | } |
| 1039 | 1053 | } |
| 1040 | 1054 | } |