mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
fixes for compiling with MSVC.
This commit is contained in:
parent
e18eceb3f1
commit
53bf34c24f
@ -117,7 +117,7 @@ UINT8 devcb_stub(device_t *device, offs_t offset)
|
||||
|
||||
// static template for a read16 stub function that calls through a given READ16_MEMBER
|
||||
template<class _Class, UINT16 (_Class::*_Function)(address_space &, offs_t, UINT16)>
|
||||
UINT16 devcb_stub16(device_t *device, offs_t offset, UINT16 mask=0xffff)
|
||||
UINT16 devcb_stub16(device_t *device, offs_t offset, UINT16 mask)
|
||||
{
|
||||
_Class *target = downcast<_Class *>(device);
|
||||
return (target->*_Function)(*device->machine().memory().first_space(), offset, mask);
|
||||
@ -141,7 +141,7 @@ void devcb_stub(device_t *device, offs_t offset, UINT8 data)
|
||||
|
||||
// static template for a write16 stub function that calls through a given WRITE16_MEMBER
|
||||
template<class _Class, void (_Class::*_Function)(address_space &, offs_t, UINT16, UINT16)>
|
||||
void devcb_stub16(device_t *device, offs_t offset, UINT16 data, UINT16 mask=0xffff)
|
||||
void devcb_stub16(device_t *device, offs_t offset, UINT16 data, UINT16 mask)
|
||||
{
|
||||
_Class *target = downcast<_Class *>(device);
|
||||
(target->*_Function)(*device->machine().memory().first_space(), offset, data, mask);
|
||||
|
@ -58,7 +58,7 @@ static casserr_t coladam_ddp_identify ( cassette_image *cass, struct CassetteOpt
|
||||
// Store byte of data
|
||||
casserr_t coladam_put_byte(cassette_image *cass, int channel, double *time_index, int byte, int *prev_sign)
|
||||
{
|
||||
casserr_t err;
|
||||
casserr_t err = CASSETTE_ERROR_SUCCESS;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if(byte & 0x80)
|
||||
@ -127,7 +127,7 @@ static casserr_t coladam_ddp_load( cassette_image *cass )
|
||||
double time = 0.;
|
||||
int i, block, prev_sign=-1;
|
||||
UINT8 buffer[0x400];
|
||||
casserr_t err;
|
||||
casserr_t err = CASSETTE_ERROR_SUCCESS;
|
||||
|
||||
// It would appear that data packs that originally had the type GW data layout and headers work fine when converted to type
|
||||
// HE. Thus we set all tapes to type HE.
|
||||
@ -194,10 +194,7 @@ static casserr_t coladam_ddp_load( cassette_image *cass )
|
||||
}
|
||||
}
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return CASSETTE_ERROR_SUCCESS;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ UINT32 floppy_image_format_t::bitn_r(const UINT32 *buffer, int offset, int count
|
||||
{
|
||||
UINT32 r = 0;
|
||||
for(int i=0; i<count; i++)
|
||||
r = (r << 1) | bit_r(buffer, offset+i);
|
||||
r = (r << 1) | (UINT32) bit_r(buffer, offset+i);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ void pasti_format::map_sectors_in_track(wd_obs &obs, wd_sect_info *sect_infos)
|
||||
int hpos = (i+3) % tsize;
|
||||
int j;
|
||||
bool synced = false;
|
||||
int bcount, tend;
|
||||
int bcount=0, tend=0;
|
||||
int best_bcount=0, best_j=0;
|
||||
for(j=0; j != obs.sector_count; j++) {
|
||||
match_mfm_data(obs, hpos, obs.sectors[j].id, 6, hbyte, bcount, tend, synced);
|
||||
|
@ -535,8 +535,8 @@ static MACHINE_CONFIG_START( cubeqst, cubeqst_state )
|
||||
MCFG_LASERDISC_SIMUTREK_ADD("laserdisc")
|
||||
MCFG_LASERDISC_OVERLAY_STATIC(CUBEQST_HBLANK, CUBEQST_VCOUNT, cubeqst)
|
||||
MCFG_LASERDISC_OVERLAY_CLIP(0, 320-1, 0, 256-8)
|
||||
MCFG_LASERDISC_OVERLAY_POSITION(0.002, -0.018)
|
||||
MCFG_LASERDISC_OVERLAY_SCALE(1.0, 1.030)
|
||||
MCFG_LASERDISC_OVERLAY_POSITION(0.002f, -0.018f)
|
||||
MCFG_LASERDISC_OVERLAY_SCALE(1.0f, 1.030f)
|
||||
|
||||
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
|
||||
|
||||
|
@ -38,7 +38,7 @@ static WRITE16_HANDLER(vfd_w)
|
||||
{
|
||||
globalfr_state *state = space->machine().driver_data<globalfr_state>();
|
||||
|
||||
int clock = (data & 0x40);
|
||||
bool clock = (data & 0x40) != 0;
|
||||
int datline = (data & 0x80);
|
||||
|
||||
//Unlike MPU4, this uses positive transitions on both lines, so this may be a similar, but not identical component
|
||||
|
@ -1854,8 +1854,8 @@ READ16_MEMBER(igs017_state::lhzb2a_magic_r)
|
||||
{
|
||||
case 0x03:
|
||||
{
|
||||
UINT8 a = BITSWAP8(m_prot[0], 9,9,1,9,2,5,4,7); // 9 means 0 value
|
||||
UINT8 b = BITSWAP8(m_prot[1], 5,2,9,7,9,9,9,9);
|
||||
UINT8 a = BITSWAP8((UINT16)m_prot[0], 9,9,1,9,2,5,4,7); // 9 means 0 value
|
||||
UINT8 b = BITSWAP8((UINT16)m_prot[1], 5,2,9,7,9,9,9,9);
|
||||
return a | b;
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ SCREEN_UPDATE_IND16( astrowar )
|
||||
{
|
||||
// NOTE: similar to zac2650.c, the sprite chip runs at a different frequency than the background generator
|
||||
// the exact timing ratio is unknown, so we'll have to do with guesswork
|
||||
float s_ratio = 256.0 / 196.0;
|
||||
float s_ratio = 256.0f / 196.0f;
|
||||
|
||||
float sx = x * s_ratio;
|
||||
if ((int)(sx + 0.5) > cliprect.max_x)
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <float.h>
|
||||
#include "emu.h"
|
||||
#include "cpu/sharc/sharc.h"
|
||||
#include "machine/konppc.h"
|
||||
@ -564,7 +565,7 @@ static void draw_scanline_2d(void *dest, INT32 scanline, const poly_extent *exte
|
||||
if (color & 0xff000000)
|
||||
{
|
||||
fb[x] = color;
|
||||
zb[x] = 0x7fffffff; // FIXME
|
||||
zb[x] = FLT_MAX; // FIXME
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -609,7 +610,7 @@ static void draw_scanline_2d_tex(void *dest, INT32 scanline, const poly_extent *
|
||||
if (color & 0xff000000)
|
||||
{
|
||||
fb[x] = color;
|
||||
zb[x] = 0x7fffffff; // FIXME
|
||||
zb[x] = FLT_MAX; // FIXME
|
||||
}
|
||||
|
||||
u += du;
|
||||
|
@ -1372,7 +1372,7 @@ UINT32 N64TexturePipeT::Fetch(INT32 s, INT32 t, INT32 tilenum, const rdp_poly_st
|
||||
tbase += tile[tilenum].tmem;
|
||||
UINT32 tpal = tile[tilenum].palette;
|
||||
|
||||
UINT32 index = (tformat << 4) | (tsize << 2) | (object.OtherModes.en_tlut << 1) | object.OtherModes.tlut_type;
|
||||
UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type;
|
||||
|
||||
return ((this)->*(TexelFetch[index]))(s, t, tbase, tpal, userdata);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user