Previous 199869 Revisions Next

r21213 Wednesday 20th February, 2013 at 15:58:43 UTC by David Haywood
make use of some of the indirection enable bits I've found
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21212r21213
384384   UINT32 m_blit2; // ?
385385   UINT32 m_blit3; // ?
386386   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
388392   UINT32 m_blit10; // an address
389393
390394   required_device<cpu_device> m_maincpu;
r21212r21213
662666            //  2: 00000000 - unknown : OT flag?  (transparency)
663667            //  3: 00000000 - unknown : RF flag?  (90 degree rotation)
664668            //  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)
666671            //  6: vvvv---- - "Vertical Cell Count"
667672            //  6: ----hhhh - "Horizontal Cell Count"
668673            //  7: 00000000 - unknown : "Vertical|Horizontal Zoom Centers"?
r21212r21213
717722            }
718723            else if (m_blitterSerialCount == 5)
719724            {
720               m_blit5 = data;
725               m_blit5 = data&0xfffefffe;
721726               // this might enable the text indirection thing?
727               m_indirect_tile_enable = (data & 0x00010000)>>16;
728               m_indirect_zoom_enable = (data & 0x00000001);
722729
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);
724732               // 00010000 (text)
725733               // 00000001 (other)
726734
r21212r21213
772780               //if (m_blit10==0) return;
773781               //if (m_blit0==0) return;
774782
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               
776792               bitmap_rgb32* drawbitmap;
777793
778794               // guess, you can see the different sizes of bike cross from the left screen to the right where the attract text is
r21212r21213
832848
833849                     // It's unknown if it's row-major or column-major
834850                     // 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;
836852
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
839861                        if (spriteNumber == 0x20 || spriteNumber == 0x00)
840862                           continue;
841
842863#ifdef FAKE_ASCII_ROM
843                     if (m_blitterMode == 0x30 || m_blitterMode == 0x90)
844                     {
845
846864                        drawgfx_opaque(*drawbitmap,drawbitmap->cliprect(), machine().gfx[3],spriteNumber,0,0,0,pixelOffsetX,pixelOffsetY);
847865                        continue;
866#endif
848867                     }
849#endif
850868
851869
852870                     int blockwide = ((16*m_hZoom)/0x40)-1;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team