Previous 199869 Revisions Next

r21527 Friday 1st March, 2013 at 17:51:13 UTC by David Haywood
added missing x source bit
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21526r21527
239239   int color;
240240   UINT8 *vram = memregion("vram")->base();
241241
242   // there doesn't seem to be a specific bit to mark compressed sprites (we currently have a hack to look at the first byte of the data)
243   // do they get decompressed at blit time instead? of are there other registers we need to look at
244
242245   // +0                    +1                    +2                    +3                    +4                    +5                    +6                    +7
243   // cccc cccc e--b b--- | xxxx ---- u--- ---- | yyyy yy-- --XX XXXX | nnnn nnnn ---Y YYYY | mmmm mmmm -MMM -NNN | hhhh hhhh wwww wwww | ---- ---- oooo oooo | pppp pppp ---- ---- |
246   // cccc cccc e--b b--- | xxxx x--- u--t tttt | yyyy yy-- --XX XXXX | nnnn nnnn ---Y YYYY | mmmm mmmm -MMM -NNN | hhhh hhhh wwww wwww | ---- ---- oooo oooo | pppp pppp ---- ---- |
244247
245248   // c = color palette
246249   // e = END marker
r21526r21527
258261   // u = unknown, set on text, maybe 'solid' ?
259262   // o = zoom width
260263   // p = zoom height
264   // t = transparency / alpha related? (0x10 on player cursor, 0xf when swapping, other values at other times..)
261265   const int debug = 0;
262266
263267   if(!(m_wram[count+0] & 1))
r21526r21527
277281
278282      //UINT32 col = 0xffffff;
279283   //      UINT32 val = (m_wram[count+1] << 16) | ((m_wram[count+2]));
280      int xsource = ((m_wram[count+2] & 0x003f) << 4) | ((m_wram[count+1] & 0xf000) >> 12);
284      int xsource = ((m_wram[count+2] & 0x003f) << 5) | ((m_wram[count+1] & 0xf800) >> 11);
281285      int ysource = ((m_wram[count+3] & 0x001f) << 6) | ((m_wram[count+2] & 0xfc00) >> 10);
282286      //printf("%08x  %04x %04x\n", val, m_wram[count+1],m_wram[count+2] );
283287   //   UINT16 xsource = (m_wram[count+2] & 0x00ff << 4) | (m_wram[count+1] & 0xf000 >> 12);
284288      //xsource<<=1;
285289
286      xsource<<=1;
290   //   xsource<<=1;
287291   //   ysource <<=2;
288292
289293      UINT8 testhack = vram[((((ysource+0)&0x7ff)*0x800) + ((xsource+0)&0x7ff))];
r21526r21527
299303      if (debug) 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]);
300304     
301305      unused = m_wram[count+0]&~0xff98; if (unused) printf("unused bits set in word 0 - %04x\n", unused);
302      unused = m_wram[count+1]&~0xf080; if (unused) printf("unused bits set in word 1 - %04x\n", unused);
306      unused = m_wram[count+1]&~0xf89f; if (unused) printf("unused bits set in word 1 - %04x\n", unused);
303307      unused = m_wram[count+2]&~0xfc3f; if (unused) printf("unused bits set in word 2 - %04x\n", unused);
304308      unused = m_wram[count+3]&~0xff1f; if (unused) printf("unused bits set in word 3 - %04x\n", unused);
305309      unused = m_wram[count+4]&~0xff77; if (unused) printf("unused bits set in word 4 - %04x\n", unused);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team