summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Jim Stolis <Stolistic@users.noreply.github.com>2009-11-19 04:10:44 +0000
committer Jim Stolis <Stolistic@users.noreply.github.com>2009-11-19 04:10:44 +0000
commit5709ada61aa08af3e58db04d00d22979793c9f67 (patch)
tree356b2aadbe85dfa7a786784a0f165a1e10e33a59 /src
parent15b0c50409b844fea3a329ecab6d8d291bc543e1 (diff)
Renamed drw80pkr to drw80pk2. Appears to be later version and MN jurisdiction specific.
Replaced drw80pkr with older dump from [Team Europe]. drw80pkr: - Added various graphics improvements and corrected colors. Game boots much farther and cleaner.
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/drw80pkr.c195
-rw-r--r--src/mame/mamedriv.c3
2 files changed, 126 insertions, 72 deletions
diff --git a/src/mame/drivers/drw80pkr.c b/src/mame/drivers/drw80pkr.c
index 376fe08cfee..7aa91db5271 100644
--- a/src/mame/drivers/drw80pkr.c
+++ b/src/mame/drivers/drw80pkr.c
@@ -10,7 +10,7 @@
Name: Draw 80 Poker
Company: IGT - International Gaming Technology
- Year: 1983
+ Year: 1982
Hardware:
@@ -22,8 +22,7 @@
This is one of the first video machines produced by IGT. Originally, the
company was called SIRCOMA and was founded in 1979. It became a public
- company in 1981 and changed its name to IGT. The motherboard has a date
- of 1982 (c) IGT, but the game rom labels and backglass are dated 1983.
+ company in 1981 and changed its name to IGT.
***********************************************************************************/
#include "driver.h"
@@ -34,11 +33,11 @@
static tilemap *bg_tilemap;
-static UINT8 p1, p2, prog, bus;
+static UINT8 t0, t1, p0, p1, p2, prog, bus;
-static UINT8 *pkr_io_ram;
static UINT8 active_bank = 0;
+static UINT8 pkr_io_ram[0x100];
static UINT16 video_ram[0x0400];
static UINT8 color_ram[0x0400];
@@ -47,6 +46,21 @@ static UINT8 color_ram[0x0400];
* Write Handlers *
******************/
+static WRITE8_HANDLER( t0_w )
+{
+ t0 = data;
+}
+
+static WRITE8_HANDLER( t1_w )
+{
+ t1 = data;
+}
+
+static WRITE8_HANDLER( p0_w )
+{
+ p0 = data;
+}
+
static WRITE8_HANDLER( p1_w )
{
p1 = data;
@@ -79,42 +93,19 @@ static WRITE8_HANDLER( bus_w )
static WRITE8_HANDLER( drw80pkr_io_w )
{
- static UINT16 n_offs;
- static UINT16 n_data;
- static UINT16 add;
-
+ UINT16 n_offs;
- if (p2 == 0x3f) // write cg address
+ if (p2 == 0x3f || p2 == 0x7f)
{
- if (p1 == 0xbf || p1 == 0x3f)
- {
- n_data = data;
- }
- if (p1 == 0x7f && data != 0x0f)
- {
- n_data = data + 0x100;
- }
+ n_offs = (((~p1) & 0xc0) << 2) - 0x100; // high address
+ n_offs += (offset); // low address
- add = ((p1 & 0xc0) << 2);
- if (p1 == 0x3f && offset >= 0xf0)
+ color_ram[n_offs] = data & 0x0f;
+
+ if (p2 == 0x3f)
{
- add = 0x200;
+ video_ram[n_offs] = data;
}
- n_offs = (add) + (0xff-offset);
-
- video_ram[n_offs] = n_data;
-
- tilemap_mark_tile_dirty(bg_tilemap, n_offs);
- }
-
- if (p2 == 0x7f) // write palette
- {
- n_offs = ((p1 & 0xc0) << 2 ) + (0xff-offset);
-
- color_ram[n_offs] = 0;//data & 0x0f;
-
- if (data < 0x10)
- video_ram[n_offs] = video_ram[n_offs] + 0x100;
tilemap_mark_tile_dirty(bg_tilemap, n_offs);
}
@@ -152,13 +143,30 @@ static WRITE8_HANDLER( drw80pkr_io_w )
// CRTC Address
//if (p1 == 0xff && p2 == 0xd7)
- pkr_io_ram[offset] = data;
+ if (p2 == 0xfb) {
+ pkr_io_ram[offset] = data;
+ }
}
/****************
* Read Handlers *
****************/
+static READ8_HANDLER( t0_r )
+{
+ return t0;
+}
+
+static READ8_HANDLER( t1_r )
+{
+ return t1;
+}
+
+static READ8_HANDLER( p0_r )
+{
+ return p0;
+}
+
static READ8_HANDLER( p1_r )
{
return p1;
@@ -176,7 +184,47 @@ static READ8_HANDLER( bus_r )
static READ8_HANDLER( drw80pkr_io_r )
{
- return pkr_io_ram[offset];
+ UINT8 ret;
+ UINT16 n_offs;
+
+ ret = 0x00;
+
+ if (p2 == 0x3b)
+ {
+ n_offs = (((~p1) & 0xc0) << 2) - 0x100; // high address
+ n_offs += (offset); // low address
+
+ ret = video_ram[n_offs];
+ }
+
+ if (p2 == 0x7b)
+ {
+ n_offs = (((~p1) & 0xc0) << 2) - 0x100; // high address
+ n_offs += (offset); // low address
+
+ ret = color_ram[n_offs];
+ }
+
+ if (p2 == 0xf7)
+ {
+ ret = 0x00; // unknown
+ }
+
+ if (p2 == 0xfb)
+ {
+ ret = pkr_io_ram[offset];
+ }
+
+ if (p2 == 0xff)
+ {
+ // TODO: Get Input Port Values
+ ret = 0x00;
+
+ // Set High Bit After Input (maybe door?)
+ ret += 0x80;
+ }
+
+ return ret;
}
@@ -206,37 +254,28 @@ static VIDEO_UPDATE( drw80pkr )
static PALETTE_INIT( drw80pkr )
{
-/* prom bits
- 7654 3210
- ---- -xxx red component.
- --xx x--- green component.
- xx-- ---- blue component.
-*/
- int i;
-
- for (i = 0;i < machine->config->total_colors;i++)
+ int j;
+
+ for (j = 0; j < machine->config->total_colors; j++)
{
- int bit0, bit1, bit2, r, g, b;
+ int r, g, b, tr, tg, tb, i;
+
+ i = (color_prom[j] >> 3) & 0x01;
+ //i = color_prom[j];
/* red component */
- bit0 = (~color_prom[i] >> 0) & 0x01;
- bit1 = (~color_prom[i] >> 1) & 0x01;
- bit2 = (~color_prom[i] >> 2) & 0x01;
- r = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
+ tr = 0xf0 - (0xf0 * ((color_prom[j] >> 0) & 0x01));
+ r = tr - (i * (tr / 5));
/* green component */
- bit0 = (~color_prom[i] >> 3) & 0x01;
- bit1 = (~color_prom[i] >> 4) & 0x01;
- bit2 = (~color_prom[i] >> 5) & 0x01;
- g = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
+ tg = 0xf0 - (0xf0 * ((color_prom[j] >> 1) & 0x01));
+ g = tg - (i * (tg / 5));
/* blue component */
- bit0 = (~color_prom[i] >> 6) & 0x01;
- bit1 = (~color_prom[i] >> 7) & 0x01;
- bit2 = 0;
- b = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
+ tb = 0xf0 - (0xf0 * ((color_prom[j] >> 2) & 0x01));
+ b = tb - (i * (tb / 5));
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ palette_set_color(machine, j, MAKE_RGB(r, g, b));
}
}
@@ -250,7 +289,7 @@ static const gfx_layout charlayout =
8,8, /* 8x8 characters */
RGN_FRAC(1,2), /* 512 characters */
2, /* 2 bitplanes */
- { RGN_FRAC(1,2), 0 },
+ { 0, RGN_FRAC(1,2) },
{ STEP8(0,1) },
{ STEP8(0,8) },
8*8
@@ -285,11 +324,13 @@ static ADDRESS_MAP_START( drw80pkr_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static ADDRESS_MAP_START( drw80pkr_io_map, ADDRESS_SPACE_IO, 8 )
- AM_RANGE(0x00, 0xff) AM_READWRITE(drw80pkr_io_r, drw80pkr_io_w) AM_BASE(&pkr_io_ram)
- AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_RAM
+ AM_RANGE(0x00, 0xff) AM_READWRITE(drw80pkr_io_r, drw80pkr_io_w)
+ AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READWRITE(t0_r, t0_w)
+ AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READWRITE(t1_r, t1_w)
+ AM_RANGE(MCS48_PORT_P0, MCS48_PORT_P0) AM_READWRITE(p0_r, p0_w)
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(p1_r, p1_w)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(p2_r, p2_w)
- AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_RAM_WRITE(prog_w)
+ AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_RAM_WRITE(prog_w)
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READWRITE(bus_r, bus_w)
ADDRESS_MAP_END
@@ -341,22 +382,34 @@ MACHINE_DRIVER_END
ROM_START( drw80pkr )
ROM_REGION( 0x2000, "maincpu", 0 )
+ ROM_LOAD( "pm0.u81", 0x0000, 0x1000, CRC(73223555) SHA1(229999ec00a1353f0d4928c65c8975079060c5af) )
+ ROM_LOAD( "pm1.u82", 0x1000, 0x1000, CRC(f8158f2b) SHA1(da3b30cfd49cd0e8a48d78fd3f82b2b4ab33670c) )
+
+ ROM_REGION( 0x002000, "gfx1", 0 )
+ ROM_LOAD( "cg0-a.u74", 0x0000, 0x1000, CRC(0eefe598) SHA1(ed10aac345b10e35fb15babdd3ac30ebe2b8fc0f) )
+ ROM_LOAD( "cg1-a.u76", 0x1000, 0x1000, CRC(522a96d0) SHA1(48f855a132413493353fbf6a44a1feb34ae6726d) )
+
+ ROM_REGION( 0x100, "proms", 0 )
+ ROM_LOAD( "cap13.u92", 0x0000, 0x0100, CRC(be67a8d9) SHA1(24b8cd19a5ec09779a737f6fc8c07b44f1226c8f) )
+ROM_END
+
+ROM_START( drw80pk2 )
+ ROM_REGION( 0x2000, "maincpu", 0 )
ROM_LOAD( "pm0.u81", 0x0000, 0x1000, CRC(0f3e97d2) SHA1(aa9e4015246284f32435d7320de667e075412e5b) )
ROM_LOAD( "pm1.u82", 0x1000, 0x1000, CRC(5a6ad467) SHA1(0128bd70b65244a0f68031d5f451bf115eeb7609) )
-
ROM_REGION( 0x002000, "gfx1", 0 )
ROM_LOAD( "cg0-a.u74", 0x0000, 0x1000, CRC(97f5eb92) SHA1(f6c7bb42ccef8a78e8d56104ad942ae5b8e5b0df) )
ROM_LOAD( "cg1-a.u76", 0x1000, 0x1000, CRC(2a3a750d) SHA1(db6183d11b2865b011c3748dc472cf5858dde78f) )
- ROM_REGION( 0x100, "proms", 0 ) // WRONG CAP
- ROM_LOAD( "cap13.u92", 0x0000, 0x0100, CRC(42d6e973) SHA1(5c2983d5c80333ca45033070a2296fe58c339ee1) )
+ ROM_REGION( 0x100, "proms", 0 )
+ ROM_LOAD( "cap13.u92", 0x0000, 0x0100, CRC(be67a8d9) SHA1(24b8cd19a5ec09779a737f6fc8c07b44f1226c8f) )
ROM_END
-
/*************************
* Game Drivers *
*************************/
-/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */
-GAME( 1983, drw80pkr, 0, drw80pkr, drw80pkr, drw80pkr, ROT0, "IGT - International Gaming Technology", "Draw 80 Poker", GAME_NOT_WORKING )
+/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */
+GAME( 1982, drw80pkr, 0, drw80pkr, drw80pkr, drw80pkr, ROT0, "IGT - International Gaming Technology", "Draw 80 Poker", GAME_NOT_WORKING )
+GAME( 1983, drw80pk2, 0, drw80pkr, drw80pkr, drw80pkr, ROT0, "IGT - International Gaming Technology", "Draw 80 Poker - Minn", GAME_NOT_WORKING )
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 9b72b691a4f..0feebc3c361 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -9203,7 +9203,8 @@ Other Sun games
DRIVER( jongkyo ) /* (c) 1985 Kiwako */
DRIVER( gamecstl ) /* MAME based bootleg */
DRIVER( gamecst2 ) /* MAME based bootleg, version 2.613 */
- DRIVER( drw80pkr ) /* (c) 1983 IGT */
+ DRIVER( drw80pkr ) /* (c) 1982 IGT */
+ DRIVER( drw80pk2 ) /* (c) 1983 IGT */
DRIVER( blazlaz ) /* (c) 1989 Hudson Soft */
DRIVER( ggconnie ) /* (c) ???? Capcom */
DRIVER( paranoia ) /* (c) 1990 Naxat Soft */