mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
modernization or timer callbacks part 2 (no whatsnew)
This commit is contained in:
parent
ef6f5d0a52
commit
3679f744c2
@ -479,11 +479,10 @@ void st_state::mouse_tick()
|
||||
// TIMER_CALLBACK( st_mouse_tick )
|
||||
//-------------------------------------------------
|
||||
|
||||
static TIMER_CALLBACK( st_mouse_tick )
|
||||
TIMER_CALLBACK_MEMBER(st_state::st_mouse_tick)
|
||||
{
|
||||
st_state *state = machine.driver_data<st_state>();
|
||||
|
||||
state->mouse_tick();
|
||||
mouse_tick();
|
||||
}
|
||||
|
||||
|
||||
@ -776,11 +775,10 @@ void ste_state::dmasound_tick()
|
||||
// TIMER_CALLBACK( atariste_dmasound_tick )
|
||||
//-------------------------------------------------
|
||||
|
||||
static TIMER_CALLBACK( atariste_dmasound_tick )
|
||||
TIMER_CALLBACK_MEMBER(ste_state::atariste_dmasound_tick)
|
||||
{
|
||||
ste_state *state = machine.driver_data<ste_state>();
|
||||
|
||||
state->dmasound_tick();
|
||||
dmasound_tick();
|
||||
}
|
||||
|
||||
|
||||
@ -1027,11 +1025,10 @@ void ste_state::microwire_tick()
|
||||
// TIMER_CALLBACK( atariste_microwire_tick )
|
||||
//-------------------------------------------------
|
||||
|
||||
static TIMER_CALLBACK( atariste_microwire_tick )
|
||||
TIMER_CALLBACK_MEMBER(ste_state::atariste_microwire_tick)
|
||||
{
|
||||
ste_state *state = machine.driver_data<ste_state>();
|
||||
|
||||
state->microwire_tick();
|
||||
microwire_tick();
|
||||
}
|
||||
|
||||
|
||||
@ -2208,7 +2205,7 @@ void st_state::machine_start()
|
||||
m_maincpu->set_irq_acknowledge_callback(atarist_int_ack);
|
||||
|
||||
// allocate timers
|
||||
m_mouse_timer = machine().scheduler().timer_alloc(FUNC(st_mouse_tick));
|
||||
m_mouse_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(st_state::st_mouse_tick),this));
|
||||
m_mouse_timer->adjust(attotime::zero, 0, attotime::from_hz(500));
|
||||
|
||||
// register for state saving
|
||||
@ -2265,8 +2262,8 @@ void ste_state::machine_start()
|
||||
m_maincpu->set_irq_acknowledge_callback(atarist_int_ack);
|
||||
|
||||
/* allocate timers */
|
||||
m_dmasound_timer = machine().scheduler().timer_alloc(FUNC(atariste_dmasound_tick));
|
||||
m_microwire_timer = machine().scheduler().timer_alloc(FUNC(atariste_microwire_tick));
|
||||
m_dmasound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ste_state::atariste_dmasound_tick),this));
|
||||
m_microwire_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ste_state::atariste_microwire_tick),this));
|
||||
|
||||
/* register for state saving */
|
||||
state_save();
|
||||
|
@ -84,13 +84,12 @@ INPUT_PORTS_END
|
||||
|
||||
/* M6532 Interface */
|
||||
|
||||
static TIMER_CALLBACK( led_refresh )
|
||||
TIMER_CALLBACK_MEMBER(beta_state::led_refresh)
|
||||
{
|
||||
beta_state *state = machine.driver_data<beta_state>();
|
||||
|
||||
if (state->m_ls145_p < 6)
|
||||
if (m_ls145_p < 6)
|
||||
{
|
||||
output_set_digit_value(state->m_ls145_p, state->m_segment);
|
||||
output_set_digit_value(m_ls145_p, m_segment);
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,7 +236,7 @@ static DEVICE_IMAGE_UNLOAD( beta_eprom )
|
||||
|
||||
void beta_state::machine_start()
|
||||
{
|
||||
m_led_refresh_timer = machine().scheduler().timer_alloc(FUNC(led_refresh));
|
||||
m_led_refresh_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(beta_state::led_refresh),this));
|
||||
|
||||
/* register for state saving */
|
||||
save_item(NAME(m_eprom_oe));
|
||||
|
@ -176,43 +176,40 @@ static WRITE_LINE_DEVICE_HANDLER(coleco_vdp_interrupt)
|
||||
drvstate->m_last_nmi_state = state;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( paddle_d7reset_callback )
|
||||
TIMER_CALLBACK_MEMBER(coleco_state::paddle_d7reset_callback)
|
||||
{
|
||||
coleco_state *state = machine.driver_data<coleco_state>();
|
||||
|
||||
state->m_joy_d7_state[param] = 0;
|
||||
state->m_joy_analog_state[param] = 0;
|
||||
m_joy_d7_state[param] = 0;
|
||||
m_joy_analog_state[param] = 0;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( paddle_irqreset_callback )
|
||||
TIMER_CALLBACK_MEMBER(coleco_state::paddle_irqreset_callback)
|
||||
{
|
||||
coleco_state *state = machine.driver_data<coleco_state>();
|
||||
|
||||
state->m_joy_irq_state[param] = 0;
|
||||
m_joy_irq_state[param] = 0;
|
||||
|
||||
if (!state->m_joy_irq_state[param ^ 1])
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
if (!m_joy_irq_state[param ^ 1])
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( paddle_pulse_callback )
|
||||
TIMER_CALLBACK_MEMBER(coleco_state::paddle_pulse_callback)
|
||||
{
|
||||
coleco_state *state = machine.driver_data<coleco_state>();
|
||||
|
||||
if (state->m_joy_analog_reload[param])
|
||||
if (m_joy_analog_reload[param])
|
||||
{
|
||||
state->m_joy_analog_state[param] = state->m_joy_analog_reload[param];
|
||||
m_joy_analog_state[param] = m_joy_analog_reload[param];
|
||||
|
||||
// on movement, controller port d7 is set for a short period and an irq is fired on d7 rising edge
|
||||
state->m_joy_d7_state[param] = 0x80;
|
||||
state->m_joy_d7_timer[param]->adjust(attotime::from_usec(500), param); // TODO: measure duration
|
||||
m_joy_d7_state[param] = 0x80;
|
||||
m_joy_d7_timer[param]->adjust(attotime::from_usec(500), param); // TODO: measure duration
|
||||
|
||||
// irq on rising edge, PULSE_LINE is not supported in this case, so clear it manually
|
||||
state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
state->m_joy_irq_timer[param]->adjust(attotime::from_usec(11), param); // TODO: measure duration
|
||||
state->m_joy_irq_state[param] = 1;
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
m_joy_irq_timer[param]->adjust(attotime::from_usec(11), param); // TODO: measure duration
|
||||
m_joy_irq_state[param] = 1;
|
||||
|
||||
// reload timer
|
||||
state->m_joy_pulse_timer[param]->adjust(state->m_joy_pulse_reload[param], param);
|
||||
m_joy_pulse_timer[param]->adjust(m_joy_pulse_reload[param], param);
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,9 +261,9 @@ void coleco_state::machine_start()
|
||||
// init paddles
|
||||
for (int port = 0; port < 2; port++)
|
||||
{
|
||||
m_joy_pulse_timer[port] = machine().scheduler().timer_alloc(FUNC(paddle_pulse_callback));
|
||||
m_joy_d7_timer[port] = machine().scheduler().timer_alloc(FUNC(paddle_d7reset_callback));
|
||||
m_joy_irq_timer[port] = machine().scheduler().timer_alloc(FUNC(paddle_irqreset_callback));
|
||||
m_joy_pulse_timer[port] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(coleco_state::paddle_pulse_callback),this));
|
||||
m_joy_d7_timer[port] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(coleco_state::paddle_d7reset_callback),this));
|
||||
m_joy_irq_timer[port] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(coleco_state::paddle_irqreset_callback),this));
|
||||
|
||||
m_joy_irq_state[port] = 0;
|
||||
m_joy_d7_state[port] = 0;
|
||||
|
@ -301,32 +301,31 @@ WRITE32_MEMBER( cxhumax_state::cx_extdesc_w )
|
||||
COMBINE_DATA(&m_extdesc_regs[offset]);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( timer_tick )
|
||||
TIMER_CALLBACK_MEMBER(cxhumax_state::timer_tick)
|
||||
{
|
||||
cxhumax_state *state = machine.driver_data<cxhumax_state>();
|
||||
state->m_timer_regs.timer[param].value++;
|
||||
if(state->m_timer_regs.timer[param].value==state->m_timer_regs.timer[param].limit) {
|
||||
m_timer_regs.timer[param].value++;
|
||||
if(m_timer_regs.timer[param].value==m_timer_regs.timer[param].limit) {
|
||||
/* Reset counter when reaching limit and RESET_CNTR bit is cleared */
|
||||
if(!(state->m_timer_regs.timer[param].mode & 2))
|
||||
state->m_timer_regs.timer[param].value=0;
|
||||
if(!(m_timer_regs.timer[param].mode & 2))
|
||||
m_timer_regs.timer[param].value=0;
|
||||
|
||||
/* Indicate interrupt request if EN_INT bit is set */
|
||||
if (state->m_timer_regs.timer[param].mode & 8) {
|
||||
if (m_timer_regs.timer[param].mode & 8) {
|
||||
//printf( "IRQ on Timer %d\n", param );
|
||||
verboselog( machine, 9, "(TIMER%d) Interrupt\n", param);
|
||||
state->m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] |= INT_TIMER_BIT; /* Timer interrupt */
|
||||
state->m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] |= INT_TIMER_BIT; /* Timer interrupt */
|
||||
state->m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] |= INT_TIMER_BIT; /* Timer interrupt */
|
||||
verboselog( machine(), 9, "(TIMER%d) Interrupt\n", param);
|
||||
m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] |= INT_TIMER_BIT; /* Timer interrupt */
|
||||
m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] |= INT_TIMER_BIT; /* Timer interrupt */
|
||||
m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] |= INT_TIMER_BIT; /* Timer interrupt */
|
||||
|
||||
state->m_timer_regs.timer_irq |= 1<<param; /* Indicate which timer interrupted */
|
||||
m_timer_regs.timer_irq |= 1<<param; /* Indicate which timer interrupted */
|
||||
|
||||
/* Interrupt if Timer interrupt is not masked in ITC_INTENABLE_REG */
|
||||
if (state->m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)] & INT_TIMER_BIT)
|
||||
machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
if (m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)] & INT_TIMER_BIT)
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
attotime period = attotime::from_hz(XTAL_54MHz)*state->m_timer_regs.timer[param].timebase;
|
||||
state->m_timer_regs.timer[param].timer->adjust(period,param);
|
||||
attotime period = attotime::from_hz(XTAL_54MHz)*m_timer_regs.timer[param].timebase;
|
||||
m_timer_regs.timer[param].timer->adjust(period,param);
|
||||
}
|
||||
|
||||
READ32_MEMBER( cxhumax_state::cx_timers_r )
|
||||
@ -983,7 +982,7 @@ void cxhumax_state::machine_start()
|
||||
int index = 0;
|
||||
for(index = 0; index < MAX_CX_TIMERS; index++)
|
||||
{
|
||||
m_timer_regs.timer[index].timer = machine().scheduler().timer_alloc(FUNC(timer_tick));
|
||||
m_timer_regs.timer[index].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cxhumax_state::timer_tick),this));
|
||||
m_timer_regs.timer[index].timer->adjust(attotime::never, index);
|
||||
}
|
||||
}
|
||||
|
@ -234,9 +234,9 @@ READ8_MEMBER(fm7_state::fm7_irq_cause_r)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( fm7_beeper_off )
|
||||
TIMER_CALLBACK_MEMBER(fm7_state::fm7_beeper_off)
|
||||
{
|
||||
beep_set_state(machine.device(BEEPER_TAG),0);
|
||||
beep_set_state(machine().device(BEEPER_TAG),0);
|
||||
logerror("timed beeper off\n");
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ WRITE8_MEMBER(fm7_state::fm7_beeper_w)
|
||||
{
|
||||
beep_set_state(machine().device(BEEPER_TAG),1);
|
||||
logerror("timed beeper on\n");
|
||||
machine().scheduler().timer_set(attotime::from_msec(205), FUNC(fm7_beeper_off));
|
||||
machine().scheduler().timer_set(attotime::from_msec(205), timer_expired_delegate(FUNC(fm7_state::fm7_beeper_off),this));
|
||||
}
|
||||
}
|
||||
logerror("beeper state: %02x\n",data);
|
||||
@ -281,7 +281,7 @@ READ8_MEMBER(fm7_state::fm7_sub_beeper_r)
|
||||
{
|
||||
beep_set_state(machine().device(BEEPER_TAG),1);
|
||||
logerror("timed beeper on\n");
|
||||
machine().scheduler().timer_set(attotime::from_msec(205), FUNC(fm7_beeper_off));
|
||||
machine().scheduler().timer_set(attotime::from_msec(205), timer_expired_delegate(FUNC(fm7_state::fm7_beeper_off),this));
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
@ -628,10 +628,9 @@ void fm7_state::fm77av_encoder_setup_command()
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( fm77av_encoder_ack )
|
||||
TIMER_CALLBACK_MEMBER(fm7_state::fm77av_encoder_ack)
|
||||
{
|
||||
fm7_state *state = machine.driver_data<fm7_state>();
|
||||
state->m_encoder.ack = 1;
|
||||
m_encoder.ack = 1;
|
||||
}
|
||||
|
||||
void fm7_state::fm77av_encoder_handle_command()
|
||||
@ -716,7 +715,7 @@ WRITE8_MEMBER(fm7_state::fm77av_key_encoder_w)
|
||||
fm77av_encoder_handle_command();
|
||||
|
||||
// wait 5us to set ACK flag
|
||||
machine().scheduler().timer_set(attotime::from_usec(5), FUNC(fm77av_encoder_ack));
|
||||
machine().scheduler().timer_set(attotime::from_usec(5), timer_expired_delegate(FUNC(fm7_state::fm77av_encoder_ack),this));
|
||||
|
||||
//logerror("ENC: write 0x%02x to data register, moved to pos %i\n",data,m_encoder.position);
|
||||
}
|
||||
@ -1204,20 +1203,18 @@ WRITE8_MEMBER(fm7_state::fm7_kanji_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( fm7_timer_irq )
|
||||
TIMER_CALLBACK_MEMBER(fm7_state::fm7_timer_irq)
|
||||
{
|
||||
fm7_state *state = machine.driver_data<fm7_state>();
|
||||
if(state->m_irq_mask & IRQ_FLAG_TIMER)
|
||||
if(m_irq_mask & IRQ_FLAG_TIMER)
|
||||
{
|
||||
main_irq_set_flag(machine,IRQ_FLAG_TIMER);
|
||||
main_irq_set_flag(machine(),IRQ_FLAG_TIMER);
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( fm7_subtimer_irq )
|
||||
TIMER_CALLBACK_MEMBER(fm7_state::fm7_subtimer_irq)
|
||||
{
|
||||
fm7_state *state = machine.driver_data<fm7_state>();
|
||||
if(state->m_video.nmi_mask == 0 && state->m_video.sub_halt == 0)
|
||||
machine.device("sub")->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE);
|
||||
if(m_video.nmi_mask == 0 && m_video.sub_halt == 0)
|
||||
machine().device("sub")->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE);
|
||||
}
|
||||
|
||||
// When a key is pressed or released (in scan mode only), an IRQ is generated on the main CPU,
|
||||
@ -1288,28 +1285,27 @@ static void fm7_keyboard_poll_scan(running_machine &machine)
|
||||
state->m_mod_data = modifiers;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( fm7_keyboard_poll )
|
||||
TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll)
|
||||
{
|
||||
fm7_state *state = machine.driver_data<fm7_state>();
|
||||
static const char *const portnames[3] = { "key1","key2","key3" };
|
||||
int x,y;
|
||||
int bit = 0;
|
||||
int mod = 0;
|
||||
UINT32 keys;
|
||||
UINT32 modifiers = machine.root_device().ioport("key_modifiers")->read();
|
||||
UINT32 modifiers = machine().root_device().ioport("key_modifiers")->read();
|
||||
|
||||
if(machine.root_device().ioport("key3")->read() & 0x40000)
|
||||
if(machine().root_device().ioport("key3")->read() & 0x40000)
|
||||
{
|
||||
state->m_break_flag = 1;
|
||||
machine.device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE,ASSERT_LINE);
|
||||
m_break_flag = 1;
|
||||
machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE,ASSERT_LINE);
|
||||
}
|
||||
else
|
||||
state->m_break_flag = 0;
|
||||
m_break_flag = 0;
|
||||
|
||||
if(state->m_key_scan_mode == KEY_MODE_SCAN)
|
||||
if(m_key_scan_mode == KEY_MODE_SCAN)
|
||||
{
|
||||
// handle scancode mode
|
||||
fm7_keyboard_poll_scan(machine);
|
||||
fm7_keyboard_poll_scan(machine());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1327,18 +1323,18 @@ static TIMER_CALLBACK( fm7_keyboard_poll )
|
||||
|
||||
for(x=0;x<3;x++)
|
||||
{
|
||||
keys = machine.root_device().ioport(portnames[x])->read();
|
||||
keys = machine().root_device().ioport(portnames[x])->read();
|
||||
|
||||
for(y=0;y<32;y++) // loop through each bit in the port
|
||||
{
|
||||
if((keys & (1<<y)) != 0 && (state->m_key_data[x] & (1<<y)) == 0)
|
||||
if((keys & (1<<y)) != 0 && (m_key_data[x] & (1<<y)) == 0)
|
||||
{
|
||||
key_press(machine,fm7_key_list[bit][mod]); // key press
|
||||
key_press(machine(),fm7_key_list[bit][mod]); // key press
|
||||
}
|
||||
bit++;
|
||||
}
|
||||
|
||||
state->m_key_data[x] = keys;
|
||||
m_key_data[x] = keys;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1834,10 +1830,10 @@ DRIVER_INIT_MEMBER(fm7_state,fm7)
|
||||
{
|
||||
// m_shared_ram = auto_alloc_array(machine(),UINT8,0x80);
|
||||
m_video_ram = auto_alloc_array(machine(),UINT8,0x18000); // 2 pages on some systems
|
||||
m_timer = machine().scheduler().timer_alloc(FUNC(fm7_timer_irq));
|
||||
m_subtimer = machine().scheduler().timer_alloc(FUNC(fm7_subtimer_irq));
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(FUNC(fm7_keyboard_poll));
|
||||
m_fm77av_vsync_timer = machine().scheduler().timer_alloc(FUNC(fm77av_vsync));
|
||||
m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm7_timer_irq),this));
|
||||
m_subtimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm7_subtimer_irq),this));
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm7_keyboard_poll),this));
|
||||
m_fm77av_vsync_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm77av_vsync),this));
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(fm7_irq_ack);
|
||||
machine().device("sub")->execute().set_irq_acknowledge_callback(fm7_sub_irq_ack);
|
||||
}
|
||||
|
@ -1305,13 +1305,12 @@ static void towns_cdrom_set_irq(running_machine &machine,int line,int state)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( towns_cd_status_ready )
|
||||
TIMER_CALLBACK_MEMBER(towns_state::towns_cd_status_ready)
|
||||
{
|
||||
towns_state* state = machine.driver_data<towns_state>();
|
||||
state->m_towns_cd.status |= 0x02; // status read request
|
||||
state->m_towns_cd.status |= 0x01; // ready
|
||||
state->m_towns_cd.cmd_status_ptr = 0;
|
||||
towns_cdrom_set_irq((running_machine&)machine,TOWNS_CD_IRQ_MPU,1);
|
||||
m_towns_cd.status |= 0x02; // status read request
|
||||
m_towns_cd.status |= 0x01; // ready
|
||||
m_towns_cd.cmd_status_ptr = 0;
|
||||
towns_cdrom_set_irq((running_machine&)machine(),TOWNS_CD_IRQ_MPU,1);
|
||||
}
|
||||
|
||||
static void towns_cd_set_status(running_machine &machine, UINT8 st0, UINT8 st1, UINT8 st2, UINT8 st3)
|
||||
@ -1322,7 +1321,7 @@ static void towns_cd_set_status(running_machine &machine, UINT8 st0, UINT8 st1,
|
||||
state->m_towns_cd.cmd_status[2] = st2;
|
||||
state->m_towns_cd.cmd_status[3] = st3;
|
||||
// wait a bit
|
||||
machine.scheduler().timer_set(attotime::from_msec(1), FUNC(towns_cd_status_ready), 0, &machine);
|
||||
machine.scheduler().timer_set(attotime::from_msec(1), timer_expired_delegate(FUNC(towns_state::towns_cd_status_ready),state), 0, &machine);
|
||||
}
|
||||
|
||||
static UINT8 towns_cd_get_track(running_machine &machine)
|
||||
@ -1341,52 +1340,51 @@ static UINT8 towns_cd_get_track(running_machine &machine)
|
||||
return track;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( towns_cdrom_read_byte )
|
||||
TIMER_CALLBACK_MEMBER(towns_state::towns_cdrom_read_byte)
|
||||
{
|
||||
device_t* device = (device_t* )ptr;
|
||||
towns_state* state = machine.driver_data<towns_state>();
|
||||
int masked;
|
||||
// TODO: support software transfers, for now DMA is assumed.
|
||||
|
||||
if(state->m_towns_cd.buffer_ptr < 0) // transfer has ended
|
||||
if(m_towns_cd.buffer_ptr < 0) // transfer has ended
|
||||
return;
|
||||
|
||||
masked = upd71071_dmarq(device,param,3); // CD-ROM controller uses DMA1 channel 3
|
||||
// logerror("DMARQ: param=%i ret=%i bufferptr=%i\n",param,masked,state->m_towns_cd.buffer_ptr);
|
||||
// logerror("DMARQ: param=%i ret=%i bufferptr=%i\n",param,masked,m_towns_cd.buffer_ptr);
|
||||
if(param != 0)
|
||||
{
|
||||
state->m_towns_cd.read_timer->adjust(attotime::from_hz(300000));
|
||||
m_towns_cd.read_timer->adjust(attotime::from_hz(300000));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(masked != 0) // check if the DMA channel is masked
|
||||
{
|
||||
state->m_towns_cd.read_timer->adjust(attotime::from_hz(300000),1);
|
||||
m_towns_cd.read_timer->adjust(attotime::from_hz(300000),1);
|
||||
return;
|
||||
}
|
||||
if(state->m_towns_cd.buffer_ptr < 2048)
|
||||
state->m_towns_cd.read_timer->adjust(attotime::from_hz(300000),1);
|
||||
if(m_towns_cd.buffer_ptr < 2048)
|
||||
m_towns_cd.read_timer->adjust(attotime::from_hz(300000),1);
|
||||
else
|
||||
{ // end of transfer
|
||||
state->m_towns_cd.status &= ~0x10; // no longer transferring by DMA
|
||||
state->m_towns_cd.status &= ~0x20; // no longer transferring by software
|
||||
logerror("DMA1: end of transfer (LBA=%08x)\n",state->m_towns_cd.lba_current);
|
||||
if(state->m_towns_cd.lba_current >= state->m_towns_cd.lba_last)
|
||||
m_towns_cd.status &= ~0x10; // no longer transferring by DMA
|
||||
m_towns_cd.status &= ~0x20; // no longer transferring by software
|
||||
logerror("DMA1: end of transfer (LBA=%08x)\n",m_towns_cd.lba_current);
|
||||
if(m_towns_cd.lba_current >= m_towns_cd.lba_last)
|
||||
{
|
||||
state->m_towns_cd.extra_status = 0;
|
||||
m_towns_cd.extra_status = 0;
|
||||
towns_cd_set_status(device->machine(),0x06,0x00,0x00,0x00);
|
||||
towns_cdrom_set_irq(device->machine(),TOWNS_CD_IRQ_DMA,1);
|
||||
state->m_towns_cd.buffer_ptr = -1;
|
||||
state->m_towns_cd.status |= 0x01; // ready
|
||||
m_towns_cd.buffer_ptr = -1;
|
||||
m_towns_cd.status |= 0x01; // ready
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_towns_cd.extra_status = 0;
|
||||
m_towns_cd.extra_status = 0;
|
||||
towns_cd_set_status(device->machine(),0x22,0x00,0x00,0x00);
|
||||
towns_cdrom_set_irq(device->machine(),TOWNS_CD_IRQ_DMA,1);
|
||||
cdrom_read_data(state->m_cdrom->get_cdrom_file(),++state->m_towns_cd.lba_current,state->m_towns_cd.buffer,CD_TRACK_MODE1);
|
||||
state->m_towns_cd.read_timer->adjust(attotime::from_hz(300000),1);
|
||||
state->m_towns_cd.buffer_ptr = -1;
|
||||
cdrom_read_data(m_cdrom->get_cdrom_file(),++m_towns_cd.lba_current,m_towns_cd.buffer,CD_TRACK_MODE1);
|
||||
m_towns_cd.read_timer->adjust(attotime::from_hz(300000),1);
|
||||
m_towns_cd.buffer_ptr = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1482,7 +1480,7 @@ static void towns_cdrom_play_cdda(cdrom_image_device* device)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(towns_delay_cdda)
|
||||
TIMER_CALLBACK_MEMBER(towns_state::towns_delay_cdda)
|
||||
{
|
||||
towns_cdrom_play_cdda((cdrom_image_device*)ptr);
|
||||
}
|
||||
@ -1526,7 +1524,7 @@ static void towns_cdrom_execute_command(cdrom_image_device* device)
|
||||
break;
|
||||
case 0x04: // Play Audio Track
|
||||
logerror("CD: Command 0x04: PLAY CD-DA\n");
|
||||
device->machine().scheduler().timer_set(attotime::from_msec(1), FUNC(towns_delay_cdda), 0, device);
|
||||
device->machine().scheduler().timer_set(attotime::from_msec(1), timer_expired_delegate(FUNC(towns_state::towns_delay_cdda),state), 0, device);
|
||||
break;
|
||||
case 0x05: // Read TOC
|
||||
logerror("CD: Command 0x05: READ TOC\n");
|
||||
@ -2456,7 +2454,7 @@ void towns_state::driver_start()
|
||||
m_towns_intervaltimer2 = timer_alloc(TIMER_INTERVAL2);
|
||||
|
||||
// CD-ROM init
|
||||
m_towns_cd.read_timer = machine().scheduler().timer_alloc(FUNC(towns_cdrom_read_byte), (void*)machine().device("dma_1"));
|
||||
m_towns_cd.read_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(towns_state::towns_cdrom_read_byte),this), (void*)machine().device("dma_1"));
|
||||
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(towns_irq_callback);
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x100000,machine().device<ram_device>(RAM_TAG)->size()-1,0xffffffff,0,NULL);
|
||||
|
@ -104,25 +104,24 @@ static void gba_request_irq(running_machine &machine, UINT32 int_type)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( dma_complete )
|
||||
TIMER_CALLBACK_MEMBER(gba_state::dma_complete)
|
||||
{
|
||||
int ctrl;
|
||||
FPTR ch;
|
||||
static const UINT32 ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 };
|
||||
gba_state *state = machine.driver_data<gba_state>();
|
||||
|
||||
ch = param;
|
||||
|
||||
// printf("dma complete: ch %d\n", ch);
|
||||
|
||||
state->m_dma_timer[ch]->adjust(attotime::never);
|
||||
m_dma_timer[ch]->adjust(attotime::never);
|
||||
|
||||
ctrl = state->m_dma_regs[(ch*3)+2] >> 16;
|
||||
ctrl = m_dma_regs[(ch*3)+2] >> 16;
|
||||
|
||||
// IRQ
|
||||
if (ctrl & 0x4000)
|
||||
{
|
||||
gba_request_irq(machine, ch_int[ch]);
|
||||
gba_request_irq(machine(), ch_int[ch]);
|
||||
}
|
||||
|
||||
// if we're supposed to repeat, don't clear "active" and then the next vbl/hbl will retrigger us
|
||||
@ -130,19 +129,19 @@ static TIMER_CALLBACK( dma_complete )
|
||||
if (!((ctrl>>9) & 1) || ((ctrl & 0x3000) == 0))
|
||||
{
|
||||
// printf("clear active for ch %d\n", ch);
|
||||
state->m_dma_regs[(ch*3)+2] &= ~0x80000000; // clear "active" bit
|
||||
m_dma_regs[(ch*3)+2] &= ~0x80000000; // clear "active" bit
|
||||
}
|
||||
else
|
||||
{
|
||||
// if repeat, reload the count
|
||||
if ((ctrl>>9) & 1)
|
||||
{
|
||||
state->m_dma_cnt[ch] = state->m_dma_regs[(ch*3)+2]&0xffff;
|
||||
m_dma_cnt[ch] = m_dma_regs[(ch*3)+2]&0xffff;
|
||||
|
||||
// if increment & reload mode, reload the destination
|
||||
if (((ctrl>>5)&3) == 3)
|
||||
{
|
||||
state->m_dma_dst[ch] = state->m_dma_regs[(ch*3)+1];
|
||||
m_dma_dst[ch] = m_dma_regs[(ch*3)+1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -278,7 +277,7 @@ static void dma_exec(running_machine &machine, FPTR ch)
|
||||
|
||||
// printf("settng DMA timer %d for %d cycs (tmr %x)\n", ch, cnt, (UINT32)state->m_dma_timer[ch]);
|
||||
// state->m_dma_timer[ch]->adjust(ATTOTIME_IN_CYCLES(0, cnt), ch);
|
||||
dma_complete(machine, NULL, ch);
|
||||
state->dma_complete(NULL, ch);
|
||||
}
|
||||
|
||||
static void audio_tick(running_machine &machine, int ref)
|
||||
@ -371,55 +370,54 @@ static void audio_tick(running_machine &machine, int ref)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(timer_expire)
|
||||
TIMER_CALLBACK_MEMBER(gba_state::timer_expire)
|
||||
{
|
||||
static const UINT32 tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW };
|
||||
FPTR tmr = (FPTR) param;
|
||||
gba_state *state = machine.driver_data<gba_state>();
|
||||
|
||||
// printf("Timer %d expired, SOUNDCNT_H %04x\n", tmr, state->m_SOUNDCNT_H);
|
||||
// printf("Timer %d expired, SOUNDCNT_H %04x\n", tmr, m_SOUNDCNT_H);
|
||||
|
||||
// "The reload value is copied into the counter only upon following two situations: Automatically upon timer overflows,"
|
||||
// "or when the timer start bit becomes changed from 0 to 1."
|
||||
if (state->m_timer_recalc[tmr] != 0)
|
||||
if (m_timer_recalc[tmr] != 0)
|
||||
{
|
||||
double rate, clocksel, final;
|
||||
attotime time;
|
||||
state->m_timer_recalc[tmr] = 0;
|
||||
state->m_timer_regs[tmr] = (state->m_timer_regs[tmr] & 0xFFFF0000) | (state->m_timer_reload[tmr] & 0x0000FFFF);
|
||||
rate = 0x10000 - (state->m_timer_regs[tmr] & 0xffff);
|
||||
clocksel = timer_clks[(state->m_timer_regs[tmr] >> 16) & 3];
|
||||
m_timer_recalc[tmr] = 0;
|
||||
m_timer_regs[tmr] = (m_timer_regs[tmr] & 0xFFFF0000) | (m_timer_reload[tmr] & 0x0000FFFF);
|
||||
rate = 0x10000 - (m_timer_regs[tmr] & 0xffff);
|
||||
clocksel = timer_clks[(m_timer_regs[tmr] >> 16) & 3];
|
||||
final = clocksel / rate;
|
||||
state->m_timer_hz[tmr] = final;
|
||||
m_timer_hz[tmr] = final;
|
||||
time = attotime::from_hz(final);
|
||||
GBA_ATTOTIME_NORMALIZE(time);
|
||||
state->m_tmr_timer[tmr]->adjust(time, tmr, time);
|
||||
m_tmr_timer[tmr]->adjust(time, tmr, time);
|
||||
}
|
||||
|
||||
// check if timers 0 or 1 are feeding directsound
|
||||
if (tmr == 0)
|
||||
{
|
||||
if ((state->m_SOUNDCNT_H & 0x400) == 0)
|
||||
if ((m_SOUNDCNT_H & 0x400) == 0)
|
||||
{
|
||||
audio_tick(machine, 0);
|
||||
audio_tick(machine(), 0);
|
||||
}
|
||||
|
||||
if ((state->m_SOUNDCNT_H & 0x4000) == 0)
|
||||
if ((m_SOUNDCNT_H & 0x4000) == 0)
|
||||
{
|
||||
audio_tick(machine, 1);
|
||||
audio_tick(machine(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (tmr == 1)
|
||||
{
|
||||
if ((state->m_SOUNDCNT_H & 0x400) == 0x400)
|
||||
if ((m_SOUNDCNT_H & 0x400) == 0x400)
|
||||
{
|
||||
audio_tick(machine, 0);
|
||||
audio_tick(machine(), 0);
|
||||
}
|
||||
|
||||
if ((state->m_SOUNDCNT_H & 0x4000) == 0x4000)
|
||||
if ((m_SOUNDCNT_H & 0x4000) == 0x4000)
|
||||
{
|
||||
audio_tick(machine, 1);
|
||||
audio_tick(machine(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -427,35 +425,35 @@ static TIMER_CALLBACK(timer_expire)
|
||||
switch (tmr)
|
||||
{
|
||||
case 0:
|
||||
if (state->m_timer_regs[1] & 0x40000)
|
||||
if (m_timer_regs[1] & 0x40000)
|
||||
{
|
||||
state->m_timer_regs[1] = (( ( state->m_timer_regs[1] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (state->m_timer_regs[1] & 0xffff0000);
|
||||
if( ( state->m_timer_regs[1] & 0x0000ffff ) == 0 )
|
||||
m_timer_regs[1] = (( ( m_timer_regs[1] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (m_timer_regs[1] & 0xffff0000);
|
||||
if( ( m_timer_regs[1] & 0x0000ffff ) == 0 )
|
||||
{
|
||||
state->m_timer_regs[1] |= state->m_timer_reload[1];
|
||||
if( ( state->m_timer_regs[1] & 0x400000 ) && ( state->m_IME != 0 ) )
|
||||
m_timer_regs[1] |= m_timer_reload[1];
|
||||
if( ( m_timer_regs[1] & 0x400000 ) && ( m_IME != 0 ) )
|
||||
{
|
||||
gba_request_irq( machine, tmr_ints[1] );
|
||||
gba_request_irq( machine(), tmr_ints[1] );
|
||||
}
|
||||
if( ( state->m_timer_regs[2] & 0x40000 ) )
|
||||
if( ( m_timer_regs[2] & 0x40000 ) )
|
||||
{
|
||||
state->m_timer_regs[2] = (( ( state->m_timer_regs[2] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (state->m_timer_regs[2] & 0xffff0000);
|
||||
if( ( state->m_timer_regs[2] & 0x0000ffff ) == 0 )
|
||||
m_timer_regs[2] = (( ( m_timer_regs[2] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (m_timer_regs[2] & 0xffff0000);
|
||||
if( ( m_timer_regs[2] & 0x0000ffff ) == 0 )
|
||||
{
|
||||
state->m_timer_regs[2] |= state->m_timer_reload[2];
|
||||
if( ( state->m_timer_regs[2] & 0x400000 ) && ( state->m_IME != 0 ) )
|
||||
m_timer_regs[2] |= m_timer_reload[2];
|
||||
if( ( m_timer_regs[2] & 0x400000 ) && ( m_IME != 0 ) )
|
||||
{
|
||||
gba_request_irq( machine, tmr_ints[2] );
|
||||
gba_request_irq( machine(), tmr_ints[2] );
|
||||
}
|
||||
if( ( state->m_timer_regs[3] & 0x40000 ) )
|
||||
if( ( m_timer_regs[3] & 0x40000 ) )
|
||||
{
|
||||
state->m_timer_regs[3] = (( ( state->m_timer_regs[3] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (state->m_timer_regs[3] & 0xffff0000);
|
||||
if( ( state->m_timer_regs[3] & 0x0000ffff ) == 0 )
|
||||
m_timer_regs[3] = (( ( m_timer_regs[3] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (m_timer_regs[3] & 0xffff0000);
|
||||
if( ( m_timer_regs[3] & 0x0000ffff ) == 0 )
|
||||
{
|
||||
state->m_timer_regs[3] |= state->m_timer_reload[3];
|
||||
if( ( state->m_timer_regs[3] & 0x400000 ) && ( state->m_IME != 0 ) )
|
||||
m_timer_regs[3] |= m_timer_reload[3];
|
||||
if( ( m_timer_regs[3] & 0x400000 ) && ( m_IME != 0 ) )
|
||||
{
|
||||
gba_request_irq( machine, tmr_ints[3] );
|
||||
gba_request_irq( machine(), tmr_ints[3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -465,25 +463,25 @@ static TIMER_CALLBACK(timer_expire)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (state->m_timer_regs[2] & 0x40000)
|
||||
if (m_timer_regs[2] & 0x40000)
|
||||
{
|
||||
state->m_timer_regs[2] = (( ( state->m_timer_regs[2] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (state->m_timer_regs[2] & 0xffff0000);
|
||||
if( ( state->m_timer_regs[2] & 0x0000ffff ) == 0 )
|
||||
m_timer_regs[2] = (( ( m_timer_regs[2] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (m_timer_regs[2] & 0xffff0000);
|
||||
if( ( m_timer_regs[2] & 0x0000ffff ) == 0 )
|
||||
{
|
||||
state->m_timer_regs[2] |= state->m_timer_reload[2];
|
||||
if( ( state->m_timer_regs[2] & 0x400000 ) && ( state->m_IME != 0 ) )
|
||||
m_timer_regs[2] |= m_timer_reload[2];
|
||||
if( ( m_timer_regs[2] & 0x400000 ) && ( m_IME != 0 ) )
|
||||
{
|
||||
gba_request_irq( machine, tmr_ints[2] );
|
||||
gba_request_irq( machine(), tmr_ints[2] );
|
||||
}
|
||||
if( ( state->m_timer_regs[3] & 0x40000 ) )
|
||||
if( ( m_timer_regs[3] & 0x40000 ) )
|
||||
{
|
||||
state->m_timer_regs[3] = (( ( state->m_timer_regs[3] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (state->m_timer_regs[3] & 0xffff0000);
|
||||
if( ( state->m_timer_regs[3] & 0x0000ffff ) == 0 )
|
||||
m_timer_regs[3] = (( ( m_timer_regs[3] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (m_timer_regs[3] & 0xffff0000);
|
||||
if( ( m_timer_regs[3] & 0x0000ffff ) == 0 )
|
||||
{
|
||||
state->m_timer_regs[3] |= state->m_timer_reload[3];
|
||||
if( ( state->m_timer_regs[3] & 0x400000 ) && ( state->m_IME != 0 ) )
|
||||
m_timer_regs[3] |= m_timer_reload[3];
|
||||
if( ( m_timer_regs[3] & 0x400000 ) && ( m_IME != 0 ) )
|
||||
{
|
||||
gba_request_irq( machine, tmr_ints[3] );
|
||||
gba_request_irq( machine(), tmr_ints[3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -491,15 +489,15 @@ static TIMER_CALLBACK(timer_expire)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (state->m_timer_regs[3] & 0x40000)
|
||||
if (m_timer_regs[3] & 0x40000)
|
||||
{
|
||||
state->m_timer_regs[3] = (( ( state->m_timer_regs[3] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (state->m_timer_regs[3] & 0xffff0000);
|
||||
if( ( state->m_timer_regs[3] & 0x0000ffff ) == 0 )
|
||||
m_timer_regs[3] = (( ( m_timer_regs[3] & 0x0000ffff ) + 1 ) & 0x0000ffff) | (m_timer_regs[3] & 0xffff0000);
|
||||
if( ( m_timer_regs[3] & 0x0000ffff ) == 0 )
|
||||
{
|
||||
state->m_timer_regs[3] |= state->m_timer_reload[3];
|
||||
if( ( state->m_timer_regs[3] & 0x400000 ) && ( state->m_IME != 0 ) )
|
||||
m_timer_regs[3] |= m_timer_reload[3];
|
||||
if( ( m_timer_regs[3] & 0x400000 ) && ( m_IME != 0 ) )
|
||||
{
|
||||
gba_request_irq( machine, tmr_ints[3] );
|
||||
gba_request_irq( machine(), tmr_ints[3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -507,19 +505,18 @@ static TIMER_CALLBACK(timer_expire)
|
||||
}
|
||||
|
||||
// are we supposed to IRQ?
|
||||
if ((state->m_timer_regs[tmr] & 0x400000) && (state->m_IME != 0))
|
||||
if ((m_timer_regs[tmr] & 0x400000) && (m_IME != 0))
|
||||
{
|
||||
gba_request_irq(machine, tmr_ints[tmr]);
|
||||
gba_request_irq(machine(), tmr_ints[tmr]);
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(handle_irq)
|
||||
TIMER_CALLBACK_MEMBER(gba_state::handle_irq)
|
||||
{
|
||||
gba_state *state = machine.driver_data<gba_state>();
|
||||
|
||||
gba_request_irq(machine, state->m_IF);
|
||||
gba_request_irq(machine(), m_IF);
|
||||
|
||||
state->m_irq_timer->adjust(attotime::never);
|
||||
m_irq_timer->adjust(attotime::never);
|
||||
}
|
||||
|
||||
READ32_MEMBER(gba_state::gba_io_r)
|
||||
@ -2004,64 +2001,62 @@ static INPUT_PORTS_START( gbadv )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("A") PORT_PLAYER(1) // A
|
||||
INPUT_PORTS_END
|
||||
|
||||
static TIMER_CALLBACK( perform_hbl )
|
||||
TIMER_CALLBACK_MEMBER(gba_state::perform_hbl)
|
||||
{
|
||||
int ch, ctrl;
|
||||
gba_state *state = machine.driver_data<gba_state>();
|
||||
int scanline = machine.primary_screen->vpos();
|
||||
int scanline = machine().primary_screen->vpos();
|
||||
|
||||
// draw only visible scanlines
|
||||
if (scanline < 160)
|
||||
{
|
||||
gba_draw_scanline(machine, scanline);
|
||||
gba_draw_scanline(machine(), scanline);
|
||||
}
|
||||
state->m_DISPSTAT |= DISPSTAT_HBL;
|
||||
if ((state->m_DISPSTAT & DISPSTAT_HBL_IRQ_EN ) != 0)
|
||||
m_DISPSTAT |= DISPSTAT_HBL;
|
||||
if ((m_DISPSTAT & DISPSTAT_HBL_IRQ_EN ) != 0)
|
||||
{
|
||||
gba_request_irq(machine, INT_HBL);
|
||||
gba_request_irq(machine(), INT_HBL);
|
||||
}
|
||||
|
||||
for (ch = 0; ch < 4; ch++)
|
||||
{
|
||||
ctrl = state->m_dma_regs[(ch*3)+2]>>16;
|
||||
ctrl = m_dma_regs[(ch*3)+2]>>16;
|
||||
|
||||
// HBL-triggered DMA?
|
||||
if ((ctrl & 0x8000) && ((ctrl & 0x3000) == 0x2000))
|
||||
{
|
||||
dma_exec(machine, ch);
|
||||
dma_exec(machine(), ch);
|
||||
}
|
||||
}
|
||||
|
||||
state->m_hbl_timer->adjust(attotime::never);
|
||||
m_hbl_timer->adjust(attotime::never);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( perform_scan )
|
||||
TIMER_CALLBACK_MEMBER(gba_state::perform_scan)
|
||||
{
|
||||
int scanline;
|
||||
gba_state *state = machine.driver_data<gba_state>();
|
||||
|
||||
// clear hblank and raster IRQ flags
|
||||
state->m_DISPSTAT &= ~(DISPSTAT_HBL|DISPSTAT_VCNT);
|
||||
m_DISPSTAT &= ~(DISPSTAT_HBL|DISPSTAT_VCNT);
|
||||
|
||||
scanline = machine.primary_screen->vpos();
|
||||
scanline = machine().primary_screen->vpos();
|
||||
|
||||
// VBL is set for scanlines 160 through 226 (but not 227, which is the last line)
|
||||
if (scanline >= 160 && scanline < 227)
|
||||
{
|
||||
state->m_DISPSTAT |= DISPSTAT_VBL;
|
||||
m_DISPSTAT |= DISPSTAT_VBL;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_DISPSTAT &= ~DISPSTAT_VBL;
|
||||
m_DISPSTAT &= ~DISPSTAT_VBL;
|
||||
}
|
||||
|
||||
// handle VCNT match interrupt/flag
|
||||
if (scanline == ((state->m_DISPSTAT >> 8) & 0xff))
|
||||
if (scanline == ((m_DISPSTAT >> 8) & 0xff))
|
||||
{
|
||||
state->m_DISPSTAT |= DISPSTAT_VCNT;
|
||||
if (state->m_DISPSTAT & DISPSTAT_VCNT_IRQ_EN)
|
||||
m_DISPSTAT |= DISPSTAT_VCNT;
|
||||
if (m_DISPSTAT & DISPSTAT_VCNT_IRQ_EN)
|
||||
{
|
||||
gba_request_irq(machine, INT_VCNT);
|
||||
gba_request_irq(machine(), INT_VCNT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2092,25 +2087,25 @@ static TIMER_CALLBACK( perform_scan )
|
||||
// More work on IRQs is definitely necessary!
|
||||
int ch, ctrl;
|
||||
|
||||
if (state->m_DISPSTAT & DISPSTAT_VBL_IRQ_EN)
|
||||
if (m_DISPSTAT & DISPSTAT_VBL_IRQ_EN)
|
||||
{
|
||||
gba_request_irq(machine, INT_VBL);
|
||||
gba_request_irq(machine(), INT_VBL);
|
||||
}
|
||||
|
||||
for (ch = 0; ch < 4; ch++)
|
||||
{
|
||||
ctrl = state->m_dma_regs[(ch*3)+2]>>16;
|
||||
ctrl = m_dma_regs[(ch*3)+2]>>16;
|
||||
|
||||
// VBL-triggered DMA?
|
||||
if ((ctrl & 0x8000) && ((ctrl & 0x3000) == 0x1000))
|
||||
{
|
||||
dma_exec(machine, ch);
|
||||
dma_exec(machine(), ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
state->m_hbl_timer->adjust(machine.primary_screen->time_until_pos(scanline, 240));
|
||||
state->m_scan_timer->adjust(machine.primary_screen->time_until_pos(( scanline + 1 ) % 228, 0));
|
||||
m_hbl_timer->adjust(machine().primary_screen->time_until_pos(scanline, 240));
|
||||
m_scan_timer->adjust(machine().primary_screen->time_until_pos(( scanline + 1 ) % 228, 0));
|
||||
}
|
||||
|
||||
void gba_state::machine_reset()
|
||||
@ -2179,32 +2174,32 @@ void gba_state::machine_start()
|
||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(gba_machine_stop),&machine()));
|
||||
|
||||
/* create a timer to fire scanline functions */
|
||||
m_scan_timer = machine().scheduler().timer_alloc(FUNC(perform_scan));
|
||||
m_hbl_timer = machine().scheduler().timer_alloc(FUNC(perform_hbl));
|
||||
m_scan_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::perform_scan),this));
|
||||
m_hbl_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::perform_hbl),this));
|
||||
m_scan_timer->adjust(machine().primary_screen->time_until_pos(0, 0));
|
||||
|
||||
/* and one for each DMA channel */
|
||||
m_dma_timer[0] = machine().scheduler().timer_alloc(FUNC(dma_complete));
|
||||
m_dma_timer[1] = machine().scheduler().timer_alloc(FUNC(dma_complete));
|
||||
m_dma_timer[2] = machine().scheduler().timer_alloc(FUNC(dma_complete));
|
||||
m_dma_timer[3] = machine().scheduler().timer_alloc(FUNC(dma_complete));
|
||||
m_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::dma_complete),this));
|
||||
m_dma_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::dma_complete),this));
|
||||
m_dma_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::dma_complete),this));
|
||||
m_dma_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::dma_complete),this));
|
||||
m_dma_timer[0]->adjust(attotime::never);
|
||||
m_dma_timer[1]->adjust(attotime::never, 1);
|
||||
m_dma_timer[2]->adjust(attotime::never, 2);
|
||||
m_dma_timer[3]->adjust(attotime::never, 3);
|
||||
|
||||
/* also one for each timer (heh) */
|
||||
m_tmr_timer[0] = machine().scheduler().timer_alloc(FUNC(timer_expire));
|
||||
m_tmr_timer[1] = machine().scheduler().timer_alloc(FUNC(timer_expire));
|
||||
m_tmr_timer[2] = machine().scheduler().timer_alloc(FUNC(timer_expire));
|
||||
m_tmr_timer[3] = machine().scheduler().timer_alloc(FUNC(timer_expire));
|
||||
m_tmr_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::timer_expire),this));
|
||||
m_tmr_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::timer_expire),this));
|
||||
m_tmr_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::timer_expire),this));
|
||||
m_tmr_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::timer_expire),this));
|
||||
m_tmr_timer[0]->adjust(attotime::never);
|
||||
m_tmr_timer[1]->adjust(attotime::never, 1);
|
||||
m_tmr_timer[2]->adjust(attotime::never, 2);
|
||||
m_tmr_timer[3]->adjust(attotime::never, 3);
|
||||
|
||||
/* and an IRQ handling timer */
|
||||
m_irq_timer = machine().scheduler().timer_alloc(FUNC(handle_irq));
|
||||
m_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::handle_irq),this));
|
||||
m_irq_timer->adjust(attotime::never);
|
||||
}
|
||||
|
||||
|
@ -257,33 +257,32 @@ static void s3c240x_lcd_render_16( running_machine &machine)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( s3c240x_lcd_timer_exp )
|
||||
TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_lcd_timer_exp)
|
||||
{
|
||||
gp32_state *state = machine.driver_data<gp32_state>();
|
||||
screen_device *screen = machine.primary_screen;
|
||||
verboselog( machine, 2, "LCD timer callback\n");
|
||||
state->m_s3c240x_lcd.vpos = screen->vpos();
|
||||
state->m_s3c240x_lcd.hpos = screen->hpos();
|
||||
verboselog( machine, 3, "LCD - vpos %d hpos %d\n", state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos);
|
||||
if (state->m_s3c240x_lcd.vramaddr_cur >= state->m_s3c240x_lcd.vramaddr_max)
|
||||
screen_device *screen = machine().primary_screen;
|
||||
verboselog( machine(), 2, "LCD timer callback\n");
|
||||
m_s3c240x_lcd.vpos = screen->vpos();
|
||||
m_s3c240x_lcd.hpos = screen->hpos();
|
||||
verboselog( machine(), 3, "LCD - vpos %d hpos %d\n", m_s3c240x_lcd.vpos, m_s3c240x_lcd.hpos);
|
||||
if (m_s3c240x_lcd.vramaddr_cur >= m_s3c240x_lcd.vramaddr_max)
|
||||
{
|
||||
s3c240x_lcd_dma_reload( machine);
|
||||
s3c240x_lcd_dma_reload( machine());
|
||||
}
|
||||
verboselog( machine, 3, "LCD - vramaddr %08X\n", state->m_s3c240x_lcd.vramaddr_cur);
|
||||
while (state->m_s3c240x_lcd.vramaddr_cur < state->m_s3c240x_lcd.vramaddr_max)
|
||||
verboselog( machine(), 3, "LCD - vramaddr %08X\n", m_s3c240x_lcd.vramaddr_cur);
|
||||
while (m_s3c240x_lcd.vramaddr_cur < m_s3c240x_lcd.vramaddr_max)
|
||||
{
|
||||
switch (state->m_s3c240x_lcd.bppmode)
|
||||
switch (m_s3c240x_lcd.bppmode)
|
||||
{
|
||||
case BPPMODE_TFT_01 : s3c240x_lcd_render_01( machine); break;
|
||||
case BPPMODE_TFT_02 : s3c240x_lcd_render_02( machine); break;
|
||||
case BPPMODE_TFT_04 : s3c240x_lcd_render_04( machine); break;
|
||||
case BPPMODE_TFT_08 : s3c240x_lcd_render_08( machine); break;
|
||||
case BPPMODE_TFT_16 : s3c240x_lcd_render_16( machine); break;
|
||||
default : verboselog( machine, 0, "s3c240x_lcd_timer_exp: bppmode %d not supported\n", state->m_s3c240x_lcd.bppmode); break;
|
||||
case BPPMODE_TFT_01 : s3c240x_lcd_render_01( machine()); break;
|
||||
case BPPMODE_TFT_02 : s3c240x_lcd_render_02( machine()); break;
|
||||
case BPPMODE_TFT_04 : s3c240x_lcd_render_04( machine()); break;
|
||||
case BPPMODE_TFT_08 : s3c240x_lcd_render_08( machine()); break;
|
||||
case BPPMODE_TFT_16 : s3c240x_lcd_render_16( machine()); break;
|
||||
default : verboselog( machine(), 0, "s3c240x_lcd_timer_exp: bppmode %d not supported\n", m_s3c240x_lcd.bppmode); break;
|
||||
}
|
||||
if ((state->m_s3c240x_lcd.vpos == 0) && (state->m_s3c240x_lcd.hpos == 0)) break;
|
||||
if ((m_s3c240x_lcd.vpos == 0) && (m_s3c240x_lcd.hpos == 0)) break;
|
||||
}
|
||||
state->m_s3c240x_lcd_timer->adjust( screen->time_until_pos(state->m_s3c240x_lcd.vpos, state->m_s3c240x_lcd.hpos));
|
||||
m_s3c240x_lcd_timer->adjust( screen->time_until_pos(m_s3c240x_lcd.vpos, m_s3c240x_lcd.hpos));
|
||||
}
|
||||
|
||||
void gp32_state::video_start()
|
||||
@ -673,19 +672,18 @@ WRITE32_MEMBER(gp32_state::s3c240x_pwm_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( s3c240x_pwm_timer_exp )
|
||||
TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_pwm_timer_exp)
|
||||
{
|
||||
gp32_state *state = machine.driver_data<gp32_state>();
|
||||
int ch = param;
|
||||
static const int ch_int[] = { INT_TIMER0, INT_TIMER1, INT_TIMER2, INT_TIMER3, INT_TIMER4 };
|
||||
verboselog( machine, 2, "PWM %d timer callback\n", ch);
|
||||
if (BITS( state->m_s3c240x_pwm_regs[1], 23, 20) == (ch + 1))
|
||||
verboselog( machine(), 2, "PWM %d timer callback\n", ch);
|
||||
if (BITS( m_s3c240x_pwm_regs[1], 23, 20) == (ch + 1))
|
||||
{
|
||||
s3c240x_dma_request_pwm( machine);
|
||||
s3c240x_dma_request_pwm( machine());
|
||||
}
|
||||
else
|
||||
{
|
||||
s3c240x_request_irq( machine, ch_int[ch]);
|
||||
s3c240x_request_irq( machine(), ch_int[ch]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -911,10 +909,10 @@ WRITE32_MEMBER(gp32_state::s3c240x_dma_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( s3c240x_dma_timer_exp )
|
||||
TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_dma_timer_exp)
|
||||
{
|
||||
int ch = param;
|
||||
verboselog( machine, 2, "DMA %d timer callback\n", ch);
|
||||
verboselog( machine(), 2, "DMA %d timer callback\n", ch);
|
||||
}
|
||||
|
||||
// SMARTMEDIA
|
||||
@ -1439,52 +1437,51 @@ WRITE32_MEMBER(gp32_state::s3c240x_iic_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( s3c240x_iic_timer_exp )
|
||||
TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iic_timer_exp)
|
||||
{
|
||||
gp32_state *state = machine.driver_data<gp32_state>();
|
||||
int enable_interrupt, mode_selection;
|
||||
verboselog( machine, 2, "IIC timer callback\n");
|
||||
mode_selection = BITS( state->m_s3c240x_iic_regs[1], 7, 6);
|
||||
verboselog( machine(), 2, "IIC timer callback\n");
|
||||
mode_selection = BITS( m_s3c240x_iic_regs[1], 7, 6);
|
||||
switch (mode_selection)
|
||||
{
|
||||
// master receive mode
|
||||
case 2 :
|
||||
{
|
||||
if (state->m_s3c240x_iic.data_index == 0)
|
||||
if (m_s3c240x_iic.data_index == 0)
|
||||
{
|
||||
UINT8 data_shift = state->m_s3c240x_iic_regs[3] & 0xFF;
|
||||
verboselog( machine, 5, "IIC write %02X\n", data_shift);
|
||||
UINT8 data_shift = m_s3c240x_iic_regs[3] & 0xFF;
|
||||
verboselog( machine(), 5, "IIC write %02X\n", data_shift);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 data_shift = eeprom_read( machine, state->m_s3c240x_iic.address);
|
||||
verboselog( machine, 5, "IIC read %02X\n", data_shift);
|
||||
state->m_s3c240x_iic_regs[3] = (state->m_s3c240x_iic_regs[3] & ~0xFF) | data_shift;
|
||||
UINT8 data_shift = eeprom_read( machine(), m_s3c240x_iic.address);
|
||||
verboselog( machine(), 5, "IIC read %02X\n", data_shift);
|
||||
m_s3c240x_iic_regs[3] = (m_s3c240x_iic_regs[3] & ~0xFF) | data_shift;
|
||||
}
|
||||
state->m_s3c240x_iic.data_index++;
|
||||
m_s3c240x_iic.data_index++;
|
||||
}
|
||||
break;
|
||||
// master transmit mode
|
||||
case 3 :
|
||||
{
|
||||
UINT8 data_shift = state->m_s3c240x_iic_regs[3] & 0xFF;
|
||||
verboselog( machine, 5, "IIC write %02X\n", data_shift);
|
||||
state->m_s3c240x_iic.data[state->m_s3c240x_iic.data_index++] = data_shift;
|
||||
if (state->m_s3c240x_iic.data_index == 3)
|
||||
UINT8 data_shift = m_s3c240x_iic_regs[3] & 0xFF;
|
||||
verboselog( machine(), 5, "IIC write %02X\n", data_shift);
|
||||
m_s3c240x_iic.data[m_s3c240x_iic.data_index++] = data_shift;
|
||||
if (m_s3c240x_iic.data_index == 3)
|
||||
{
|
||||
state->m_s3c240x_iic.address = (state->m_s3c240x_iic.data[1] << 8) | state->m_s3c240x_iic.data[2];
|
||||
m_s3c240x_iic.address = (m_s3c240x_iic.data[1] << 8) | m_s3c240x_iic.data[2];
|
||||
}
|
||||
if ((state->m_s3c240x_iic.data_index == 4) && (state->m_s3c240x_iic.data[0] == 0xA0))
|
||||
if ((m_s3c240x_iic.data_index == 4) && (m_s3c240x_iic.data[0] == 0xA0))
|
||||
{
|
||||
eeprom_write( machine, state->m_s3c240x_iic.address, data_shift);
|
||||
eeprom_write( machine(), m_s3c240x_iic.address, data_shift);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
enable_interrupt = BIT( state->m_s3c240x_iic_regs[0], 5);
|
||||
enable_interrupt = BIT( m_s3c240x_iic_regs[0], 5);
|
||||
if (enable_interrupt)
|
||||
{
|
||||
s3c240x_request_irq( machine, INT_IIC);
|
||||
s3c240x_request_irq( machine(), INT_IIC);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1582,10 +1579,10 @@ WRITE32_MEMBER(gp32_state::s3c240x_iis_w)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( s3c240x_iis_timer_exp )
|
||||
TIMER_CALLBACK_MEMBER(gp32_state::s3c240x_iis_timer_exp)
|
||||
{
|
||||
verboselog( machine, 2, "IIS timer callback\n");
|
||||
s3c240x_dma_request_iis( machine);
|
||||
verboselog( machine(), 2, "IIS timer callback\n");
|
||||
s3c240x_dma_request_iis( machine());
|
||||
}
|
||||
|
||||
// RTC
|
||||
@ -1657,18 +1654,18 @@ WRITE32_MEMBER(gp32_state::s3c240x_mmc_w)
|
||||
static void s3c240x_machine_start( running_machine &machine)
|
||||
{
|
||||
gp32_state *state = machine.driver_data<gp32_state>();
|
||||
state->m_s3c240x_pwm_timer[0] = machine.scheduler().timer_alloc(FUNC(s3c240x_pwm_timer_exp), (void *)(FPTR)0);
|
||||
state->m_s3c240x_pwm_timer[1] = machine.scheduler().timer_alloc(FUNC(s3c240x_pwm_timer_exp), (void *)(FPTR)1);
|
||||
state->m_s3c240x_pwm_timer[2] = machine.scheduler().timer_alloc(FUNC(s3c240x_pwm_timer_exp), (void *)(FPTR)2);
|
||||
state->m_s3c240x_pwm_timer[3] = machine.scheduler().timer_alloc(FUNC(s3c240x_pwm_timer_exp), (void *)(FPTR)3);
|
||||
state->m_s3c240x_pwm_timer[4] = machine.scheduler().timer_alloc(FUNC(s3c240x_pwm_timer_exp), (void *)(FPTR)4);
|
||||
state->m_s3c240x_dma_timer[0] = machine.scheduler().timer_alloc(FUNC(s3c240x_dma_timer_exp), (void *)(FPTR)0);
|
||||
state->m_s3c240x_dma_timer[1] = machine.scheduler().timer_alloc(FUNC(s3c240x_dma_timer_exp), (void *)(FPTR)1);
|
||||
state->m_s3c240x_dma_timer[2] = machine.scheduler().timer_alloc(FUNC(s3c240x_dma_timer_exp), (void *)(FPTR)2);
|
||||
state->m_s3c240x_dma_timer[3] = machine.scheduler().timer_alloc(FUNC(s3c240x_dma_timer_exp), (void *)(FPTR)3);
|
||||
state->m_s3c240x_iic_timer = machine.scheduler().timer_alloc(FUNC(s3c240x_iic_timer_exp), (void *)(FPTR)0);
|
||||
state->m_s3c240x_iis_timer = machine.scheduler().timer_alloc(FUNC(s3c240x_iis_timer_exp), (void *)(FPTR)0);
|
||||
state->m_s3c240x_lcd_timer = machine.scheduler().timer_alloc(FUNC(s3c240x_lcd_timer_exp), (void *)(FPTR)0);
|
||||
state->m_s3c240x_pwm_timer[0] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),state), (void *)(FPTR)0);
|
||||
state->m_s3c240x_pwm_timer[1] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),state), (void *)(FPTR)1);
|
||||
state->m_s3c240x_pwm_timer[2] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),state), (void *)(FPTR)2);
|
||||
state->m_s3c240x_pwm_timer[3] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),state), (void *)(FPTR)3);
|
||||
state->m_s3c240x_pwm_timer[4] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),state), (void *)(FPTR)4);
|
||||
state->m_s3c240x_dma_timer[0] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),state), (void *)(FPTR)0);
|
||||
state->m_s3c240x_dma_timer[1] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),state), (void *)(FPTR)1);
|
||||
state->m_s3c240x_dma_timer[2] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),state), (void *)(FPTR)2);
|
||||
state->m_s3c240x_dma_timer[3] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),state), (void *)(FPTR)3);
|
||||
state->m_s3c240x_iic_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iic_timer_exp),state), (void *)(FPTR)0);
|
||||
state->m_s3c240x_iis_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iis_timer_exp),state), (void *)(FPTR)0);
|
||||
state->m_s3c240x_lcd_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_lcd_timer_exp),state), (void *)(FPTR)0);
|
||||
state->m_eeprom_data = auto_alloc_array( machine, UINT8, 0x2000);
|
||||
machine.device<nvram_device>("nvram")->set_base(state->m_eeprom_data, 0x2000);
|
||||
smc_init( machine);
|
||||
|
@ -796,15 +796,15 @@ ADDRESS_MAP_END
|
||||
/* This is needed because MAME core does not allow PULSE_LINE.
|
||||
The time interval is not critical, although it should be below 1000. */
|
||||
|
||||
static TIMER_CALLBACK(intv_interrupt2_complete)
|
||||
TIMER_CALLBACK_MEMBER(intv_state::intv_interrupt2_complete)
|
||||
{
|
||||
machine.device("keyboard")->execute().set_input_line(0, CLEAR_LINE);
|
||||
machine().device("keyboard")->execute().set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(intv_state::intv_interrupt2)
|
||||
{
|
||||
machine().device("keyboard")->execute().set_input_line(0, ASSERT_LINE);
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("keyboard")->cycles_to_attotime(100), FUNC(intv_interrupt2_complete));
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("keyboard")->cycles_to_attotime(100), timer_expired_delegate(FUNC(intv_state::intv_interrupt2_complete),this));
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( intv, intv_state )
|
||||
|
@ -203,16 +203,15 @@ INPUT_PORTS_END
|
||||
|
||||
/* Intel 8255A Interface */
|
||||
|
||||
static TIMER_CALLBACK( led_refresh )
|
||||
TIMER_CALLBACK_MEMBER(mpf1_state::led_refresh)
|
||||
{
|
||||
mpf1_state *state = machine.driver_data<mpf1_state>();
|
||||
|
||||
if (BIT(state->m_lednum, 5)) output_set_digit_value(0, param);
|
||||
if (BIT(state->m_lednum, 4)) output_set_digit_value(1, param);
|
||||
if (BIT(state->m_lednum, 3)) output_set_digit_value(2, param);
|
||||
if (BIT(state->m_lednum, 2)) output_set_digit_value(3, param);
|
||||
if (BIT(state->m_lednum, 1)) output_set_digit_value(4, param);
|
||||
if (BIT(state->m_lednum, 0)) output_set_digit_value(5, param);
|
||||
if (BIT(m_lednum, 5)) output_set_digit_value(0, param);
|
||||
if (BIT(m_lednum, 4)) output_set_digit_value(1, param);
|
||||
if (BIT(m_lednum, 3)) output_set_digit_value(2, param);
|
||||
if (BIT(m_lednum, 2)) output_set_digit_value(3, param);
|
||||
if (BIT(m_lednum, 1)) output_set_digit_value(4, param);
|
||||
if (BIT(m_lednum, 0)) output_set_digit_value(5, param);
|
||||
}
|
||||
|
||||
READ8_MEMBER( mpf1_state::ppi_pa_r )
|
||||
@ -346,7 +345,7 @@ static TIMER_DEVICE_CALLBACK( check_halt_callback )
|
||||
|
||||
void mpf1_state::machine_start()
|
||||
{
|
||||
m_led_refresh_timer = machine().scheduler().timer_alloc(FUNC(led_refresh));
|
||||
m_led_refresh_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mpf1_state::led_refresh),this));
|
||||
|
||||
/* register for state saving */
|
||||
save_item(NAME(m_break));
|
||||
|
@ -296,19 +296,18 @@ static void nc_update_interrupts(running_machine &machine)
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(nc_keyboard_timer_callback)
|
||||
TIMER_CALLBACK_MEMBER(nc_state::nc_keyboard_timer_callback)
|
||||
{
|
||||
nc_state *state = machine.driver_data<nc_state>();
|
||||
LOG(("keyboard int\n"));
|
||||
|
||||
/* set int */
|
||||
state->m_irq_status |= (1<<3);
|
||||
m_irq_status |= (1<<3);
|
||||
|
||||
/* update ints */
|
||||
nc_update_interrupts(machine);
|
||||
nc_update_interrupts(machine());
|
||||
|
||||
/* don't trigger again, but don't free it */
|
||||
state->m_keyboard_timer->reset();
|
||||
m_keyboard_timer->reset();
|
||||
}
|
||||
|
||||
|
||||
@ -539,7 +538,7 @@ static TIMER_DEVICE_CALLBACK(dummy_timer_callback)
|
||||
state->m_previous_inputport_10_state = inputport_10_state;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(nc_serial_timer_callback);
|
||||
|
||||
|
||||
static void nc_common_init_machine(running_machine &machine)
|
||||
{
|
||||
@ -767,9 +766,9 @@ static const unsigned long baud_rate_table[]=
|
||||
19200
|
||||
};
|
||||
|
||||
static TIMER_CALLBACK(nc_serial_timer_callback)
|
||||
TIMER_CALLBACK_MEMBER(nc_state::nc_serial_timer_callback)
|
||||
{
|
||||
i8251_device *uart = machine.device<i8251_device>("uart");
|
||||
i8251_device *uart = machine().device<i8251_device>("uart");
|
||||
|
||||
uart->transmit_clock();
|
||||
uart->receive_clock();
|
||||
@ -952,11 +951,11 @@ void nc_state::machine_start()
|
||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(nc100_machine_stop),&machine()));
|
||||
|
||||
/* keyboard timer */
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(FUNC(nc_keyboard_timer_callback));
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nc_state::nc_keyboard_timer_callback),this));
|
||||
m_keyboard_timer->adjust(attotime::from_msec(10));
|
||||
|
||||
/* serial timer */
|
||||
m_serial_timer = machine().scheduler().timer_alloc(FUNC(nc_serial_timer_callback));
|
||||
m_serial_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nc_state::nc_serial_timer_callback),this));
|
||||
}
|
||||
|
||||
|
||||
@ -1342,11 +1341,11 @@ MACHINE_START_MEMBER(nc_state,nc200)
|
||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(nc200_machine_stop),&machine()));
|
||||
|
||||
/* keyboard timer */
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(FUNC(nc_keyboard_timer_callback));
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nc_state::nc_keyboard_timer_callback),this));
|
||||
m_keyboard_timer->adjust(attotime::from_msec(10));
|
||||
|
||||
/* serial timer */
|
||||
m_serial_timer = machine().scheduler().timer_alloc(FUNC(nc_serial_timer_callback));
|
||||
m_serial_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(nc_state::nc_serial_timer_callback),this));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -903,16 +903,16 @@ ROM_END
|
||||
|
||||
/* Driver Initialization */
|
||||
|
||||
static TIMER_CALLBACK( setup_beep )
|
||||
TIMER_CALLBACK_MEMBER(sb2m600_state::setup_beep)
|
||||
{
|
||||
device_t *speaker = machine.device(BEEPER_TAG);
|
||||
device_t *speaker = machine().device(BEEPER_TAG);
|
||||
beep_set_state(speaker, 0);
|
||||
beep_set_frequency(speaker, 300);
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(c1p_state,c1p)
|
||||
{
|
||||
machine().scheduler().timer_set(attotime::zero, FUNC(setup_beep));
|
||||
machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(sb2m600_state::setup_beep),this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -162,11 +162,10 @@ static void pcw_update_irqs(running_machine &machine)
|
||||
machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(pcw_timer_pulse)
|
||||
TIMER_CALLBACK_MEMBER(pcw_state::pcw_timer_pulse)
|
||||
{
|
||||
pcw_state *state = machine.driver_data<pcw_state>();
|
||||
state->m_timer_irq_flag = 0;
|
||||
pcw_update_irqs(machine);
|
||||
m_timer_irq_flag = 0;
|
||||
pcw_update_irqs(machine());
|
||||
}
|
||||
|
||||
/* callback for 1/300ths of a second interrupt */
|
||||
@ -177,7 +176,7 @@ static TIMER_DEVICE_CALLBACK(pcw_timer_interrupt)
|
||||
|
||||
state->m_timer_irq_flag = 1;
|
||||
pcw_update_irqs(timer.machine());
|
||||
timer.machine().scheduler().timer_set(attotime::from_usec(100), FUNC(pcw_timer_pulse));
|
||||
timer.machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(pcw_state::pcw_timer_pulse),state));
|
||||
}
|
||||
|
||||
/* fdc interrupt callback. set/clear fdc int */
|
||||
@ -731,73 +730,71 @@ READ8_MEMBER(pcw_state::pcw_printer_status_r)
|
||||
* T0: Paper sensor (?)
|
||||
* T1: Print head location (1 if not at left margin)
|
||||
*/
|
||||
static TIMER_CALLBACK(pcw_stepper_callback)
|
||||
TIMER_CALLBACK_MEMBER(pcw_state::pcw_stepper_callback)
|
||||
{
|
||||
pcw_state *state = machine.driver_data<pcw_state>();
|
||||
|
||||
//popmessage("PRN: P2 bits %s %s %s\nSerial: %02x\nHeadpos: %i",state->m_printer_p2 & 0x40 ? " " : "6",state->m_printer_p2 & 0x20 ? " " : "5",state->m_printer_p2 & 0x10 ? " " : "4",state->m_printer_shift_output,state->m_printer_headpos);
|
||||
if((state->m_printer_p2 & 0x10) == 0) // print head motor active
|
||||
//popmessage("PRN: P2 bits %s %s %s\nSerial: %02x\nHeadpos: %i",m_printer_p2 & 0x40 ? " " : "6",m_printer_p2 & 0x20 ? " " : "5",m_printer_p2 & 0x10 ? " " : "4",m_printer_shift_output,m_printer_headpos);
|
||||
if((m_printer_p2 & 0x10) == 0) // print head motor active
|
||||
{
|
||||
UINT8 stepper_state = (state->m_printer_shift_output >> 4) & 0x0f;
|
||||
if(stepper_state == full_step_table[(state->m_head_motor_state + 1) & 0x03])
|
||||
UINT8 stepper_state = (m_printer_shift_output >> 4) & 0x0f;
|
||||
if(stepper_state == full_step_table[(m_head_motor_state + 1) & 0x03])
|
||||
{
|
||||
state->m_printer_headpos += 2;
|
||||
state->m_head_motor_state++;
|
||||
logerror("Printer head moved forward by 2 to %i\n",state->m_printer_headpos);
|
||||
m_printer_headpos += 2;
|
||||
m_head_motor_state++;
|
||||
logerror("Printer head moved forward by 2 to %i\n",m_printer_headpos);
|
||||
}
|
||||
if(stepper_state == half_step_table[(state->m_head_motor_state + 1) & 0x03])
|
||||
if(stepper_state == half_step_table[(m_head_motor_state + 1) & 0x03])
|
||||
{
|
||||
state->m_printer_headpos += 1;
|
||||
state->m_head_motor_state++;
|
||||
logerror("Printer head moved forward by 1 to %i\n",state->m_printer_headpos);
|
||||
m_printer_headpos += 1;
|
||||
m_head_motor_state++;
|
||||
logerror("Printer head moved forward by 1 to %i\n",m_printer_headpos);
|
||||
}
|
||||
if(stepper_state == full_step_table[(state->m_head_motor_state - 1) & 0x03])
|
||||
if(stepper_state == full_step_table[(m_head_motor_state - 1) & 0x03])
|
||||
{
|
||||
state->m_printer_headpos -= 2;
|
||||
state->m_head_motor_state--;
|
||||
logerror("Printer head moved back by 2 to %i\n",state->m_printer_headpos);
|
||||
m_printer_headpos -= 2;
|
||||
m_head_motor_state--;
|
||||
logerror("Printer head moved back by 2 to %i\n",m_printer_headpos);
|
||||
}
|
||||
if(stepper_state == half_step_table[(state->m_head_motor_state - 1) & 0x03])
|
||||
if(stepper_state == half_step_table[(m_head_motor_state - 1) & 0x03])
|
||||
{
|
||||
state->m_printer_headpos -= 1;
|
||||
state->m_head_motor_state--;
|
||||
logerror("Printer head moved back by 1 to %i\n",state->m_printer_headpos);
|
||||
m_printer_headpos -= 1;
|
||||
m_head_motor_state--;
|
||||
logerror("Printer head moved back by 1 to %i\n",m_printer_headpos);
|
||||
}
|
||||
if(state->m_printer_headpos < 0)
|
||||
state->m_printer_headpos = 0;
|
||||
if(state->m_printer_headpos > PCW_PRINTER_WIDTH)
|
||||
state->m_printer_headpos = PCW_PRINTER_WIDTH;
|
||||
state->m_head_motor_state &= 0x03;
|
||||
state->m_printer_p2 |= 0x10;
|
||||
if(m_printer_headpos < 0)
|
||||
m_printer_headpos = 0;
|
||||
if(m_printer_headpos > PCW_PRINTER_WIDTH)
|
||||
m_printer_headpos = PCW_PRINTER_WIDTH;
|
||||
m_head_motor_state &= 0x03;
|
||||
m_printer_p2 |= 0x10;
|
||||
}
|
||||
if((state->m_printer_p2 & 0x20) == 0) // line feed motor active
|
||||
if((m_printer_p2 & 0x20) == 0) // line feed motor active
|
||||
{
|
||||
UINT8 stepper_state = state->m_printer_shift_output & 0x0f;
|
||||
if(stepper_state == full_step_table[(state->m_linefeed_motor_state + 1) & 0x03])
|
||||
UINT8 stepper_state = m_printer_shift_output & 0x0f;
|
||||
if(stepper_state == full_step_table[(m_linefeed_motor_state + 1) & 0x03])
|
||||
{
|
||||
state->m_paper_feed++;
|
||||
if(state->m_paper_feed > PCW_PRINTER_HEIGHT*2)
|
||||
state->m_paper_feed = 0;
|
||||
state->m_linefeed_motor_state++;
|
||||
m_paper_feed++;
|
||||
if(m_paper_feed > PCW_PRINTER_HEIGHT*2)
|
||||
m_paper_feed = 0;
|
||||
m_linefeed_motor_state++;
|
||||
}
|
||||
if(stepper_state == half_step_table[(state->m_linefeed_motor_state + 1) & 0x03])
|
||||
if(stepper_state == half_step_table[(m_linefeed_motor_state + 1) & 0x03])
|
||||
{
|
||||
state->m_paper_feed++;
|
||||
if(state->m_paper_feed > PCW_PRINTER_HEIGHT*2)
|
||||
state->m_paper_feed = 0;
|
||||
state->m_linefeed_motor_state++;
|
||||
m_paper_feed++;
|
||||
if(m_paper_feed > PCW_PRINTER_HEIGHT*2)
|
||||
m_paper_feed = 0;
|
||||
m_linefeed_motor_state++;
|
||||
}
|
||||
state->m_linefeed_motor_state &= 0x03;
|
||||
state->m_printer_p2 |= 0x20;
|
||||
m_linefeed_motor_state &= 0x03;
|
||||
m_printer_p2 |= 0x20;
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(pcw_pins_callback)
|
||||
TIMER_CALLBACK_MEMBER(pcw_state::pcw_pins_callback)
|
||||
{
|
||||
pcw_state *state = machine.driver_data<pcw_state>();
|
||||
|
||||
pcw_printer_fire_pins(machine,state->m_printer_pins);
|
||||
state->m_printer_p2 |= 0x40;
|
||||
pcw_printer_fire_pins(machine(),m_printer_pins);
|
||||
m_printer_p2 |= 0x40;
|
||||
}
|
||||
|
||||
READ8_MEMBER(pcw_state::mcu_printer_p1_r)
|
||||
@ -1034,9 +1031,9 @@ static ADDRESS_MAP_START(pcw_keyboard_io, AS_IO, 8, pcw_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static TIMER_CALLBACK(setup_beep)
|
||||
TIMER_CALLBACK_MEMBER(pcw_state::setup_beep)
|
||||
{
|
||||
device_t *speaker = machine.device(BEEPER_TAG);
|
||||
device_t *speaker = machine().device(BEEPER_TAG);
|
||||
beep_set_state(speaker, 0);
|
||||
beep_set_frequency(speaker, 3750);
|
||||
}
|
||||
@ -1096,10 +1093,10 @@ DRIVER_INIT_MEMBER(pcw_state,pcw)
|
||||
m_roller_ram_offset = 0;
|
||||
|
||||
/* timer interrupt */
|
||||
machine().scheduler().timer_set(attotime::zero, FUNC(setup_beep));
|
||||
machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(pcw_state::setup_beep),this));
|
||||
|
||||
m_prn_stepper = machine().scheduler().timer_alloc(FUNC(pcw_stepper_callback));
|
||||
m_prn_pins = machine().scheduler().timer_alloc(FUNC(pcw_pins_callback));
|
||||
m_prn_stepper = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_stepper_callback),this));
|
||||
m_prn_pins = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pcw_state::pcw_pins_callback),this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -383,10 +383,10 @@ by a pdp-1 programming error, even if there is no emulator error. */
|
||||
|
||||
|
||||
static int tape_read(pdp1_state *state, UINT8 *reply);
|
||||
static TIMER_CALLBACK(reader_callback);
|
||||
static TIMER_CALLBACK(puncher_callback);
|
||||
static TIMER_CALLBACK(tyo_callback);
|
||||
static TIMER_CALLBACK(dpy_callback);
|
||||
|
||||
|
||||
|
||||
|
||||
static void pdp1_machine_stop(running_machine &machine);
|
||||
|
||||
static void pdp1_tape_read_binary(device_t *device);
|
||||
@ -658,10 +658,10 @@ void pdp1_state::machine_start()
|
||||
|
||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(pdp1_machine_stop),&machine()));
|
||||
|
||||
m_tape_reader.timer = machine().scheduler().timer_alloc(FUNC(reader_callback));
|
||||
m_tape_puncher.timer = machine().scheduler().timer_alloc(FUNC(puncher_callback));
|
||||
m_typewriter.tyo_timer = machine().scheduler().timer_alloc(FUNC(tyo_callback));
|
||||
m_dpy_timer = machine().scheduler().timer_alloc(FUNC(dpy_callback));
|
||||
m_tape_reader.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::reader_callback),this));
|
||||
m_tape_puncher.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::puncher_callback),this));
|
||||
m_typewriter.tyo_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::tyo_callback),this));
|
||||
m_dpy_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::dpy_callback),this));
|
||||
m_tape_reader.timer->adjust(attotime::zero, 0, attotime::from_hz(2500));
|
||||
m_tape_reader.timer->enable(0);
|
||||
}
|
||||
@ -902,54 +902,53 @@ static void begin_tape_read(pdp1_state *state, int binary, int nac)
|
||||
/*
|
||||
timer callback to simulate reader IO
|
||||
*/
|
||||
static TIMER_CALLBACK(reader_callback)
|
||||
TIMER_CALLBACK_MEMBER(pdp1_state::reader_callback)
|
||||
{
|
||||
pdp1_state *state = machine.driver_data<pdp1_state>();
|
||||
int not_ready;
|
||||
UINT8 data;
|
||||
|
||||
if (state->m_tape_reader.rc)
|
||||
if (m_tape_reader.rc)
|
||||
{
|
||||
not_ready = tape_read(state, & data);
|
||||
not_ready = tape_read(this, & data);
|
||||
if (not_ready)
|
||||
{
|
||||
state->m_tape_reader.motor_on = 0; /* let us stop the motor */
|
||||
m_tape_reader.motor_on = 0; /* let us stop the motor */
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((! state->m_tape_reader.rby) || (data & 0200))
|
||||
if ((! m_tape_reader.rby) || (data & 0200))
|
||||
{
|
||||
state->m_tape_reader.rb |= (state->m_tape_reader.rby) ? (data & 077) : data;
|
||||
m_tape_reader.rb |= (m_tape_reader.rby) ? (data & 077) : data;
|
||||
|
||||
if (state->m_tape_reader.rc != 3)
|
||||
if (m_tape_reader.rc != 3)
|
||||
{
|
||||
state->m_tape_reader.rb <<= 6;
|
||||
m_tape_reader.rb <<= 6;
|
||||
}
|
||||
|
||||
state->m_tape_reader.rc = (state->m_tape_reader.rc+1) & 3;
|
||||
m_tape_reader.rc = (m_tape_reader.rc+1) & 3;
|
||||
|
||||
if (state->m_tape_reader.rc == 0)
|
||||
if (m_tape_reader.rc == 0)
|
||||
{ /* IO complete */
|
||||
state->m_tape_reader.rcl = 0;
|
||||
if (state->m_tape_reader.rcp)
|
||||
m_tape_reader.rcl = 0;
|
||||
if (m_tape_reader.rcp)
|
||||
{
|
||||
machine.device("maincpu")->state().set_state_int(PDP1_IO, state->m_tape_reader.rb); /* transfer reader buffer to IO */
|
||||
pdp1_pulse_iot_done(machine.device("maincpu"));
|
||||
machine().device("maincpu")->state().set_state_int(PDP1_IO, m_tape_reader.rb); /* transfer reader buffer to IO */
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
}
|
||||
else
|
||||
state->m_io_status |= io_st_ptr;
|
||||
m_io_status |= io_st_ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state->m_tape_reader.motor_on && state->m_tape_reader.rcl)
|
||||
if (m_tape_reader.motor_on && m_tape_reader.rcl)
|
||||
{
|
||||
state->m_tape_reader.timer->enable(1);
|
||||
m_tape_reader.timer->enable(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_tape_reader.timer->enable(0);
|
||||
m_tape_reader.timer->enable(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1080,14 +1079,13 @@ static void tape_write(pdp1_state *state, UINT8 data)
|
||||
/*
|
||||
timer callback to generate punch completion pulse
|
||||
*/
|
||||
static TIMER_CALLBACK(puncher_callback)
|
||||
TIMER_CALLBACK_MEMBER(pdp1_state::puncher_callback)
|
||||
{
|
||||
pdp1_state *state = machine.driver_data<pdp1_state>();
|
||||
int nac = param;
|
||||
state->m_io_status |= io_st_ptp;
|
||||
m_io_status |= io_st_ptp;
|
||||
if (nac)
|
||||
{
|
||||
pdp1_pulse_iot_done(machine.device("maincpu"));
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1290,14 +1288,13 @@ static void typewriter_out(running_machine &machine, UINT8 data)
|
||||
/*
|
||||
timer callback to generate typewriter completion pulse
|
||||
*/
|
||||
static TIMER_CALLBACK(tyo_callback)
|
||||
TIMER_CALLBACK_MEMBER(pdp1_state::tyo_callback)
|
||||
{
|
||||
pdp1_state *state = machine.driver_data<pdp1_state>();
|
||||
int nac = param;
|
||||
state->m_io_status |= io_st_tyo;
|
||||
m_io_status |= io_st_tyo;
|
||||
if (nac)
|
||||
{
|
||||
pdp1_pulse_iot_done(machine.device("maincpu"));
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1413,9 +1410,9 @@ static void iot_tyi(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
/*
|
||||
timer callback to generate crt completion pulse
|
||||
*/
|
||||
static TIMER_CALLBACK(dpy_callback)
|
||||
TIMER_CALLBACK_MEMBER(pdp1_state::dpy_callback)
|
||||
{
|
||||
pdp1_pulse_iot_done(machine.device("maincpu"));
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
}
|
||||
|
||||
|
||||
@ -1478,10 +1475,9 @@ static void parallel_drum_set_il(pdp1_state *state, int il)
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
static TIMER_CALLBACK(il_timer_callback)
|
||||
TIMER_CALLBACK_MEMBER(pdp1_state::il_timer_callback)
|
||||
{
|
||||
pdp1_state *state = machine.driver_data<pdp1_state>();
|
||||
if (state->m_parallel_drum.dba)
|
||||
if (m_parallel_drum.dba)
|
||||
{
|
||||
/* set break request and status bit 5 */
|
||||
/* ... */
|
||||
@ -1493,7 +1489,7 @@ static void parallel_drum_init(pdp1_state *state)
|
||||
state->m_parallel_drum.rotation_timer = machine.scheduler().timer_alloc();
|
||||
state->m_parallel_drum.rotation_timer->adjust(PARALLEL_DRUM_ROTATION_TIME, 0, PARALLEL_DRUM_ROTATION_TIME);
|
||||
|
||||
state->m_parallel_drum.il_timer = machine.scheduler().timer_alloc(FUNC(il_timer_callback));
|
||||
state->m_parallel_drum.il_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(pdp1_state::il_timer_callback),this));
|
||||
parallel_drum_set_il(0);
|
||||
}
|
||||
#endif
|
||||
|
@ -325,15 +325,14 @@ ADDRESS_MAP_END
|
||||
INTERRUPTS
|
||||
***************************************************************************/
|
||||
|
||||
static TIMER_CALLBACK( irq_off )
|
||||
TIMER_CALLBACK_MEMBER(samcoupe_state::irq_off)
|
||||
{
|
||||
samcoupe_state *state = machine.driver_data<samcoupe_state>();
|
||||
/* adjust STATUS register */
|
||||
state->m_status |= param;
|
||||
m_status |= param;
|
||||
|
||||
/* clear interrupt */
|
||||
if ((state->m_status & 0x1f) == 0x1f)
|
||||
machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
if ((m_status & 0x1f) == 0x1f)
|
||||
machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
|
||||
}
|
||||
|
||||
@ -343,7 +342,7 @@ void samcoupe_irq(device_t *device, UINT8 src)
|
||||
|
||||
/* assert irq and a timer to set it off again */
|
||||
device->execute().set_input_line(0, ASSERT_LINE);
|
||||
device->machine().scheduler().timer_set(attotime::from_usec(20), FUNC(irq_off), src);
|
||||
device->machine().scheduler().timer_set(attotime::from_usec(20), timer_expired_delegate(FUNC(samcoupe_state::irq_off),state), src);
|
||||
|
||||
/* adjust STATUS register */
|
||||
state->m_status &= ~src;
|
||||
|
@ -1025,19 +1025,19 @@ static const sn76496_config psg_intf =
|
||||
TIMER_CALLBACK( lightgun_tick )
|
||||
-------------------------------------------------*/
|
||||
|
||||
static TIMER_CALLBACK( lightgun_tick )
|
||||
TIMER_CALLBACK_MEMBER(sg1000_state::lightgun_tick)
|
||||
{
|
||||
UINT8 *rom = machine.root_device().memregion(Z80_TAG)->base();
|
||||
UINT8 *rom = machine().root_device().memregion(Z80_TAG)->base();
|
||||
|
||||
if (IS_CARTRIDGE_TV_DRAW(rom))
|
||||
{
|
||||
/* enable crosshair for TV Draw */
|
||||
crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL);
|
||||
crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_ALL);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* disable crosshair for other cartridges */
|
||||
crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE);
|
||||
crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1048,7 +1048,7 @@ static TIMER_CALLBACK( lightgun_tick )
|
||||
void sg1000_state::machine_start()
|
||||
{
|
||||
/* toggle light gun crosshair */
|
||||
machine().scheduler().timer_set(attotime::zero, FUNC(lightgun_tick));
|
||||
machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(sg1000_state::lightgun_tick),this));
|
||||
|
||||
/* register for state saving */
|
||||
save_item(NAME(m_tvdraw_data));
|
||||
@ -1061,7 +1061,7 @@ void sg1000_state::machine_start()
|
||||
void sc3000_state::machine_start()
|
||||
{
|
||||
/* toggle light gun crosshair */
|
||||
machine().scheduler().timer_set(attotime::zero, FUNC(lightgun_tick));
|
||||
machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(sg1000_state::lightgun_tick),this));
|
||||
|
||||
/* register for state saving */
|
||||
save_item(NAME(m_tvdraw_data));
|
||||
|
@ -546,16 +546,16 @@ ROM_END
|
||||
|
||||
/* Driver Initialization */
|
||||
|
||||
static TIMER_CALLBACK( setup_beep )
|
||||
TIMER_CALLBACK_MEMBER(studio2_state::setup_beep)
|
||||
{
|
||||
device_t *speaker = machine.device(BEEPER_TAG);
|
||||
device_t *speaker = machine().device(BEEPER_TAG);
|
||||
beep_set_state(speaker, 0);
|
||||
beep_set_frequency(speaker, 300);
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(studio2_state,studio2)
|
||||
{
|
||||
machine().scheduler().timer_set(attotime::zero, FUNC(setup_beep));
|
||||
machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(studio2_state::setup_beep),this));
|
||||
}
|
||||
|
||||
/* Game Drivers */
|
||||
|
@ -24,36 +24,36 @@
|
||||
#define YPOS state->m_reg[3]
|
||||
#define BANK m_reg[0x26]
|
||||
|
||||
static TIMER_CALLBACK(svision_pet_timer)
|
||||
TIMER_CALLBACK_MEMBER(svision_state::svision_pet_timer)
|
||||
{
|
||||
svision_state *state = machine.driver_data<svision_state>();
|
||||
switch (state->m_pet.state)
|
||||
switch (m_pet.state)
|
||||
{
|
||||
case 0:
|
||||
state->m_pet.input = machine.root_device().ioport("JOY2")->read();
|
||||
m_pet.input = machine().root_device().ioport("JOY2")->read();
|
||||
/* fall through */
|
||||
|
||||
case 2: case 4: case 6: case 8:
|
||||
case 10: case 12: case 14:
|
||||
state->m_pet.clock=state->m_pet.state&2;
|
||||
state->m_pet.data=state->m_pet.input&1;
|
||||
state->m_pet.input>>=1;
|
||||
state->m_pet.state++;
|
||||
m_pet.clock=m_pet.state&2;
|
||||
m_pet.data=m_pet.input&1;
|
||||
m_pet.input>>=1;
|
||||
m_pet.state++;
|
||||
break;
|
||||
|
||||
case 16+15:
|
||||
state->m_pet.state = 0;
|
||||
m_pet.state = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
state->m_pet.state++;
|
||||
m_pet.state++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_DEVICE_CALLBACK(svision_pet_timer_dev)
|
||||
{
|
||||
svision_pet_timer(timer.machine(),ptr,param);
|
||||
svision_state *state = timer.machine().driver_data<svision_state>();
|
||||
state->svision_pet_timer(ptr,param);
|
||||
}
|
||||
|
||||
void svision_irq(running_machine &machine)
|
||||
@ -65,12 +65,11 @@ void svision_irq(running_machine &machine)
|
||||
machine.device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(svision_timer)
|
||||
TIMER_CALLBACK_MEMBER(svision_state::svision_timer)
|
||||
{
|
||||
svision_state *state = machine.driver_data<svision_state>();
|
||||
state->m_svision.timer_shot = TRUE;
|
||||
state->m_svision.timer1->enable(FALSE);
|
||||
svision_irq( machine );
|
||||
m_svision.timer_shot = TRUE;
|
||||
m_svision.timer1->enable(FALSE);
|
||||
svision_irq( machine() );
|
||||
}
|
||||
|
||||
READ8_MEMBER(svision_state::svision_r)
|
||||
@ -424,7 +423,7 @@ INTERRUPT_GEN_MEMBER(svision_state::svision_frame_int)
|
||||
|
||||
DRIVER_INIT_MEMBER(svision_state,svision)
|
||||
{
|
||||
m_svision.timer1 = machine().scheduler().timer_alloc(FUNC(svision_timer));
|
||||
m_svision.timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(svision_state::svision_timer),this));
|
||||
m_sound = machine().device("custom");
|
||||
m_dma_finished = svision_dma_finished(m_sound);
|
||||
m_pet.on = FALSE;
|
||||
@ -433,13 +432,13 @@ DRIVER_INIT_MEMBER(svision_state,svision)
|
||||
|
||||
DRIVER_INIT_MEMBER(svision_state,svisions)
|
||||
{
|
||||
m_svision.timer1 = machine().scheduler().timer_alloc(FUNC(svision_timer));
|
||||
m_svision.timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(svision_state::svision_timer),this));
|
||||
m_sound = machine().device("custom");
|
||||
m_dma_finished = svision_dma_finished(m_sound);
|
||||
membank("bank2")->set_base(memregion("user1")->base() + 0x1c000);
|
||||
m_svision.timer1 = machine().scheduler().timer_alloc(FUNC(svision_timer));
|
||||
m_svision.timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(svision_state::svision_timer),this));
|
||||
m_pet.on = TRUE;
|
||||
m_pet.timer = machine().scheduler().timer_alloc(FUNC(svision_pet_timer));
|
||||
m_pet.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(svision_state::svision_pet_timer),this));
|
||||
}
|
||||
|
||||
static DEVICE_IMAGE_LOAD( svision_cart )
|
||||
|
@ -900,16 +900,16 @@ ROM_END
|
||||
|
||||
/* Driver Initialization */
|
||||
|
||||
static TIMER_CALLBACK(setup_beep)
|
||||
TIMER_CALLBACK_MEMBER(tmc1800_state::setup_beep)
|
||||
{
|
||||
device_t *speaker = machine.device(BEEPER_TAG);
|
||||
device_t *speaker = machine().device(BEEPER_TAG);
|
||||
beep_set_state(speaker, 0);
|
||||
beep_set_frequency( speaker, 0 );
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(tmc1800_state,tmc1800)
|
||||
{
|
||||
machine().scheduler().timer_set(attotime::zero, FUNC(setup_beep));
|
||||
machine().scheduler().timer_set(attotime::zero, timer_expired_delegate(FUNC(tmc1800_state::setup_beep),this));
|
||||
}
|
||||
|
||||
/* System Drivers */
|
||||
|
@ -340,10 +340,10 @@ static const crt_interface tx0_crt_interface =
|
||||
*/
|
||||
|
||||
|
||||
static TIMER_CALLBACK(reader_callback);
|
||||
static TIMER_CALLBACK(puncher_callback);
|
||||
static TIMER_CALLBACK(prt_callback);
|
||||
static TIMER_CALLBACK(dis_callback);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -383,10 +383,10 @@ static void tx0_machine_stop(running_machine &machine)
|
||||
|
||||
void tx0_state::machine_start()
|
||||
{
|
||||
m_tape_reader.timer = machine().scheduler().timer_alloc(FUNC(reader_callback));
|
||||
m_tape_puncher.timer = machine().scheduler().timer_alloc(FUNC(puncher_callback));
|
||||
m_typewriter.prt_timer = machine().scheduler().timer_alloc(FUNC(prt_callback));
|
||||
m_dis_timer = machine().scheduler().timer_alloc(FUNC(dis_callback));
|
||||
m_tape_reader.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tx0_state::reader_callback),this));
|
||||
m_tape_puncher.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tx0_state::puncher_callback),this));
|
||||
m_typewriter.prt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tx0_state::prt_callback),this));
|
||||
m_dis_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tx0_state::dis_callback),this));
|
||||
|
||||
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(tx0_machine_stop),&machine()));
|
||||
}
|
||||
@ -631,49 +631,48 @@ static void begin_tape_read(tx0_state *state, int binary)
|
||||
/*
|
||||
timer callback to simulate reader IO
|
||||
*/
|
||||
static TIMER_CALLBACK(reader_callback)
|
||||
TIMER_CALLBACK_MEMBER(tx0_state::reader_callback)
|
||||
{
|
||||
tx0_state *state = machine.driver_data<tx0_state>();
|
||||
int not_ready;
|
||||
UINT8 data;
|
||||
int ac;
|
||||
|
||||
if (state->m_tape_reader.rc)
|
||||
if (m_tape_reader.rc)
|
||||
{
|
||||
not_ready = tape_read(state, & data);
|
||||
not_ready = tape_read(this, & data);
|
||||
if (not_ready)
|
||||
{
|
||||
state->m_tape_reader.motor_on = 0; /* let us stop the motor */
|
||||
m_tape_reader.motor_on = 0; /* let us stop the motor */
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data & 0100)
|
||||
{
|
||||
/* read current AC */
|
||||
ac = machine.device("maincpu")->state().state_int(TX0_AC);
|
||||
ac = machine().device("maincpu")->state().state_int(TX0_AC);
|
||||
/* cycle right */
|
||||
ac = (ac >> 1) | ((ac & 1) << 17);
|
||||
/* shuffle and insert data into AC */
|
||||
ac = (ac /*& 0333333*/) | ((data & 001) << 17) | ((data & 002) << 13) | ((data & 004) << 9) | ((data & 010) << 5) | ((data & 020) << 1) | ((data & 040) >> 3);
|
||||
/* write modified AC */
|
||||
machine.device("maincpu")->state().set_state_int(TX0_AC, ac);
|
||||
machine().device("maincpu")->state().set_state_int(TX0_AC, ac);
|
||||
|
||||
state->m_tape_reader.rc = (state->m_tape_reader.rc+1) & 3;
|
||||
m_tape_reader.rc = (m_tape_reader.rc+1) & 3;
|
||||
|
||||
if (state->m_tape_reader.rc == 0)
|
||||
if (m_tape_reader.rc == 0)
|
||||
{ /* IO complete */
|
||||
state->m_tape_reader.rcl = 0;
|
||||
machine.device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
m_tape_reader.rcl = 0;
|
||||
machine().device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state->m_tape_reader.motor_on && state->m_tape_reader.rcl)
|
||||
if (m_tape_reader.motor_on && m_tape_reader.rcl)
|
||||
/* delay is approximately 1/400s */
|
||||
state->m_tape_reader.timer->adjust(attotime::from_usec(2500));
|
||||
m_tape_reader.timer->adjust(attotime::from_usec(2500));
|
||||
else
|
||||
state->m_tape_reader.timer->enable(0);
|
||||
m_tape_reader.timer->enable(0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -697,9 +696,9 @@ void tx0_punchtape_image_device::call_unload()
|
||||
state->m_tape_puncher.fd = NULL;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(puncher_callback)
|
||||
TIMER_CALLBACK_MEMBER(tx0_state::puncher_callback)
|
||||
{
|
||||
machine.device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
machine().device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -792,9 +791,9 @@ static void typewriter_out(running_machine &machine, UINT8 data)
|
||||
/*
|
||||
timer callback to generate typewriter completion pulse
|
||||
*/
|
||||
static TIMER_CALLBACK(prt_callback)
|
||||
TIMER_CALLBACK_MEMBER(tx0_state::prt_callback)
|
||||
{
|
||||
machine.device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
machine().device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -819,9 +818,9 @@ static void tx0_io_prt(device_t *device)
|
||||
/*
|
||||
timer callback to generate crt completion pulse
|
||||
*/
|
||||
static TIMER_CALLBACK(dis_callback)
|
||||
TIMER_CALLBACK_MEMBER(tx0_state::dis_callback)
|
||||
{
|
||||
machine.device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
machine().device("maincpu")->state().set_state_int(TX0_IO_COMPLETE, (UINT64)0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -666,20 +666,18 @@ void x07_state::cassette_w()
|
||||
m_cass_data = m_regs_w[7];
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( cassette_tick )
|
||||
TIMER_CALLBACK_MEMBER(x07_state::cassette_tick)
|
||||
{
|
||||
x07_state *state = machine.driver_data<x07_state>();
|
||||
state->m_cass_clk++;
|
||||
m_cass_clk++;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( cassette_poll )
|
||||
TIMER_CALLBACK_MEMBER(x07_state::cassette_poll)
|
||||
{
|
||||
x07_state *state = machine.driver_data<x07_state>();
|
||||
|
||||
if ((state->m_cassette->get_state() & 0x03) == CASSETTE_PLAY)
|
||||
state->cassette_load();
|
||||
else if ((state->m_cassette->get_state() & 0x03) == CASSETTE_RECORD)
|
||||
state->cassette_save();
|
||||
if ((m_cassette->get_state() & 0x03) == CASSETTE_PLAY)
|
||||
cassette_load();
|
||||
else if ((m_cassette->get_state() & 0x03) == CASSETTE_RECORD)
|
||||
cassette_save();
|
||||
}
|
||||
|
||||
void x07_state::cassette_load()
|
||||
@ -1367,26 +1365,23 @@ static TIMER_DEVICE_CALLBACK( blink_timer )
|
||||
state->m_blink = !state->m_blink;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( rsta_clear )
|
||||
TIMER_CALLBACK_MEMBER(x07_state::rsta_clear)
|
||||
{
|
||||
x07_state *state = machine.driver_data<x07_state>();
|
||||
state->m_maincpu->set_input_line(NSC800_RSTA, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(NSC800_RSTA, CLEAR_LINE);
|
||||
|
||||
if (state->m_kb_size)
|
||||
state->kb_irq();
|
||||
if (m_kb_size)
|
||||
kb_irq();
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( rstb_clear )
|
||||
TIMER_CALLBACK_MEMBER(x07_state::rstb_clear)
|
||||
{
|
||||
x07_state *state = machine.driver_data<x07_state>();
|
||||
state->m_maincpu->set_input_line(NSC800_RSTB, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(NSC800_RSTB, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( beep_stop )
|
||||
TIMER_CALLBACK_MEMBER(x07_state::beep_stop)
|
||||
{
|
||||
x07_state *state = machine.driver_data<x07_state>();
|
||||
|
||||
beep_set_state(state->m_beep, 0);
|
||||
beep_set_state(m_beep, 0);
|
||||
}
|
||||
|
||||
static const gfx_layout x07_charlayout =
|
||||
@ -1406,11 +1401,11 @@ GFXDECODE_END
|
||||
|
||||
void x07_state::machine_start()
|
||||
{
|
||||
m_rsta_clear = machine().scheduler().timer_alloc(FUNC(rsta_clear));
|
||||
m_rstb_clear = machine().scheduler().timer_alloc(FUNC(rstb_clear));
|
||||
m_beep_stop = machine().scheduler().timer_alloc(FUNC(beep_stop));
|
||||
m_cass_poll = machine().scheduler().timer_alloc(FUNC(cassette_poll));
|
||||
m_cass_tick = machine().scheduler().timer_alloc(FUNC(cassette_tick));
|
||||
m_rsta_clear = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::rsta_clear),this));
|
||||
m_rstb_clear = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::rstb_clear),this));
|
||||
m_beep_stop = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::beep_stop),this));
|
||||
m_cass_poll = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::cassette_poll),this));
|
||||
m_cass_tick = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x07_state::cassette_tick),this));
|
||||
|
||||
/* Save State */
|
||||
save_item(NAME(m_sleep));
|
||||
|
@ -2432,32 +2432,31 @@ TIMER_DEVICE_CALLBACK(x1_keyboard_callback)
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_CALLBACK(x1_rtc_increment)
|
||||
TIMER_CALLBACK_MEMBER(x1_state::x1_rtc_increment)
|
||||
{
|
||||
x1_state *state = machine.driver_data<x1_state>();
|
||||
static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
|
||||
|
||||
state->m_rtc.sec++;
|
||||
m_rtc.sec++;
|
||||
|
||||
if((state->m_rtc.sec & 0x0f) >= 0x0a) { state->m_rtc.sec+=0x10; state->m_rtc.sec&=0xf0; }
|
||||
if((state->m_rtc.sec & 0xf0) >= 0x60) { state->m_rtc.min++; state->m_rtc.sec = 0; }
|
||||
if((state->m_rtc.min & 0x0f) >= 0x0a) { state->m_rtc.min+=0x10; state->m_rtc.min&=0xf0; }
|
||||
if((state->m_rtc.min & 0xf0) >= 0x60) { state->m_rtc.hour++; state->m_rtc.min = 0; }
|
||||
if((state->m_rtc.hour & 0x0f) >= 0x0a) { state->m_rtc.hour+=0x10; state->m_rtc.hour&=0xf0; }
|
||||
if((state->m_rtc.hour & 0xff) >= 0x24) { state->m_rtc.day++; state->m_rtc.wday++; state->m_rtc.hour = 0; }
|
||||
if((state->m_rtc.wday & 0x0f) >= 0x07) { state->m_rtc.wday = 0; }
|
||||
if((state->m_rtc.day & 0x0f) >= 0x0a) { state->m_rtc.day+=0x10; state->m_rtc.day&=0xf0; }
|
||||
if((m_rtc.sec & 0x0f) >= 0x0a) { m_rtc.sec+=0x10; m_rtc.sec&=0xf0; }
|
||||
if((m_rtc.sec & 0xf0) >= 0x60) { m_rtc.min++; m_rtc.sec = 0; }
|
||||
if((m_rtc.min & 0x0f) >= 0x0a) { m_rtc.min+=0x10; m_rtc.min&=0xf0; }
|
||||
if((m_rtc.min & 0xf0) >= 0x60) { m_rtc.hour++; m_rtc.min = 0; }
|
||||
if((m_rtc.hour & 0x0f) >= 0x0a) { m_rtc.hour+=0x10; m_rtc.hour&=0xf0; }
|
||||
if((m_rtc.hour & 0xff) >= 0x24) { m_rtc.day++; m_rtc.wday++; m_rtc.hour = 0; }
|
||||
if((m_rtc.wday & 0x0f) >= 0x07) { m_rtc.wday = 0; }
|
||||
if((m_rtc.day & 0x0f) >= 0x0a) { m_rtc.day+=0x10; m_rtc.day&=0xf0; }
|
||||
/* FIXME: very crude leap year support (i.e. it treats the RTC to be with a 2000-2099 timeline), dunno how the real x1 supports this,
|
||||
maybe it just have a 1980-1999 timeline since year 0x00 shows as a XX on display */
|
||||
if(((state->m_rtc.year % 4) == 0) && state->m_rtc.month == 2)
|
||||
if(((m_rtc.year % 4) == 0) && m_rtc.month == 2)
|
||||
{
|
||||
if((state->m_rtc.day & 0xff) >= dpm[state->m_rtc.month-1]+1+1)
|
||||
{ state->m_rtc.month++; state->m_rtc.day = 0x01; }
|
||||
if((m_rtc.day & 0xff) >= dpm[m_rtc.month-1]+1+1)
|
||||
{ m_rtc.month++; m_rtc.day = 0x01; }
|
||||
}
|
||||
else if((state->m_rtc.day & 0xff) >= dpm[state->m_rtc.month-1]+1){ state->m_rtc.month++; state->m_rtc.day = 0x01; }
|
||||
if(state->m_rtc.month > 12) { state->m_rtc.year++; state->m_rtc.month = 0x01; }
|
||||
if((state->m_rtc.year & 0x0f) >= 0x0a) { state->m_rtc.year+=0x10; state->m_rtc.year&=0xf0; }
|
||||
if((state->m_rtc.year & 0xf0) >= 0xa0) { state->m_rtc.year = 0; } //roll over
|
||||
else if((m_rtc.day & 0xff) >= dpm[m_rtc.month-1]+1){ m_rtc.month++; m_rtc.day = 0x01; }
|
||||
if(m_rtc.month > 12) { m_rtc.year++; m_rtc.month = 0x01; }
|
||||
if((m_rtc.year & 0x0f) >= 0x0a) { m_rtc.year+=0x10; m_rtc.year&=0xf0; }
|
||||
if((m_rtc.year & 0xf0) >= 0xa0) { m_rtc.year = 0; } //roll over
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(x1_state,x1)
|
||||
@ -2530,7 +2529,7 @@ MACHINE_START_MEMBER(x1_state,x1)
|
||||
m_rtc.min = ((systime.local_time.minute / 10)<<4) | ((systime.local_time.minute % 10) & 0xf);
|
||||
m_rtc.sec = ((systime.local_time.second / 10)<<4) | ((systime.local_time.second % 10) & 0xf);
|
||||
|
||||
m_rtc_timer = machine().scheduler().timer_alloc(FUNC(x1_rtc_increment));
|
||||
m_rtc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x1_state::x1_rtc_increment),this));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,58 +177,57 @@ static void mfp_init(running_machine &machine)
|
||||
state->m_mfp.current_irq = -1; // No current interrupt
|
||||
|
||||
#if 0
|
||||
mfp_timer[0] = machine.scheduler().timer_alloc(FUNC(mfp_timer_a_callback));
|
||||
mfp_timer[1] = machine.scheduler().timer_alloc(FUNC(mfp_timer_b_callback));
|
||||
mfp_timer[2] = machine.scheduler().timer_alloc(FUNC(mfp_timer_c_callback));
|
||||
mfp_timer[3] = machine.scheduler().timer_alloc(FUNC(mfp_timer_d_callback));
|
||||
mfp_irq = machine.scheduler().timer_alloc(FUNC(mfp_update_irq));
|
||||
mfp_timer[0] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::mfp_timer_a_callback),this));
|
||||
mfp_timer[1] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::mfp_timer_b_callback),this));
|
||||
mfp_timer[2] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::mfp_timer_c_callback),this));
|
||||
mfp_timer[3] = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::mfp_timer_d_callback),this));
|
||||
mfp_irq = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::mfp_update_irq),this));
|
||||
mfp_irq->adjust(attotime::zero, 0, attotime::from_usec(32));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
TIMER_CALLBACK(mfp_update_irq)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::mfp_update_irq)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
int x;
|
||||
|
||||
if((state->m_ioc.irqstatus & 0xc0) != 0)
|
||||
if((m_ioc.irqstatus & 0xc0) != 0)
|
||||
return;
|
||||
|
||||
// check for pending IRQs, in priority order
|
||||
if(state->m_mfp.ipra != 0)
|
||||
if(m_mfp.ipra != 0)
|
||||
{
|
||||
for(x=7;x>=0;x--)
|
||||
{
|
||||
if((state->m_mfp.ipra & (1 << x)) && (state->m_mfp.imra & (1 << x)))
|
||||
if((m_mfp.ipra & (1 << x)) && (m_mfp.imra & (1 << x)))
|
||||
{
|
||||
state->m_current_irq_line = state->m_mfp.irqline;
|
||||
state->m_mfp.current_irq = x + 8;
|
||||
m_current_irq_line = m_mfp.irqline;
|
||||
m_mfp.current_irq = x + 8;
|
||||
// assert IRQ line
|
||||
// if(state->m_mfp.iera & (1 << x))
|
||||
// if(m_mfp.iera & (1 << x))
|
||||
{
|
||||
state->m_current_vector[6] = (state->m_mfp.vr & 0xf0) | (x+8);
|
||||
machine.device("maincpu")->execute().set_input_line_and_vector(state->m_mfp.irqline,ASSERT_LINE,(state->m_mfp.vr & 0xf0) | (x + 8));
|
||||
// logerror("MFP: Sent IRQ vector 0x%02x (IRQ line %i)\n",(state->m_mfp.vr & 0xf0) | (x+8),state->m_mfp.irqline);
|
||||
m_current_vector[6] = (m_mfp.vr & 0xf0) | (x+8);
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(m_mfp.irqline,ASSERT_LINE,(m_mfp.vr & 0xf0) | (x + 8));
|
||||
// logerror("MFP: Sent IRQ vector 0x%02x (IRQ line %i)\n",(m_mfp.vr & 0xf0) | (x+8),m_mfp.irqline);
|
||||
return; // one at a time only
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(state->m_mfp.iprb != 0)
|
||||
if(m_mfp.iprb != 0)
|
||||
{
|
||||
for(x=7;x>=0;x--)
|
||||
{
|
||||
if((state->m_mfp.iprb & (1 << x)) && (state->m_mfp.imrb & (1 << x)))
|
||||
if((m_mfp.iprb & (1 << x)) && (m_mfp.imrb & (1 << x)))
|
||||
{
|
||||
state->m_current_irq_line = state->m_mfp.irqline;
|
||||
state->m_mfp.current_irq = x;
|
||||
m_current_irq_line = m_mfp.irqline;
|
||||
m_mfp.current_irq = x;
|
||||
// assert IRQ line
|
||||
// if(state->m_mfp.ierb & (1 << x))
|
||||
// if(m_mfp.ierb & (1 << x))
|
||||
{
|
||||
state->m_current_vector[6] = (state->m_mfp.vr & 0xf0) | x;
|
||||
machine.device("maincpu")->execute().set_input_line_and_vector(state->m_mfp.irqline,ASSERT_LINE,(state->m_mfp.vr & 0xf0) | x);
|
||||
// logerror("MFP: Sent IRQ vector 0x%02x (IRQ line %i)\n",(state->m_mfp.vr & 0xf0) | x,state->m_mfp.irqline);
|
||||
m_current_vector[6] = (m_mfp.vr & 0xf0) | x;
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(m_mfp.irqline,ASSERT_LINE,(m_mfp.vr & 0xf0) | x);
|
||||
// logerror("MFP: Sent IRQ vector 0x%02x (IRQ line %i)\n",(m_mfp.vr & 0xf0) | x,m_mfp.irqline);
|
||||
return; // one at a time only
|
||||
}
|
||||
}
|
||||
@ -262,46 +261,42 @@ void mfp_trigger_irq(running_machine &machine, int irq)
|
||||
|
||||
}
|
||||
|
||||
TIMER_CALLBACK(mfp_timer_a_callback)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::mfp_timer_a_callback)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mfp.timer[0].counter--;
|
||||
if(state->m_mfp.timer[0].counter == 0)
|
||||
m_mfp.timer[0].counter--;
|
||||
if(m_mfp.timer[0].counter == 0)
|
||||
{
|
||||
state->m_mfp.timer[0].counter = state->m_mfp.tadr;
|
||||
m_mfp.timer[0].counter = m_mfp.tadr;
|
||||
mfp_trigger_irq(MFP_IRQ_TIMERA);
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_CALLBACK(mfp_timer_b_callback)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::mfp_timer_b_callback)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mfp.timer[1].counter--;
|
||||
if(state->m_mfp.timer[1].counter == 0)
|
||||
m_mfp.timer[1].counter--;
|
||||
if(m_mfp.timer[1].counter == 0)
|
||||
{
|
||||
state->m_mfp.timer[1].counter = state->m_mfp.tbdr;
|
||||
m_mfp.timer[1].counter = m_mfp.tbdr;
|
||||
mfp_trigger_irq(MFP_IRQ_TIMERB);
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_CALLBACK(mfp_timer_c_callback)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::mfp_timer_c_callback)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mfp.timer[2].counter--;
|
||||
if(state->m_mfp.timer[2].counter == 0)
|
||||
m_mfp.timer[2].counter--;
|
||||
if(m_mfp.timer[2].counter == 0)
|
||||
{
|
||||
state->m_mfp.timer[2].counter = state->m_mfp.tcdr;
|
||||
m_mfp.timer[2].counter = m_mfp.tcdr;
|
||||
mfp_trigger_irq(MFP_IRQ_TIMERC);
|
||||
}
|
||||
}
|
||||
|
||||
TIMER_CALLBACK(mfp_timer_d_callback)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::mfp_timer_d_callback)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mfp.timer[3].counter--;
|
||||
if(state->m_mfp.timer[3].counter == 0)
|
||||
m_mfp.timer[3].counter--;
|
||||
if(m_mfp.timer[3].counter == 0)
|
||||
{
|
||||
state->m_mfp.timer[3].counter = state->m_mfp.tddr;
|
||||
m_mfp.timer[3].counter = m_mfp.tddr;
|
||||
mfp_trigger_irq(MFP_IRQ_TIMERD);
|
||||
}
|
||||
}
|
||||
@ -322,18 +317,17 @@ void mfp_set_timer(int timer, unsigned char data)
|
||||
#endif
|
||||
|
||||
// LED timer callback
|
||||
static TIMER_CALLBACK( x68k_led_callback )
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::x68k_led_callback)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
int drive;
|
||||
if(state->m_led_state == 0)
|
||||
state->m_led_state = 1;
|
||||
if(m_led_state == 0)
|
||||
m_led_state = 1;
|
||||
else
|
||||
state->m_led_state = 0;
|
||||
if(state->m_led_state == 1)
|
||||
m_led_state = 0;
|
||||
if(m_led_state == 1)
|
||||
{
|
||||
for(drive=0;drive<4;drive++)
|
||||
output_set_indexed_value("ctrl_drv",drive,state->m_fdc.led_ctrl[drive] ? 0 : 1);
|
||||
output_set_indexed_value("ctrl_drv",drive,m_fdc.led_ctrl[drive] ? 0 : 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -470,48 +464,47 @@ static void x68k_keyboard_push_scancode(running_machine &machine,unsigned char c
|
||||
}
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(x68k_keyboard_poll)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::x68k_keyboard_poll)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
int x;
|
||||
static const char *const keynames[] = { "key1", "key2", "key3", "key4" };
|
||||
|
||||
for(x=0;x<0x80;x++)
|
||||
{
|
||||
// adjust delay/repeat timers
|
||||
if(state->m_keyboard.keytime[x] > 0)
|
||||
if(m_keyboard.keytime[x] > 0)
|
||||
{
|
||||
state->m_keyboard.keytime[x] -= 5;
|
||||
m_keyboard.keytime[x] -= 5;
|
||||
}
|
||||
if(!(machine.root_device().ioport(keynames[x / 32])->read() & (1 << (x % 32))))
|
||||
if(!(machine().root_device().ioport(keynames[x / 32])->read() & (1 << (x % 32))))
|
||||
{
|
||||
if(state->m_keyboard.keyon[x] != 0)
|
||||
if(m_keyboard.keyon[x] != 0)
|
||||
{
|
||||
x68k_keyboard_push_scancode(machine,0x80 + x);
|
||||
state->m_keyboard.keytime[x] = 0;
|
||||
state->m_keyboard.keyon[x] = 0;
|
||||
state->m_keyboard.last_pressed = 0;
|
||||
x68k_keyboard_push_scancode(machine(),0x80 + x);
|
||||
m_keyboard.keytime[x] = 0;
|
||||
m_keyboard.keyon[x] = 0;
|
||||
m_keyboard.last_pressed = 0;
|
||||
logerror("KB: Released key 0x%02x\n",x);
|
||||
}
|
||||
}
|
||||
// check to see if a key is being held
|
||||
if(state->m_keyboard.keyon[x] != 0 && state->m_keyboard.keytime[x] == 0 && state->m_keyboard.last_pressed == x)
|
||||
if(m_keyboard.keyon[x] != 0 && m_keyboard.keytime[x] == 0 && m_keyboard.last_pressed == x)
|
||||
{
|
||||
if(machine.root_device().ioport(keynames[state->m_keyboard.last_pressed / 32])->read() & (1 << (state->m_keyboard.last_pressed % 32)))
|
||||
if(machine().root_device().ioport(keynames[m_keyboard.last_pressed / 32])->read() & (1 << (m_keyboard.last_pressed % 32)))
|
||||
{
|
||||
x68k_keyboard_push_scancode(machine,state->m_keyboard.last_pressed);
|
||||
state->m_keyboard.keytime[state->m_keyboard.last_pressed] = (state->m_keyboard.repeat^2)*5+30;
|
||||
logerror("KB: Holding key 0x%02x\n",state->m_keyboard.last_pressed);
|
||||
x68k_keyboard_push_scancode(machine(),m_keyboard.last_pressed);
|
||||
m_keyboard.keytime[m_keyboard.last_pressed] = (m_keyboard.repeat^2)*5+30;
|
||||
logerror("KB: Holding key 0x%02x\n",m_keyboard.last_pressed);
|
||||
}
|
||||
}
|
||||
if((machine.root_device().ioport(keynames[x / 32])->read() & (1 << (x % 32))))
|
||||
if((machine().root_device().ioport(keynames[x / 32])->read() & (1 << (x % 32))))
|
||||
{
|
||||
if(state->m_keyboard.keyon[x] == 0)
|
||||
if(m_keyboard.keyon[x] == 0)
|
||||
{
|
||||
x68k_keyboard_push_scancode(machine,x);
|
||||
state->m_keyboard.keytime[x] = state->m_keyboard.delay * 100 + 200;
|
||||
state->m_keyboard.keyon[x] = 1;
|
||||
state->m_keyboard.last_pressed = x;
|
||||
x68k_keyboard_push_scancode(machine(),x);
|
||||
m_keyboard.keytime[x] = m_keyboard.delay * 100 + 200;
|
||||
m_keyboard.keyon[x] = 1;
|
||||
m_keyboard.last_pressed = x;
|
||||
logerror("KB: Pushed key 0x%02x\n",x);
|
||||
}
|
||||
}
|
||||
@ -634,14 +627,13 @@ static WRITE16_HANDLER( x68k_scc_w )
|
||||
state->m_scc_prev = scc->get_reg_b(5) & 0x02;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(x68k_scc_ack)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::x68k_scc_ack)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
scc8530_t *scc = machine.device<scc8530_t>("scc");
|
||||
if(state->m_mouse.bufferempty != 0) // nothing to do if the mouse data buffer is empty
|
||||
scc8530_t *scc = machine().device<scc8530_t>("scc");
|
||||
if(m_mouse.bufferempty != 0) // nothing to do if the mouse data buffer is empty
|
||||
return;
|
||||
|
||||
// if((state->m_ioc.irqstatus & 0xc0) != 0)
|
||||
// if((m_ioc.irqstatus & 0xc0) != 0)
|
||||
// return;
|
||||
|
||||
// hard-code the IRQ vector for now, until the SCC code is more complete
|
||||
@ -651,10 +643,10 @@ static TIMER_CALLBACK(x68k_scc_ack)
|
||||
{
|
||||
if(scc->get_reg_b(5) & 0x02) // RTS signal
|
||||
{
|
||||
state->m_mouse.irqactive = 1;
|
||||
state->m_current_vector[5] = 0x54;
|
||||
state->m_current_irq_line = 5;
|
||||
machine.device("maincpu")->execute().set_input_line_and_vector(5,ASSERT_LINE,0x54);
|
||||
m_mouse.irqactive = 1;
|
||||
m_current_vector[5] = 0x54;
|
||||
m_current_irq_line = 5;
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(5,ASSERT_LINE,0x54);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -725,23 +717,21 @@ static UINT8 md_3button_r(device_t* device, int port)
|
||||
}
|
||||
|
||||
// Megadrive 6 button gamepad
|
||||
static TIMER_CALLBACK(md_6button_port1_timeout)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::md_6button_port1_timeout)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mdctrl.seq1 = 0;
|
||||
m_mdctrl.seq1 = 0;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(md_6button_port2_timeout)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::md_6button_port2_timeout)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mdctrl.seq2 = 0;
|
||||
m_mdctrl.seq2 = 0;
|
||||
}
|
||||
|
||||
static void md_6button_init(running_machine &machine)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
state->m_mdctrl.io_timeout1 = machine.scheduler().timer_alloc(FUNC(md_6button_port1_timeout));
|
||||
state->m_mdctrl.io_timeout2 = machine.scheduler().timer_alloc(FUNC(md_6button_port2_timeout));
|
||||
state->m_mdctrl.io_timeout1 = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::md_6button_port1_timeout),state));
|
||||
state->m_mdctrl.io_timeout2 = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::md_6button_port2_timeout),state));
|
||||
}
|
||||
|
||||
static UINT8 md_6button_r(device_t* device, int port)
|
||||
@ -1689,20 +1679,20 @@ static WRITE16_HANDLER( x68k_enh_areaset_w )
|
||||
logerror("SYS: Enhanced Supervisor area set (from %iMB): 0x%02x\n",(offset + 1) * 2,data & 0xff);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK(x68k_bus_error)
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::x68k_bus_error)
|
||||
{
|
||||
int val = param;
|
||||
int v;
|
||||
UINT8 *ram = machine.device<ram_device>(RAM_TAG)->pointer();
|
||||
UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
|
||||
|
||||
if(strcmp(machine.system().name,"x68030") == 0)
|
||||
if(strcmp(machine().system().name,"x68030") == 0)
|
||||
v = 0x0b;
|
||||
else
|
||||
v = 0x09;
|
||||
if(ram[v] != 0x02) // normal vector for bus errors points to 02FF0540
|
||||
{
|
||||
machine.device("maincpu")->execute().set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
|
||||
popmessage("Bus error: Unused RAM access [%08x]", val);
|
||||
}
|
||||
}
|
||||
@ -1720,7 +1710,7 @@ static READ16_HANDLER( x68k_rom0_r )
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), FUNC(x68k_bus_error), 0xbffffc+offset);
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),state), 0xbffffc+offset);
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
@ -1738,7 +1728,7 @@ static WRITE16_HANDLER( x68k_rom0_w )
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), FUNC(x68k_bus_error), 0xbffffc+offset);
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),state), 0xbffffc+offset);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1755,7 +1745,7 @@ static READ16_HANDLER( x68k_emptyram_r )
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), FUNC(x68k_bus_error), offset);
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),state), offset);
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
@ -1773,7 +1763,7 @@ static WRITE16_HANDLER( x68k_emptyram_w )
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), FUNC(x68k_bus_error), offset);
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),state), offset);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1788,7 +1778,7 @@ static READ16_HANDLER( x68k_exp_r )
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(16), FUNC(x68k_bus_error), 0xeafa00+offset);
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(16), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),state), 0xeafa00+offset);
|
||||
// machine.device("maincpu")->execute().set_input_line_and_vector(2,ASSERT_LINE,state->m_current_vector[2]);
|
||||
}
|
||||
return 0xffff;
|
||||
@ -1805,7 +1795,7 @@ static WRITE16_HANDLER( x68k_exp_w )
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(16), FUNC(x68k_bus_error), 0xeafa00+offset);
|
||||
space.machine().scheduler().timer_set(space.machine().device<cpu_device>("maincpu")->cycles_to_attotime(16), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),state), 0xeafa00+offset);
|
||||
// machine.device("maincpu")->execute().set_input_line_and_vector(2,ASSERT_LINE,state->m_current_vector[2]);
|
||||
}
|
||||
}
|
||||
@ -2482,13 +2472,12 @@ static void x68k_unload_proc(device_image_interface &image)
|
||||
state->m_fdc.disk_inserted[floppy_get_drive(&image.device())] = 0;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( x68k_net_irq )
|
||||
TIMER_CALLBACK_MEMBER(x68k_state::x68k_net_irq)
|
||||
{
|
||||
x68k_state *state = machine.driver_data<x68k_state>();
|
||||
|
||||
state->m_current_vector[2] = 0xf9;
|
||||
state->m_current_irq_line = 2;
|
||||
machine.device("maincpu")->execute().set_input_line_and_vector(2,ASSERT_LINE,state->m_current_vector[2]);
|
||||
m_current_vector[2] = 0xf9;
|
||||
m_current_irq_line = 2;
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(2,ASSERT_LINE,m_current_vector[2]);
|
||||
}
|
||||
|
||||
static void x68k_irq2_line(device_t* device,int state)
|
||||
@ -2708,13 +2697,13 @@ DRIVER_INIT_MEMBER(x68k_state,x68000)
|
||||
// init keyboard
|
||||
m_keyboard.delay = 500; // 3*100+200
|
||||
m_keyboard.repeat = 110; // 4^2*5+30
|
||||
m_kb_timer = machine().scheduler().timer_alloc(FUNC(x68k_keyboard_poll));
|
||||
m_scanline_timer = machine().scheduler().timer_alloc(FUNC(x68k_hsync));
|
||||
m_raster_irq = machine().scheduler().timer_alloc(FUNC(x68k_crtc_raster_irq));
|
||||
m_vblank_irq = machine().scheduler().timer_alloc(FUNC(x68k_crtc_vblank_irq));
|
||||
m_mouse_timer = machine().scheduler().timer_alloc(FUNC(x68k_scc_ack));
|
||||
m_led_timer = machine().scheduler().timer_alloc(FUNC(x68k_led_callback));
|
||||
m_net_timer = machine().scheduler().timer_alloc(FUNC(x68k_net_irq));
|
||||
m_kb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_keyboard_poll),this));
|
||||
m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_hsync),this));
|
||||
m_raster_irq = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_crtc_raster_irq),this));
|
||||
m_vblank_irq = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_crtc_vblank_irq),this));
|
||||
m_mouse_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_scc_ack),this));
|
||||
m_led_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_led_callback),this));
|
||||
m_net_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(x68k_state::x68k_net_irq),this));
|
||||
|
||||
// Initialise timers for 6-button MD controllers
|
||||
md_6button_init(machine());
|
||||
|
@ -386,10 +386,9 @@ static INPUT_PORTS_START( xerox820 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RIGHT CTRL") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RCONTROL))
|
||||
INPUT_PORTS_END
|
||||
|
||||
static TIMER_CALLBACK( bigboard_beepoff )
|
||||
TIMER_CALLBACK_MEMBER(xerox820_state::bigboard_beepoff)
|
||||
{
|
||||
xerox820_state *state = machine.driver_data<xerox820_state>();
|
||||
beep_set_state(state->m_beeper, 0);
|
||||
beep_set_state(m_beeper, 0);
|
||||
}
|
||||
|
||||
/* Z80 PIO */
|
||||
@ -461,7 +460,7 @@ WRITE8_MEMBER( xerox820_state::kbpio_pa_w )
|
||||
/* beeper on bigboard */
|
||||
if (BIT(data, 5) & (!m_bit5))
|
||||
{
|
||||
machine().scheduler().timer_set(attotime::from_msec(40), FUNC(bigboard_beepoff));
|
||||
machine().scheduler().timer_set(attotime::from_msec(40), timer_expired_delegate(FUNC(xerox820_state::bigboard_beepoff),this));
|
||||
beep_set_state(m_beeper, 1 );
|
||||
}
|
||||
m_bit5 = BIT(data, 5);
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
required_device<cassette_image_device> m_cass1;
|
||||
required_device<cassette_image_device> m_cass2;
|
||||
virtual void machine_start();
|
||||
TIMER_CALLBACK_MEMBER(aim65_printer_timer);
|
||||
};
|
||||
|
||||
|
||||
|
@ -170,6 +170,9 @@ public:
|
||||
UINT32 screen_update_amstrad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_amstrad(screen_device &screen, bool state);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(cpc_monitor_changed);
|
||||
TIMER_CALLBACK_MEMBER(amstrad_pc2_low);
|
||||
TIMER_CALLBACK_MEMBER(amstrad_video_update_timer);
|
||||
TIMER_CALLBACK_MEMBER(cb_set_resolution);
|
||||
};
|
||||
|
||||
|
||||
|
@ -48,6 +48,10 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(apple1_kbd_poll);
|
||||
TIMER_CALLBACK_MEMBER(apple1_kbd_strobe_end);
|
||||
TIMER_CALLBACK_MEMBER(apple1_dsp_ready_start);
|
||||
TIMER_CALLBACK_MEMBER(apple1_dsp_ready_end);
|
||||
};
|
||||
|
||||
|
||||
|
@ -142,6 +142,9 @@ public:
|
||||
DECLARE_MACHINE_START(apple2gsr1);
|
||||
DECLARE_MACHINE_START(apple2gscommon);
|
||||
UINT32 screen_update_apple2gs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(apple2gs_clock_tick);
|
||||
TIMER_CALLBACK_MEMBER(apple2gs_qsecond_tick);
|
||||
TIMER_CALLBACK_MEMBER(apple2gs_scanline_tick);
|
||||
};
|
||||
|
||||
|
||||
|
@ -274,6 +274,10 @@ public:
|
||||
floppy_image_device *floppy_devices[2];
|
||||
|
||||
static const floppy_format_type floppy_formats[];
|
||||
TIMER_CALLBACK_MEMBER(st_mouse_tick);
|
||||
TIMER_CALLBACK_MEMBER(atarist_shifter_tick);
|
||||
TIMER_CALLBACK_MEMBER(atarist_glue_tick);
|
||||
TIMER_CALLBACK_MEMBER(atarist_blitter_tick);
|
||||
};
|
||||
|
||||
class megast_state : public st_state
|
||||
@ -327,6 +331,9 @@ public:
|
||||
|
||||
DECLARE_READ8_MEMBER( mfp_gpio_r );
|
||||
|
||||
TIMER_CALLBACK_MEMBER(atariste_dmasound_tick);
|
||||
TIMER_CALLBACK_MEMBER(atariste_microwire_tick);
|
||||
|
||||
void dmasound_set_state(int level);
|
||||
void dmasound_tick();
|
||||
void microwire_shift();
|
||||
|
@ -285,6 +285,7 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(bbcb_vsync);
|
||||
INTERRUPT_GEN_MEMBER(bbcb_keyscan);
|
||||
INTERRUPT_GEN_MEMBER(bbcm_keyscan);
|
||||
TIMER_CALLBACK_MEMBER(bbc_tape_timer_cb);
|
||||
};
|
||||
|
||||
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
DECLARE_DRIVER_INIT(bebox);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
TIMER_CALLBACK_MEMBER(bebox_get_devices);
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
UINT8 m_segment;
|
||||
|
||||
emu_timer *m_led_refresh_timer;
|
||||
TIMER_CALLBACK_MEMBER(led_refresh);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_bk0010(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(keyboard_callback);
|
||||
};
|
||||
|
||||
#endif /* BK_H_ */
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
UINT32 screen_update_cgenie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(cgenie_timer_interrupt);
|
||||
INTERRUPT_GEN_MEMBER(cgenie_frame_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(handle_cassette_input);
|
||||
};
|
||||
|
||||
|
||||
|
@ -43,6 +43,9 @@ public:
|
||||
int m_joy_d7_state[2];
|
||||
UINT8 m_joy_analog_state[2];
|
||||
UINT8 m_joy_analog_reload[2];
|
||||
TIMER_CALLBACK_MEMBER(paddle_d7reset_callback);
|
||||
TIMER_CALLBACK_MEMBER(paddle_irqreset_callback);
|
||||
TIMER_CALLBACK_MEMBER(paddle_pulse_callback);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -188,6 +188,8 @@ public:
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_compis2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(compis_vblank_int);
|
||||
TIMER_CALLBACK_MEMBER(internal_timer_int);
|
||||
TIMER_CALLBACK_MEMBER(dma_timer_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -152,6 +152,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_cxhumax(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(timer_tick);
|
||||
};
|
||||
|
||||
#define INTDEST 0 // Interrupt destination (1=IRQ, 0=FIQ)
|
||||
|
@ -81,6 +81,8 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(dai_bootstrap_callback);
|
||||
TIMER_CALLBACK_MEMBER(dai_timer);
|
||||
};
|
||||
|
||||
|
||||
|
@ -75,6 +75,9 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_electron(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(electron_tape_timer_handler);
|
||||
TIMER_CALLBACK_MEMBER(setup_beep);
|
||||
TIMER_CALLBACK_MEMBER(electron_scanline_interrupt);
|
||||
};
|
||||
|
||||
|
||||
|
@ -239,6 +239,13 @@ public:
|
||||
DECLARE_MACHINE_START(fm11);
|
||||
DECLARE_MACHINE_START(fm16);
|
||||
UINT32 screen_update_fm7(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(fm7_beeper_off);
|
||||
TIMER_CALLBACK_MEMBER(fm77av_encoder_ack);
|
||||
TIMER_CALLBACK_MEMBER(fm7_timer_irq);
|
||||
TIMER_CALLBACK_MEMBER(fm7_subtimer_irq);
|
||||
TIMER_CALLBACK_MEMBER(fm7_keyboard_poll);
|
||||
TIMER_CALLBACK_MEMBER(fm77av_alu_task_end);
|
||||
TIMER_CALLBACK_MEMBER(fm77av_vsync);
|
||||
};
|
||||
|
||||
/*----------- defined in video/fm7.c -----------*/
|
||||
|
@ -276,6 +276,11 @@ class towns_state : public driver_device
|
||||
void wait_end();
|
||||
public:
|
||||
INTERRUPT_GEN_MEMBER(towns_vsync_irq);
|
||||
TIMER_CALLBACK_MEMBER(towns_cd_status_ready);
|
||||
TIMER_CALLBACK_MEMBER(towns_cdrom_read_byte);
|
||||
TIMER_CALLBACK_MEMBER(towns_delay_cdda);
|
||||
TIMER_CALLBACK_MEMBER(towns_sprite_done);
|
||||
TIMER_CALLBACK_MEMBER(towns_vblank_end);
|
||||
};
|
||||
|
||||
class marty_state : public towns_state
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
DECLARE_MACHINE_RESET(galaxyp);
|
||||
UINT32 screen_update_galaxy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(galaxy_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(gal_video);
|
||||
};
|
||||
|
||||
|
||||
|
@ -244,6 +244,8 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
INTERRUPT_GEN_MEMBER(gamecom_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(gamecom_scanline);
|
||||
};
|
||||
|
||||
|
||||
|
@ -246,6 +246,10 @@ public:
|
||||
DECLARE_MACHINE_START(gb_video);
|
||||
DECLARE_MACHINE_START(gbc_video);
|
||||
INTERRUPT_GEN_MEMBER(gb_scanline_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(gb_serial_timer_proc);
|
||||
TIMER_CALLBACK_MEMBER(gb_video_init_vbl);
|
||||
TIMER_CALLBACK_MEMBER(gb_lcd_timer_proc);
|
||||
TIMER_CALLBACK_MEMBER(gbc_lcd_timer_proc);
|
||||
};
|
||||
|
||||
|
||||
|
@ -240,6 +240,11 @@ public:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void palette_init();
|
||||
TIMER_CALLBACK_MEMBER(dma_complete);
|
||||
TIMER_CALLBACK_MEMBER(timer_expire);
|
||||
TIMER_CALLBACK_MEMBER(handle_irq);
|
||||
TIMER_CALLBACK_MEMBER(perform_hbl);
|
||||
TIMER_CALLBACK_MEMBER(perform_scan);
|
||||
};
|
||||
|
||||
/*----------- defined in video/gba.c -----------*/
|
||||
|
@ -164,6 +164,11 @@ public:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
UINT32 screen_update_gp32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(s3c240x_lcd_timer_exp);
|
||||
TIMER_CALLBACK_MEMBER(s3c240x_pwm_timer_exp);
|
||||
TIMER_CALLBACK_MEMBER(s3c240x_dma_timer_exp);
|
||||
TIMER_CALLBACK_MEMBER(s3c240x_iic_timer_exp);
|
||||
TIMER_CALLBACK_MEMBER(s3c240x_iis_timer_exp);
|
||||
};
|
||||
|
||||
|
||||
|
@ -137,6 +137,7 @@ public:
|
||||
DECLARE_MACHINE_START(hec2mdhrx);
|
||||
DECLARE_MACHINE_RESET(hec2mdhrx);
|
||||
UINT32 screen_update_hec2hrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(Callback_CK);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/hec2hrp.c -----------*/
|
||||
|
@ -78,6 +78,12 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(hp48_io_w);
|
||||
DECLARE_READ8_MEMBER(hp48_io_r);
|
||||
DECLARE_READ8_MEMBER(hp48_bank_r);
|
||||
TIMER_CALLBACK_MEMBER(hp48_rs232_byte_recv_cb);
|
||||
TIMER_CALLBACK_MEMBER(hp48_rs232_byte_sent_cb);
|
||||
TIMER_CALLBACK_MEMBER(hp48_chardev_byte_recv_cb);
|
||||
TIMER_CALLBACK_MEMBER(hp48_kbd_cb);
|
||||
TIMER_CALLBACK_MEMBER(hp48_timer1_cb);
|
||||
TIMER_CALLBACK_MEMBER(hp48_timer2_cb);
|
||||
};
|
||||
|
||||
|
||||
|
@ -134,6 +134,9 @@ public:
|
||||
UINT32 screen_update_intvkbd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(intv_interrupt2);
|
||||
INTERRUPT_GEN_MEMBER(intv_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(intv_interrupt2_complete);
|
||||
TIMER_CALLBACK_MEMBER(intv_interrupt_complete);
|
||||
TIMER_CALLBACK_MEMBER(intv_btb_fill);
|
||||
};
|
||||
|
||||
/*----------- defined in video/intv.c -----------*/
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_irisha(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(irisha_key);
|
||||
};
|
||||
|
||||
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
UINT32 screen_update_kaypro2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(kay_kbd_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(kaypro_timer_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -146,6 +146,8 @@ public:
|
||||
|
||||
kcexp_slot_device * m_expansions[3];
|
||||
DECLARE_PALETTE_INIT(kc85);
|
||||
TIMER_CALLBACK_MEMBER(kc_cassette_oneshot_timer);
|
||||
TIMER_CALLBACK_MEMBER(kc_cassette_timer_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -165,6 +165,9 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_lisa(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(lisa_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(handle_mouse);
|
||||
TIMER_CALLBACK_MEMBER(read_COPS_command);
|
||||
TIMER_CALLBACK_MEMBER(set_COPS_ready);
|
||||
};
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_lviv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(lviv_reset);
|
||||
};
|
||||
|
||||
|
||||
|
@ -140,6 +140,10 @@ public:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void palette_init();
|
||||
TIMER_CALLBACK_MEMBER(lynx_blitter_timer);
|
||||
TIMER_CALLBACK_MEMBER(lynx_timer_shot);
|
||||
TIMER_CALLBACK_MEMBER(lynx_uart_loopback_timer);
|
||||
TIMER_CALLBACK_MEMBER(lynx_uart_timer);
|
||||
};
|
||||
|
||||
|
||||
|
@ -523,6 +523,12 @@ public:
|
||||
UINT32 screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_macpbwd(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(mac_rbv_vbl);
|
||||
TIMER_CALLBACK_MEMBER(kbd_clock);
|
||||
TIMER_CALLBACK_MEMBER(inquiry_timeout_func);
|
||||
TIMER_CALLBACK_MEMBER(mac_6015_tick);
|
||||
TIMER_CALLBACK_MEMBER(mac_scanline_tick);
|
||||
TIMER_CALLBACK_MEMBER(dafb_vbl_tick);
|
||||
TIMER_CALLBACK_MEMBER(dafb_cursor_tick);
|
||||
};
|
||||
|
||||
#endif /* MAC_H_ */
|
||||
|
@ -158,6 +158,7 @@ private:
|
||||
public:
|
||||
emu_timer *m_scanline_timer;
|
||||
UINT32 screen_update_pippin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(mac_6015_tick);
|
||||
};
|
||||
|
||||
#endif /* PCIMAC_H_ */
|
||||
|
@ -157,6 +157,7 @@ public:
|
||||
virtual void video_reset();
|
||||
virtual void palette_init();
|
||||
void screen_eof_mbc55x(screen_device &screen, bool state);
|
||||
TIMER_CALLBACK_MEMBER(keyscan_callback);
|
||||
};
|
||||
|
||||
/* IO chips */
|
||||
|
@ -142,6 +142,9 @@ public:
|
||||
DECLARE_MACHINE_RESET(mbeett);
|
||||
UINT32 screen_update_mbee(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(mbee_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(mbee256_kbd);
|
||||
TIMER_CALLBACK_MEMBER(mbee_rtc_irq);
|
||||
TIMER_CALLBACK_MEMBER(mbee_reset);
|
||||
};
|
||||
|
||||
|
||||
|
@ -53,6 +53,8 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_microtan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(microtan_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(microtan_read_cassette);
|
||||
TIMER_CALLBACK_MEMBER(microtan_pulse_nmi);
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_mikro80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(mikro80_reset);
|
||||
};
|
||||
|
||||
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
|
||||
emu_timer *m_led_refresh_timer;
|
||||
DECLARE_DRIVER_INIT(mpf1);
|
||||
TIMER_CALLBACK_MEMBER(led_refresh);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -80,6 +80,8 @@ public:
|
||||
DECLARE_MACHINE_START(nc200);
|
||||
DECLARE_MACHINE_RESET(nc200);
|
||||
UINT32 screen_update_nc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(nc_keyboard_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(nc_serial_timer_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -124,6 +124,8 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_nes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(nes_irq_callback);
|
||||
TIMER_CALLBACK_MEMBER(lightgun_tick);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/nes.c -----------*/
|
||||
|
@ -115,6 +115,8 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_odyssey2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(i824x_scanline_callback);
|
||||
TIMER_CALLBACK_MEMBER(i824x_hblank_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(ondra_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(nmi_check_callback);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -108,6 +108,8 @@ public:
|
||||
virtual void palette_init();
|
||||
DECLARE_MACHINE_START(telestrat);
|
||||
UINT32 screen_update_oric(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(oric_refresh_tape);
|
||||
TIMER_CALLBACK_MEMBER(oric_vh_timer_callback);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/oric.c -----------*/
|
||||
|
@ -82,6 +82,8 @@ public:
|
||||
DECLARE_DRIVER_INIT(osborne1);
|
||||
virtual void machine_reset();
|
||||
virtual void palette_init();
|
||||
TIMER_CALLBACK_MEMBER(osborne1_video_callback);
|
||||
TIMER_CALLBACK_MEMBER(setup_osborne1);
|
||||
};
|
||||
|
||||
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
|
||||
/* floppy state */
|
||||
int m_fdc_index;
|
||||
TIMER_CALLBACK_MEMBER(setup_beep);
|
||||
};
|
||||
|
||||
class c1p_state : public sb2m600_state
|
||||
|
@ -86,6 +86,10 @@ public:
|
||||
DECLARE_MACHINE_START(pcjr);
|
||||
DECLARE_MACHINE_RESET(pcjr);
|
||||
DECLARE_MACHINE_START(mc1502);
|
||||
TIMER_CALLBACK_MEMBER(pcjr_delayed_pic8259_irq);
|
||||
TIMER_CALLBACK_MEMBER(pcjr_keyb_signal_callback);
|
||||
TIMER_CALLBACK_MEMBER(mc1502_keyb_signal_callback);
|
||||
TIMER_CALLBACK_MEMBER(pc_rtc_timer);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/pc.c -----------*/
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
|
||||
DECLARE_DRIVER_INIT(pc1251);
|
||||
UINT32 screen_update_pc1251(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pc1251_power_up);
|
||||
};
|
||||
|
||||
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
int m_power;
|
||||
UINT8 m_reg[0x1000];
|
||||
UINT32 screen_update_pc1350(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pc1350_power_up);
|
||||
};
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
UINT8 m_reg[0x100];
|
||||
DECLARE_DRIVER_INIT(pc1401);
|
||||
UINT32 screen_update_pc1401(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pc1401_power_up);
|
||||
};
|
||||
|
||||
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
|
||||
DECLARE_DRIVER_INIT(pc1403);
|
||||
UINT32 screen_update_pc1403(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pc1403_power_up);
|
||||
};
|
||||
|
||||
|
||||
|
@ -142,6 +142,13 @@ public:
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_MACHINE_START(pce);
|
||||
DECLARE_MACHINE_RESET(mess_pce);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_data_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_cdda_fadeout_callback);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_cdda_fadein_callback);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_adpcm_fadeout_callback);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_adpcm_fadein_callback);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_clear_ack);
|
||||
TIMER_CALLBACK_MEMBER(pce_cd_adpcm_dma_timer_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -101,6 +101,10 @@ public:
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_pcw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_pcw_printer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pcw_timer_pulse);
|
||||
TIMER_CALLBACK_MEMBER(pcw_stepper_callback);
|
||||
TIMER_CALLBACK_MEMBER(pcw_pins_callback);
|
||||
TIMER_CALLBACK_MEMBER(setup_beep);
|
||||
};
|
||||
|
||||
#endif /* PCW_H_ */
|
||||
|
@ -262,6 +262,11 @@ public:
|
||||
UINT32 screen_update_pdp1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_pdp1(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(pdp1_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(reader_callback);
|
||||
TIMER_CALLBACK_MEMBER(puncher_callback);
|
||||
TIMER_CALLBACK_MEMBER(tyo_callback);
|
||||
TIMER_CALLBACK_MEMBER(dpy_callback);
|
||||
TIMER_CALLBACK_MEMBER(il_timer_callback);
|
||||
};
|
||||
|
||||
/*----------- defined in video/pdp1.c -----------*/
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
DECLARE_VIDEO_START(pecom);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(ef_w);
|
||||
TIMER_CALLBACK_MEMBER(reset_tick);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/pecom.c -----------*/
|
||||
|
@ -57,6 +57,9 @@ public:
|
||||
DECLARE_VIDEO_START(pet_crtc);
|
||||
UINT32 screen_update_pet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(pet_frame_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(pet_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(pet_tape1_timer);
|
||||
TIMER_CALLBACK_MEMBER(pet_tape2_timer);
|
||||
};
|
||||
|
||||
/*----------- defined in video/pet.c -----------*/
|
||||
|
@ -40,6 +40,9 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_pmd85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(pmd85_cassette_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(pmd_reset);
|
||||
TIMER_CALLBACK_MEMBER(setup_machine_state);
|
||||
};
|
||||
|
||||
|
||||
|
@ -64,6 +64,15 @@ public:
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
virtual void palette_init();
|
||||
TIMER_CALLBACK_MEMBER(pokemini_seconds_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_256hz_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_timer1_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_timer1_hi_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_timer2_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_timer2_hi_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_timer3_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_timer3_hi_callback);
|
||||
TIMER_CALLBACK_MEMBER(pokemini_prc_counter_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -35,6 +35,10 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_poly88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(poly88_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(poly88_usart_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(keyboard_callback);
|
||||
TIMER_CALLBACK_MEMBER(poly88_cassette_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(setup_machine_state);
|
||||
};
|
||||
|
||||
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
DECLARE_MACHINE_RESET(radio86);
|
||||
DECLARE_PALETTE_INIT(radio86);
|
||||
UINT32 screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(radio86_reset);
|
||||
};
|
||||
|
||||
|
||||
|
@ -125,6 +125,7 @@ public:
|
||||
int keyboard_decode();
|
||||
void update_screen(bitmap_ind16 &bitmap);
|
||||
UINT32 screen_update_rm380z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(static_vblank_timer);
|
||||
};
|
||||
|
||||
|
||||
|
@ -228,6 +228,10 @@ public:
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_nimbus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_nimbus(screen_device &screen, bool state);
|
||||
TIMER_CALLBACK_MEMBER(internal_timer_int);
|
||||
TIMER_CALLBACK_MEMBER(dma_timer_callback);
|
||||
TIMER_CALLBACK_MEMBER(keyscan_callback);
|
||||
TIMER_CALLBACK_MEMBER(mouse_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -83,6 +83,9 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void palette_init();
|
||||
INTERRUPT_GEN_MEMBER(samcoupe_frame_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(irq_off);
|
||||
TIMER_CALLBACK_MEMBER(samcoupe_mouse_reset);
|
||||
TIMER_CALLBACK_MEMBER(sam_video_update_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
|
||||
/* TV Draw state */
|
||||
UINT8 m_tvdraw_data;
|
||||
TIMER_CALLBACK_MEMBER(lightgun_tick);
|
||||
};
|
||||
|
||||
class sc3000_state : public sg1000_state
|
||||
|
@ -186,6 +186,10 @@ public:
|
||||
UINT32 screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(lgun1_changed);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(lgun2_changed);
|
||||
TIMER_CALLBACK_MEMBER(rapid_fire_callback);
|
||||
TIMER_CALLBACK_MEMBER(lightgun_tick);
|
||||
TIMER_CALLBACK_MEMBER(lphaser_1_callback);
|
||||
TIMER_CALLBACK_MEMBER(lphaser_2_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -86,6 +86,9 @@ public:
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
DECLARE_MACHINE_START(sorcererd);
|
||||
TIMER_CALLBACK_MEMBER(sorcerer_serial_tc);
|
||||
TIMER_CALLBACK_MEMBER(sorcerer_cassette_tc);
|
||||
TIMER_CALLBACK_MEMBER(sorcerer_reset);
|
||||
};
|
||||
|
||||
|
||||
|
@ -94,6 +94,8 @@ public:
|
||||
UINT32 screen_update_erik(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_specialp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_specimx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(special_reset);
|
||||
TIMER_CALLBACK_MEMBER(setup_pit8253_gates);
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
/* keyboard state */
|
||||
UINT8 m_keylatch;
|
||||
DECLARE_DRIVER_INIT(studio2);
|
||||
TIMER_CALLBACK_MEMBER(setup_beep);
|
||||
};
|
||||
|
||||
class visicom_state : public studio2_state
|
||||
|
@ -86,6 +86,9 @@ public:
|
||||
UINT32 screen_update_super80e(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_super80m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_super80m(screen_device &screen, bool state);
|
||||
TIMER_CALLBACK_MEMBER(super80_timer);
|
||||
TIMER_CALLBACK_MEMBER(super80_reset);
|
||||
TIMER_CALLBACK_MEMBER(super80_halfspeed);
|
||||
};
|
||||
|
||||
|
||||
|
@ -57,6 +57,8 @@ public:
|
||||
UINT32 screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(svision_frame_int);
|
||||
TIMER_CALLBACK_MEMBER(svision_pet_timer);
|
||||
TIMER_CALLBACK_MEMBER(svision_timer);
|
||||
};
|
||||
|
||||
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
emu_timer *m_led_update;
|
||||
DECLARE_DRIVER_INIT(sym1);
|
||||
virtual void machine_reset();
|
||||
TIMER_CALLBACK_MEMBER(led_refresh);
|
||||
};
|
||||
|
||||
/*----------- defined in machine/sym1.c -----------*/
|
||||
|
@ -102,6 +102,7 @@ public:
|
||||
DECLARE_MACHINE_START(ti86);
|
||||
DECLARE_MACHINE_START(ti83p);
|
||||
UINT32 screen_update_ti85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(ti85_timer_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
/* keyboard state */
|
||||
int m_keylatch; /* key latch */
|
||||
DECLARE_DRIVER_INIT(tmc1800);
|
||||
TIMER_CALLBACK_MEMBER(setup_beep);
|
||||
};
|
||||
|
||||
class osc1000b_state : public driver_device
|
||||
|
@ -124,6 +124,7 @@ public:
|
||||
UINT32 screen_update_meritum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(trs80_rtc_interrupt);
|
||||
INTERRUPT_GEN_MEMBER(trs80_fdc_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(cassette_data_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -153,6 +153,10 @@ public:
|
||||
UINT32 screen_update_tx0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_tx0(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(tx0_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(reader_callback);
|
||||
TIMER_CALLBACK_MEMBER(puncher_callback);
|
||||
TIMER_CALLBACK_MEMBER(prt_callback);
|
||||
TIMER_CALLBACK_MEMBER(dis_callback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
DECLARE_MACHINE_START(ut88mini);
|
||||
DECLARE_MACHINE_RESET(ut88mini);
|
||||
UINT32 screen_update_ut88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(ut88_reset);
|
||||
TIMER_CALLBACK_MEMBER(update_display);
|
||||
};
|
||||
|
||||
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_vector06(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vector06_interrupt);
|
||||
TIMER_CALLBACK_MEMBER(reset_check_callback);
|
||||
};
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user