Previous 15994 Revisions Next

r7145 Saturday 23rd January, 2010 at 14:18:54 UTC by Angelo Salese
[Super A'Can] Some graphic/DMA fixes to allow Sango Fighter to display stuff
[src/mess/drivers]supracan.c

src/mess/drivers/supracan.c
r7144r7145
117117   {
118118      case 7:  region = 2; tile_bank = 0x1c00; break;
119119      case 4:  region = 0; tile_bank = 0x400;  break;
120      case 2:  region = 1; tile_bank = 0x400;  break;
120121      case 0:  region = 1; tile_bank = 0;      break;
121122      default: region = 1; tile_bank = 0;      break;
122123   }
r7144r7145
148149/* 0x0402 Boom Zoo */
149150/* 0x2603 / 0x6623 Super Dragon Force */
150151/* 0x4020 BIOS logo */
151/* 0x06*/
152/* */
152153static void draw_roz(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
153154{
154155   UINT32 count;
r7144r7145
169170
170171   size = roz_mode & 0x200 ? 64 : 32;
171172
172   count = (roz_base_addr);
173   count = (0);
173174   scrollx = (roz_scrollx >> 8) & 0x1ff;
174175   scrolly = (roz_scrolly >> 8) & 0x1ff;
175176
r7144r7145
180181      for (x=0;x<size;x++)
181182      {
182183         int tile, flipx, flipy, pal;
183         tile = (supracan_vram[count] & 0x03ff);
184         flipx = (supracan_vram[count] & 0x0800) ? 1 : 0;
185         flipy = (supracan_vram[count] & 0x0400) ? 1 : 0;
186         pal = (supracan_vram[count] & 0xf000) >> 12;
184         tile = (supracan_vram[roz_base_addr | (count & 0x3ff)] & 0x03ff);
185         flipx = (supracan_vram[roz_base_addr | (count & 0x3ff)] & 0x0800) ? 1 : 0;
186         flipy = (supracan_vram[roz_base_addr | (count & 0x3ff)] & 0x0400) ? 1 : 0;
187         pal = (supracan_vram[roz_base_addr | (count & 0x3ff)] & 0xf000) >> 12;
187188
188189         drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx,(y*8)-scrolly,0);
189190         drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx+size*8,(y*8)-scrolly,0);
r7144r7145
757758         acan_sprdma_regs.count = data;
758759         break;
759760      case 0x1e/2:
760         //printf("%08x %08x %04x %04x\n",acan_sprdma_regs.src,acan_sprdma_regs.dst,acan_sprdma_regs.count,data);
761         printf("* %08x %08x %04x %04x\n",acan_sprdma_regs.src,acan_sprdma_regs.dst,acan_sprdma_regs.count,data);
761762         verboselog(space->machine, 0, "supracan_dma_w: Kicking off a DMA from %08x to %08x, %d bytes (%04x)\n", acan_sprdma_regs.src, acan_sprdma_regs.dst, acan_sprdma_regs.count + 1, data);
762763
763764         /* TODO: what's 0x2000 and 0x4000 for? */
764765         if(data & 0x8000)
765766         {
767            if(data & 0x2000 || data & 0x4000)
768               acan_sprdma_regs.dst |= 0xf40000;
769
766770            for(i = 0; i <= acan_sprdma_regs.count; i++)
767771            {
768772               if(data & 0x0100) //dma 0x00 fill (or fixed value?)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team