src/mess/drivers/supracan.c
| r7147 | r7148 | |
| 14 | 14 | |
| 15 | 15 | Known unemulated graphical effects: |
| 16 | 16 | - 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; |
| 19 | 31 | |
| 20 | 32 | baseball game debug trick: |
| 21 | 33 | wpset e90020,1f,w |
| r7147 | r7148 | |
| 52 | 64 | static UINT32 roz_base_addr; |
| 53 | 65 | static UINT16 roz_mode; |
| 54 | 66 | static UINT32 roz_scrollx, roz_scrolly; |
| 67 | static UINT16 roz_tile_bank; |
| 55 | 68 | |
| 56 | 69 | static UINT16 supracan_video_regs[256]; |
| 57 | 70 | |
| r7147 | r7148 | |
| 99 | 112 | UINT16 tile_bank; |
| 100 | 113 | |
| 101 | 114 | 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 | |
| 103 | 121 | /* 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 | |
| 114 | 125 | gfx_mode = (tilemap_mode[layer] & 0x7000) >> 12; |
| 115 | 126 | |
| 116 | 127 | switch(gfx_mode) |
| r7147 | r7148 | |
| 155 | 166 | UINT32 count; |
| 156 | 167 | int x,y; |
| 157 | 168 | int scrollx,scrolly; |
| 158 | | int region = 0; |
| 169 | int region; |
| 159 | 170 | // int gfx_mode; |
| 160 | 171 | int size; |
| 161 | | // UINT16 tile_bank; |
| 172 | UINT16 tile_bank; |
| 162 | 173 | |
| 163 | 174 | switch(roz_mode & 3) //FIXME: fix gfx bpp order |
| 164 | 175 | { |
| r7147 | r7148 | |
| 176 | 187 | |
| 177 | 188 | //roz_mode & 0x20 enables roz capabilities |
| 178 | 189 | |
| 190 | tile_bank = (roz_tile_bank & 0xf000) >> 3; //FIXME: check this |
| 191 | |
| 179 | 192 | for (y=0;y<size;y++) |
| 180 | 193 | { |
| 181 | 194 | for (x=0;x<size;x++) |
| 182 | 195 | { |
| 183 | 196 | 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; |
| 188 | 201 | |
| 189 | 202 | drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx,(y*8)-scrolly,0); |
| 190 | 203 | drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx+size*8,(y*8)-scrolly,0); |
| r7147 | r7148 | |
| 206 | 219 | int col; |
| 207 | 220 | int i; |
| 208 | 221 | int spr_base; |
| 209 | | int hflip; |
| 222 | int hflip,vflip; |
| 210 | 223 | int region; |
| 211 | 224 | //UINT8 *sprdata = (UINT8*)(&supracan_vram[0x1d000/2]); |
| 212 | 225 | |
| r7147 | r7148 | |
| 234 | 247 | spr_offs = supracan_vram[i+3] << 2; |
| 235 | 248 | bank = (supracan_vram[i+1] & 0xf000) >> 12; |
| 236 | 249 | hflip = (supracan_vram[i+1] & 0x0800) ? 1 : 0; |
| 250 | vflip = (supracan_vram[i+1] & 0x0400) ? 1 : 0; |
| 237 | 251 | |
| 238 | 252 | if(supracan_vram[i+2] & 0x100) |
| 239 | 253 | x-=256; |
| r7147 | r7148 | |
| 328 | 342 | } |
| 329 | 343 | #endif |
| 330 | 344 | |
| 331 | | if(video_flags & 4) |
| 332 | | draw_roz(screen->machine,bitmap,cliprect); |
| 333 | | |
| 334 | 345 | if(video_flags & 0x20) //guess, not tested |
| 335 | 346 | draw_tilemap(screen->machine,bitmap,cliprect,2); |
| 336 | 347 | |
| r7147 | r7148 | |
| 351 | 362 | if(video_flags & 8) |
| 352 | 363 | draw_sprites(screen->machine,bitmap,cliprect); |
| 353 | 364 | |
| 365 | if(video_flags & 4) |
| 366 | draw_roz(screen->machine,bitmap,cliprect); |
| 367 | |
| 368 | |
| 354 | 369 | return 0; |
| 355 | 370 | } |
| 356 | 371 | |
| r7147 | r7148 | |
| 825 | 840 | case 0x188/2: roz_scrolly = (data << 16) | (roz_scrolly & 0xffff); break; |
| 826 | 841 | case 0x18a/2: roz_scrolly = (data) | (roz_scrolly & 0xffff0000); break; |
| 827 | 842 | case 0x194/2: roz_base_addr = (data) << 1; break; |
| 843 | case 0x196/2: roz_tile_bank = data; break; //tile bank |
| 828 | 844 | |
| 829 | 845 | case 0x1f0/2: //FIXME: this register is mostly not understood |
| 830 | 846 | irq_mask = (data & 8) ? 0 : 1; |