diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index 5d510300572..5d9135b7fac 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -237,7 +237,7 @@ static WRITE32_HANDLER(Banksw_w) static TIMER_CALLBACK( Timercb ) { - int which = (int)ptr; + int which = (int)(FPTR)ptr; static const int num[] = { 0, 1, 9, 10 }; if(!(Timerctrl[which]&2)) @@ -501,7 +501,7 @@ static MACHINE_START(crystal) cpunum_set_irq_callback(0,icallback); for (i=0; i<4; i++) - Timer[i] = timer_alloc(Timercb, (void*)i); + Timer[i] = timer_alloc(Timercb, (void*)(FPTR)i); PatchReset(); } diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c index 1475a319654..76f0206c010 100644 --- a/src/mame/drivers/megadriv.c +++ b/src/mame/drivers/megadriv.c @@ -1408,7 +1408,7 @@ static int io_stage[3]; static TIMER_CALLBACK( io_timeout_timer_callback ) { - io_stage[(int)ptr] = -1; + io_stage[(int)(FPTR)ptr] = -1; } static void init_megadri6_io(void) @@ -1417,7 +1417,7 @@ static void init_megadri6_io(void) for (i=0; i<3; i++) { - io_timeout[i] = timer_alloc(io_timeout_timer_callback, (void*)i); + io_timeout[i] = timer_alloc(io_timeout_timer_callback, (void*)(FPTR)i); io_stage[i] = -1; } } diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 7d6cf43c988..03980052e3b 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -312,7 +312,7 @@ static WRITE32_HANDLER( timers_w ) static TIMER_CALLBACK( model2_timer_cb ) { - int tnum = (int)ptr; + int tnum = (int)(FPTR)ptr; int bit = tnum + 2; timer_adjust_oneshot(model2_timers[tnum], attotime_never, 0); @@ -349,7 +349,7 @@ static MACHINE_RESET(model2_common) for (i=0; i<4; i++) { - model2_timers[i] = timer_alloc(model2_timer_cb, (void*)i); + model2_timers[i] = timer_alloc(model2_timer_cb, (void*)(FPTR)i); timer_adjust_oneshot(model2_timers[i], attotime_never, 0); } }