src/mess/drivers/supracan.c
| r7144 | r7145 | |
| 117 | 117 | { |
| 118 | 118 | case 7: region = 2; tile_bank = 0x1c00; break; |
| 119 | 119 | case 4: region = 0; tile_bank = 0x400; break; |
| 120 | case 2: region = 1; tile_bank = 0x400; break; |
| 120 | 121 | case 0: region = 1; tile_bank = 0; break; |
| 121 | 122 | default: region = 1; tile_bank = 0; break; |
| 122 | 123 | } |
| r7144 | r7145 | |
| 148 | 149 | /* 0x0402 Boom Zoo */ |
| 149 | 150 | /* 0x2603 / 0x6623 Super Dragon Force */ |
| 150 | 151 | /* 0x4020 BIOS logo */ |
| 151 | | /* 0x06*/ |
| 152 | /* */ |
| 152 | 153 | static void draw_roz(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) |
| 153 | 154 | { |
| 154 | 155 | UINT32 count; |
| r7144 | r7145 | |
| 169 | 170 | |
| 170 | 171 | size = roz_mode & 0x200 ? 64 : 32; |
| 171 | 172 | |
| 172 | | count = (roz_base_addr); |
| 173 | count = (0); |
| 173 | 174 | scrollx = (roz_scrollx >> 8) & 0x1ff; |
| 174 | 175 | scrolly = (roz_scrolly >> 8) & 0x1ff; |
| 175 | 176 | |
| r7144 | r7145 | |
| 180 | 181 | for (x=0;x<size;x++) |
| 181 | 182 | { |
| 182 | 183 | 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; |
| 187 | 188 | |
| 188 | 189 | drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx,(y*8)-scrolly,0); |
| 189 | 190 | drawgfx_transpen(bitmap,cliprect,machine->gfx[region],tile,pal,flipx,flipy,(x*8)-scrollx+size*8,(y*8)-scrolly,0); |
| r7144 | r7145 | |
| 757 | 758 | acan_sprdma_regs.count = data; |
| 758 | 759 | break; |
| 759 | 760 | 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); |
| 761 | 762 | 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); |
| 762 | 763 | |
| 763 | 764 | /* TODO: what's 0x2000 and 0x4000 for? */ |
| 764 | 765 | if(data & 0x8000) |
| 765 | 766 | { |
| 767 | if(data & 0x2000 || data & 0x4000) |
| 768 | acan_sprdma_regs.dst |= 0xf40000; |
| 769 | |
| 766 | 770 | for(i = 0; i <= acan_sprdma_regs.count; i++) |
| 767 | 771 | { |
| 768 | 772 | if(data & 0x0100) //dma 0x00 fill (or fixed value?) |