trunk/src/mame/drivers/gunpey.c
| r21511 | r21512 | |
| 321 | 321 | int xsource = ((val & 0x000000ff) << 4) | ((val & 0xf0000000) >> 28); |
| 322 | 322 | int ysource = ((val & 0x0000f000) >> 10); |
| 323 | 323 | |
| 324 | xsource<<=1; |
| 324 | 325 | |
| 325 | | |
| 326 | 326 | #ifdef USE_FAKE_ROM |
| 327 | 327 | if (letter != -1) |
| 328 | 328 | drawgfx_opaque(bitmap,cliprect,machine().gfx[1],letter,1,0,0,x,y); |
| r21511 | r21512 | |
| 334 | 334 | { |
| 335 | 335 | for(int xi=0;xi<width/2;xi++) |
| 336 | 336 | { |
| 337 | | UINT8 data = vram[((((ysource+yi)&0x7ff)*0x400) + ((xsource+xi)&0x3ff))]; |
| 337 | UINT8 data = vram[((((ysource+yi)&0x7ff)*0x800) + ((xsource+xi)&0x7ff))]; |
| 338 | 338 | |
| 339 | 339 | UINT8 pix; |
| 340 | 340 | |
| r21511 | r21512 | |
| 472 | 472 | //if (srcx & 0xf800) printf("(error srcx &0xf800)"); |
| 473 | 473 | //if (srcy & 0xf800) printf("(error srcy &0xf800)"); |
| 474 | 474 | |
| 475 | // these are definitely needed for 4bpp.. |
| 476 | dstx<<=1; |
| 477 | xsize<<=1; |
| 475 | 478 | |
| 476 | 479 | for (int y=0;y<ysize;y++) |
| 477 | 480 | { |
| 478 | 481 | for (int x=0;x<xsize;x++) |
| 479 | 482 | { |
| 480 | | vram[(((dsty+y)&0x3ff)*0x400)+((dstx+x)&0x3ff)] = blit_rom[(((srcy+y)&0x7ff)*0x800)+((srcx+x)&0x7ff)]; |
| 483 | vram[(((dsty+y)&0x3ff)*0x800)+((dstx+x)&0x7ff)] = blit_rom[(((srcy+y)&0x7ff)*0x800)+((srcx+x)&0x7ff)]; |
| 481 | 484 | } |
| 482 | 485 | } |
| 483 | 486 | |
| r21511 | r21512 | |
| 689 | 692 | // this isn't a real decode as such, but the graphic data is all stored in pages 2048 bytes wide at varying BPP levelsl, some (BG data) compressed with what is likely a lossy scheme |
| 690 | 693 | // palette data is in here too, the blocks at the bottom right of all this? |
| 691 | 694 | static GFXLAYOUT_RAW( gunpey, 2048, 1, 2048*8, 2048*8 ) |
| 692 | | static GFXLAYOUT_RAW( gunpey1024, 1024, 1, 1024*8, 1024*8 ) |
| 695 | //static GFXLAYOUT_RAW( gunpey1024, 1024, 1, 1024*8, 1024*8 ) |
| 693 | 696 | |
| 694 | 697 | static GFXDECODE_START( gunpey ) |
| 695 | 698 | GFXDECODE_ENTRY( "blit_data", 0, gunpey, 0x0000, 0x1 ) |
| 696 | 699 | GFXDECODE_ENTRY( "fakerom", 0x18000, fake_layout, 0x0, 2 ) |
| 697 | | GFXDECODE_ENTRY( "vram", 0, gunpey1024, 0x0000, 0x1 ) |
| 700 | //GFXDECODE_ENTRY( "vram", 0, gunpey1024, 0x0000, 0x1 ) |
| 701 | GFXDECODE_ENTRY( "vram", 0, gunpey, 0x0000, 0x1 ) |
| 698 | 702 | |
| 699 | 703 | GFXDECODE_END |
| 700 | 704 | |