Previous 199869 Revisions Next

r21524 Friday 1st March, 2013 at 17:26:12 UTC by David Haywood
fix missing y source bits
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21523r21524
240240   UINT8 *vram = memregion("vram")->base();
241241
242242   // +0                    +1                    +2                    +3                    +4                    +5                    +6                    +7
243   // cccc cccc e--b b--- | xxxx ---- u--- ---- | yyyy ---- --XX XXXX | nnnn nnnn ---Y YYYY | mmmm mmmm -MMM -NNN | hhhh hhhh wwww wwww | ---- ---- ---- ---- | ---- ---- ---- ---- |
243   // cccc cccc e--b b--- | xxxx ---- u--- ---- | yyyy yy-- --XX XXXX | nnnn nnnn ---Y YYYY | mmmm mmmm -MMM -NNN | hhhh hhhh wwww wwww | ---- ---- ---- ---- | ---- ---- ---- ---- |
244244
245245   // c = color palette
246246   // e = END marker
r21523r21524
273273      //UINT32 col = 0xffffff;
274274   //      UINT32 val = (m_wram[count+1] << 16) | ((m_wram[count+2]));
275275      int xsource = ((m_wram[count+2] & 0x003f) << 4) | ((m_wram[count+1] & 0xf000) >> 12);
276      int ysource = ((m_wram[count+3] & 0x001f) << 4) | ((m_wram[count+2] & 0xf000) >> 12);
276      int ysource = ((m_wram[count+3] & 0x001f) << 6) | ((m_wram[count+2] & 0xfc00) >> 10);
277277      //printf("%08x  %04x %04x\n", val, m_wram[count+1],m_wram[count+2] );
278278   //   UINT16 xsource = (m_wram[count+2] & 0x00ff << 4) | (m_wram[count+1] & 0xf000 >> 12);
279279      //xsource<<=1;
280280
281281      xsource<<=1;
282      ysource <<=2;
282   //   ysource <<=2;
283283
284284      UINT8 testhack = vram[((((ysource+0)&0x7ff)*0x800) + ((xsource+0)&0x7ff))];
285285      UINT8 testhack2 = vram[((((ysource+0)&0x7ff)*0x800) + ((xsource+1)&0x7ff))];
r21523r21524
289289
290290
291291
292     
293
292294      printf("sprite %04x %04x %04x %04x %04x %04x %04x %04x\n", m_wram[count+0], m_wram[count+1], m_wram[count+2], m_wram[count+3], m_wram[count+4], m_wram[count+5], m_wram[count+6], m_wram[count+7]);
295      printf("unused %04x %04x %04x %04x %04x %04x %04x %04x\n\n", m_wram[count+0]&~0xff98, m_wram[count+1]&~0xf080, m_wram[count+2]&~0xfc3f, m_wram[count+3]&~0xf01f, m_wram[count+4]&~0xff77, m_wram[count+5]&~0xffff, m_wram[count+6]&~0x0000, m_wram[count+7]&~0x0000);
293296
294297      if ((testhack2 & 0x0f) == 0x08)
295298         return m_wram[count+0] & 0x80;
r21523r21524
687690   int scanline = param;
688691
689692   if(scanline == 224)
693   {
694      printf("frame\n");
690695      gunpey_irq_check(0x50);
696   }
691697}
692698
693699
694static const gfx_layout fake_layout =
695{
696   8,8,
697   RGN_FRAC(1,4),
698   4,
699   { 0,1,2,3 },
700   { 0*4,1*4,2*4,3*4,4*4,5*4,6*4,7*4 },
701   { 0*32,1*32,2*32,3*32,4*32,5*32,6*32,7*32},
702   8*32
703};
704700
705701
706702
707703// this isn't a real decode as such, but the graphic data is all stored in pages 2048 bytes wide at varying BPP levelsl, some (BG data) compressed with what is likely a lossy scheme
708704// palette data is in here too, the blocks at the bottom right of all this?
709705static GFXLAYOUT_RAW( gunpey, 2048, 1, 2048*8, 2048*8 )
710//static GFXLAYOUT_RAW( gunpey1024, 1024, 1, 1024*8, 1024*8 )
711706
712707static GFXDECODE_START( gunpey )
713708   GFXDECODE_ENTRY( "blit_data", 0, gunpey,     0x0000, 0x1 )
714   //GFXDECODE_ENTRY( "vram", 0, gunpey1024,     0x0000, 0x1 )
715709   GFXDECODE_ENTRY( "vram", 0, gunpey,     0x0000, 0x1 )
716
717710GFXDECODE_END
718711
719712
r21523r21524
729722
730723   /* video hardware */
731724   MCFG_SCREEN_ADD("screen", RASTER)
732   MCFG_SCREEN_RAW_PARAMS(57242400/8, 442, 0, 320, 264, 0, 224) /* just to get ~60 Hz */
725   MCFG_SCREEN_RAW_PARAMS(57242400/8, 442, 0, 320, 264, 0, 240) /* just to get ~60 Hz */
733726   MCFG_SCREEN_UPDATE_DRIVER(gunpey_state, screen_update_gunpey)
734727
735728   MCFG_PALETTE_LENGTH(0x10000)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team