Previous 15994 Revisions Next

r7151 Saturday 23rd January, 2010 at 16:44:04 UTC by Angelo Salese
[Super A'Can]: cleaned-up the DMA fill function, fixes pause on transitions
[src/mess/drivers]supracan.c

src/mess/drivers/supracan.c
r7150r7151
109109   int region;
110110   int gfx_mode;
111111   int size;
112   UINT16 tile_bank;
112   UINT16 tile_bank,pal_bank;
113113
114114   count = (tilemap_base_addr[layer]);
115115   /* FIXME: I guess that this truly controls tilemap paging. */
r7150r7151
126126
127127   switch(gfx_mode)
128128   {
129      case 7:  region = 2; tile_bank = 0x1c00; break;
130      case 4:  region = 0; tile_bank = 0x400;  break;
131      case 2:  region = 1; tile_bank = 0x400;  break;
132      case 0:  region = 1; tile_bank = 0;      break;
133      default: region = 1; tile_bank = 0;      break;
129      case 7:  region = 2; tile_bank = 0x1c00; pal_bank = 0x38; break;
130      case 4:  region = 0; tile_bank = 0x400;  pal_bank = 0x00; break;
131      case 2:  region = 1; tile_bank = 0x400;  pal_bank = 0x00; break;
132      case 0:  region = 1; tile_bank = 0;      pal_bank = 0x00; break;
133      default: region = 1; tile_bank = 0;      pal_bank = 0x00; break;
134134   }
135135
136136
r7150r7151
142142         tile = (supracan_vram[count] & 0x03ff) + tile_bank;
143143         flipx = (supracan_vram[count] & 0x0800) ? 1 : 0;
144144         flipy = (supracan_vram[count] & 0x0400) ? 1 : 0;
145         pal = (supracan_vram[count] & 0xf000) >> 12;
145         pal = ((supracan_vram[count] & 0xf000) >> 12) + pal_bank;
146146
147147         drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx,(y*8)-scrolly,0);
148148         if(tilemap_flags[layer] & 0x20) //wrap-around enable
r7150r7151
803803            {
804804               if(data & 0x0100) //dma 0x00 fill (or fixed value?)
805805               {
806                  //memory_write_word(space, acan_sprdma_regs.dst, 0);
807                  //acan_sprdma_regs.dst+=2;
808                  memset(supracan_vram,0x00,0x020000);
806                  memory_write_word(space, acan_sprdma_regs.dst, 0);
807                  acan_sprdma_regs.dst+=2;
808                  //memset(supracan_vram,0x00,0x020000);
809809               }
810810               else
811811               {
r7150r7151
941941static GFXDECODE_START( supracan )
942942   GFXDECODE_ENTRY( "ram_gfx",  0, supracan_gfx8bpp,   0, 1 )
943943   GFXDECODE_ENTRY( "ram_gfx",  0, supracan_gfx4bpp,   0, 0x10 )
944   GFXDECODE_ENTRY( "ram_gfx",  0, supracan_gfx2bpp,   0, 0x10 )
944   GFXDECODE_ENTRY( "ram_gfx",  0, supracan_gfx2bpp,   0, 0x40 )
945945GFXDECODE_END
946946
947947static INTERRUPT_GEN( supracan_irq )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team