Previous 199869 Revisions Next

r21526 Friday 1st March, 2013 at 17:43:55 UTC by David Haywood
misc improvements
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21525r21526
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 yy-- --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 | ---- ---- oooo oooo | pppp pppp ---- ---- |
244244
245245   // c = color palette
246246   // e = END marker
r21525r21526
256256   // h = height
257257   // w = width
258258   // u = unknown, set on text, maybe 'solid' ?
259   // o = zoom width
260   // p = zoom height
261   const int debug = 0;
259262
260
261263   if(!(m_wram[count+0] & 1))
262264   {
263265      x = (m_wram[count+3] >> 8) | ((m_wram[count+4] & 0x03) << 8);
r21525r21526
270272      x-=0x160;
271273      y-=0x188;
272274
275      UINT8 zoomwidth  = (m_wram[count+6] & 0xff);
276      UINT8 zoomheight = (m_wram[count+7] >> 8);
277
273278      //UINT32 col = 0xffffff;
274279   //      UINT32 val = (m_wram[count+1] << 16) | ((m_wram[count+2]));
275280      int xsource = ((m_wram[count+2] & 0x003f) << 4) | ((m_wram[count+1] & 0xf000) >> 12);
r21525r21526
284289      UINT8 testhack = vram[((((ysource+0)&0x7ff)*0x800) + ((xsource+0)&0x7ff))];
285290      UINT8 testhack2 = vram[((((ysource+0)&0x7ff)*0x800) + ((xsource+1)&0x7ff))];
286291
287      //if (m_wram[count+1] & 0x0080) // set on text
288      //   color =  machine.rand()&0xf;
292      if (m_wram[count+1] & 0x0010)
293         color =  machine.rand()&0xf;
289294
290295
291296
292297     
298      UINT16 unused;
299      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]);
300     
301      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);
303      unused = m_wram[count+2]&~0xfc3f; if (unused) printf("unused bits set in word 2 - %04x\n", unused);
304      unused = m_wram[count+3]&~0xff1f; if (unused) printf("unused bits set in word 3 - %04x\n", unused);
305      unused = m_wram[count+4]&~0xff77; if (unused) printf("unused bits set in word 4 - %04x\n", unused);
306      unused = m_wram[count+5]&~0xffff; if (unused) printf("unused bits set in word 5 - %04x\n", unused);
307      unused = m_wram[count+6]&~0x00ff; if (unused) printf("unused bits set in word 6 - %04x\n", unused);
308      unused = m_wram[count+7]&~0xff00; if (unused) printf("unused bits set in word 7 - %04x\n", unused);
309   
310      if ((zoomwidth != width) || (zoomheight!= height))
311      {
312         printf("zoomed widths %02x %02x heights %02x %02x\n", width, zoomwidth, height, zoomheight);
313      }
293314
294      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]&~0xff1f, m_wram[count+4]&~0xff77, m_wram[count+5]&~0xffff, m_wram[count+6]&~0x0000, m_wram[count+7]&~0x0000);
296315
316
297317      if ((testhack2 & 0x0f) == 0x08)
298318         return m_wram[count+0] & 0x80;
299319
300      printf("testhack1 %02x %02x\n", testhack, testhack2);
320      if (debug) printf("testhack1 %02x %02x\n", testhack, testhack2);
301321
302322      if(bpp_sel == 0x00)  // 4bpp
303323      {
r21525r21526
691711
692712   if(scanline == 224)
693713   {
694      printf("frame\n");
714      //printf("frame\n");
695715      gunpey_irq_check(0x50);
696716   }
697717}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team