mirror of
https://github.com/holub/mame
synced 2025-06-07 21:33:45 +03:00
- Removed colortable
- Renamed some sets in cclimber: Crazy Kong -> Crazy Kong Part II rpatrolo -> rpatrol
This commit is contained in:
parent
aa16ee779d
commit
3f37fbeef2
@ -212,12 +212,12 @@ static WRITE8_HANDLER( custom_cocktail_w )
|
||||
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_WRITE(arabian_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0xc000, 0xc000) AM_READ(input_port_0_r)
|
||||
AM_RANGE(0xc200, 0xc200) AM_READ(input_port_1_r)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_WRITE(arabian_videoram_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x01ff) AM_READ(input_port_0_r)
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x01ff) AM_READ(input_port_1_r)
|
||||
AM_RANGE(0xd000, 0xd7ef) AM_RAM AM_BASE(&custom_cpu_ram)
|
||||
AM_RANGE(0xd7f0, 0xd7ff) AM_READWRITE(custom_cpu_r, MWA8_RAM)
|
||||
AM_RANGE(0xe000, 0xe07f) AM_WRITE(arabian_blitter_w) AM_BASE(&spriteram)
|
||||
AM_RANGE(0xe000, 0xe007) AM_MIRROR(0x0ff8) AM_WRITE(arabian_blitter_w) AM_BASE(&arabian_blitter)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -229,8 +229,8 @@ ADDRESS_MAP_END
|
||||
*************************************/
|
||||
|
||||
static ADDRESS_MAP_START( main_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
AM_RANGE(0xc800, 0xc800) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0xca00, 0xca00) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0xc800, 0xc800) AM_MIRROR(0x01ff) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0xca00, 0xca00) AM_MIRROR(0x01ff) AM_WRITE(AY8910_write_port_0_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -363,8 +363,7 @@ static MACHINE_DRIVER_START( arabian )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(256, 256)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0, 255, 11, 244)
|
||||
MDRV_PALETTE_LENGTH(64)
|
||||
MDRV_COLORTABLE_LENGTH(256*32)
|
||||
MDRV_PALETTE_LENGTH(256*32)
|
||||
|
||||
MDRV_PALETTE_INIT(arabian)
|
||||
MDRV_VIDEO_START(arabian)
|
||||
|
@ -2996,7 +2996,6 @@ static MACHINE_DRIVER_START( scorpion2_vid )
|
||||
MDRV_VIDEO_UPDATE(addersc2)
|
||||
|
||||
MDRV_PALETTE_LENGTH(16)
|
||||
MDRV_COLORTABLE_LENGTH(16)
|
||||
MDRV_PALETTE_INIT(adder2)
|
||||
MDRV_GFXDECODE(adder2)
|
||||
|
||||
|
@ -204,7 +204,6 @@ static MACHINE_DRIVER_START( carjmbre )
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(carjmbre)
|
||||
MDRV_PALETTE_LENGTH(64)
|
||||
MDRV_COLORTABLE_LENGTH(64)
|
||||
|
||||
MDRV_PALETTE_INIT(carjmbre)
|
||||
MDRV_VIDEO_START(carjmbre)
|
||||
|
@ -184,7 +184,7 @@ static ADDRESS_MAP_START( cclimber_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x6bff) AM_RAM /* Crazy Kong only */
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM
|
||||
AM_RANGE(0x8800, 0x88ff) AM_READWRITE(MRA8_RAM, cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8800, 0x88ff) AM_RAM AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8900, 0x8bff) AM_RAM /* not used, but initialized */
|
||||
AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
|
||||
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
|
||||
@ -211,7 +211,7 @@ static ADDRESS_MAP_START( cannonb_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x6000, 0x6bff) AM_RAM /* Crazy Kong only, Cannon Ball also */
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM
|
||||
AM_RANGE(0x8800, 0x8800) AM_READNOP /* must not return what's written (game will reset after coin insert if it returns 0xff)*/
|
||||
AM_RANGE(0x8800, 0x88ff) AM_READWRITE(MRA8_RAM, cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8800, 0x88ff) AM_RAM AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
//AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */
|
||||
AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
|
||||
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
|
||||
@ -233,7 +233,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( swimmer_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM
|
||||
AM_RANGE(0x8800, 0x88ff) AM_MIRROR(0x0100) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8800, 0x88ff) AM_MIRROR(0x0100) AM_RAM AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size)
|
||||
AM_RANGE(0x9800, 0x981f) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_column_scroll)
|
||||
AM_RANGE(0x9880, 0x989f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
@ -242,11 +242,11 @@ static ADDRESS_MAP_START( swimmer_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xa000, 0xa000) AM_READWRITE(input_port_0_r, interrupt_enable_w)
|
||||
AM_RANGE(0xa001, 0xa001) AM_WRITE(flip_screen_x_w)
|
||||
AM_RANGE(0xa002, 0xa002) AM_WRITE(flip_screen_y_w)
|
||||
AM_RANGE(0xa003, 0xa003) AM_WRITE(swimmer_sidepanel_enable_w)
|
||||
AM_RANGE(0xa004, 0xa004) AM_WRITE(swimmer_palettebank_w)
|
||||
AM_RANGE(0xa003, 0xa003) AM_WRITE(MWA8_RAM) AM_BASE(&swimmer_sidepanel_enabled)
|
||||
AM_RANGE(0xa004, 0xa004) AM_WRITE(MWA8_RAM) AM_BASE(&swimmer_palettebank)
|
||||
AM_RANGE(0xa800, 0xa800) AM_READWRITE(input_port_1_r, swimmer_sh_soundlatch_w)
|
||||
AM_RANGE(0xb000, 0xb000) AM_READ(input_port_2_r)
|
||||
AM_RANGE(0xb800, 0xb800) AM_READWRITE(input_port_3_r, swimmer_bgcolor_w) /* river color in Swimmer */
|
||||
AM_RANGE(0xb800, 0xb800) AM_READWRITE(input_port_3_r, MWA8_RAM) AM_BASE(&swimmer_bgcolor)
|
||||
AM_RANGE(0xb880, 0xb880) AM_READ(input_port_4_r)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM /* ??? used by Guzzler */
|
||||
AM_RANGE(0xe000, 0xffff) AM_ROM /* Guzzler only */
|
||||
@ -504,7 +504,7 @@ static INPUT_PORTS_START( ckongb )
|
||||
CKONGIN2
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( rpatrolb )
|
||||
static INPUT_PORTS_START( rpatrol )
|
||||
PORT_START_TAG("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x3e, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
@ -798,8 +798,7 @@ static MACHINE_DRIVER_START( cclimber )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(cclimber)
|
||||
MDRV_PALETTE_LENGTH(96)
|
||||
MDRV_COLORTABLE_LENGTH(16*4+8*4)
|
||||
MDRV_PALETTE_LENGTH(16*4+8*4)
|
||||
|
||||
MDRV_PALETTE_INIT(cclimber)
|
||||
MDRV_VIDEO_START(generic)
|
||||
@ -852,8 +851,7 @@ static MACHINE_DRIVER_START( swimmer )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(swimmer)
|
||||
MDRV_PALETTE_LENGTH(256+32+2)
|
||||
MDRV_COLORTABLE_LENGTH(64*8+4*8)
|
||||
MDRV_PALETTE_LENGTH(64*8+4*8)
|
||||
|
||||
MDRV_PALETTE_INIT(swimmer)
|
||||
MDRV_VIDEO_START(generic)
|
||||
@ -1310,7 +1308,7 @@ ROM_END
|
||||
I think the board was a half-converted board as 'Water Gage' and 'Bon Voyage' don't really fit the theme
|
||||
of Silver Land so I'm loading the River Patrol GFX instead as they fit better
|
||||
*/
|
||||
ROM_START( rpatrolo )
|
||||
ROM_START( rpatrol )
|
||||
ROM_REGION( 0x10000, REGION_CPU1, 0 )
|
||||
ROM_LOAD( "sci1.bin", 0x0000, 0x1000, CRC(33b01c90) SHA1(9c8da6dd963bfb0544ef99b8fdedcf86c32cdb6b) )
|
||||
ROM_LOAD( "sci2.bin", 0x1000, 0x1000, CRC(03f53340) SHA1(35336945f4b634fc4c7791ac9c9e6643c8cd8006) )
|
||||
@ -1550,18 +1548,18 @@ GAME( 1980, cclimber, 0, cclimber, cclimber, cclimber, ROT0, "Nichibuts
|
||||
GAME( 1980, cclimbrj, cclimber, cclimber, cclimbrj, cclimbrj, ROT0, "Nichibutsu", "Crazy Climber (Japan)", 0 )
|
||||
GAME( 1980, ccboot, cclimber, cclimber, cclimber, cclimbrj, ROT0, "bootleg", "Crazy Climber (bootleg set 1)", 0 )
|
||||
GAME( 1980, ccboot2, cclimber, cclimber, cclimber, cclimbrj, ROT0, "bootleg", "Crazy Climber (bootleg set 2)", 0 )
|
||||
GAME( 1981, ckong, 0, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong (set 1)", 0 )
|
||||
GAME( 1981, ckonga, ckong, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong (set 2)", 0 )
|
||||
GAME( 1981, ckongjeu, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Crazy Kong (Jeutel bootleg)", 0 )
|
||||
GAME( 1981, ckong, 0, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong Part II (set 1)", 0 )
|
||||
GAME( 1981, ckonga, ckong, cclimber, ckong, 0, ROT270, "Falcon", "Crazy Kong Part II (set 2)", 0 )
|
||||
GAME( 1981, ckongjeu, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Crazy Kong Part II (Jeutel bootleg)", 0 )
|
||||
GAME( 1981, ckongo, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Crazy Kong (Orca bootleg)", 0 )
|
||||
GAME( 1981, ckongalc, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Crazy Kong (Alca bootleg)", 0 )
|
||||
GAME( 198?, bigkong, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Big Kong", 0 )
|
||||
GAME( 1981, monkeyd, ckong, cclimber, ckong, 0, ROT270, "bootleg", "Monkey Donkey", 0 )
|
||||
GAME( 198?, ckongb, ckong, cclimber, ckongb, ckongb, ROT270, "bootleg", "Crazy Kong (Alternative levels)", 0 )
|
||||
GAME( 198?, ckongb, ckong, cclimber, ckongb, ckongb, ROT270, "bootleg", "Crazy Kong Part II (alternative levels)", 0 )
|
||||
|
||||
GAME( 1981, rpatrolb, 0, cclimber, rpatrolb, 0, ROT0, "bootleg", "River Patrol (bootleg)", 0 )
|
||||
GAME( 1981, rpatrolo, rpatrolb, cclimber, rpatrolb, 0, ROT0, "Orca", "River Patrol (Orca)", 0 )
|
||||
GAME( 1981, silvland, rpatrolb, cclimber, rpatrolb, 0, ROT0, "Falcon", "Silver Land", 0 )
|
||||
GAME( 1981, rpatrol, 0, cclimber, rpatrol, 0, ROT0, "Orca", "River Patrol (Orca)", 0 )
|
||||
GAME( 1981, rpatrolb, rpatrol, cclimber, rpatrol, 0, ROT0, "bootleg", "River Patrol (bootleg)", 0 )
|
||||
GAME( 1981, silvland, rpatrol, cclimber, rpatrol, 0, ROT0, "Falcon", "Silver Land", 0 )
|
||||
|
||||
GAME( 1985, cannonb, cannonbp, cannonb, cannonb, cannonb, ROT90, "Soft", "Cannon Ball (bootleg on Crazy Climber hardware, set 1)" , GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1985, cannonb2, cannonbp, cannonb, cannonb, cannonb2, ROT90, "TV Game Gruenberg", "Cannon Ball (bootleg on Crazy Climber hardware, set 2)", 0 )
|
||||
|
@ -75,7 +75,8 @@ static PALETTE_INIT( yamato )
|
||||
/* chars - 12 bits RGB */
|
||||
for (i = 0; i < 0x40; i++)
|
||||
{
|
||||
int bit0, bit1, bit2, bit3, r, g, b;
|
||||
int bit0, bit1, bit2, bit3;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = (color_prom[i + 0x00] >> 0) & 0x01;
|
||||
@ -104,7 +105,8 @@ static PALETTE_INIT( yamato )
|
||||
/* big sprite - 8 bits RGB */
|
||||
for (i = 0; i < 0x20; i++)
|
||||
{
|
||||
int bit0, bit1, bit2, r, g, b;
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = (color_prom[i + 0x80] >> 0) & 0x01;
|
||||
@ -136,35 +138,30 @@ static PALETTE_INIT( toprollr )
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0;i < 32*5;i++)
|
||||
for (i = 0; i < 32*5; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
|
||||
int bit0,bit1,bit2;
|
||||
int r,g,b;
|
||||
|
||||
/* red component */
|
||||
bit0 = (color_prom[0] >> 0) & 0x01;
|
||||
bit1 = (color_prom[0] >> 1) & 0x01;
|
||||
bit2 = (color_prom[0] >> 2) & 0x01;
|
||||
|
||||
|
||||
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[0] >> 3) & 0x01;
|
||||
bit1 = (color_prom[0] >> 4) & 0x01;
|
||||
bit2 = (color_prom[0] >> 5) & 0x01;
|
||||
|
||||
g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[0] >> 6) & 0x01;
|
||||
bit2 = (color_prom[0] >> 7) & 0x01;
|
||||
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
palette_set_color(machine, i, MAKE_RGB(r, g, b));
|
||||
color_prom++;
|
||||
}
|
||||
|
||||
@ -220,7 +217,7 @@ static ADDRESS_MAP_START( yamato_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_WRITE(MWA8_RAM)
|
||||
AM_RANGE(0x7000, 0x7fff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8800, 0x88ff) AM_WRITE(MWA8_RAM) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8900, 0x8bff) AM_WRITE(MWA8_RAM) /* not used, but initialized */
|
||||
AM_RANGE(0x9000, 0x93ff) AM_WRITE(MWA8_RAM) AM_BASE(&videoram) AM_SIZE(&videoram_size)
|
||||
//AM_RANGE(0x9400, 0x97ff) AM_WRITE(MWA8_RAM) /* mirror address, used by Crazy Climber to draw windows */
|
||||
@ -283,10 +280,10 @@ static WRITE8_HANDLER(rombank_w)
|
||||
}
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( trmem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
static ADDRESS_MAP_START( toprollr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_READ(MRA8_BANK1)
|
||||
AM_RANGE(0x6000, 0x6bff) AM_RAM
|
||||
AM_RANGE(0x8800, 0x88ff) AM_WRITE(cclimber_bigsprite_videoram_w) AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8800, 0x88ff) AM_RAM AM_BASE(&cclimber_bsvideoram) AM_SIZE(&cclimber_bsvideoram_size)
|
||||
AM_RANGE(0x8c00, 0x8fff) AM_RAM AM_BASE(&toprollr_videoram3)
|
||||
AM_RANGE(0x9000, 0x93ff) AM_RAM AM_BASE(&videoram)
|
||||
AM_RANGE(0x9400, 0x97ff) AM_RAM AM_BASE(&toprollr_videoram4)
|
||||
@ -306,7 +303,7 @@ static ADDRESS_MAP_START( trmem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( trport_map, ADDRESS_SPACE_IO, 8 )
|
||||
static ADDRESS_MAP_START( toprollr_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x08, 0x08) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0x09, 0x09) AM_WRITE(AY8910_write_port_0_w)
|
||||
@ -466,7 +463,7 @@ static const gfx_layout spritelayout =
|
||||
};
|
||||
|
||||
|
||||
static const gfx_layout trcharlayout =
|
||||
static const gfx_layout toprollr_charlayout =
|
||||
{
|
||||
8,8,
|
||||
RGN_FRAC(1,2),
|
||||
@ -477,7 +474,7 @@ static const gfx_layout trcharlayout =
|
||||
8*8
|
||||
};
|
||||
|
||||
static const gfx_layout trspritelayout =
|
||||
static const gfx_layout toprollr_spritelayout =
|
||||
{
|
||||
16,16, /* 16*16 sprites */
|
||||
RGN_FRAC(1,2), /* 128 sprites (64 in Crazy Climber) */
|
||||
@ -499,11 +496,11 @@ static GFXDECODE_START( yamato )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0x2000, spritelayout, 0, 16 ) /* sprite set #2 */
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( tr )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0x0000, trcharlayout, 0, 40 )
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0x0000, trcharlayout, 0, 40 )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0x0000, trspritelayout, 0, 40 )
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0x0000, trcharlayout, 0, 40 )
|
||||
static GFXDECODE_START( toprollr )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0x0000, toprollr_charlayout, 0, 40 )
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0x0000, toprollr_charlayout, 0, 40 )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0x0000, toprollr_spritelayout, 0, 40 )
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0x0000, toprollr_charlayout, 0, 40 )
|
||||
GFXDECODE_END
|
||||
|
||||
static MACHINE_DRIVER_START( yamato )
|
||||
@ -548,8 +545,8 @@ static MACHINE_DRIVER_START( toprollr )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD(Z80, 3072000)
|
||||
MDRV_CPU_PROGRAM_MAP(trmem_map,0)
|
||||
MDRV_CPU_IO_MAP(trport_map,0)
|
||||
MDRV_CPU_PROGRAM_MAP(toprollr_map,0)
|
||||
MDRV_CPU_IO_MAP(toprollr_io_map,0)
|
||||
MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
|
||||
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
@ -561,7 +558,7 @@ static MACHINE_DRIVER_START( toprollr )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(tr)
|
||||
MDRV_GFXDECODE(toprollr)
|
||||
MDRV_PALETTE_LENGTH(32*5)
|
||||
MDRV_PALETTE_INIT(toprollr)
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
/*----------- defined in video/arabian.c -----------*/
|
||||
|
||||
extern UINT8 *arabian_blitter;
|
||||
extern UINT8 arabian_video_control;
|
||||
extern UINT8 arabian_flip_screen;
|
||||
|
||||
|
@ -14,12 +14,15 @@ extern size_t cclimber_bsvideoram_size;
|
||||
extern UINT8 *cclimber_bigspriteram;
|
||||
extern UINT8 *cclimber_column_scroll;
|
||||
|
||||
extern UINT8 *swimmer_bgcolor;
|
||||
extern UINT8 *swimmer_sidepanel_enabled;
|
||||
extern UINT8 *swimmer_palettebank;
|
||||
|
||||
extern UINT8 *toprollr_videoram2;
|
||||
extern UINT8 *toprollr_videoram3;
|
||||
extern UINT8 *toprollr_videoram4;
|
||||
|
||||
WRITE8_HANDLER( cclimber_colorram_w );
|
||||
WRITE8_HANDLER( cclimber_bigsprite_videoram_w );
|
||||
PALETTE_INIT( cclimber );
|
||||
VIDEO_UPDATE( cclimber );
|
||||
|
||||
@ -29,11 +32,8 @@ VIDEO_UPDATE( yamato );
|
||||
VIDEO_START( toprollr );
|
||||
VIDEO_UPDATE( toprollr );
|
||||
|
||||
WRITE8_HANDLER( swimmer_bgcolor_w );
|
||||
WRITE8_HANDLER( swimmer_palettebank_w );
|
||||
PALETTE_INIT( swimmer );
|
||||
VIDEO_UPDATE( swimmer );
|
||||
WRITE8_HANDLER( swimmer_sidepanel_enable_w );
|
||||
|
||||
|
||||
/*----------- defined in audio/cclimber.c -----------*/
|
||||
|
@ -340,8 +340,8 @@ const game_driver * const drivers[] =
|
||||
DRIVER( ckongalc ) /* bootleg */
|
||||
DRIVER( bigkong ) /* bootleg */
|
||||
DRIVER( monkeyd ) /* bootleg */
|
||||
DRIVER( rpatrol ) /* Orca, from a suspicious set */
|
||||
DRIVER( rpatrolb ) /* bootleg */
|
||||
DRIVER( rpatrolo ) /* Orca, from a suspicious set */
|
||||
DRIVER( silvland ) /* Falcon */
|
||||
DRIVER( yamato ) /* (c) 1983 Sega */
|
||||
DRIVER( yamato2 ) /* (c) 1983 Sega */
|
||||
|
@ -21,6 +21,7 @@ static UINT8 *converted_gfx;
|
||||
|
||||
|
||||
/* Globals */
|
||||
UINT8 *arabian_blitter;
|
||||
UINT8 arabian_video_control;
|
||||
UINT8 arabian_flip_screen;
|
||||
|
||||
@ -36,18 +37,11 @@ PALETTE_INIT( arabian )
|
||||
{
|
||||
int i;
|
||||
|
||||
/* there are effectively 6 bits of color: 2 red, 2 green, 2 blue */
|
||||
for (i = 0; i < 64; i++)
|
||||
{
|
||||
palette_set_color_rgb(machine, i,
|
||||
((i >> 5) & 1) * (153*192/255) + ((i >> 4) & 1) * (102*192/255) + ((i & 0x30) ? 63 : 0),
|
||||
((i >> 3) & 1) * (156*192/255) + ((i >> 2) & 1) * (99*192/255) + ((i & 0x0c) ? 63 : 0),
|
||||
((i >> 1) & 1) * 192 + ((i >> 0) & 1) * 63);
|
||||
}
|
||||
|
||||
/* there are 13 color table bits */
|
||||
for (i = 0; i < (1 << 13); i++)
|
||||
{
|
||||
int r, g, b;
|
||||
|
||||
int ena = (i >> 12) & 1;
|
||||
int enb = (i >> 11) & 1;
|
||||
int abhf = (~i >> 10) & 1;
|
||||
@ -146,9 +140,19 @@ PALETTE_INIT( arabian )
|
||||
int bhi = ab;
|
||||
int bbase = (!abhf & az) ? 0 : ab;
|
||||
|
||||
*colortable++ = (rhi << 5) | (rlo << 4) |
|
||||
(ghi << 3) | (glo << 2) |
|
||||
(bhi << 1) | bbase;
|
||||
/* convert an RGB color -
|
||||
there are effectively 6 bits of color: 2 red, 2 green, 2 blue */
|
||||
r = ( rhi * (int)(((153.0 * 192) / 255) + 0.5)) +
|
||||
( rlo * (int)(((102.0 * 192) / 255) + 0.5)) +
|
||||
((rhi | rlo) ? 63 : 0);
|
||||
|
||||
g = ( ghi * (int)(((156.0 * 192) / 255) + 0.5)) +
|
||||
( glo * (int)((( 99.0 * 192) / 255) + 0.5)) +
|
||||
((ghi | glo) ? 63 : 0);
|
||||
|
||||
b = (bhi * 192) + (bbase * 63);
|
||||
|
||||
palette_set_color(machine, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,19 +276,18 @@ static void blit_area(UINT8 plane, UINT16 src, UINT8 x, UINT8 y, UINT8 sx, UINT8
|
||||
WRITE8_HANDLER( arabian_blitter_w )
|
||||
{
|
||||
/* write the data */
|
||||
offset &= 7;
|
||||
spriteram[offset] = data;
|
||||
arabian_blitter[offset] = data;
|
||||
|
||||
/* watch for a write to offset 6 -- that triggers the blit */
|
||||
if ((offset & 0x07) == 6)
|
||||
if (offset == 6)
|
||||
{
|
||||
/* extract the data */
|
||||
int plane = spriteram[offset - 6];
|
||||
int src = spriteram[offset - 5] | (spriteram[offset - 4] << 8);
|
||||
int x = spriteram[offset - 2] << 2;
|
||||
int y = spriteram[offset - 3];
|
||||
int sx = spriteram[offset - 0];
|
||||
int sy = spriteram[offset - 1];
|
||||
int plane = arabian_blitter[0];
|
||||
int src = arabian_blitter[1] | (arabian_blitter[2] << 8);
|
||||
int x = arabian_blitter[4] << 2;
|
||||
int y = arabian_blitter[3];
|
||||
int sx = arabian_blitter[6];
|
||||
int sy = arabian_blitter[5];
|
||||
|
||||
/* blit it */
|
||||
blit_area(plane, src, x, y, sx, sy);
|
||||
@ -304,7 +307,7 @@ WRITE8_HANDLER( arabian_videoram_w )
|
||||
UINT8 *base;
|
||||
UINT8 x, y;
|
||||
|
||||
/* determine X/Y and mark the area dirty */
|
||||
/* determine X/Y */
|
||||
x = (offset >> 8) << 2;
|
||||
y = offset & 0xff;
|
||||
|
||||
@ -324,7 +327,7 @@ WRITE8_HANDLER( arabian_videoram_w )
|
||||
*/
|
||||
|
||||
/* enable writes to AZ/AR */
|
||||
if (spriteram[0] & 0x08)
|
||||
if (arabian_blitter[0] & 0x08)
|
||||
{
|
||||
base[0] = (base[0] & ~0x03) | ((data & 0x10) >> 3) | ((data & 0x01) >> 0);
|
||||
base[1] = (base[1] & ~0x03) | ((data & 0x20) >> 4) | ((data & 0x02) >> 1);
|
||||
@ -333,7 +336,7 @@ WRITE8_HANDLER( arabian_videoram_w )
|
||||
}
|
||||
|
||||
/* enable writes to AG/AB */
|
||||
if (spriteram[0] & 0x04)
|
||||
if (arabian_blitter[0] & 0x04)
|
||||
{
|
||||
base[0] = (base[0] & ~0x0c) | ((data & 0x10) >> 1) | ((data & 0x01) << 2);
|
||||
base[1] = (base[1] & ~0x0c) | ((data & 0x20) >> 2) | ((data & 0x02) << 1);
|
||||
@ -342,7 +345,7 @@ WRITE8_HANDLER( arabian_videoram_w )
|
||||
}
|
||||
|
||||
/* enable writes to BZ/BR */
|
||||
if (spriteram[0] & 0x02)
|
||||
if (arabian_blitter[0] & 0x02)
|
||||
{
|
||||
base[0] = (base[0] & ~0x30) | ((data & 0x10) << 1) | ((data & 0x01) << 4);
|
||||
base[1] = (base[1] & ~0x30) | ((data & 0x20) << 0) | ((data & 0x02) << 3);
|
||||
@ -351,7 +354,7 @@ WRITE8_HANDLER( arabian_videoram_w )
|
||||
}
|
||||
|
||||
/* enable writes to BG/BB */
|
||||
if (spriteram[0] & 0x01)
|
||||
if (arabian_blitter[0] & 0x01)
|
||||
{
|
||||
base[0] = (base[0] & ~0xc0) | ((data & 0x10) << 3) | ((data & 0x01) << 6);
|
||||
base[1] = (base[1] & ~0xc0) | ((data & 0x20) << 2) | ((data & 0x02) << 5);
|
||||
@ -370,7 +373,7 @@ WRITE8_HANDLER( arabian_videoram_w )
|
||||
|
||||
VIDEO_UPDATE( arabian )
|
||||
{
|
||||
const pen_t *colortable = &machine->remapped_colortable[(arabian_video_control >> 3) << 8];
|
||||
const pen_t *pens = &machine->pens[(arabian_video_control >> 3) << 8];
|
||||
int y;
|
||||
|
||||
/* render the screen from the bitmap */
|
||||
@ -378,7 +381,7 @@ VIDEO_UPDATE( arabian )
|
||||
{
|
||||
/* non-flipped case */
|
||||
if (!arabian_flip_screen)
|
||||
draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &main_bitmap[y * BITMAP_WIDTH], colortable, -1);
|
||||
draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &main_bitmap[y * BITMAP_WIDTH], pens, -1);
|
||||
|
||||
/* flipped case */
|
||||
else
|
||||
@ -387,7 +390,7 @@ VIDEO_UPDATE( arabian )
|
||||
int x;
|
||||
for (x = 0; x < BITMAP_WIDTH; x++)
|
||||
scanline[BITMAP_WIDTH - 1 - x] = main_bitmap[y * BITMAP_WIDTH + x];
|
||||
draw_scanline8(bitmap, 0, BITMAP_HEIGHT - 1 - y, BITMAP_WIDTH, scanline, colortable, -1);
|
||||
draw_scanline8(bitmap, 0, BITMAP_HEIGHT - 1 - y, BITMAP_WIDTH, scanline, pens, -1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -7,16 +7,16 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/cclimber.h"
|
||||
#include "video\resnet.h"
|
||||
|
||||
|
||||
UINT8 *cclimber_bsvideoram;
|
||||
size_t cclimber_bsvideoram_size;
|
||||
UINT8 *cclimber_bigspriteram;
|
||||
UINT8 *cclimber_column_scroll;
|
||||
static int palettebank;
|
||||
static int sidepanel_enabled;
|
||||
UINT8 *swimmer_bgcolor;
|
||||
UINT8 *swimmer_sidepanel_enabled;
|
||||
UINT8 *swimmer_palettebank;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -38,52 +38,47 @@ static int sidepanel_enabled;
|
||||
***************************************************************************/
|
||||
PALETTE_INIT( cclimber )
|
||||
{
|
||||
static const int resistances_rg[3] = { 1000, 470, 220 };
|
||||
static const int resistances_b [2] = { 470, 220 };
|
||||
double rweights[3], gweights[3], bweights[2];
|
||||
int i;
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + (offs)])
|
||||
|
||||
/* compute the color output resistor weights */
|
||||
compute_resistor_weights(0, 255, -1.0,
|
||||
3, &resistances_rg[0], rweights, 0, 0,
|
||||
3, &resistances_rg[0], gweights, 0, 0,
|
||||
2, &resistances_b[0], bweights, 0, 0);
|
||||
|
||||
for (i = 0;i < machine->drv->total_colors;i++)
|
||||
for (i = 0;i < machine->drv->total_colors; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
UINT8 data;
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
if (i & 0x07)
|
||||
data = color_prom[i];
|
||||
else
|
||||
/* River Patrol shows that background is pen 0 */
|
||||
data = color_prom[0];
|
||||
|
||||
/* red component */
|
||||
bit0 = (*color_prom >> 0) & 0x01;
|
||||
bit1 = (*color_prom >> 1) & 0x01;
|
||||
bit2 = (*color_prom >> 2) & 0x01;
|
||||
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
bit0 = (data >> 0) & 0x01;
|
||||
bit1 = (data >> 1) & 0x01;
|
||||
bit2 = (data >> 2) & 0x01;
|
||||
r = combine_3_weights(rweights, bit0, bit1, bit2);
|
||||
|
||||
/* green component */
|
||||
bit0 = (*color_prom >> 3) & 0x01;
|
||||
bit1 = (*color_prom >> 4) & 0x01;
|
||||
bit2 = (*color_prom >> 5) & 0x01;
|
||||
g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
bit0 = (data >> 3) & 0x01;
|
||||
bit1 = (data >> 4) & 0x01;
|
||||
bit2 = (data >> 5) & 0x01;
|
||||
g = combine_3_weights(gweights, bit0, bit1, bit2);
|
||||
|
||||
/* blue component */
|
||||
bit0 = 0;
|
||||
bit1 = (*color_prom >> 6) & 0x01;
|
||||
bit2 = (*color_prom >> 7) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
bit0 = (data >> 6) & 0x01;
|
||||
bit1 = (data >> 7) & 0x01;
|
||||
b = combine_2_weights(bweights, bit0, bit1);
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
color_prom++;
|
||||
}
|
||||
|
||||
|
||||
/* character and sprite lookup table */
|
||||
/* they use colors 0-63 */
|
||||
for (i = 0;i < TOTAL_COLORS(0);i++)
|
||||
{
|
||||
/* pen 0 always uses color 0 (background in River Patrol and Silver Land) */
|
||||
if (i % 4 == 0) COLOR(0,i) = 0;
|
||||
else COLOR(0,i) = i;
|
||||
}
|
||||
|
||||
/* big sprite lookup table */
|
||||
/* it uses colors 64-95 */
|
||||
for (i = 0;i < TOTAL_COLORS(2);i++)
|
||||
{
|
||||
if (i % 4 == 0) COLOR(2,i) = 0;
|
||||
else COLOR(2,i) = i + 64;
|
||||
palette_set_color(machine, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,91 +119,87 @@ PALETTE_INIT( cclimber )
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#define BGPEN (256+32)
|
||||
#define SIDEPEN (256+32+1)
|
||||
|
||||
PALETTE_INIT( swimmer )
|
||||
{
|
||||
int i;
|
||||
#define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
|
||||
#define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + (offs)])
|
||||
|
||||
|
||||
for (i = 0;i < 256;i++)
|
||||
for (i = 0; i < 0x200; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
rgb_t color;
|
||||
|
||||
/* non-backgrond pens */
|
||||
if (i & 0x07)
|
||||
{
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = (color_prom[i] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i] >> 2) & 0x01;
|
||||
bit0 = (color_prom[(i & 0xff) + 0x000] >> 0) & 0x01;
|
||||
bit1 = (color_prom[(i & 0xff) + 0x000] >> 1) & 0x01;
|
||||
bit2 = (color_prom[(i & 0xff) + 0x000] >> 2) & 0x01;
|
||||
r = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[i] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i+256] >> 0) & 0x01;
|
||||
bit2 = (color_prom[i+256] >> 1) & 0x01;
|
||||
bit0 = (color_prom[(i & 0xff) + 0x000] >> 3) & 0x01;
|
||||
bit1 = (color_prom[(i & 0xff) + 0x100] >> 0) & 0x01;
|
||||
bit2 = (color_prom[(i & 0xff) + 0x100] >> 1) & 0x01;
|
||||
g = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[i+256] >> 2) & 0x01;
|
||||
bit2 = (color_prom[i+256] >> 3) & 0x01;
|
||||
bit1 = (color_prom[(i & 0xff) + 0x100] >> 2) & 0x01;
|
||||
bit2 = (color_prom[(i & 0xff) + 0x100] >> 3) & 0x01;
|
||||
b = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r,g,b));
|
||||
|
||||
/* side panel */
|
||||
if (i % 8)
|
||||
{
|
||||
COLOR(0,i) = i;
|
||||
COLOR(0,i+256) = i;
|
||||
color = MAKE_RGB(r,g,b);
|
||||
}
|
||||
|
||||
/* backgrond pen */
|
||||
else
|
||||
{
|
||||
/* background */
|
||||
COLOR(0,i) = BGPEN;
|
||||
COLOR(0,i+256) = SIDEPEN;
|
||||
}
|
||||
if (i & 0x100)
|
||||
/* side panel */
|
||||
#if 0
|
||||
// values calculated from the resistors don't seem to match the real board
|
||||
color = MAKE_RGB(0x24, 0x5d, 0x4e);
|
||||
#endif
|
||||
color = MAKE_RGB(0x20, 0x98, 0x79);
|
||||
else
|
||||
/* 'water' background -- will be modified dynamically later */
|
||||
color = RGB_BLACK;
|
||||
}
|
||||
|
||||
color_prom += 2 * 256;
|
||||
palette_set_color(machine, i, color);
|
||||
}
|
||||
|
||||
color_prom += 0x200;
|
||||
|
||||
/* big sprite */
|
||||
for (i = 0;i < 32;i++)
|
||||
for (i = 0; i < 0x20; i++)
|
||||
{
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = (color_prom[i] >> 0) & 0x01;
|
||||
bit1 = (color_prom[i] >> 1) & 0x01;
|
||||
bit2 = (color_prom[i] >> 2) & 0x01;
|
||||
r = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (color_prom[i] >> 3) & 0x01;
|
||||
bit1 = (color_prom[i] >> 4) & 0x01;
|
||||
bit2 = (color_prom[i] >> 5) & 0x01;
|
||||
g = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = 0;
|
||||
bit1 = (color_prom[i] >> 6) & 0x01;
|
||||
bit2 = (color_prom[i] >> 7) & 0x01;
|
||||
b = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
palette_set_color(machine,i+256,MAKE_RGB(r,g,b));
|
||||
|
||||
if (i % 8 == 0) COLOR(2,i) = BGPEN; /* enforce transparency */
|
||||
else COLOR(2,i) = i+256;
|
||||
palette_set_color(machine, i + 0x200, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
/* background */
|
||||
palette_set_color(machine,BGPEN,MAKE_RGB(0,0,0));
|
||||
/* side panel background color */
|
||||
#if 0
|
||||
// values calculated from the resistors don't seem to match the real board
|
||||
palette_set_color(machine,SIDEPEN,MAKE_RGB(0x24,0x5d,0x4e));
|
||||
#endif
|
||||
palette_set_color(machine,SIDEPEN,MAKE_RGB(0x20,0x98,0x79));
|
||||
}
|
||||
|
||||
|
||||
@ -229,31 +220,37 @@ PALETTE_INIT( swimmer )
|
||||
bit 0 -- 1 kohm resistor -- BLUE
|
||||
|
||||
***************************************************************************/
|
||||
WRITE8_HANDLER( swimmer_bgcolor_w )
|
||||
{
|
||||
int bit0,bit1,bit2;
|
||||
int r,g,b;
|
||||
|
||||
static void swimmer_set_background_pen(running_machine *machine)
|
||||
{
|
||||
int i;
|
||||
pen_t color;
|
||||
int bit0, bit1, bit2;
|
||||
int r, g, b;
|
||||
|
||||
/* red component */
|
||||
bit0 = 0;
|
||||
bit1 = (data >> 6) & 0x01;
|
||||
bit2 = (data >> 7) & 0x01;
|
||||
bit1 = (*swimmer_bgcolor >> 6) & 0x01;
|
||||
bit2 = (*swimmer_bgcolor >> 7) & 0x01;
|
||||
r = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
/* green component */
|
||||
bit0 = (data >> 3) & 0x01;
|
||||
bit1 = (data >> 4) & 0x01;
|
||||
bit2 = (data >> 5) & 0x01;
|
||||
bit0 = (*swimmer_bgcolor >> 3) & 0x01;
|
||||
bit1 = (*swimmer_bgcolor >> 4) & 0x01;
|
||||
bit2 = (*swimmer_bgcolor >> 5) & 0x01;
|
||||
g = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
/* blue component */
|
||||
bit0 = (data >> 0) & 0x01;
|
||||
bit1 = (data >> 1) & 0x01;
|
||||
bit2 = (data >> 2) & 0x01;
|
||||
bit0 = (*swimmer_bgcolor >> 0) & 0x01;
|
||||
bit1 = (*swimmer_bgcolor >> 1) & 0x01;
|
||||
bit2 = (*swimmer_bgcolor >> 2) & 0x01;
|
||||
b = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
|
||||
|
||||
palette_set_color(Machine,BGPEN,MAKE_RGB(r,g,b));
|
||||
color = MAKE_RGB(r, g, b);
|
||||
|
||||
/* set pen 0 if each color code */
|
||||
for (i = 0; i < 0x100; i += 8)
|
||||
palette_set_color(machine, i, color);
|
||||
}
|
||||
|
||||
|
||||
@ -263,31 +260,8 @@ WRITE8_HANDLER( cclimber_colorram_w )
|
||||
/* bit 5 of the address is not used for color memory. There is just */
|
||||
/* 512 bytes of memory; every two consecutive rows share the same memory */
|
||||
/* region. */
|
||||
offset &= 0xffdf;
|
||||
|
||||
colorram[offset] = data;
|
||||
colorram[offset + 0x20] = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_HANDLER( cclimber_bigsprite_videoram_w )
|
||||
{
|
||||
cclimber_bsvideoram[offset] = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_HANDLER( swimmer_palettebank_w )
|
||||
{
|
||||
palettebank = data & 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_HANDLER( swimmer_sidepanel_enable_w )
|
||||
{
|
||||
sidepanel_enabled = data & 1;
|
||||
colorram[offset ^ 0x20] = data;
|
||||
}
|
||||
|
||||
|
||||
@ -553,6 +527,8 @@ VIDEO_UPDATE( swimmer )
|
||||
{
|
||||
int offs;
|
||||
|
||||
swimmer_set_background_pen(machine);
|
||||
|
||||
for (offs = videoram_size - 1;offs >= 0;offs--)
|
||||
{
|
||||
int sx,sy,flipx,flipy,color;
|
||||
@ -564,8 +540,8 @@ VIDEO_UPDATE( swimmer )
|
||||
/* vertical flipping flips two adjacent characters */
|
||||
if (flipy) sy ^= 1;
|
||||
|
||||
color = (colorram[offs] & 0x0f) + 0x10 * palettebank;
|
||||
if (sx >= 24 && sidepanel_enabled)
|
||||
color = (colorram[offs] & 0x0f) + 0x10 * (*swimmer_palettebank & 0x01);
|
||||
if (sx >= 24 && (*swimmer_sidepanel_enabled & 0x01))
|
||||
{
|
||||
color += 32;
|
||||
}
|
||||
@ -639,7 +615,7 @@ VIDEO_UPDATE( swimmer )
|
||||
|
||||
drawgfx(bitmap,machine->gfx[1],
|
||||
(spriteram[offs] & 0x3f) | (spriteram[offs + 1] & 0x10) << 2,
|
||||
(spriteram[offs + 1] & 0x0f) + 0x10 * palettebank,
|
||||
(spriteram[offs + 1] & 0x0f) + 0x10 * (*swimmer_palettebank & 0x01),
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,TRANSPARENCY_PEN,0);
|
||||
|
Loading…
Reference in New Issue
Block a user