| Previous | 15994 Revisions | Next |
| r6893 Sunday 3rd January, 2010 at 09:46:46 UTC by Harmony |
|---|
| [ACAN] Multiple graphical fixes: [Harmony] - Temporarily disabled the A'Can logo and ROZ display until the associated windowing and ROZ effects can be discerned - Added the missing third tilemap, this fixes most remaining missing graphics - Fixed a number of sprite dimension flags - Increased the maximum spritelist length, this fixes most remaining missing sprites - Promoted driver to working due to the one dumped game's playability |
| [src/mess/drivers] | supracan.c |
| r6892 | r6893 | |
|---|---|---|
| 69 | 69 | /* FIXME: vram is currently hardcoded, but there's an high chance it's tied to some video registers */ |
| 70 | 70 | static VIDEO_UPDATE( supracan ) |
| 71 | 71 | { |
| 72 | int x,y,count; | |
| 72 | int x,y,map,count; | |
| 73 | 73 | |
| 74 | 74 | bitmap_fill(bitmap, cliprect, 0); |
| 75 | 75 | |
| 76 | 76 | count = 0x4400/2; |
| 77 | 77 | |
| 78 | #if 0 | |
| 78 | 79 | for (y=0;y<64;y++) |
| 79 | 80 | { |
| 80 | 81 | for (x=0;x<32;x += 8) |
| r6892 | r6893 | |
| 109 | 110 | count++; |
| 110 | 111 | } |
| 111 | 112 | } |
| 113 | #endif | |
| 112 | 114 | |
| 113 | // Tilemap 1 | |
| 114 | count = 0x1e000/2; | |
| 115 | ||
| 116 | for (y=0;y<30;y++) | |
| 115 | // Tilemaps | |
| 116 | for (map = 0; map < 3; map++) | |
| 117 | 117 | { |
| 118 | for (x=0;x<32;x++) | |
| 118 | count = (0x1e000 + map * 0x800) / 2; | |
| 119 | for (y=0;y<30;y++) | |
| 119 | 120 | { |
| 120 | int tile, flipx, pal; | |
| 121 | for (x=0;x<32;x++) | |
| 122 | { | |
| 123 | int tile, flipx, flipy, pal; | |
| 121 | 124 | |
| 122 | tile = (supracan_vram[count] & 0x03ff); | |
| 123 | flipx = (supracan_vram[count] & 0x0800) ? 1 : 0; | |
| 124 | pal = (supracan_vram[count] & 0xf000) >> 12; | |
| 125 | tile = (supracan_vram[count] & 0x03ff); | |
| 126 | flipx = (supracan_vram[count] & 0x0800) ? 1 : 0; | |
| 127 | flipy = (supracan_vram[count] & 0x0400) ? 1 : 0; | |
| 128 | pal = (supracan_vram[count] & 0xf000) >> 12; | |
| 125 | 129 | |
| 126 | drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],tile,pal,flipx,0,x*8,y*8,0); | |
| 127 | count++; | |
| 130 | drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],tile,pal,flipx,flipy,x*8,y*8,0); | |
| 131 | count++; | |
| 132 | } | |
| 128 | 133 | } |
| 129 | 134 | } |
| 130 | 135 | |
| 131 | // Tilemap 2 | |
| 132 | count = 0x1f000/2; | |
| 133 | ||
| 134 | for (y=0;y<30;y++) | |
| 135 | 136 | { |
| 136 | for (x=0;x<32;x++) | |
| 137 | { | |
| 138 | int tile, flipx, pal; | |
| 139 | ||
| 140 | tile = (supracan_vram[count] & 0x03ff); | |
| 141 | flipx = (supracan_vram[count] & 0x0800) ? 1 : 0; | |
| 142 | pal = (supracan_vram[count] & 0xf000) >> 12; | |
| 143 | ||
| 144 | drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],tile,pal,flipx,0,x*8,y*8,0); | |
| 145 | count++; | |
| 146 | } | |
| 147 | } | |
| 148 | ||
| 149 | { | |
| 150 | 137 | int x,y,xtile,ytile,xsize,ysize,bank,spr_offs,col,i,spr_base; |
| 151 | 138 | //UINT8 *sprdata = (UINT8*)(&supracan_vram[0x1d000/2]); |
| 152 | 139 | |
| 153 | 140 | spr_base = 0x1d000; |
| 154 | 141 | |
| 155 | for(i=spr_base/2;i<(spr_base+0x100)/2;i+=4) | |
| 142 | for(i=spr_base/2;i<(spr_base+0x1000)/2;i+=4) | |
| 156 | 143 | { |
| 157 | 144 | x = supracan_vram[i+2] & 0x1ff; |
| 158 | 145 | y = supracan_vram[i+0] & 0x0ff; |
| 159 | 146 | spr_offs = supracan_vram[i+3] << 2; |
| 160 | col = (supracan_vram[i+1] & 0x000f); | |
| 161 | 147 | bank = (supracan_vram[i+1] & 0xf000) >> 12; |
| 162 | 148 | |
| 163 | 149 | if(supracan_vram[i+3] != 0) |
| r6892 | r6893 | |
| 166 | 152 | // Some of these are likely wrong |
| 167 | 153 | switch((supracan_vram[i+0] & 0xff00) | ((supracan_vram[i+2] & 0xfe00) >> 8)) |
| 168 | 154 | { |
| 169 | //case 0x2412: | |
| 170 | // xsize = 4; | |
| 171 | // ysize = 3; | |
| 172 | // break; | |
| 173 | //case 0x2612: | |
| 174 | // xsize = 4; | |
| 175 | // ysize = 4; | |
| 176 | // break; | |
| 155 | case 0x2412: | |
| 156 | xsize = 4; | |
| 157 | ysize = 3; | |
| 158 | break; | |
| 159 | case 0x2612: | |
| 160 | xsize = 4; | |
| 161 | ysize = 4; | |
| 162 | break; | |
| 177 | 163 | case 0x4028: |
| 178 | xsize = 1 | |
| 164 | xsize = 3 * (supracan_vram[i+1] & 7); | |
| 179 | 165 | ysize = 1; |
| 180 | 166 | break; |
| 167 | case 0x402a: | |
| 168 | xsize = 2; | |
| 169 | ysize = 1; | |
| 170 | break; | |
| 181 | 171 | case 0x4228: |
| 182 | xsize = | |
| 172 | xsize = 2 * (supracan_vram[i+1] & 7); | |
| 183 | 173 | ysize = 2; |
| 184 | 174 | break; |
| 185 | 175 | case 0x422a: |
| 186 | 176 | xsize = 2; |
| 187 | 177 | ysize = 2; |
| 188 | 178 | break; |
| 179 | case 0x422c: | |
| 180 | xsize = 4; | |
| 181 | ysize = 2; | |
| 182 | break; | |
| 189 | 183 | case 0x422e: |
| 190 | 184 | xsize = 2; |
| 191 | 185 | ysize = 2; |
| r6892 | r6893 | |
| 203 | 197 | ysize = 3; |
| 204 | 198 | break; |
| 205 | 199 | case 0x4628: |
| 206 | xsize = 2; | |
| 200 | xsize = 2 * (supracan_vram[i+1] & 7); | |
| 207 | 201 | ysize = 4; |
| 208 | 202 | break; |
| 209 | 203 | case 0x462a: |
| 210 | 204 | xsize = 4; |
| 211 | 205 | ysize = 4; |
| 212 | 206 | break; |
| 207 | case 0x462c: | |
| 208 | xsize = 2; | |
| 209 | ysize = 4; | |
| 210 | break; | |
| 213 | 211 | case 0x482a: |
| 214 | 212 | xsize = 4; |
| 215 | 213 | ysize = 5; |
| r6892 | r6893 | |
| 298 | 296 | // printf("%08x %08x %02x %04x\n",acan_dma_regs.source,acan_dma_regs.dest,acan_dma_regs.count + 1,data); |
| 299 | 297 | if(data & 0x8800) |
| 300 | 298 | { |
| 299 | if(data != 0x9800 && data != 0x8800) | |
| 300 | { | |
| 301 | fatalerror("%04x",data); | |
| 302 | } | |
| 301 | 303 | verboselog(space->machine, 0, "supracan_dma_w: Kicking off a DMA from %08x to %08x, %d bytes (%04x)\n", acan_dma_regs.source, acan_dma_regs.dest, acan_dma_regs.count + 1, data); |
| 302 | 304 | for(i = 0; i <= acan_dma_regs.count; i++) |
| 303 | 305 | { |
| r6892 | r6893 | |
| 318 | 320 | else |
| 319 | 321 | { |
| 320 | 322 | verboselog(space->machine, 0, "supracan_dma_w: Unknown DMA kickoff value of %04x (other regs %08x, %08x, %d)\n", data, acan_dma_regs.source, acan_dma_regs.dest, acan_dma_regs.count + 1); |
| 323 | fatalerror("supracan_dma_w: Unknown DMA kickoff value of %04x (other regs %08x, %08x, %d)",data, acan_dma_regs.source, acan_dma_regs.dest, acan_dma_regs.count + 1); | |
| 321 | 324 | } |
| 322 | 325 | break; |
| 323 | 326 | } |
| r6892 | r6893 | |
| 519 | 522 | break; |
| 520 | 523 | case 0x1e/2: |
| 521 | 524 | //printf("%08x %08x %04x %04x\n",acan_sprdma_regs.src,acan_sprdma_regs.dst,acan_sprdma_regs.count,data); |
| 525 | 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); | |
| 522 | 526 | if(data & 0xa000) //0x2000 selects dword transfer? |
| 523 | 527 | { |
| 524 | 528 | for(i = 0; i <= acan_sprdma_regs.count; i++) |
| 525 | 529 | { |
| 526 | 530 | if(data & 0x0100) //dma 0x00 fill (or fixed value?) |
| 527 | 531 | { |
| 528 | memory_write_dword(space, acan_sprdma_regs.dst, 0); | |
| 529 | acan_sprdma_regs.dst+=4; | |
| 532 | memory_write_word(space, acan_sprdma_regs.dst, 0); | |
| 533 | acan_sprdma_regs.dst+=2; | |
| 530 | 534 | } |
| 531 | 535 | else |
| 532 | 536 | { |
| 533 | memory_write_dword(space, acan_sprdma_regs.dst, memory_read_dword(space, acan_sprdma_regs.src)); | |
| 534 | acan_sprdma_regs.dst+=4; | |
| 535 | acan_sprdma_regs.src+=4; | |
| 537 | memory_write_word(space, acan_sprdma_regs.dst, memory_read_word(space, acan_sprdma_regs.src)); | |
| 538 | acan_sprdma_regs.dst+=2; | |
| 539 | acan_sprdma_regs.src+=2; | |
| 536 | 540 | } |
| 537 | 541 | } |
| 538 | 542 | } |
| r6892 | r6893 | |
| 649 | 653 | |
| 650 | 654 | |
| 651 | 655 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 652 | CONS( 1995, supracan, 0, 0, supracan, supracan, 0, "Funtech Entertainment", "Super A'Can", GAME_NO | |
| 656 | CONS( 1995, supracan, 0, 0, supracan, supracan, 0, "Funtech Entertainment", "Super A'Can", GAME_NO | |
| 653 | 657 | |
| 654 | 658 |
| Previous | 15994 Revisions | Next |