summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/cheat.c8
-rw-r--r--src/emu/cpu/rsp/rsp.c6
-rw-r--r--src/emu/cpu/sm8500/sm8500d.c1
-rw-r--r--src/emu/driver.h14
-rw-r--r--src/emu/emupal.c8
-rw-r--r--src/emu/rendlay.c16
-rw-r--r--src/emu/sound/msm5232.c4
-rw-r--r--src/emu/sound/scsp.c42
-rw-r--r--src/emu/sound/scsplfo.c11
-rw-r--r--src/emu/sound/sid.c24
-rw-r--r--src/emu/sound/sidenvel.c24
-rw-r--r--src/emu/sound/sidenvel.h31
-rw-r--r--src/emu/sound/sidvoice.c4
-rw-r--r--src/emu/video.c2
-rw-r--r--src/mame/audio/cinemat.c4
-rw-r--r--src/mame/audio/galaxian.c10
-rw-r--r--src/mame/drivers/bfm_sc2.c4
-rw-r--r--src/mame/video/bwing.c2
-rw-r--r--src/mame/video/carpolo.c26
-rw-r--r--src/mame/video/dkong.c2
-rw-r--r--src/mame/video/mrdo.c2
-rw-r--r--src/mame/video/namcos22.c2
-rw-r--r--src/mame/video/segasyse.c2
-rw-r--r--src/osd/windows/drawd3d.c4
-rw-r--r--src/osd/windows/drawdd.c2
-rw-r--r--src/osd/windows/eivc.h15
-rw-r--r--src/osd/windows/vconv.c3
27 files changed, 147 insertions, 126 deletions
diff --git a/src/emu/cheat.c b/src/emu/cheat.c
index dcc43aa9334..60aaa874730 100644
--- a/src/emu/cheat.c
+++ b/src/emu/cheat.c
@@ -7254,11 +7254,11 @@ static int EditWatch(running_machine *machine, WatchInfo * entry, int selection)
break;
case kMenu_XPosition:
- entry->x -= 0.01;
+ entry->x -= 0.01f;
break;
case kMenu_YPosition:
- entry->y -= 0.01;
+ entry->y -= 0.01f;
break;
case kMenu_Skip:
@@ -7349,11 +7349,11 @@ static int EditWatch(running_machine *machine, WatchInfo * entry, int selection)
break;
case kMenu_XPosition:
- entry->x += 0.01;
+ entry->x += 0.01f;
break;
case kMenu_YPosition:
- entry->y += 0.01;
+ entry->y += 0.01f;
break;
case kMenu_Skip:
diff --git a/src/emu/cpu/rsp/rsp.c b/src/emu/cpu/rsp/rsp.c
index b42f49a2abc..94b9675d058 100644
--- a/src/emu/cpu/rsp/rsp.c
+++ b/src/emu/cpu/rsp/rsp.c
@@ -120,9 +120,9 @@ typedef struct
#define S_ACCUM_M (2 << 4)
#define S_ACCUM_L (1 << 4)
-#define M_ACCUM_H ((INT64)0x0000FFFFll << S_ACCUM_H)
-#define M_ACCUM_M ((INT64)0x0000FFFFll << S_ACCUM_M)
-#define M_ACCUM_L ((INT64)0x0000FFFFll << S_ACCUM_L)
+#define M_ACCUM_H (((INT64)0x0000FFFF) << S_ACCUM_H)
+#define M_ACCUM_M (((INT64)0x0000FFFF) << S_ACCUM_M)
+#define M_ACCUM_L (((INT64)0x0000FFFF) << S_ACCUM_L)
#define R_ACCUM_H(x) ((INT16)((ACCUM(x) >> S_ACCUM_H) & 0x00FFFF))
#define R_ACCUM_M(x) ((INT16)((ACCUM(x) >> S_ACCUM_M) & 0x00FFFF))
diff --git a/src/emu/cpu/sm8500/sm8500d.c b/src/emu/cpu/sm8500/sm8500d.c
index b4d2c336a9e..bd84f860f62 100644
--- a/src/emu/cpu/sm8500/sm8500d.c
+++ b/src/emu/cpu/sm8500/sm8500d.c
@@ -372,6 +372,7 @@ unsigned sm8500_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *
case AM_r1:
ea = oprom[pos++];
switch( ea & 0xC0 ) {
+ case 0x00:
dst += sprintf( dst, "@r%02Xh", (ea >> 3 ) & 0x07 );
break;
case 0x40:
diff --git a/src/emu/driver.h b/src/emu/driver.h
index 5772577830c..8eb0ed68e69 100644
--- a/src/emu/driver.h
+++ b/src/emu/driver.h
@@ -454,15 +454,15 @@ struct _game_driver
screen->defstate.visarea.max_y = (maxy); \
#define MDRV_SCREEN_DEFAULT_POSITION(_xscale, _xoffs, _yscale, _yoffs) \
- screen->xoffset = (_xoffs); \
- screen->xscale = (_xscale); \
- screen->yoffset = (_yoffs); \
- screen->yscale = (_yscale); \
+ screen->xoffset = (float)(_xoffs); \
+ screen->xscale = (float)(_xscale); \
+ screen->yoffset = (float)(_yoffs); \
+ screen->yscale = (float)(_yscale); \
/* add/remove speakers */
#define MDRV_SPEAKER_ADD(tag, x, y, z) \
- driver_add_speaker(machine, (tag), (x), (y), (z)); \
+ driver_add_speaker(machine, (tag), (float)(x), (float)(y), (float)(z)); \
#define MDRV_SPEAKER_REMOVE(tag) \
driver_remove_speaker(machine, (tag)); \
@@ -505,7 +505,7 @@ struct _game_driver
sound = driver_find_sound(machine, tag); \
if (sound) \
{ \
- sound->type = SOUND_##_type; \
+ sound->type = SOUND_##_type; \
sound->clock = (_clock); \
sound->config = NULL; \
sound->routes = 0; \
@@ -516,7 +516,7 @@ struct _game_driver
{ \
sound->route[sound->routes].output = (_output); \
sound->route[sound->routes].target = (_target); \
- sound->route[sound->routes].gain = (_gain); \
+ sound->route[sound->routes].gain = (float)(_gain); \
sound->route[sound->routes].input = (_input); \
sound->routes++; \
} \
diff --git a/src/emu/emupal.c b/src/emu/emupal.c
index 76e4f3366b7..92f1a75ad79 100644
--- a/src/emu/emupal.c
+++ b/src/emu/emupal.c
@@ -623,9 +623,9 @@ static void allocate_palette(running_machine *machine, palette_private *palette)
/* configure the groups */
if (palette->shadow_group != 0)
- palette_group_set_contrast(machine->palette, palette->shadow_group, PALETTE_DEFAULT_SHADOW_FACTOR);
+ palette_group_set_contrast(machine->palette, palette->shadow_group, (float)PALETTE_DEFAULT_SHADOW_FACTOR);
if (palette->hilight_group != 0)
- palette_group_set_contrast(machine->palette, palette->hilight_group, PALETTE_DEFAULT_HIGHLIGHT_FACTOR);
+ palette_group_set_contrast(machine->palette, palette->hilight_group, (float)PALETTE_DEFAULT_HIGHLIGHT_FACTOR);
/* set the initial colors to a standard rainbow */
for (index = 0; index < machine->drv->total_colors; index++)
@@ -726,7 +726,7 @@ static void allocate_shadow_tables(running_machine *machine, palette_private *pa
{
palette->shadow_table[0].base = table;
palette->shadow_table[2].base = table + 32768;
- configure_rgb_shadows(machine, 0, PALETTE_DEFAULT_SHADOW_FACTOR);
+ configure_rgb_shadows(machine, 0, (float)PALETTE_DEFAULT_SHADOW_FACTOR);
}
}
@@ -749,7 +749,7 @@ static void allocate_shadow_tables(running_machine *machine, palette_private *pa
{
palette->shadow_table[1].base = table;
palette->shadow_table[3].base = table + 32768;
- configure_rgb_shadows(machine, 1, PALETTE_DEFAULT_HIGHLIGHT_FACTOR);
+ configure_rgb_shadows(machine, 1, (float)PALETTE_DEFAULT_HIGHLIGHT_FACTOR);
}
}
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index ab2ac02f581..49e10daae38 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -1929,18 +1929,18 @@ static int load_bounds(xml_data_node *boundsnode, render_bounds *bounds)
if (xml_get_attribute(boundsnode, "left") != NULL)
{
/* left/right/top/bottom format */
- bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "left", 0.0);
- bounds->x1 = xml_get_attribute_float_with_subst(boundsnode, "right", 1.0);
- bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "top", 0.0);
- bounds->y1 = xml_get_attribute_float_with_subst(boundsnode, "bottom", 1.0);
+ bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "left", 0.0f);
+ bounds->x1 = xml_get_attribute_float_with_subst(boundsnode, "right", 1.0f);
+ bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "top", 0.0f);
+ bounds->y1 = xml_get_attribute_float_with_subst(boundsnode, "bottom", 1.0f);
}
else if (xml_get_attribute(boundsnode, "x") != NULL)
{
/* x/y/width/height format */
- bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "x", 0.0);
- bounds->x1 = bounds->x0 + xml_get_attribute_float_with_subst(boundsnode, "width", 1.0);
- bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "y", 0.0);
- bounds->y1 = bounds->y0 + xml_get_attribute_float_with_subst(boundsnode, "height", 1.0);
+ bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "x", 0.0f);
+ bounds->x1 = bounds->x0 + xml_get_attribute_float_with_subst(boundsnode, "width", 1.0f);
+ bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "y", 0.0f);
+ bounds->y1 = bounds->y0 + xml_get_attribute_float_with_subst(boundsnode, "height", 1.0f);
}
else
{
diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c
index cc8024a613f..710b468c5ec 100644
--- a/src/emu/sound/msm5232.c
+++ b/src/emu/sound/msm5232.c
@@ -186,7 +186,7 @@ static void msm5232_init_tables( MSM5232 *chip )
{
double clockscale = (double)chip->clock / 2119040.0;
double time = (ATBL[i] / 1000.0) / clockscale; /* attack time in seconds */
- chip->ar_tbl[i] = (float)0.50 * ( (1.0/time) / (double)chip->rate );
+ chip->ar_tbl[i] = 0.50 * ( (1.0/time) / (double)chip->rate );
/* logerror("ATBL[%i] = %20.16f time = %f s\n",i, chip->ar_tbl[i], time); */
}
@@ -194,7 +194,7 @@ static void msm5232_init_tables( MSM5232 *chip )
{
double clockscale = (double)chip->clock / 2119040.0;
double time = (DTBL[i] / 1000.0) / clockscale; /* decay time in seconds */
- chip->dr_tbl[i] = (float)0.50 * ( (1.0/time) / (double)chip->rate );
+ chip->dr_tbl[i] = 0.50 * ( (1.0/time) / (double)chip->rate );
/* logerror("DTBL[%i] = %20.16f time = %f s\n",i, chip->dr_tbl[i], time); */
}
}
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index 2b7c54119b1..892ab0157f8 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -232,7 +232,7 @@ static void dma_scsp(struct _SCSP *SCSP); /*SCSP DMA transfer function*/
#define scsp_dexe scsp_regs[0x16/2] & 0x1000
#define dma_transfer_end ((scsp_regs[0x24/2] & 0x10)>>4)|(((scsp_regs[0x26/2] & 0x10)>>4)<<1)|(((scsp_regs[0x28/2] & 0x10)>>4)<<2)
-static const float SDLT[8]={-1000000.0,-36.0,-30.0,-24.0,-18.0,-12.0,-6.0,0.0};
+static const float SDLT[8]={-1000000.0f,-36.0f,-30.0f,-24.0f,-18.0f,-12.0f,-6.0f,0.0f};
static stream_sample_t *bufferl;
static stream_sample_t *bufferr;
@@ -502,7 +502,7 @@ static void SCSP_StopSlot(struct _SLOT *slot,int keyoff)
slot->udata.data[0]&=~0x800;
}
-#define log_base_2(n) (log((float) n)/log((float) 2))
+#define log_base_2(n) (log((double)(n))/log(2.0))
static void SCSP_Init(struct _SCSP *SCSP, const struct SCSPinterface *intf, int sndindex)
{
@@ -541,15 +541,15 @@ static void SCSP_Init(struct _SCSP *SCSP, const struct SCSPinterface *intf, int
for(i=0;i<0x400;++i)
{
- //float fcent=(double) 1200.0*log_base_2((double)(((double) 1024.0+(double)i)/(double)1024.0));
+ //float fcent=(double) 1200.0*log_base_2((1024.0+(double)i)/1024.0);
//fcent=(double) 44100.0*pow(2.0,fcent/1200.0);
- float fcent=44100.0*(1024.0+(double) i)/1024.0;
+ float fcent=44100.0f*(1024.0f+(float)i)/1024.0f;
FNS_Table[i]=(float) (1<<SHIFT) *fcent;
}
for(i=0;i<0x400;++i)
{
- float envDB=((float)(3*(i-0x3ff)))/32.0;
+ float envDB=((float)(3*(i-0x3ff)))/32.0f;
float scale=(float)(1<<SHIFT);
EG_TABLE[i]=(INT32)(pow(10.0,envDB/20.0)*scale);
}
@@ -559,28 +559,28 @@ static void SCSP_Init(struct _SCSP *SCSP, const struct SCSPinterface *intf, int
int iTL =(i>>0x0)&0xff;
int iPAN=(i>>0x8)&0x1f;
int iSDL=(i>>0xD)&0x07;
- float TL=1.0;
- float SegaDB=0;
- float fSDL=1.0;
- float PAN=1.0;
+ float TL=1.0f;
+ float SegaDB=0.0f;
+ float fSDL=1.0f;
+ float PAN=1.0f;
float LPAN,RPAN;
- if(iTL&0x01) SegaDB-=0.4;
- if(iTL&0x02) SegaDB-=0.8;
- if(iTL&0x04) SegaDB-=1.5;
- if(iTL&0x08) SegaDB-=3;
- if(iTL&0x10) SegaDB-=6;
- if(iTL&0x20) SegaDB-=12;
- if(iTL&0x40) SegaDB-=24;
- if(iTL&0x80) SegaDB-=48;
+ if(iTL&0x01) SegaDB-=0.4f;
+ if(iTL&0x02) SegaDB-=0.8f;
+ if(iTL&0x04) SegaDB-=1.5f;
+ if(iTL&0x08) SegaDB-=3.0f;
+ if(iTL&0x10) SegaDB-=6.0f;
+ if(iTL&0x20) SegaDB-=12.0f;
+ if(iTL&0x40) SegaDB-=24.0f;
+ if(iTL&0x80) SegaDB-=48.0f;
TL=pow(10.0,SegaDB/20.0);
SegaDB=0;
- if(iPAN&0x1) SegaDB-=3;
- if(iPAN&0x2) SegaDB-=6;
- if(iPAN&0x4) SegaDB-=12;
- if(iPAN&0x8) SegaDB-=24;
+ if(iPAN&0x1) SegaDB-=3.0f;
+ if(iPAN&0x2) SegaDB-=6.0f;
+ if(iPAN&0x4) SegaDB-=12.0f;
+ if(iPAN&0x8) SegaDB-=24.0f;
if((iPAN&0xf)==0xf) PAN=0.0;
else PAN=pow(10.0,SegaDB/20.0);
diff --git a/src/emu/sound/scsplfo.c b/src/emu/sound/scsplfo.c
index 01023a4ba82..4926d498fd4 100644
--- a/src/emu/sound/scsplfo.c
+++ b/src/emu/sound/scsplfo.c
@@ -28,10 +28,13 @@ struct _LFO
static int PLFO_TRI[256],PLFO_SQR[256],PLFO_SAW[256],PLFO_NOI[256];
static int ALFO_TRI[256],ALFO_SQR[256],ALFO_SAW[256],ALFO_NOI[256];
-static const float LFOFreq[32]={0.17,0.19,0.23,0.27,0.34,0.39,0.45,0.55,0.68,0.78,0.92,1.10,1.39,1.60,1.87,2.27,
- 2.87,3.31,3.92,4.79,6.15,7.18,8.60,10.8,14.4,17.2,21.5,28.7,43.1,57.4,86.1,172.3};
-static const float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0};
-static const float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494};
+static const float LFOFreq[32]=
+{
+ 0.17f,0.19f,0.23f,0.27f,0.34f,0.39f,0.45f,0.55f,0.68f,0.78f,0.92f,1.10f,1.39f,1.60f,1.87f,2.27f,
+ 2.87f,3.31f,3.92f,4.79f,6.15f,7.18f,8.60f,10.8f,14.4f,17.2f,21.5f,28.7f,43.1f,57.4f,86.1f,172.3f
+};
+static const float ASCALE[8]={0.0f,0.4f,0.8f,1.5f,3.0f,6.0f,12.0f,24.0f};
+static const float PSCALE[8]={0.0f,7.0f,13.5f,27.0f,55.0f,112.0f,230.0f,494.0f};
static int PSCALES[8][256];
static int ASCALES[8][256];
diff --git a/src/emu/sound/sid.c b/src/emu/sound/sid.c
index c5b732b54ec..ceaa7803a48 100644
--- a/src/emu/sound/sid.c
+++ b/src/emu/sound/sid.c
@@ -156,10 +156,10 @@ void filterTableInit(void)
UINT16 uk;
/* Parameter calculation has not been moved to a separate function */
/* by purpose. */
- const float filterRefFreq = 44100.0;
+ const float filterRefFreq = 44100.0f;
- float yMax = 1.0;
- float yMin = 0.01;
+ float yMax = 1.0f;
+ float yMin = 0.01f;
float yAdd;
float yTmp, rk, rk2;
@@ -183,9 +183,9 @@ void filterTableInit(void)
}
/*extern float bandPassParam[0x800]; */
- yMax = 0.22;
- yMin = 0.05; /* less for some R1/R4 chips */
- yAdd = (yMax-yMin)/2048.0;
+ yMax = 0.22f;
+ yMin = 0.05f; /* less for some R1/R4 chips */
+ yAdd = (yMax-yMin)/2048.0f;
yTmp = yMin;
uk = 0;
/* Some C++ compilers still have non-local scope! */
@@ -197,8 +197,8 @@ void filterTableInit(void)
}
/*extern float filterResTable[16]; */
- resDyMax = 1.0;
- resDyMin = 2.0;
+ resDyMax = 1.0f;
+ resDyMin = 2.0f;
resDy = resDyMin;
for ( uk = 0; uk < 16; uk++ )
{
@@ -282,12 +282,12 @@ void sid6581_port_w (SID6581 *This, int offset, int data)
{
This->filter.Value = 0x7ff & ( (This->reg[0x15]&7) | ( (UINT16)This->reg[0x16] << 3 ));
if (This->filter.Type == 0x20)
- This->filter.Dy = bandPassParam ? bandPassParam[This->filter.Value] : 0.0;
+ This->filter.Dy = bandPassParam ? bandPassParam[This->filter.Value] : 0.0f;
else
- This->filter.Dy = lowPassParam ? lowPassParam[This->filter.Value] : 0.0;
+ This->filter.Dy = lowPassParam ? lowPassParam[This->filter.Value] : 0.0f;
This->filter.ResDy = filterResTable[This->reg[0x17] >> 4] - This->filter.Dy;
- if ( This->filter.ResDy < 1.0 )
- This->filter.ResDy = 1.0;
+ if ( This->filter.ResDy < 1.0f )
+ This->filter.ResDy = 1.0f;
}
sidEmuSet( &This->optr1 );
diff --git a/src/emu/sound/sidenvel.c b/src/emu/sound/sidenvel.c
index 83a9f774d0b..65a02f8510f 100644
--- a/src/emu/sound/sidenvel.c
+++ b/src/emu/sound/sidenvel.c
@@ -50,13 +50,13 @@ static const float attackTimes[16] =
{
/* milliseconds */
#if defined(SID_REFTIMES)
- 2,8,16,24,38,56,68,80,
- 100,250,500,800,1000,3000,5000,8000
+ 2.0f, 8.0f, 16.0f, 24.0f, 38.0f, 56.0f, 68.0f, 80.0f,
+ 100.0f, 250.0f, 500.0f, 800.0f, 1000.0f, 3000.0f, 5000.0f, 8000.0f
#else
- 2.2528606, 8.0099577, 15.7696042, 23.7795619, 37.2963655, 55.0684591,
- 66.8330845, 78.3473987,
- 98.1219818, 244.554021, 489.108042, 782.472742, 977.715461, 2933.64701,
- 4889.07793, 7822.72493
+ 2.2528606f, 8.0099577f, 15.7696042f, 23.7795619f, 37.2963655f, 55.0684591f,
+ 66.8330845f, 78.3473987f,
+ 98.1219818f, 244.554021f, 489.108042f, 782.472742f, 977.715461f, 2933.64701f,
+ 4889.07793f, 7822.72493f
#endif
};
@@ -64,13 +64,13 @@ static const float decayReleaseTimes[16] =
{
/* milliseconds */
#if defined(SID_REFTIMES)
- 8,24,48,72,114,168,204,240,
- 300,750,1500,2400,3000,9000,15000,24000
+ 8.0f, 24.0f, 48.0f, 72.0f, 114.0f, 168.0f, 204.0f, 240.0f,
+ 300.0f, 750.0f, 1500.0f, 2400.0f, 3000.0f, 9000.0f, 15000.0f, 24000.0f
#else
- 8.91777693, 24.594051, 48.4185907, 73.0116639, 114.512475, 169.078356,
- 205.199432, 240.551975,
- 301.266125, 750.858245, 1501.71551, 2402.43682, 3001.89298, 9007.21405,
- 15010.998, 24018.2111
+ 8.91777693f, 24.594051f, 48.4185907f, 73.0116639f, 114.512475f, 169.078356f,
+ 205.199432f, 240.551975f,
+ 301.266125f, 750.858245f, 1501.71551f, 2402.43682f, 3001.89298f, 9007.21405f,
+ 15010.998f, 24018.2111f
#endif
};
diff --git a/src/emu/sound/sidenvel.h b/src/emu/sound/sidenvel.h
index a609770cb79..4d2019e48f8 100644
--- a/src/emu/sound/sidenvel.h
+++ b/src/emu/sound/sidenvel.h
@@ -13,20 +13,23 @@ void enveEmuResetOperator(sidOperator* pVoice);
extern const ptr2sidUwordFunc enveModeTable[]; // -> envelope.cpp
extern const UINT8 masterVolumeLevels[16]; // -> envelope.cpp
-static const UINT8 ENVE_STARTATTACK = 0;
-static const UINT8 ENVE_STARTRELEASE = 2;
-
-static const UINT8 ENVE_ATTACK = 4;
-static const UINT8 ENVE_DECAY = 6;
-static const UINT8 ENVE_SUSTAIN = 8;
-static const UINT8 ENVE_RELEASE = 10;
-static const UINT8 ENVE_SUSTAINDECAY = 12;
-static const UINT8 ENVE_MUTE = 14;
-
-static const UINT8 ENVE_STARTSHORTATTACK = 16;
-static const UINT8 ENVE_SHORTATTACK = 16;
-
-static const UINT8 ENVE_ALTER = 32;
+enum
+{
+ ENVE_STARTATTACK = 0,
+ ENVE_STARTRELEASE = 2,
+
+ ENVE_ATTACK = 4,
+ ENVE_DECAY = 6,
+ ENVE_SUSTAIN = 8,
+ ENVE_RELEASE = 10,
+ ENVE_SUSTAINDECAY = 12,
+ ENVE_MUTE = 14,
+
+ ENVE_STARTSHORTATTACK = 16,
+ ENVE_SHORTATTACK = 16,
+
+ ENVE_ALTER = 32
+};
#endif
diff --git a/src/emu/sound/sidvoice.c b/src/emu/sound/sidvoice.c
index a1ca3fddd72..3ee758e84ab 100644
--- a/src/emu/sound/sidvoice.c
+++ b/src/emu/sound/sidvoice.c
@@ -32,9 +32,7 @@ void sidInitMixerEngine(void)
INT32 si, sj ;
/* 8-bit volume modulation tables. */
- float filterAmpl = 1.0;
-
- filterAmpl = 0.7;
+ float filterAmpl = 0.7f;
ampMod1x8=(INT8*) auto_malloc(256*256);
diff --git a/src/emu/video.c b/src/emu/video.c
index 6e2b4fee4ea..29e34fdc552 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -1552,7 +1552,7 @@ static void update_frameskip(void)
/* if we're throttling and autoframeskip is on, adjust */
if (effective_throttle() && effective_autoframeskip() && global.frameskip_counter == 0)
{
- float speed = global.speed * 0.01;
+ double speed = global.speed * 0.01;
/* if we're too fast, attempt to increase the frameskip */
if (global.speed_percent >= 0.995 * speed)
diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c
index 264c16be9ac..e4b79b2275b 100644
--- a/src/mame/audio/cinemat.c
+++ b/src/mame/audio/cinemat.c
@@ -976,9 +976,9 @@ static void solarq_sound_w(UINT8 sound_val, UINT8 bits_changed)
if (sample_playing(2) && cpu_getcurrentframe() > last_frame)
{
if (current_volume > target_volume)
- current_volume -= 0.078;
+ current_volume -= 0.078f;
if (current_volume < target_volume)
- current_volume += 0.078;
+ current_volume += 0.078f;
if (current_volume > 0)
sample_set_volume(2, current_volume);
else
diff --git a/src/mame/audio/galaxian.c b/src/mame/audio/galaxian.c
index 697e3df8a39..7ebf571afdd 100644
--- a/src/mame/audio/galaxian.c
+++ b/src/mame/audio/galaxian.c
@@ -19,11 +19,11 @@
#define SHOOT_LENGTH 13000
#define TOOTHSAW_LENGTH 16
-#define TOOTHSAW_VOLUME 36
+#define TOOTHSAW_VOLUME 0.36f
#define STEPS 16
-#define LFO_VOLUME 0.06
-#define SHOOT_VOLUME 0.50
-#define NOISE_VOLUME 0.50
+#define LFO_VOLUME 0.06f
+#define SHOOT_VOLUME 0.50f
+#define NOISE_VOLUME 0.50f
#define NOISE_AMPLITUDE (70*256)
#define TOOTHSAW_AMPLITUDE (64*256)
@@ -344,7 +344,7 @@ static void galaxian_sh_start(void)
vol = 0;
tone_stream = stream_create(0,1,SOUND_CLOCK/STEPS,NULL,tone_update);
- stream_set_output_gain(tone_stream, 0, TOOTHSAW_VOLUME / 100.0);
+ stream_set_output_gain(tone_stream, 0, TOOTHSAW_VOLUME);
sample_set_volume(CHANNEL_NOISE,0);
sample_start_raw(CHANNEL_NOISE,noisewave,NOISE_LENGTH,NOISE_RATE,1);
diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c
index ccf76af8517..09131c17263 100644
--- a/src/mame/drivers/bfm_sc2.c
+++ b/src/mame/drivers/bfm_sc2.c
@@ -763,7 +763,7 @@ static WRITE8_HANDLER( volume_override_w )
if ( old != volume_override )
{
- float percent = volume_override?1.0:(32-global_volume)/32.0;
+ float percent = volume_override? 1.0f : (32-global_volume)/32.0f;
sndti_set_output_gain(SOUND_YM2413, 0, 0, percent);
sndti_set_output_gain(SOUND_YM2413, 0, 1, percent);
@@ -875,7 +875,7 @@ static WRITE8_HANDLER( expansion_latch_w )
}
{
- float percent = volume_override?1.0:(32-global_volume)/32.0;
+ float percent = volume_override ? 1.0f : (32-global_volume)/32.0f;
sndti_set_output_gain(SOUND_YM2413, 0, 0, percent);
sndti_set_output_gain(SOUND_YM2413, 0, 1, percent);
diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c
index 9b50086c27a..5241f7e4e8a 100644
--- a/src/mame/video/bwing.c
+++ b/src/mame/video/bwing.c
@@ -130,7 +130,7 @@ WRITE8_HANDLER( bwing_scrollreg_w )
WRITE8_HANDLER( bwing_paletteram_w )
{
- static const float rgb[4][3]={{0.85,0.95,1.00},{0.90,1.00,1.00},{0.80,1.00,1.00},{0.75,0.90,1.10}};
+ static const float rgb[4][3]={{0.85f,0.95f,1.00f},{0.90f,1.00f,1.00f},{0.80f,1.00f,1.00f},{0.75f,0.90f,1.10f}};
int r, g, b, i;
paletteram[offset] = data;
diff --git a/src/mame/video/carpolo.c b/src/mame/video/carpolo.c
index d13e8de2e85..f153f2535c1 100644
--- a/src/mame/video/carpolo.c
+++ b/src/mame/video/carpolo.c
@@ -76,19 +76,25 @@ static mame_bitmap *sprite_border_collision_bitmap;
PALETTE_INIT( carpolo )
{
/* thanks to Jarek Burczynski for analyzing the circuit */
-// const static float MAX_VOLTAGE = 6.9620;
- const static float MIN_VOLTAGE = 1.7434;
- const static float MAX_VOLTAGE = 5.5266;
+ //static const float MAX_VOLTAGE = 6.9620f;
+ static const float MIN_VOLTAGE = 1.7434f;
+ static const float MAX_VOLTAGE = 5.5266f;
- const static float r_voltage[] = { 1.7434, 2.1693, 2.5823, 3.0585,
- 3.4811, 4.0707, 4.7415, 5.4251 };
+ static const float r_voltage[] =
+ {
+ 1.7434f, 2.1693f, 2.5823f, 3.0585f, 3.4811f, 4.0707f, 4.7415f, 5.4251f
+ };
- const static float g_voltage[] = { 1.7434, 2.1693, 2.5823, 3.0585,
- 3.4811, 4.0707, 4.7415, 5.4251 };
-// const static float g_voltage[] = { 4.7871, 5.0613, 5.3079, 5.6114,
-// 5.7940, 6.1608, 6.5436, 6.9620 };
+ static const float g_voltage[] =
+ {
+ 1.7434f, 2.1693f, 2.5823f, 3.0585f, 3.4811f, 4.0707f, 4.7415f, 5.4251f
+ //4.7871f, 5.0613f, 5.3079f, 5.6114f, 5.7940f, 6.1608f, 6.5436f, 6.9620f
+ };
- const static float b_voltage[] = { 1.9176, 2.8757, 3.9825, 5.5266 };
+ static const float b_voltage[] =
+ {
+ 1.9176f, 2.8757f, 3.9825f, 5.5266f
+ };
int i;
diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c
index 57bb1a47973..a7415a745a1 100644
--- a/src/mame/video/dkong.c
+++ b/src/mame/video/dkong.c
@@ -668,7 +668,7 @@ INLINE double CD4049(running_machine *machine, double x)
#define RC32 ((18e3 + 68e3) * 33e-6)
#define RC4 (90e3 * 0.47e-6)
#define dt (1./60./(double) VTOTAL)
-#define period2 (((long long)(PIXEL_CLOCK) * ( 33L * 68L )) / (long)10000000L / 3) // period/2 in pixel ...
+#define period2 (((INT64)(PIXEL_CLOCK) * ( 33L * 68L )) / (INT32)10000000L / 3) // period/2 in pixel ...
static void radarscp_step(running_machine *machine, int line_cnt)
{
diff --git a/src/mame/video/mrdo.c b/src/mame/video/mrdo.c
index 8d744c8f969..72c5011baea 100644
--- a/src/mame/video/mrdo.c
+++ b/src/mame/video/mrdo.c
@@ -59,7 +59,7 @@ PALETTE_INIT( mrdo )
const int pull = 200;
float pot[16];
int weight[16];
- const float potadjust = 0.2; /* diode voltage drop */
+ const float potadjust = 0.2f; /* diode voltage drop */
for (i = 15;i >= 0;i--)
{
diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c
index ea5b280d6b1..adc3c95a8ca 100644
--- a/src/mame/video/namcos22.c
+++ b/src/mame/video/namcos22.c
@@ -706,7 +706,7 @@ matrix3d_Multiply( float A[4][4], float B[4][4] )
{
for(col=0;col<4;col++)
{
- float sum = 0.0;
+ float sum = 0.0f;
int i;
for( i=0; i<4; i++ )
{
diff --git a/src/mame/video/segasyse.c b/src/mame/video/segasyse.c
index d43ef9f93f2..5a57b8269b7 100644
--- a/src/mame/video/segasyse.c
+++ b/src/mame/video/segasyse.c
@@ -465,7 +465,7 @@ static void draw_sprite_line(UINT8 *dest, UINT8 chip, UINT8 line)
if ( (line >= ypos) && (line < ypos+sheight) ) {
int xpos;
- UINT8 sprnum;
+ UINT16 sprnum;
UINT8 spline;
spline = line - ypos;
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index 1cb7d6c0c9c..57f29811aa1 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -1241,7 +1241,7 @@ static void pick_best_mode(win_window_info *window)
INT32 target_width, target_height;
d3d_info *d3d = window->drawdata;
INT32 minwidth, minheight;
- float best_score = 0.0;
+ float best_score = 0.0f;
int maxmodes;
int modenum;
@@ -1295,7 +1295,7 @@ static void pick_best_mode(win_window_info *window)
// if refresh is smaller than we'd like, it only scores up to 0.1
if ((double)mode.RefreshRate < target_refresh)
- refresh_score *= 0.1;
+ refresh_score *= 0.1f;
// if we're looking for a particular refresh, make sure it matches
if (mode.RefreshRate == window->refresh)
diff --git a/src/osd/windows/drawdd.c b/src/osd/windows/drawdd.c
index e2aed62e832..8b450860685 100644
--- a/src/osd/windows/drawdd.c
+++ b/src/osd/windows/drawdd.c
@@ -1261,7 +1261,7 @@ static HRESULT WINAPI enum_modes_callback(LPDDSURFACEDESC2 desc, LPVOID context)
// if refresh is smaller than we'd like, it only scores up to 0.1
if ((double)desc->dwRefreshRate < einfo->target_refresh)
- refresh_score *= 0.1;
+ refresh_score *= 0.1f;
// if we're looking for a particular refresh, make sure it matches
if (desc->dwRefreshRate == einfo->window->refresh)
diff --git a/src/osd/windows/eivc.h b/src/osd/windows/eivc.h
index bd3d66b5814..bb13b70cd9f 100644
--- a/src/osd/windows/eivc.h
+++ b/src/osd/windows/eivc.h
@@ -12,13 +12,24 @@
#ifndef __EIVC__
#define __EIVC__
-#ifdef PTR64
+#if (_MSC_VER >= 1400)
#include <intrin.h>
-#pragma intrinsic(_BitScanReverse)
#else
+long __cdecl _InterlockedIncrement(long volatile *);
+long __cdecl _InterlockedDecrement(long volatile *);
+long _InterlockedExchange(long volatile *, long);
+long _InterlockedCompareExchange (long volatile *, long, long);
+long _InterlockedExchangeAdd(long volatile *, long);
+unsigned char _BitScanReverse(unsigned long *Index, unsigned long Mask);
+#endif
+
+#pragma intrinsic(_InterlockedIncrement)
+#pragma intrinsic(_InterlockedDecrement)
#pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd)
+#if (_MSC_VER >= 1310)
+#pragma intrinsic(_BitScanReverse)
#endif
diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c
index 1fd6c912c6c..5e0efbabdc7 100644
--- a/src/osd/windows/vconv.c
+++ b/src/osd/windows/vconv.c
@@ -67,8 +67,7 @@ static const translation_info gcc_translate[] =
{ 0, "-fno-strict-aliasing", "/Oa" },
{ 0, "-fno-omit-frame-pointer", "" },
{ 0, "-Werror", "/WX" },
- { VS2005, "-Wall", "/Wall /W3 /wd4018 /wd4146 /wd4242 /wd4244 /wd4305 /wd4619 /wd4702 /wd4706 /wd4710 /wd4711 /wd4738 /wd4826" },
- { VS7, "-Wall", "/Wall /W3 /wd4018 /wd4146 /wd4242 /wd4244 /wd4305 /wd4550 /wd4619 /wd4702 /wd4706 /wd4710 /wd4711 /wd4826" },
+ { VS7, "-Wall", "/Wall /W3 /wd4018 /wd4146 /wd4242 /wd4244 /wd4619 /wd4702 /wd4706 /wd4710 /wd4711 /wd4738 /wd4826" },
{ 0, "-Wall", "/W0" },
{ VS7, "-Wno-unused", "/wd4100 /wd4101 /wd4102" },
{ 0, "-W*", "" },