diff options
author | 2010-07-05 23:52:39 +0000 | |
---|---|---|
committer | 2010-07-05 23:52:39 +0000 | |
commit | 995097894f775112942bbe13549c9ef8ab6ef3e4 (patch) | |
tree | 662056bf6c99d01f40b77e822f51bf5ebb555b93 | |
parent | b0a74c9e0f375d6d13221b68d4f73ad897dd3442 (diff) |
Hooked up second layer, no whatsnew
-rw-r--r-- | src/mame/drivers/cb2001.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c index 55b9462f20d..92ed5d3206d 100644 --- a/src/mame/drivers/cb2001.c +++ b/src/mame/drivers/cb2001.c @@ -329,7 +329,8 @@ e328e 18 c0 xor al,al 70 ret */ -static UINT16 *cb2001_vram; +static UINT16 *cb2001_vram_fg; +static UINT16* cb2001_vram_bg; static int cb2001_videobank; static VIDEO_START(cb2001) @@ -350,11 +351,31 @@ static VIDEO_UPDATE(cb2001) int tile; int colour; - tile = (cb2001_vram[count] & 0x0fff); - colour = (cb2001_vram[count] & 0xf000)>>12; + tile = (cb2001_vram_bg[count] & 0x0fff); + colour = (cb2001_vram_bg[count] & 0xf000)>>12; tile += cb2001_videobank*0x2000; drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,colour,0,0,x*8,y*8); + + count++; + } + } + + + count = 0x0000; + + for (y=0;y<32;y++) + { + for (x=0;x<64;x++) + { + int tile; + int colour; + + tile = (cb2001_vram_fg[count] & 0x0fff); + colour = (cb2001_vram_fg[count] & 0xf000)>>12; + tile += cb2001_videobank*0x2000; + + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],tile,colour,0,0,x*8,y*8, 0); count++; } } @@ -388,7 +409,8 @@ WRITE16_HANDLER( cb2001_vidctrl2_w ) static ADDRESS_MAP_START( cb2001_map, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0x00000, 0x1ffff) AM_RAM - AM_RANGE(0x20000, 0x21fff) AM_RAM AM_BASE(&cb2001_vram) + AM_RANGE(0x20000, 0x20fff) AM_RAM AM_BASE(&cb2001_vram_fg) + AM_RANGE(0x21000, 0x21fff) AM_RAM AM_BASE(&cb2001_vram_bg) AM_RANGE(0xc0000, 0xfffff) AM_ROM AM_REGION("boot_prg",0) ADDRESS_MAP_END |