src/mess/drivers/supracan.c
| r6870 | r6871 | |
| 75 | 75 | |
| 76 | 76 | count = 0; |
| 77 | 77 | |
| 78 | | for (y=0;y<32;y++) |
| 78 | for (y=0;y<64;y++) |
| 79 | 79 | { |
| 80 | | for (x=0;x<32;x += 4) |
| 80 | for (x=0;x<32;x += 8) |
| 81 | 81 | { |
| 82 | | *BITMAP_ADDR16(bitmap, y, 128+x+0) = (supracan_rram[count] >> 12) & 0x000f; |
| 83 | | *BITMAP_ADDR16(bitmap, y, 128+x+1) = (supracan_rram[count] >> 8) & 0x000f; |
| 84 | | *BITMAP_ADDR16(bitmap, y, 128+x+2) = (supracan_rram[count] >> 4) & 0x000f; |
| 85 | | *BITMAP_ADDR16(bitmap, y, 128+x+3) = (supracan_rram[count] >> 0) & 0x000f; |
| 82 | static UINT16 dot_data; |
| 83 | |
| 84 | /* FIXME: likely to be clutted */ |
| 85 | dot_data = supracan_rram[count] ^ 0xffff; |
| 86 | |
| 87 | *BITMAP_ADDR16(bitmap, y, 128+x+0) = ((dot_data >> 14) & 0x0003) + 0x20; |
| 88 | *BITMAP_ADDR16(bitmap, y, 128+x+1) = ((dot_data >> 12) & 0x0003) + 0x20; |
| 89 | *BITMAP_ADDR16(bitmap, y, 128+x+2) = ((dot_data >> 10) & 0x0003) + 0x20; |
| 90 | *BITMAP_ADDR16(bitmap, y, 128+x+3) = ((dot_data >> 8) & 0x0003) + 0x20; |
| 91 | *BITMAP_ADDR16(bitmap, y, 128+x+4) = ((dot_data >> 6) & 0x0003) + 0x20; |
| 92 | *BITMAP_ADDR16(bitmap, y, 128+x+5) = ((dot_data >> 4) & 0x0003) + 0x20; |
| 93 | *BITMAP_ADDR16(bitmap, y, 128+x+6) = ((dot_data >> 2) & 0x0003) + 0x20; |
| 94 | *BITMAP_ADDR16(bitmap, y, 128+x+7) = ((dot_data >> 0) & 0x0003) + 0x20; |
| 86 | 95 | count++; |
| 87 | 96 | } |
| 88 | 97 | } |
| r6870 | r6871 | |
| 139 | 148 | acan_dma_regs.count = data; |
| 140 | 149 | break; |
| 141 | 150 | case 0x0a/2: // Control |
| 151 | //if(acan_dma_regs.dest != 0xf00200) |
| 152 | // printf("%08x %08x %02x %04x\n",acan_dma_regs.source,acan_dma_regs.dest,acan_dma_regs.count + 1,data); |
| 142 | 153 | if(data & 0x8800) |
| 143 | 154 | { |
| 144 | 155 | verboselog(space->machine, 0, "supracan_dma_w: Kicking off a DMA from %08x to %08x, %d bytes\n", acan_dma_regs.source, acan_dma_regs.dest, acan_dma_regs.count + 1); |
| 145 | | //if(acan_dma_regs.dest != 0xf00200) |
| 146 | | // printf("%08x %08x %02x %04x\n",acan_dma_regs.source,acan_dma_regs.dest,acan_dma_regs.count + 1,data); |
| 147 | 156 | for(i = 0; i <= acan_dma_regs.count; i++) |
| 148 | 157 | { |
| 149 | 158 | if(data & 0x1000) |
| r6870 | r6871 | |
| 178 | 187 | AM_RANGE( 0x000000, 0x07ffff ) AM_ROM AM_REGION( "cart", 0 ) |
| 179 | 188 | AM_RANGE( 0xe80204, 0xe80205 ) AM_READ( supracan_unk1_r ) |
| 180 | 189 | AM_RANGE( 0xe80300, 0xe80301 ) AM_READ( supracan_unk1_r ) |
| 181 | | AM_RANGE( 0xe88400, 0xe88bff ) AM_RAM /* Unknown, some data gets copied here during boot */ |
| 182 | | AM_RANGE( 0xe88c00, 0xe8efff ) AM_RAM_WRITE( supracan_sprchar_w ) AM_BASE( &supracan_sprcharram ) /* Unknown DMA target, likely gfx-related */ |
| 190 | AM_RANGE( 0xe88400, 0xe8efff ) AM_RAM /* sample table + sample data */ |
| 183 | 191 | AM_RANGE( 0xe8f000, 0xe8ffff ) AM_RAM_WRITE( supracan_soundram_w ) AM_BASE( &supracan_soundram_16 ) |
| 184 | 192 | AM_RANGE( 0xe90000, 0xe9001f ) AM_WRITE( supracan_sound_w ) |
| 185 | 193 | AM_RANGE( 0xe90020, 0xe9002b ) AM_WRITE( supracan_dma_w ) |
| r6870 | r6871 | |
| 190 | 198 | AM_RANGE( 0xf44200, 0xf443ff ) AM_RAM AM_BASE(&supracan_vram) /* Foreground tilemap layer */ |
| 191 | 199 | AM_RANGE( 0xf44400, 0xf445ff ) AM_RAM AM_BASE(&supracan_rram) /* ROZ layer tiles */ |
| 192 | 200 | AM_RANGE( 0xf44600, 0xf44fff ) AM_RAM /* Unknown, stuff gets written here. Zoom table?? */ |
| 193 | | AM_RANGE( 0xfc0000, 0xfcffff ) AM_RAM /* System work ram */ |
| 201 | AM_RANGE( 0xfc0000, 0xfcffff ) AM_RAM_WRITE( supracan_sprchar_w ) AM_BASE( &supracan_sprcharram ) /* System work ram */ |
| 194 | 202 | AM_RANGE( 0xff8000, 0xffffff ) AM_RAM /* System work ram */ |
| 195 | 203 | ADDRESS_MAP_END |
| 196 | 204 | |
| r6870 | r6871 | |
| 210 | 218 | gfx[offset*2+0] = (supracan_charram[offset] & 0xff00) >> 8; |
| 211 | 219 | gfx[offset*2+1] = (supracan_charram[offset] & 0x00ff) >> 0; |
| 212 | 220 | |
| 213 | | gfx_element_mark_dirty(space->machine->gfx[0], offset/32); |
| 221 | gfx_element_mark_dirty(space->machine->gfx[0], offset/16); |
| 214 | 222 | } |
| 215 | 223 | } |
| 216 | 224 | |
| r6870 | r6871 | |
| 370 | 378 | 8*8*8 |
| 371 | 379 | }; |
| 372 | 380 | |
| 381 | static const gfx_layout supracan_sprlayout = |
| 382 | { |
| 383 | 8,8, |
| 384 | RGN_FRAC(1,1), |
| 385 | 4, |
| 386 | { 0,1,2,3 }, |
| 387 | { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 }, |
| 388 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, |
| 389 | 8*32 |
| 390 | }; |
| 373 | 391 | |
| 374 | 392 | static GFXDECODE_START( supracan ) |
| 375 | 393 | GFXDECODE_ENTRY( "ram_gfx", 0, supracan_gfxlayout, 0, 1 ) |
| 376 | | GFXDECODE_ENTRY( "spr_gfx", 0, supracan_gfxlayout, 0, 2 ) |
| 394 | GFXDECODE_ENTRY( "spr_gfx", 0, supracan_sprlayout, 0, 2 ) |
| 377 | 395 | GFXDECODE_END |
| 378 | 396 | |
| 379 | 397 | static MACHINE_DRIVER_START( supracan ) |