mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
Color table removal
This commit is contained in:
parent
997c60ab84
commit
01dac00ae0
@ -154,7 +154,6 @@ static MACHINE_DRIVER_START( paranoia )
|
||||
/* MDRV_GFXDECODE( pce_gfxdecodeinfo ) */
|
||||
MDRV_PALETTE_LENGTH(1024)
|
||||
MDRV_PALETTE_INIT( vce )
|
||||
MDRV_COLORTABLE_LENGTH(1024)
|
||||
|
||||
MDRV_VIDEO_START( pce )
|
||||
MDRV_VIDEO_UPDATE( pce )
|
||||
|
@ -1018,9 +1018,8 @@ static MACHINE_DRIVER_START( pmpoker )
|
||||
|
||||
MDRV_GFXDECODE(pmpoker)
|
||||
|
||||
MDRV_PALETTE_LENGTH(256)
|
||||
MDRV_PALETTE_INIT(pottnpkr)
|
||||
MDRV_COLORTABLE_LENGTH(1024)
|
||||
MDRV_PALETTE_LENGTH(1024)
|
||||
|
||||
MDRV_VIDEO_START(pmpoker)
|
||||
MDRV_VIDEO_UPDATE(pmpoker)
|
||||
@ -1052,8 +1051,11 @@ ROM_START( pmpoker )
|
||||
ROM_LOAD( "1-2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_LOAD( "1-3.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tbp24sa10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
ROM_END
|
||||
|
||||
/* the original goldnpkr u40_4a.bin rom is bit corrupted.
|
||||
@ -1074,8 +1076,11 @@ ROM_START( goldnpkr )
|
||||
ROM_LOAD( "u40_4a.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_COPY( REGION_GFX1, 0x0800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
|
||||
/* pmpoker goldnpkr
|
||||
1-4.bin u38_5a (1st quarter) 96.582031% \ 1st and 2nd halves are identical.
|
||||
@ -1097,8 +1102,11 @@ ROM_START( goldnpkb )
|
||||
ROM_LOAD( "u40.4a.bin", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_COPY( REGION_GFX1, 0x0800, 0x4000, 0x0800 ) /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
|
||||
/* pmpoker goldnpkb
|
||||
1-4.bin u38.5a (1st quarter) 96.582031% \ 1st and 2nd halves are identical.
|
||||
@ -1121,8 +1129,11 @@ ROM_START( goldnpkc ) /* Golden Poker without the double up feature */
|
||||
ROM_LOAD( "ic3_8.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_LOAD( "ic5_9.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) ) /* cards deck gfx, bitplane3 */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "tbp24s10n.7d", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
|
||||
/* ic2_7.bin 1ST AND 2ND HALF IDENTICAL
|
||||
ic3_8.bin 1ST AND 2ND HALF IDENTICAL
|
||||
@ -1147,8 +1158,11 @@ ROM_START( jokerpkr ) /* a Coinmaster game?... seems to be a hack */
|
||||
ROM_LOAD( "vp-2.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_LOAD( "vp-3.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
ROM_END
|
||||
|
||||
/* the alternative Jack Potten set is identical, but with different sized roms.
|
||||
@ -1177,8 +1191,11 @@ ROM_START( pottnpkr )
|
||||
ROM_LOAD( "pottpok3.bin", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_LOAD( "pottpok2.bin", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "82s129.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
ROM_END
|
||||
|
||||
/*pottpok4.bin 0xxxxxxxxxx = 0x00
|
||||
@ -1205,8 +1222,11 @@ ROM_START( pottnpkb )
|
||||
ROM_LOAD( "517.6a", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */
|
||||
ROM_LOAD( "517.7a", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) /* cards deck gfx, bitplane3 */
|
||||
|
||||
ROM_REGION( 0x0100, REGION_PROMS, 0 )
|
||||
ROM_REGION( 0x0400, REGION_PROMS, 0 )
|
||||
ROM_LOAD( "517_mb7052.9c", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
|
||||
ROM_RELOAD( 0x0100, 0x0100 )
|
||||
ROM_RELOAD( 0x0200, 0x0100 )
|
||||
ROM_RELOAD( 0x0300, 0x0100 )
|
||||
ROM_END
|
||||
|
||||
|
||||
@ -1230,7 +1250,7 @@ GAMEL( 1981, pmpoker, 0, pmpoker, pmpoker, pmpoker, ROT0, "PlayMan"
|
||||
GAMEL( 1981, goldnpkr, pmpoker, pmpoker, goldnpkr, pmpoker, ROT0, "Bonanza Enterprises, Ltd", "Golden Poker Double Up (Big Boy)", GAME_NO_SOUND ,layout_goldnpkr )
|
||||
GAMEL( 1981, goldnpkb, pmpoker, pmpoker, goldnpkr, pmpoker, ROT0, "Bonanza Enterprises, Ltd", "Golden Poker Double Up (Mini Boy)", GAME_NO_SOUND ,layout_goldnpkr )
|
||||
GAMEL( 1981, goldnpkc, pmpoker, pmpoker, goldnpkc, pmpoker, ROT0, "Bootleg", "Golden Poker (no double up)", GAME_NO_SOUND ,layout_goldnpkr )
|
||||
GAMEL( 198?, jokerpkr, pmpoker, jokerpkr, jokerpkr, pmpoker, ROT0, "Bootleg in Coinmaster hardware", "Joker-Poker", GAME_NO_SOUND ,layout_pottnpkr )
|
||||
GAMEL( 198?, jokerpkr, pmpoker, jokerpkr, jokerpkr, pmpoker, ROT0, "Bootleg on Coinmaster hardware", "Joker-Poker", GAME_NO_SOUND ,layout_pottnpkr )
|
||||
GAMEL( 198?, pottnpkr, pmpoker, jokerpkr, pottnpkr, pmpoker, ROT0, "Bootleg", "Jack Potten's Poker (bootleg)", GAME_NO_SOUND ,layout_pottnpkr )
|
||||
GAMEL( 198?, pottnpkb, pmpoker, jokerpkr, goldnpkc, pmpoker, ROT0, "Bootleg", "Jack Potten's Poker (bootleg2)", GAME_NO_SOUND ,layout_pottnpkr )
|
||||
|
||||
|
@ -441,8 +441,8 @@ static const gfx_layout spritelayout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( popeye )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) /* chars */
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16*2, 64 ) /* sprites */
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 16, 16 ) /* chars */
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 16+16*2, 64 ) /* sprites */
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -495,8 +495,7 @@ static MACHINE_DRIVER_START( skyskipr )
|
||||
MDRV_SCREEN_SIZE(32*16, 32*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*16, 32*16-1, 2*16, 30*16-1)
|
||||
MDRV_GFXDECODE(popeye)
|
||||
MDRV_PALETTE_LENGTH(16+16+256)
|
||||
MDRV_COLORTABLE_LENGTH(16*2+64*4)
|
||||
MDRV_PALETTE_LENGTH(16+16*2+64*4)
|
||||
|
||||
MDRV_PALETTE_INIT(popeye)
|
||||
MDRV_VIDEO_START(skyskipr)
|
||||
|
@ -309,7 +309,6 @@ static MACHINE_DRIVER_START( rcasino )
|
||||
|
||||
MDRV_GFXDECODE(rcasino)
|
||||
MDRV_PALETTE_LENGTH(64)
|
||||
MDRV_COLORTABLE_LENGTH(64)
|
||||
|
||||
MDRV_PALETTE_INIT(rcasino)
|
||||
MDRV_VIDEO_START(rcasino)
|
||||
|
@ -120,7 +120,7 @@ static ADDRESS_MAP_START( rockrage_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_WRITE(K007342_w) /* Color RAM + Video RAM */
|
||||
AM_RANGE(0x2000, 0x21ff) AM_WRITE(K007420_w) /* Sprite RAM */
|
||||
AM_RANGE(0x2200, 0x23ff) AM_WRITE(K007342_scroll_w) /* Scroll RAM */
|
||||
AM_RANGE(0x2400, 0x247f) AM_WRITE(paletteram_xBBBBBGGGGGRRRRR_le_w) AM_BASE(&paletteram)/* palette */
|
||||
AM_RANGE(0x2400, 0x247f) AM_WRITE(MWA8_RAM) AM_BASE(&paletteram)/* palette */
|
||||
AM_RANGE(0x2600, 0x2607) AM_WRITE(K007342_vreg_w) /* Video Registers */
|
||||
AM_RANGE(0x2e80, 0x2e80) AM_WRITE(rockrage_sh_irqtrigger_w)/* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x2ec0, 0x2ec0) AM_WRITE(watchdog_reset_w) /* watchdog reset */
|
||||
@ -310,8 +310,7 @@ static MACHINE_DRIVER_START( rockrage )
|
||||
MDRV_SCREEN_SIZE(32*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(rockrage)
|
||||
MDRV_PALETTE_LENGTH(64)
|
||||
MDRV_COLORTABLE_LENGTH(64 + 2*16*16)
|
||||
MDRV_PALETTE_LENGTH(64 + 2*16*16)
|
||||
|
||||
MDRV_PALETTE_INIT(rockrage)
|
||||
MDRV_VIDEO_START(rockrage)
|
||||
|
@ -201,7 +201,6 @@ static MACHINE_DRIVER_START( uapce )
|
||||
/* MDRV_GFXDECODE( pce_gfxdecodeinfo ) */
|
||||
MDRV_PALETTE_LENGTH(1024)
|
||||
MDRV_PALETTE_INIT( vce )
|
||||
MDRV_COLORTABLE_LENGTH(1024)
|
||||
|
||||
MDRV_VIDEO_START( pce )
|
||||
MDRV_VIDEO_UPDATE( pce )
|
||||
|
@ -25,7 +25,7 @@ PALETTE_INIT( bladestl )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -35,7 +35,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ VIDEO_START( bladestl )
|
||||
|
||||
VIDEO_UPDATE( bladestl )
|
||||
{
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
K007342_tilemap_update();
|
||||
|
||||
|
@ -104,7 +104,7 @@ PALETTE_INIT( combascb )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -114,7 +114,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -489,7 +489,7 @@ VIDEO_UPDATE( combasc )
|
||||
{
|
||||
int i;
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
if (K007121_ctrlram[0][0x01] & 0x02)
|
||||
{
|
||||
@ -649,7 +649,7 @@ VIDEO_UPDATE( combascb )
|
||||
{
|
||||
int i;
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
for( i=0; i<32; i++ )
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ PALETTE_INIT( contra )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -70,7 +70,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ VIDEO_UPDATE( contra )
|
||||
sect_rect(&fg_finalclip, cliprect);
|
||||
sect_rect(&tx_finalclip, cliprect);
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
tilemap_set_scrollx( fg_tilemap,0, K007121_ctrlram[0][0x00] - 40 );
|
||||
tilemap_set_scrolly( fg_tilemap,0, K007121_ctrlram[0][0x02] );
|
||||
|
@ -87,7 +87,7 @@ PALETTE_INIT( cvs )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -97,7 +97,7 @@ static void set_pens(running_machine *machine)
|
||||
int g = pal3bit(~cvs_palette_ram[i] >> 2);
|
||||
int b = pal3bit(~cvs_palette_ram[i] >> 5);
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
colortable_palette_set_color(colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ VIDEO_UPDATE( cvs )
|
||||
mame_bitmap *s2636_1_bitmap;
|
||||
mame_bitmap *s2636_2_bitmap;
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
/* create our background character set, which is a software
|
||||
selectable mixture of RAM and ROM based tiles */
|
||||
|
@ -103,7 +103,7 @@ PALETTE_INIT(darkmist)
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -113,10 +113,10 @@ static void set_pens(running_machine *machine)
|
||||
int g = pal4bit(paletteram[i | 0x000] >> 4);
|
||||
int b = pal4bit(paletteram[i | 0x000] >> 0);
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
|
||||
colortable_palette_set_color(colortable, i, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
colortable_palette_set_color(machine->colortable, 0x100, RGB_BLACK);
|
||||
colortable_palette_set_color(colortable, 0x100, RGB_BLACK);
|
||||
}
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ VIDEO_UPDATE( darkmist)
|
||||
|
||||
#define DM_GETSCROLL(n) (((darkmist_scroll[(n)]<<1)&0xff) + ((darkmist_scroll[(n)]&0x80)?1:0) +( ((darkmist_scroll[(n)-1]<<4) | (darkmist_scroll[(n)-1]<<12) )&0xff00))
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
tilemap_set_scrollx(bgtilemap, 0, DM_GETSCROLL(0x2));
|
||||
tilemap_set_scrolly(bgtilemap, 0, DM_GETSCROLL(0x6));
|
||||
|
@ -41,7 +41,7 @@ PALETTE_INIT( ddrible )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -51,7 +51,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
|
||||
|
||||
VIDEO_UPDATE( ddrible )
|
||||
{
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
tilemap_set_flip(fg_tilemap, (ddribble_vregs[0][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
tilemap_set_flip(bg_tilemap, (ddribble_vregs[1][4] & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
|
@ -26,7 +26,7 @@ PALETTE_INIT( fastlane )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -36,7 +36,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ VIDEO_UPDATE( fastlane )
|
||||
sect_rect(&finalclip0, cliprect);
|
||||
sect_rect(&finalclip1, cliprect);
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
/* set scroll registers */
|
||||
xoffs = K007121_ctrlram[0][0x00];
|
||||
|
@ -46,7 +46,7 @@ PALETTE_INIT( hcastle )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -56,7 +56,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ VIDEO_UPDATE( hcastle )
|
||||
{
|
||||
static int old_pf1,old_pf2;
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
pf1_bankbase = 0x0000;
|
||||
pf2_bankbase = 0x4000 * ((gfx_bank & 2) >> 1);
|
||||
|
@ -48,7 +48,7 @@ PALETTE_INIT( jackal )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -58,7 +58,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
|
||||
|
||||
VIDEO_UPDATE( jackal )
|
||||
{
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
draw_background(bitmap, cliprect);
|
||||
draw_sprites(machine, bitmap, cliprect);
|
||||
return 0;
|
||||
|
@ -6490,7 +6490,7 @@ static int K056832_update_linemap(running_machine *machine, mame_bitmap *bitmap,
|
||||
if (!(dirty[0]|dirty[1]|dirty[2]|dirty[3]|dirty[4]|dirty[5]|dirty[6]|dirty[7])) return(0);
|
||||
}
|
||||
|
||||
pal_ptr = machine->remapped_colortable;
|
||||
pal_ptr = machine->pens;
|
||||
src_gfx = machine->gfx[K056832_gfxnum];
|
||||
src_base = src_gfx->gfxdata;
|
||||
src_pitch = src_gfx->line_modulo;
|
||||
@ -8285,7 +8285,7 @@ void K053250_draw(running_machine *machine, mame_bitmap *bitmap, const rectangle
|
||||
linedata_offs += line_start * linedata_adv; // pre-advance line info offset for the clipped region
|
||||
|
||||
// load physical palette base
|
||||
pal_base = machine->remapped_colortable + (colorbase << 4) % machine->drv->total_colors;
|
||||
pal_base = machine->pens + (colorbase << 4) % machine->drv->total_colors;
|
||||
|
||||
// walk the target bitmap within the visible area vertically or horizontally, one line at a time
|
||||
for (line_pos=line_start; line_pos<=line_end; linedata_offs+=linedata_adv, line_pos++)
|
||||
|
@ -44,7 +44,7 @@ PALETTE_INIT( labyrunr )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -54,7 +54,7 @@ static void set_pens(running_machine *machine)
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i >> 1, color);
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ VIDEO_UPDATE( labyrunr )
|
||||
{
|
||||
rectangle finalclip0, finalclip1;
|
||||
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,get_black_pen(machine),cliprect);
|
||||
|
@ -60,11 +60,10 @@ static tilemap *fg_tilemap;
|
||||
***************************************************************************/
|
||||
static void convert_color_prom(running_machine *machine,UINT16 *colortable,const UINT8 *color_prom)
|
||||
{
|
||||
int i,pal_index;
|
||||
int i;
|
||||
|
||||
|
||||
/* palette entries 0-15 are directly used by the background and changed at runtime */
|
||||
pal_index = 16;
|
||||
color_prom += 32;
|
||||
|
||||
/* characters */
|
||||
@ -73,7 +72,6 @@ static void convert_color_prom(running_machine *machine,UINT16 *colortable,const
|
||||
int prom_offs = i | ((i & 8) << 1); /* address bits 3 and 4 are tied together */
|
||||
int bit0,bit1,bit2,r,g,b;
|
||||
|
||||
|
||||
/* red component */
|
||||
bit0 = ((color_prom[prom_offs] ^ invertmask) >> 0) & 0x01;
|
||||
bit1 = ((color_prom[prom_offs] ^ invertmask) >> 1) & 0x01;
|
||||
@ -90,7 +88,7 @@ static void convert_color_prom(running_machine *machine,UINT16 *colortable,const
|
||||
bit2 = ((color_prom[prom_offs] ^ invertmask) >> 7) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette_set_color(machine,pal_index++,MAKE_RGB(r,g,b));
|
||||
palette_set_color(machine,16 + (2 * i) + 1,MAKE_RGB(r,g,b));
|
||||
}
|
||||
|
||||
color_prom += 32;
|
||||
@ -117,24 +115,10 @@ static void convert_color_prom(running_machine *machine,UINT16 *colortable,const
|
||||
bit2 = ((color_prom[256] ^ invertmask) >> 3) & 0x01;
|
||||
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette_set_color(machine,pal_index++,MAKE_RGB(r,g,b));
|
||||
palette_set_color(machine,48+i,MAKE_RGB(r,g,b));
|
||||
|
||||
color_prom++;
|
||||
}
|
||||
|
||||
|
||||
/* palette entries 0-15 are directly used by the background */
|
||||
|
||||
for (i = 0;i < 16;i++) /* characters */
|
||||
{
|
||||
*(colortable++) = 0; /* since chars are transparent, the PROM only */
|
||||
/* stores the non transparent color */
|
||||
*(colortable++) = i + 16;
|
||||
}
|
||||
for (i = 0;i < 256;i++) /* sprites */
|
||||
{
|
||||
*(colortable++) = i + 16+16;
|
||||
}
|
||||
}
|
||||
|
||||
PALETTE_INIT( popeye )
|
||||
|
@ -4,19 +4,47 @@
|
||||
static int layer_colorbase[2];
|
||||
static int rockrage_vreg;
|
||||
|
||||
|
||||
PALETTE_INIT( rockrage )
|
||||
{
|
||||
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])
|
||||
|
||||
/* build the lookup table for sprites. Palette is dynamic. */
|
||||
for (i = 0;i < TOTAL_COLORS(0)/2; i++){
|
||||
COLOR(0,i) = 0x00 + (color_prom[i] & 0x0f);
|
||||
COLOR(0,(TOTAL_COLORS(0)/2)+i) = 0x10 + (color_prom[0x100+i] & 0x0f);
|
||||
/* allocate the colortable */
|
||||
machine->colortable = colortable_alloc(machine, 0x40);
|
||||
|
||||
/* sprites */
|
||||
for (i = 0x20; i < 0x40; i++)
|
||||
colortable_entry_set_value(machine->colortable, i, i);
|
||||
|
||||
/* characters */
|
||||
for (i = 0x40; i < 0x140; i++)
|
||||
{
|
||||
UINT8 ctabentry;
|
||||
|
||||
ctabentry = (color_prom[(i - 0x40) + 0x000] & 0x0f) | 0x00;
|
||||
colortable_entry_set_value(machine->colortable, i + 0x000, ctabentry);
|
||||
|
||||
ctabentry = (color_prom[(i - 0x40) + 0x100] & 0x0f) | 0x10;
|
||||
colortable_entry_set_value(machine->colortable, i + 0x100, ctabentry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0x00; i < 0x80; i += 2)
|
||||
{
|
||||
UINT16 data = paletteram[i] | (paletteram[i | 1] << 8);
|
||||
|
||||
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
|
||||
|
||||
colortable_palette_set_color(colortable, i >> 1, color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Callback for the K007342
|
||||
@ -84,6 +112,8 @@ VIDEO_START( rockrage )
|
||||
|
||||
VIDEO_UPDATE( rockrage )
|
||||
{
|
||||
set_pens(machine->colortable);
|
||||
|
||||
K007342_tilemap_update();
|
||||
|
||||
K007342_tilemap_draw( bitmap,cliprect, 0, TILEMAP_DRAW_OPAQUE ,0);
|
||||
|
@ -74,7 +74,7 @@ PALETTE_INIT( stfight )
|
||||
}
|
||||
|
||||
|
||||
static void set_pens(running_machine *machine)
|
||||
static void set_pens(colortable_t *colortable)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -83,7 +83,7 @@ static void set_pens(running_machine *machine)
|
||||
UINT16 data = paletteram[i] | (paletteram_2[i] << 8);
|
||||
rgb_t color = MAKE_RGB(pal4bit(data >> 4), pal4bit(data >> 0), pal4bit(data >> 8));
|
||||
|
||||
colortable_palette_set_color(machine->colortable, i, color);
|
||||
colortable_palette_set_color(colortable, i, color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
|
||||
|
||||
VIDEO_UPDATE( stfight )
|
||||
{
|
||||
set_pens(machine);
|
||||
set_pens(machine->colortable);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
|
@ -71,12 +71,12 @@ static VPC vpc;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
static void vdc_advance_line(int which);
|
||||
static void draw_black_line(int line);
|
||||
static void draw_overscan_line(int line);
|
||||
static void draw_sgx_overscan_line(int line);
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer);
|
||||
static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_buffer);
|
||||
static void vdc_advance_line(running_machine *machine, int which);
|
||||
static void draw_black_line(running_machine *machine, int line);
|
||||
static void draw_overscan_line(const pen_t *pens, int line);
|
||||
static void draw_sgx_overscan_line(const pen_t *pens, int line);
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens);
|
||||
static void pce_refresh_sprites(running_machine *machine, int which, int line, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens);
|
||||
static void vdc_do_dma(int which);
|
||||
static void vpc_init( void );
|
||||
|
||||
@ -86,7 +86,7 @@ INTERRUPT_GEN( pce_interrupt )
|
||||
if ( vce.current_bitmap_line >= 14 && vce.current_bitmap_line < 14 + 242 ) {
|
||||
/* We are in the active display area */
|
||||
/* First fill the line with the overscan color */
|
||||
draw_overscan_line( vce.current_bitmap_line );
|
||||
draw_overscan_line(machine->pens, vce.current_bitmap_line );
|
||||
|
||||
/* Check if we need to draw more just the overscan color */
|
||||
if ( vdc[0].current_segment == STATE_VDW ) {
|
||||
@ -103,21 +103,21 @@ INTERRUPT_GEN( pce_interrupt )
|
||||
vdc[0].y_scroll = ( vdc[0].current_segment_line == 0 ) ? vdc[0].vdc_data[BYR].w : ( vdc[0].y_scroll + 1 );
|
||||
|
||||
/* Draw VDC #0 background layer */
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn, line_buffer );
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn, line_buffer, machine->pens);
|
||||
|
||||
/* Draw VDC #0 sprite layer */
|
||||
if(vdc[0].vdc_data[CR].w & CR_SB) {
|
||||
pce_refresh_sprites(0, vdc[0].current_segment_line, drawn, line_buffer);
|
||||
pce_refresh_sprites(machine, 0, vdc[0].current_segment_line, drawn, line_buffer, machine->pens);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* We are in one of the blanking areas */
|
||||
draw_black_line( vce.current_bitmap_line );
|
||||
draw_black_line(machine, vce.current_bitmap_line );
|
||||
}
|
||||
|
||||
/* bump current scanline */
|
||||
vce.current_bitmap_line = ( vce.current_bitmap_line + 1 ) % VDC_LPF;
|
||||
vdc_advance_line( 0 );
|
||||
vdc_advance_line(machine, 0 );
|
||||
}
|
||||
|
||||
INTERRUPT_GEN( sgx_interrupt )
|
||||
@ -126,7 +126,7 @@ INTERRUPT_GEN( sgx_interrupt )
|
||||
if ( vce.current_bitmap_line >= 14 && vce.current_bitmap_line < 14 + 242 ) {
|
||||
/* We are in the active display area */
|
||||
/* First fill the line with the overscan color */
|
||||
draw_sgx_overscan_line( vce.current_bitmap_line );
|
||||
draw_sgx_overscan_line(machine->pens, vce.current_bitmap_line );
|
||||
|
||||
/* Check if we need to draw more just the overscan color */
|
||||
if ( vdc[0].current_segment == STATE_VDW ) {
|
||||
@ -145,19 +145,19 @@ INTERRUPT_GEN( sgx_interrupt )
|
||||
vdc[1].y_scroll = ( vdc[1].current_segment_line == 0 ) ? vdc[1].vdc_data[BYR].w : ( vdc[1].y_scroll + 1 );
|
||||
|
||||
/* Draw VDC #0 background layer */
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn[0], temp_buffer[0] );
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn[0], temp_buffer[0], machine->pens);
|
||||
|
||||
/* Draw VDC #0 sprite layer */
|
||||
if(vdc[0].vdc_data[CR].w & CR_SB) {
|
||||
pce_refresh_sprites( 0, vdc[0].current_segment_line, drawn[0], temp_buffer[0] );
|
||||
pce_refresh_sprites(machine, 0, vdc[0].current_segment_line, drawn[0], temp_buffer[0], machine->pens);
|
||||
}
|
||||
|
||||
/* Draw VDC #1 background layer */
|
||||
pce_refresh_line( 1, vdc[1].current_segment_line, 1, drawn[1], temp_buffer[1] );
|
||||
pce_refresh_line( 1, vdc[1].current_segment_line, 1, drawn[1], temp_buffer[1], machine->pens);
|
||||
|
||||
/* Draw VDC #1 sprite layer */
|
||||
if ( vdc[1].vdc_data[CR].w & CR_SB ) {
|
||||
pce_refresh_sprites( 1, vdc[1].current_segment_line, drawn[1], temp_buffer[1] );
|
||||
pce_refresh_sprites(machine, 1, vdc[1].current_segment_line, drawn[1], temp_buffer[1], machine->pens);
|
||||
}
|
||||
|
||||
line_buffer = BITMAP_ADDR16( vce.bmp, vce.current_bitmap_line, 86 );
|
||||
@ -227,16 +227,16 @@ INTERRUPT_GEN( sgx_interrupt )
|
||||
}
|
||||
} else {
|
||||
/* We are in one of the blanking areas */
|
||||
draw_black_line( vce.current_bitmap_line );
|
||||
draw_black_line(machine, vce.current_bitmap_line );
|
||||
}
|
||||
|
||||
/* bump current scanline */
|
||||
vce.current_bitmap_line = ( vce.current_bitmap_line + 1 ) % VDC_LPF;
|
||||
vdc_advance_line( 0 );
|
||||
vdc_advance_line( 1 );
|
||||
vdc_advance_line(machine, 0 );
|
||||
vdc_advance_line(machine, 1 );
|
||||
}
|
||||
|
||||
static void vdc_advance_line(int which) {
|
||||
static void vdc_advance_line(running_machine *machine, int which) {
|
||||
int ret = 0;
|
||||
|
||||
vdc[which].curline += 1;
|
||||
@ -342,7 +342,7 @@ static void vdc_advance_line(int which) {
|
||||
}
|
||||
|
||||
if (ret)
|
||||
cpunum_set_input_line(Machine, 0, 0, HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, HOLD_LINE);
|
||||
}
|
||||
|
||||
VIDEO_START( pce )
|
||||
@ -377,7 +377,7 @@ VIDEO_UPDATE( pce )
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void draw_black_line(int line)
|
||||
static void draw_black_line(running_machine *machine, int line)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -385,10 +385,10 @@ static void draw_black_line(int line)
|
||||
UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
|
||||
|
||||
for( i=0; i< VDC_WPF; i++ )
|
||||
line_buffer[i] = get_black_pen( Machine );
|
||||
line_buffer[i] = get_black_pen( machine );
|
||||
}
|
||||
|
||||
static void draw_overscan_line(int line)
|
||||
static void draw_overscan_line(const pen_t *pens, int line)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -399,10 +399,10 @@ static void draw_overscan_line(int line)
|
||||
UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
|
||||
|
||||
for ( i = 0; i < VDC_WPF; i++ )
|
||||
line_buffer[i] = Machine->pens[color_base + vce.vce_data[0x100].w];
|
||||
line_buffer[i] = pens[color_base + vce.vce_data[0x100].w];
|
||||
}
|
||||
|
||||
static void draw_sgx_overscan_line(int line) {
|
||||
static void draw_sgx_overscan_line(const pen_t *pens, int line) {
|
||||
int i;
|
||||
|
||||
/* Are we in greyscale mode or in color mode? */
|
||||
@ -412,7 +412,7 @@ static void draw_sgx_overscan_line(int line) {
|
||||
UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
|
||||
|
||||
for ( i = 0; i < VDC_WPF; i++ )
|
||||
line_buffer[i] = Machine->pens[color_base + vce.vce_data[0].w];
|
||||
line_buffer[i] = pens[color_base + vce.vce_data[0].w];
|
||||
}
|
||||
|
||||
static void vram_write(int which, offs_t offset, UINT8 data)
|
||||
@ -627,7 +627,7 @@ WRITE8_HANDLER ( vce_w )
|
||||
}
|
||||
|
||||
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer)
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens)
|
||||
{
|
||||
static int width_table[4] = {5, 6, 7, 7};
|
||||
|
||||
@ -705,13 +705,13 @@ static void pce_refresh_line(int which, int line, int external_input, UINT8 *dra
|
||||
if ( phys_x >= 0 && phys_x < vdc[which].physical_width ) {
|
||||
drawn[ pixel ] = c ? 1 : 0;
|
||||
if ( c || ! external_input )
|
||||
line_buffer[ pixel ] = Machine->pens[color_base + vce.vce_data[c].w];
|
||||
line_buffer[ pixel ] = pens[color_base + vce.vce_data[c].w];
|
||||
pixel++;
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
while ( pixel < ( ( ( phys_x + 1 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[ pixel ] = c ? 1 : 0;
|
||||
if ( c || ! external_input )
|
||||
line_buffer[ pixel ] = Machine->pens[color_base + vce.vce_data[c].w];
|
||||
line_buffer[ pixel ] = pens[color_base + vce.vce_data[c].w];
|
||||
pixel++;
|
||||
}
|
||||
}
|
||||
@ -755,7 +755,7 @@ static void conv_obj(int which, int i, int l, int hf, int vf, char *buf)
|
||||
}
|
||||
}
|
||||
|
||||
static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_buffer)
|
||||
static void pce_refresh_sprites(running_machine *machine, int which, int line, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens)
|
||||
{
|
||||
int i;
|
||||
UINT8 sprites_drawn=0;
|
||||
@ -807,7 +807,7 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
if(sprites_drawn > 16) {
|
||||
vdc[which].status |= VDC_OR;
|
||||
if(vdc[which].vdc_data[CR].w&CR_OV)
|
||||
cpunum_set_input_line(Machine, 0, 0, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
continue; /* Should cause an interrupt */
|
||||
}
|
||||
|
||||
@ -828,12 +828,12 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
if ( buf[x] ) {
|
||||
if( drawn[pixel_x] < 2 ) {
|
||||
if( priority || drawn[pixel_x] == 0 ) {
|
||||
line_buffer[pixel_x] = Machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x] = machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
int dp = 1;
|
||||
while ( pixel_x + dp < ( ( ( obj_x + x + 1 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[pixel_x + dp] = i + 2;
|
||||
line_buffer[pixel_x + dp] = Machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x + dp] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
dp++;
|
||||
}
|
||||
}
|
||||
@ -844,7 +844,7 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
else if (drawn[pixel_x]==2)
|
||||
{
|
||||
if(vdc[which].vdc_data[CR].w&CR_CC)
|
||||
cpunum_set_input_line(Machine, 0, 0, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
vdc[which].status|=VDC_CR;
|
||||
}
|
||||
}
|
||||
@ -870,12 +870,12 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
if ( buf[x] ) {
|
||||
if( drawn[pixel_x] < 2 ) {
|
||||
if ( priority || drawn[pixel_x] == 0 ) {
|
||||
line_buffer[pixel_x] = Machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
int dp = 1;
|
||||
while ( pixel_x + dp < ( ( ( obj_x + x + 1 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[pixel_x + dp] = i + 2;
|
||||
line_buffer[pixel_x + dp] = Machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x + dp] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
dp++;
|
||||
}
|
||||
}
|
||||
@ -885,7 +885,7 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
/* Check for sprite #0 collision */
|
||||
else if ( drawn[pixel_x] == 2 ) {
|
||||
if(vdc[which].vdc_data[CR].w&CR_CC)
|
||||
cpunum_set_input_line(Machine, 0, 0, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
vdc[which].status|=VDC_CR;
|
||||
}
|
||||
}
|
||||
@ -904,7 +904,7 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
if( sprites_drawn > 16 ) {
|
||||
vdc[which].status |= VDC_OR;
|
||||
if(vdc[which].vdc_data[CR].w&CR_OV)
|
||||
cpunum_set_input_line(Machine, 0, 0, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
} else {
|
||||
conv_obj(which, obj_i + (cgypos << 2) + (hf ? 0 : 2), obj_l, hf, vf, buf);
|
||||
for(x=0;x<16;x++)
|
||||
@ -914,12 +914,12 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
if ( buf[x] ) {
|
||||
if( drawn[pixel_x] < 2 ) {
|
||||
if( priority || drawn[pixel_x] == 0 ) {
|
||||
line_buffer[pixel_x] = Machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
int dp = 1;
|
||||
while ( pixel_x + dp < ( ( ( obj_x + x + 17 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[pixel_x + dp] = i + 2;
|
||||
line_buffer[pixel_x + dp] = Machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x + dp] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
dp++;
|
||||
}
|
||||
}
|
||||
@ -929,7 +929,7 @@ static void pce_refresh_sprites(int which, int line, UINT8 *drawn, UINT16 *line_
|
||||
/* Check for sprite #0 collision */
|
||||
else if ( drawn[pixel_x]==2 ) {
|
||||
if(vdc[which].vdc_data[CR].w&CR_CC)
|
||||
cpunum_set_input_line(Machine, 0, 0, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
|
||||
vdc[which].status|=VDC_CR;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user