mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
Fixes for 64-bit GCC. FPTR isn't just a good idea, it's the law.
This commit is contained in:
parent
8c07fef2d7
commit
5b8cc47145
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user