mirror of
https://github.com/holub/mame
synced 2025-05-08 07:11:42 +03:00
01859: looping, loopinga, skybump: Fatal Error crash
The CPU context is not active in a timer callback. You have to set it yourself.
This commit is contained in:
parent
48332dea92
commit
bba83b69aa
@ -226,6 +226,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
static TIMER_CALLBACK(cop420_counter_tick)
|
static TIMER_CALLBACK(cop420_counter_tick)
|
||||||
{
|
{
|
||||||
|
cpuintrf_push_context(param);
|
||||||
R.counter++;
|
R.counter++;
|
||||||
|
|
||||||
if (R.counter == 1024)
|
if (R.counter == 1024)
|
||||||
@ -233,15 +234,18 @@ static TIMER_CALLBACK(cop420_counter_tick)
|
|||||||
R.counter = 0;
|
R.counter = 0;
|
||||||
R.timerlatch = 1;
|
R.timerlatch = 1;
|
||||||
}
|
}
|
||||||
|
cpuintrf_pop_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IN Latches */
|
/* IN Latches */
|
||||||
|
|
||||||
static TIMER_CALLBACK(cop420_inil_tick)
|
static TIMER_CALLBACK(cop420_inil_tick)
|
||||||
{
|
{
|
||||||
UINT8 in = IN_IN();
|
UINT8 in;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
cpuintrf_push_context(param);
|
||||||
|
in = IN_IN();
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
R.in[i] = (R.in[i] << 1) | BIT(in, i);
|
R.in[i] = (R.in[i] << 1) | BIT(in, i);
|
||||||
@ -251,14 +255,17 @@ static TIMER_CALLBACK(cop420_inil_tick)
|
|||||||
IL |= (1 << i);
|
IL |= (1 << i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cpuintrf_pop_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Microbus */
|
/* Microbus */
|
||||||
|
|
||||||
static TIMER_CALLBACK(cop420_microbus_tick)
|
static TIMER_CALLBACK(cop420_microbus_tick)
|
||||||
{
|
{
|
||||||
UINT8 in = IN_IN();
|
UINT8 in;
|
||||||
|
|
||||||
|
cpuintrf_push_context(param);
|
||||||
|
in = IN_IN();
|
||||||
if (!BIT(in, 2))
|
if (!BIT(in, 2))
|
||||||
{
|
{
|
||||||
// chip select
|
// chip select
|
||||||
@ -280,6 +287,7 @@ static TIMER_CALLBACK(cop420_microbus_tick)
|
|||||||
R.microbus_int = 0;
|
R.microbus_int = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cpuintrf_pop_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user