Previous 15994 Revisions Next

r7148 Saturday 23rd January, 2010 at 15:12:11 UTC by Angelo Salese
[Super A'Can]: Fixed tilemap paging for Sango Fighter character screen
[src/mess/drivers]supracan.c

src/mess/drivers/supracan.c
r7147r7148
1414
1515Known unemulated graphical effects:
1616- The green blob of the A'Can logo should slide out from beneath the word
17  "A'Can"
18- The A'Can logo should have a scrolling ROZ layer beneath it
17  "A'Can";
18- Unemulated 1bpp ROZ mode, used by the Super A'Can BIOS logo;
19- Priorities;
20- Boom Zoo: missing window effect applied on sprites;
21- Sango Fighter: Missing rowscroll effect;
22- Sango Fighter: sprites doesn't get drawn on the far right of the screen;
23- Sango Fighter: sprites have some bad gaps of black;
24- Sango Fighter: Missing black masking on the top-down edges of the screen on gameplay?
25- Sango Fighter: intro looks bogus, dunno what's supposed to draw...
26- Super Taiwanese Baseball League: Missing window effect applied on a tilemap;
27- Super Taiwanese Baseball League: Unemulated paging mode;
28- Super Dragon Force: sprite y masking limit looks wrong;
29- Super Dragon Force: priority issues with the text;
30- Super Dragon Force: wrong ysize on character select screen;
1931
2032baseball game debug trick:
2133wpset e90020,1f,w
r7147r7148
5264static UINT32 roz_base_addr;
5365static UINT16 roz_mode;
5466static UINT32 roz_scrollx, roz_scrolly;
67static UINT16 roz_tile_bank;
5568
5669static UINT16 supracan_video_regs[256];
5770
r7147r7148
99112   UINT16 tile_bank;
100113
101114   count = (tilemap_base_addr[layer]);
102   size = (video_flags & 0x100) ? 64 : 32;
115   /* FIXME: I guess that this truly controls tilemap paging. */
116   if((tilemap_flags[layer] & 0x0f00) == 0xa00)
117      size = 128;
118   else
119      size = (video_flags & 0x100) ? 64 : 32;
120
103121   /* FIXME: swap scrollx / scrolly */
104   if(size == 64)
105   {
106      scrolly = (tilemap_scrolly[layer] & 0x800) ? ((tilemap_scrolly[layer] & 0x1ff) - 0x200) : (tilemap_scrolly[layer] & 0x1ff);
107      scrollx = (tilemap_scrollx[layer] & 0x800) ? ((tilemap_scrollx[layer] & 0x1ff) - 0x200) : (tilemap_scrollx[layer] & 0x1ff);
108   }
109   else
110   {
111      scrolly = (tilemap_scrolly[layer] & 0x800) ? ((tilemap_scrolly[layer] & 0xff) - 0x100) : (tilemap_scrolly[layer] & 0xff);
112      scrollx = (tilemap_scrollx[layer] & 0x800) ? ((tilemap_scrollx[layer] & 0xff) - 0x100) : (tilemap_scrollx[layer] & 0xff);
113   }
122   scrolly = (tilemap_scrolly[layer] & 0x800) ? ((tilemap_scrolly[layer] & (size*8-1)) - size*8) : (tilemap_scrolly[layer] & (size*8-1));
123   scrollx = (tilemap_scrollx[layer] & 0x800) ? ((tilemap_scrollx[layer] & (size*8-1)) - size*8) : (tilemap_scrollx[layer] & (size*8-1));
124
114125   gfx_mode = (tilemap_mode[layer] & 0x7000) >> 12;
115126
116127   switch(gfx_mode)
r7147r7148
155166   UINT32 count;
156167   int x,y;
157168   int scrollx,scrolly;
158   int region = 0;
169   int region;
159170//   int gfx_mode;
160171   int size;
161//   UINT16 tile_bank;
172   UINT16 tile_bank;
162173
163174   switch(roz_mode & 3) //FIXME: fix gfx bpp order
164175   {
r7147r7148
176187
177188   //roz_mode & 0x20 enables roz capabilities
178189
190    tile_bank = (roz_tile_bank & 0xf000) >> 3; //FIXME: check this
191
179192   for (y=0;y<size;y++)
180193   {
181194      for (x=0;x<size;x++)
182195      {
183196         int tile, flipx, flipy, pal;
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;
197         tile = (supracan_vram[roz_base_addr | (count & 0x7ff)] & 0x03ff) | tile_bank;
198         flipx = (supracan_vram[roz_base_addr | (count & 0x7ff)] & 0x0800) ? 1 : 0;
199         flipy = (supracan_vram[roz_base_addr | (count & 0x7ff)] & 0x0400) ? 1 : 0;
200         pal = (supracan_vram[roz_base_addr | (count & 0x7ff)] & 0xf000) >> 12;
188201
189202         drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx,(y*8)-scrolly,0);
190203         drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx+size*8,(y*8)-scrolly,0);
r7147r7148
206219   int col;
207220   int i;
208221   int spr_base;
209   int hflip;
222   int hflip,vflip;
210223   int region;
211224   //UINT8 *sprdata = (UINT8*)(&supracan_vram[0x1d000/2]);
212225
r7147r7148
234247      spr_offs = supracan_vram[i+3] << 2;
235248      bank = (supracan_vram[i+1] & 0xf000) >> 12;
236249      hflip = (supracan_vram[i+1] & 0x0800) ? 1 : 0;
250      vflip = (supracan_vram[i+1] & 0x0400) ? 1 : 0;
237251
238252      if(supracan_vram[i+2] & 0x100)
239253         x-=256;
r7147r7148
328342   }
329343#endif
330344
331   if(video_flags & 4)
332      draw_roz(screen->machine,bitmap,cliprect);
333
334345   if(video_flags & 0x20) //guess, not tested
335346      draw_tilemap(screen->machine,bitmap,cliprect,2);
336347
r7147r7148
351362   if(video_flags & 8)
352363      draw_sprites(screen->machine,bitmap,cliprect);
353364
365   if(video_flags & 4)
366      draw_roz(screen->machine,bitmap,cliprect);
367
368
354369   return 0;
355370}
356371
r7147r7148
825840      case 0x188/2: roz_scrolly = (data << 16) | (roz_scrolly & 0xffff); break;
826841      case 0x18a/2: roz_scrolly = (data) | (roz_scrolly & 0xffff0000); break;
827842      case 0x194/2: roz_base_addr = (data) << 1; break;
843      case 0x196/2: roz_tile_bank = data; break; //tile bank
828844
829845      case 0x1f0/2: //FIXME: this register is mostly not understood
830846         irq_mask = (data & 8) ? 0 : 1;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team