trunk/src/mame/drivers/coolridr.c
| r21212 | r21213 | |
| 384 | 384 | UINT32 m_blit2; // ? |
| 385 | 385 | UINT32 m_blit3; // ? |
| 386 | 386 | UINT32 m_blit4; // ? |
| 387 | | UINT32 m_blit5; // ? |
| 387 | |
| 388 | UINT32 m_blit5; // indirection enable + other bits? |
| 389 | int m_indirect_tile_enable; // from m_blit5 |
| 390 | int m_indirect_zoom_enable; // from m_blit5 |
| 391 | |
| 388 | 392 | UINT32 m_blit10; // an address |
| 389 | 393 | |
| 390 | 394 | required_device<cpu_device> m_maincpu; |
| r21212 | r21213 | |
| 662 | 666 | // 2: 00000000 - unknown : OT flag? (transparency) |
| 663 | 667 | // 3: 00000000 - unknown : RF flag? (90 degree rotation) |
| 664 | 668 | // 4: 07000000 - unknown : VF flag? (vertically flipped) |
| 665 | | // 5: 00010000 - unknown : HF flag? (horizontally flipped) (or mode... ) |
| 669 | // 5: 00010000 - enable indirect text tile lookup |
| 670 | // 5: 00000001 - enable line-zoom(?) lookup (road) |
| 666 | 671 | // 6: vvvv---- - "Vertical Cell Count" |
| 667 | 672 | // 6: ----hhhh - "Horizontal Cell Count" |
| 668 | 673 | // 7: 00000000 - unknown : "Vertical|Horizontal Zoom Centers"? |
| r21212 | r21213 | |
| 717 | 722 | } |
| 718 | 723 | else if (m_blitterSerialCount == 5) |
| 719 | 724 | { |
| 720 | | m_blit5 = data; |
| 725 | m_blit5 = data&0xfffefffe; |
| 721 | 726 | // this might enable the text indirection thing? |
| 727 | m_indirect_tile_enable = (data & 0x00010000)>>16; |
| 728 | m_indirect_zoom_enable = (data & 0x00000001); |
| 722 | 729 | |
| 723 | | // if (data!=0) printf("blit %08x\n", data); |
| 730 | |
| 731 | if (m_blit5) printf("unknown bits in blit word %d - %08x\n", m_blitterSerialCount, m_blit5); |
| 724 | 732 | // 00010000 (text) |
| 725 | 733 | // 00000001 (other) |
| 726 | 734 | |
| r21212 | r21213 | |
| 772 | 780 | //if (m_blit10==0) return; |
| 773 | 781 | //if (m_blit0==0) return; |
| 774 | 782 | |
| 775 | | const UINT32 memOffset = data; |
| 783 | //if (m_blit10!=0) |
| 784 | if (m_indirect_zoom_enable) |
| 785 | { |
| 786 | // with this bit enabled m_blit10 is a look up to the zoom(?) value eg. 03f42600 |
| 787 | |
| 788 | //printf("road type blit %08x %08x %08x %08x %08x %08x %04x %04x %04x %04x %08x %08x %d %d\n", m_blit0, m_blit1, m_blit2, m_blit3, m_blit4, m_blit5, m_vCellCount, m_hCellCount, m_vZoom, m_hZoom, m_blit10, data, m_vPosition, m_hPosition); |
| 789 | } |
| 790 | |
| 791 | |
| 776 | 792 | bitmap_rgb32* drawbitmap; |
| 777 | 793 | |
| 778 | 794 | // guess, you can see the different sizes of bike cross from the left screen to the right where the attract text is |
| r21212 | r21213 | |
| 832 | 848 | |
| 833 | 849 | // It's unknown if it's row-major or column-major |
| 834 | 850 | // TODO: Study the CRT test and "Cool Riders" logo for clues. |
| 835 | | UINT8 spriteNumber = space.read_byte(memOffset + h + (v*h)); |
| 851 | UINT8 spriteNumber = 0; |
| 836 | 852 | |
| 837 | | // DEBUG: For demo purposes, skip &spaces and NULL characters |
| 838 | | if (m_blitterMode == 0x30 || m_blitterMode == 0x90) |
| 853 | // with this bit enabled the tile numbers gets looked up using 'data' (which would be m_blit11) (eg 03f40000 for startup text) |
| 854 | // this allows text strings to be written as 8-bit ascii in one area (using command 0x10), and drawn using multi-width sprites |
| 855 | if (m_indirect_tile_enable) |
| 856 | { |
| 857 | const UINT32 memOffset = data; |
| 858 | spriteNumber = space.read_byte(memOffset + h + (v*h)); |
| 859 | |
| 860 | // DEBUG: For demo purposes, skip &spaces and NULL characters |
| 839 | 861 | if (spriteNumber == 0x20 || spriteNumber == 0x00) |
| 840 | 862 | continue; |
| 841 | | |
| 842 | 863 | #ifdef FAKE_ASCII_ROM |
| 843 | | if (m_blitterMode == 0x30 || m_blitterMode == 0x90) |
| 844 | | { |
| 845 | | |
| 846 | 864 | drawgfx_opaque(*drawbitmap,drawbitmap->cliprect(), machine().gfx[3],spriteNumber,0,0,0,pixelOffsetX,pixelOffsetY); |
| 847 | 865 | continue; |
| 866 | #endif |
| 848 | 867 | } |
| 849 | | #endif |
| 850 | 868 | |
| 851 | 869 | |
| 852 | 870 | int blockwide = ((16*m_hZoom)/0x40)-1; |