summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author U-demo\test <tedgreen99@inbox.com>2015-04-20 15:40:55 -0600
committer ted green <tedgreen99@inbox.com>2015-04-20 15:45:06 -0600
commit500a31ad5729f28b56d2928d81496b112f376805 (patch)
treeafc1e8c4e3c84569276a84c2b9add253d4f68d19
parentf487c89803333ca83521f5fe1972bb2d3e3d16bb (diff)
Minor cleanup for iteagle. Attempt to fix LFB pipelined pixel write in voodoo and fix fogmode lookup
-rw-r--r--src/emu/video/vooddefs.h28
-rw-r--r--src/emu/video/voodoo.c7
-rw-r--r--src/mame/drivers/iteagle.c55
3 files changed, 59 insertions, 31 deletions
diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h
index 819c285f290..094b6f0eb32 100644
--- a/src/emu/video/vooddefs.h
+++ b/src/emu/video/vooddefs.h
@@ -3086,13 +3086,28 @@ do
else \
{ \
int exp = count_leading_zeros(temp); \
+ temp &=0x7fff0000; \
wfloat = ((exp << 12) | ((~temp >> (19 - exp)) & 0xfff)) + 1; \
} \
} \
+ /* add the bias for fog selection*/ \
+ if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \
+ { \
+ wfloat += (INT16)(VV)->reg[zaColor].u; \
+ CLAMP(wfloat, 0, 0xffff); \
+ } \
\
/* compute depth value (W or Z) for this pixel */ \
if (FBZMODE_WBUFFER_SELECT(FBZMODE) == 0) \
+ { \
CLAMPED_Z(ITERZ, FBZCOLORPATH, depthval); \
+ /* add the bias */ \
+ if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \
+ { \
+ depthval += (INT16)(VV)->reg[zaColor].u; \
+ CLAMP(depthval, 0, 0xffff); \
+ } \
+ } \
else if (FBZMODE_DEPTH_FLOAT_SELECT(FBZMODE) == 0) \
depthval = wfloat; \
else \
@@ -3107,17 +3122,18 @@ do
else \
{ \
int exp = count_leading_zeros(temp); \
+ temp &=0x7fff0000; \
depthval = ((exp << 12) | ((~temp >> (19 - exp)) & 0xfff)) + 1; \
} \
} \
+ /* add the bias */ \
+ if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \
+ { \
+ depthval += (INT16)(VV)->reg[zaColor].u; \
+ CLAMP(depthval, 0, 0xffff); \
+ } \
} \
\
- /* add the bias */ \
- if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \
- { \
- depthval += (INT16)(VV)->reg[zaColor].u; \
- CLAMP(depthval, 0, 0xffff); \
- } \
\
/* handle depth buffer testing */ \
if (FBZMODE_ENABLE_DEPTHBUF(FBZMODE)) \
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index d84fef0261f..a29bb711570 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -3248,7 +3248,12 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask,
if (mask & 0x0f)
{
stats_block *stats = &v->fbi.lfb_stats;
- INT64 iterw = sw[pix] << (30-16);
+ INT64 iterw;
+ if (LFBMODE_WRITE_W_SELECT(v->reg[lfbMode].u)) {
+ iterw = (UINT32) (v->reg[zaColor].u & 0xffff) << 16;
+ } else {
+ iterw = (UINT32) sw[pix] << 16;
+ }
INT32 iterz = sw[pix] << 12;
rgb_union color;
diff --git a/src/mame/drivers/iteagle.c b/src/mame/drivers/iteagle.c
index 83e4f614793..714bf0d0c8c 100644
--- a/src/mame/drivers/iteagle.c
+++ b/src/mame/drivers/iteagle.c
@@ -177,78 +177,78 @@ static INPUT_PORTS_START( iteagle )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Right" )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Fly By" )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Backspin" )
- PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x00c0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0xfe00, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW )
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_DIPNAME( 0x00f0, 0x00, "SW51" )
+ PORT_DIPNAME( 0x0010, 0x00, "SW51-1" )
PORT_DIPSETTING(0x00, "Normal" )
PORT_DIPSETTING(0x10, "Operator Mode" )
+ PORT_DIPNAME( 0x0020, 0x00, "SW51-2" )
+ PORT_DIPSETTING(0x00, "On" )
+ PORT_DIPSETTING(0x20, "Off" )
+ PORT_DIPNAME( 0x00c0, 0x00, "SW51-34" )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_VOLUME_UP )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BILL1 )
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_DIPNAME( 0xC000, 0xC000, "Voltage" )
PORT_DIPSETTING(0xC000, "OK" )
PORT_DIPSETTING(0x8000, "Low" )
PORT_DIPSETTING(0x4000, "High" )
PORT_DIPSETTING(0x0000, "Not Detected" )
- PORT_START("TRACKX1")
- PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1)
-
- PORT_START("TRACKY1")
- PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1)
-
PORT_START("VERSION")
PORT_DIPNAME( 0x0F00, 0x0000, "GAME" )
PORT_DIPNAME( 0x00F0, 0x0000, "MAJOR" )
- PORT_DIPNAME( 0x000F, 0x0000, "MINOR" )
+ PORT_DIPNAME( 0x000F, 0x0000, "SIMM" )
INPUT_PORTS_END
-static INPUT_PORTS_START( gtfore05 )
+static INPUT_PORTS_START( gtfore02 )
PORT_INCLUDE(iteagle)
+ PORT_START("TRACKX1")
+ PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1)
+
+ PORT_START("TRACKY1")
+ PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1)
+
PORT_MODIFY("VERSION")
PORT_DIPNAME( 0x0F00, 0x0400, "GAME" )
- PORT_DIPNAME( 0x00F0, 0x0050, "MAJOR" )
- PORT_DIPNAME( 0x000F, 0x0001, "MINOR" )
+ PORT_DIPNAME( 0x00F0, 0x0030, "MAJOR" )
INPUT_PORTS_END
static INPUT_PORTS_START( gtfore04 )
- PORT_INCLUDE(iteagle)
+ PORT_INCLUDE(gtfore02)
PORT_MODIFY("VERSION")
PORT_DIPNAME( 0x0F00, 0x0400, "GAME" )
PORT_DIPNAME( 0x00F0, 0x0040, "MAJOR" )
- PORT_DIPNAME( 0x000F, 0x0000, "MINOR" )
INPUT_PORTS_END
-static INPUT_PORTS_START( gtfore02 )
- PORT_INCLUDE(iteagle)
+static INPUT_PORTS_START( gtfore05 )
+ PORT_INCLUDE(gtfore02)
PORT_MODIFY("VERSION")
PORT_DIPNAME( 0x0F00, 0x0400, "GAME" )
- PORT_DIPNAME( 0x00F0, 0x0030, "MAJOR" )
- PORT_DIPNAME( 0x000F, 0x0000, "MINOR" )
+ PORT_DIPNAME( 0x00F0, 0x0050, "MAJOR" )
INPUT_PORTS_END
static INPUT_PORTS_START( gtfore06 )
- PORT_INCLUDE(iteagle)
+ PORT_INCLUDE(gtfore02)
PORT_MODIFY("VERSION")
PORT_DIPNAME( 0x0F00, 0x0400, "GAME" )
PORT_DIPNAME( 0x00F0, 0x0060, "MAJOR" )
- PORT_DIPNAME( 0x000F, 0x0000, "MINOR" )
INPUT_PORTS_END
@@ -258,7 +258,14 @@ static INPUT_PORTS_START( carnking )
PORT_MODIFY("VERSION")
PORT_DIPNAME( 0x0F00, 0x0600, "GAME" )
PORT_DIPNAME( 0x00F0, 0x0030, "MAJOR" )
- PORT_DIPNAME( 0x000F, 0x0002, "MINOR" )
+
+ PORT_START("TRACKX1")
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ //PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1)
+
+ PORT_START("TRACKY1")
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ //PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1)
INPUT_PORTS_END