From 2595e5758a8a4f4c19a9280d8904b1085a6096b5 Mon Sep 17 00:00:00 2001 From: Zsolt Vasvari Date: Thu, 31 Jan 2008 06:39:35 +0000 Subject: [PATCH] - Correct colors in Birdie King 3 -- just needed a new dump from the Guru - Fixed incorrect ROM name - Switched color decoding to use the resnet code --- src/mame/drivers/bking.c | 6 +++--- src/mame/video/bking.c | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c index db3bc1b20a2..9a1c62da5d5 100644 --- a/src/mame/drivers/bking.c +++ b/src/mame/drivers/bking.c @@ -856,7 +856,7 @@ ROM_START( bking3 ) ROM_LOAD( "a24-07.8f", 0x3000, 0x1000, CRC(75a74d2d) SHA1(d433e8fcf3819b845936e7e107fef414f72bfc16) ) ROM_LOAD( "a24-08.7f", 0x4000, 0x1000, CRC(9fe07cf9) SHA1(23fdae48e519a171bf4adeeadf2fdfedfd56f4ea) ) ROM_LOAD( "a24-09.5f", 0x5000, 0x1000, CRC(51545ced) SHA1(4addad527c6fd675506bf584ec8670a23767787c) ) - ROM_LOAD( "a24-01.4f", 0x6000, 0x1000, CRC(a86b3e62) SHA1(f97a13e31e622b5ac55c23458c65a49c2998196a) ) //another one: a24-10.4f + ROM_LOAD( "a24-10.4f", 0x6000, 0x1000, CRC(a86b3e62) SHA1(f97a13e31e622b5ac55c23458c65a49c2998196a) ) ROM_LOAD( "a24-11.2f", 0x7000, 0x1000, CRC(b39db430) SHA1(4f48a34f3aaa1e998a4a5656bc3f399d9e6633c4) ) ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound ROMs */ @@ -888,7 +888,7 @@ ROM_START( bking3 ) ROM_LOAD( "82s123.2c", 0x0000, 0x0020, CRC(4cb5bd32) SHA1(8851bae033ba67516d5ff6888e5daef10c2116ee) ) /* collision detection */ ROM_REGION( 0x0200, REGION_PROMS, 0 ) - ROM_LOAD( "a24_03.2d", 0x0000, 0x0200, CRC(61b7a9ff) SHA1(4302de0c0dad2b871ad4719ad934beaee05a0c40) ) /* palette */ + ROM_LOAD( "a24_03.2d", 0x0000, 0x0200, CRC(599a6cbe) SHA1(eed8592aaba7b2b6d06f26a2b8720a288f9ad90f) ) /* palette */ ROM_REGION( 0x1000, REGION_USER2, 0 ) ROM_LOAD( "a24-21.25", 0x0000, 0x1000, CRC(3106fcac) SHA1(08454adfb58e5df84140d86ed52fa4ef684df9f1) ) /* extra rom on the same SUB PCB where is the mcu */ @@ -896,4 +896,4 @@ ROM_END GAME( 1982, bking, 0, bking, bking, 0, ROT270, "Taito Corporation", "Birdie King", 0 ) GAME( 1983, bking2, 0, bking, bking2, 0, ROT90, "Taito Corporation", "Birdie King 2", 0 ) -GAME( 1984, bking3, 0, bking3, bking2, 0, ROT90, "Taito Corporation", "Birdie King 3", GAME_WRONG_COLORS ) +GAME( 1984, bking3, 0, bking3, bking2, 0, ROT90, "Taito Corporation", "Birdie King 3", 0 ) diff --git a/src/mame/video/bking.c b/src/mame/video/bking.c index e44193b8aa5..6751e18a577 100644 --- a/src/mame/video/bking.c +++ b/src/mame/video/bking.c @@ -7,6 +7,8 @@ ***************************************************************************/ #include "driver.h" +#include "video/resnet.h" + extern UINT8* bking_playfield_ram; @@ -54,11 +56,20 @@ static tilemap* bg_tilemap; PALETTE_INIT( bking ) { + static const int resistances_rg[3] = { 220, 390, 820 }; + static const int resistances_b [2] = { 220, 390 }; + double rweights[3], gweights[3], bweights[2]; int i; + /* 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++) { - UINT8 pen; + UINT16 pen; int bit0, bit1, bit2, r, g, b; /* color PROM A7-A8 is the palette select */ @@ -79,19 +90,18 @@ PALETTE_INIT( bking ) bit0 = (color_prom[pen] >> 0) & 0x01; bit1 = (color_prom[pen] >> 1) & 0x01; bit2 = (color_prom[pen] >> 2) & 0x01; - r = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2; + r = combine_3_weights(rweights, bit0, bit1, bit2); /* green component */ bit0 = (color_prom[pen] >> 3) & 0x01; bit1 = (color_prom[pen] >> 4) & 0x01; bit2 = (color_prom[pen] >> 5) & 0x01; - g = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2; + g = combine_3_weights(gweights, bit0, bit1, bit2); /* blue component */ bit0 = (color_prom[pen] >> 6) & 0x01; bit1 = (color_prom[pen] >> 7) & 0x01; - bit2 = 0; - b = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2; + b = combine_2_weights(gweights, bit0, bit1); palette_set_color(machine, i, MAKE_RGB(r, g, b)); }