Previous 199869 Revisions Next

r21489 Thursday 28th February, 2013 at 22:27:23 UTC by Angelo Salese
Time to fix the irqs, game seems working but inputs aren't ...
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21488r21489
333333
334334   blit_ram[offset] = data;
335335
336   #if 0
337   if(offset == 0 && data == 2) // blitter trigger
336   if(offset == 0 && data == 2) // blitter trigger, 0->1 transition
338337   {
339338      int srcx = blit_ram[0x04]+(blit_ram[0x05]<<8);
340339      int srcy = blit_ram[0x06]+(blit_ram[0x07]<<8);
341      int dstx = blit_ram[0x08]+((blit_ram[0x09] & 0x01) <<8);
342      int dsty = blit_ram[0x0a]+((blit_ram[0x0b] & 0x01) <<8);
340      int dstx = blit_ram[0x08]+(blit_ram[0x09]<<8);
341      int dsty = blit_ram[0x0a]+(blit_ram[0x0b]<<8);
343342      int xsize = blit_ram[0x0c]+1;
344343      int ysize = blit_ram[0x0e]+1;
345      int color,color_offs;
344//      int color,color_offs;
346345
347      printf("%d %d %d %d\n",blit_ram[0x08]+(blit_ram[0x09]<<8),blit_ram[0x0a]+(blit_ram[0x0b]<<8),xsize,ysize);
346      printf("%04x %04x %04x %04x %02x %02x\n",srcx,srcy,dstx,dsty,xsize,ysize);
348347
348      gunpey_irq_check(4);
349
350      #if 0
349351      if(blit_ram[0x01] == 8) //1bpp?
350352      {
351353         // ...
r21488r21489
369371            }
370372         }
371373      }
372
374      #endif
373375/*
374376      printf("%02x %02x %02x %02x|%02x %02x %02x %02x|%02x %02x %02x %02x|%02x %02x %02x %02x\n"
375377      ,blit_ram[0],blit_ram[1],blit_ram[2],blit_ram[3]
r21488r21489
378380      ,blit_ram[0xc],blit_ram[0xd],blit_ram[0xe],blit_ram[0xf]);
379381*/
380382   }
381   #endif
382383}
383384
384385WRITE8_MEMBER(gunpey_state::gunpey_output_w)
r21488r21489
535536}
536537
537538
538/* Four irqs:
5390x01 really an irq?
5400x04
539/*:
5400x01
5410x04 blitter ready
5415420x10
5425430x40 almost certainly vblank (reads inputs)
5435440x80
r21488r21489
546547{
547548   int scanline = param;
548549
549   /* TODO */
550   if(scanline == 0)
551      gunpey_irq_check(0x10);
552
550553   if(scanline == 480)
551      gunpey_irq_check(0x54);
554      gunpey_irq_check(0x40);
552555}
553556
554557
r21488r21489
614617
615618DRIVER_INIT_MEMBER(gunpey_state,gunpey)
616619{
617   UINT8 *rom = memregion("maincpu")->base();
620//   UINT8 *rom = memregion("maincpu")->base();
618621
619622   /* patch SLOOOOW cycle checks ... */
620   rom[0x848b5] = 0x7e;
623//   rom[0x848b5] = 0x7e;
621624//  rom[0x848b6] = 0x03;
622   rom[0x89657] = 0x75;
623   rom[0x8e628] = 0x75;
625//   rom[0x89657] = 0x75;
626//   rom[0x8e628] = 0x75;
624627
625628}
626629

Previous 199869 Revisions Next


© 1997-2024 The MAME Team