Previous 199869 Revisions Next

r21210 Wednesday 20th February, 2013 at 14:06:09 UTC by David Haywood
improved notes on some video stuff
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21209r21210
300300   UINT16 m_hOrigin;
301301   UINT16 m_vZoom;
302302   UINT16 m_hZoom;
303   UINT32 m_blit0; // ?
304   UINT32 m_blit10; // an address
303305
304
305306   required_device<cpu_device> m_maincpu;
306307   required_device<cpu_device> m_subcpu;
307308   required_device<cpu_device> m_soundcpu;
r21209r21210
507508            m_textBytesToWrite = (data & 0xff000000) >> 24;
508509            m_textOffset = (data & 0x0000ffff);
509510            m_blitterSerialCount = 0;
511           
512            // this is ONLY used when there is text on the screen
513           
514            //printf("set mode %08x\n", data);
515
516         
510517         }
511518         else if (m_blitterMode == 0x30 || m_blitterMode == 0x40 || m_blitterMode == 0x50 || m_blitterMode == 0x60
512519              || m_blitterMode == 0x90 || m_blitterMode == 0xa0 || m_blitterMode == 0xb0 || m_blitterMode == 0xc0)
r21209r21210
515522            // After this is set a fixed count of 11 32-bit words are sent to the data register.
516523            // The lower word always seems to be 0x0001 and the upper byte always 0xac.
517524            m_blitterSerialCount = 0;
525
526            // form 0xacMM-xxx   ac = fixed value for this mode?  MM = modes above.  -xxx = some kind of offset? but it doesn't increment for each blit like the textOffset / paletteOffset stuff, investigate 
527
518528         }
519529         else if (m_blitterMode == 0x10)
520530         {
r21209r21210
575585            //  8: 00400040 - unknown : "Vertical|Horizontal Zoom Ratios"?
576586            //  9: xxxx---- - "Display Vertical Position"
577587            //  9: ----yyyy - "Display Horizontal Position"
578            // 10: 00000000 - unknown : always seems to be zero
579            // 11: ........ - complex - likely an address into bytes uploaded by mode 0xf4
588            // 10: 00000000 - unknown : always seems to be zero - NO, for some things (not text) it's also a reference to 3f40000 region like #11
589            // 11: ........ - complex - likely an address into bytes uploaded by mode 0xf4  (likely, it's only used when text is present otherwise it's always 0, some indirect tile mode I guess)
580590            //                (See ifdef'ed out code below for a closer examination)
581591
582592            // Serialized counts
583            if (m_blitterSerialCount == 1)
593            if (m_blitterSerialCount == 0)
584594            {
595               // set to 0x00000001 on some objects during the 'film strip' part of attract, otherwise 0
596               // those objects don't seem visible anyway so might have some special meaning
597               m_blit0 = data;
598            //   if (data!=0) printf("blit %08x\n", data);
599            }
600            else if (m_blitterSerialCount == 1)
601            {
585602               m_colorNumber = (data & 0x000000ff);    // Probably more bits
586603            }
604            else if (m_blitterSerialCount == 2)
605            {
606            }
607            else if (m_blitterSerialCount == 3)
608            {
609            }
610            else if (m_blitterSerialCount == 4)
611            {
612            }
613            else if (m_blitterSerialCount == 5)
614            {
615            }
587616            else if (m_blitterSerialCount == 6)
588617            {
589618               m_vCellCount = (data & 0xffff0000) >> 16;
r21209r21210
608637               if (m_hPosition & 0x8000) m_hPosition -= 0x10000;
609638               if (m_vPosition & 0x8000) m_vPosition -= 0x10000;
610639            }
640            else if (m_blitterSerialCount == 10)
641            {
642               // this is an address on some objects..
643               // to be specific, the center line of the road (actual road object? which currently gets shown as a single pixel column?)
644               // and the horizontal road used in the background of the title screen (which currently looks normal)
645               // I guess it's some kind of indirect way to do a line effect?
646               m_blit10 = data;
647
648            //   if (data!=0) printf("blit %08x\n", data);
649            }
611650            else if (m_blitterSerialCount == 11)
612651            {
652               // for text objects this is an address containing the 8-bit tile numbers to use for ASCII text
653               // I guess the tiles are decoded by a DMA operation earlier, from the compressed ROM?
654
655               // we also use this to trigger the actual draw operation
656
657               //printf("blit %08x\n", data);
658               
659               // debug, hide objects without m_blit10 set
660               //if (m_blit10==0) return;
661               //if (m_blit0==0) return;
662
613663               const UINT32 memOffset = data;
614664               bitmap_rgb32* drawbitmap;
615665
r21209r21210
733783                  }
734784               }
735785            }
786            else
787            {
788               printf("more than 11 dwords (%d) in blit?\n", m_blitterSerialCount);
789            }
736790
791
737792            m_blitterSerialCount++;
738793         }
739794         // ??

Previous 199869 Revisions Next


© 1997-2024 The MAME Team