mirror of
https://github.com/holub/mame
synced 2025-04-27 10:43:07 +03:00
little bit more (nw)
This commit is contained in:
parent
a1cdc3d898
commit
c093affda1
@ -751,28 +751,26 @@ void saturn_state::m68k_reset_callback(device_t *device)
|
|||||||
printf("m68k RESET opcode triggered\n");
|
printf("m68k RESET opcode triggered\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void scsp_irq(device_t *device, int irq)
|
WRITE_LINE_MEMBER(saturn_state::scsp_irq)
|
||||||
{
|
{
|
||||||
saturn_state *state = device->machine().driver_data<saturn_state>();
|
|
||||||
|
|
||||||
// don't bother the 68k if it's off
|
// don't bother the 68k if it's off
|
||||||
if (!state->m_en_68k)
|
if (!m_en_68k)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (irq > 0)
|
if (state > 0)
|
||||||
{
|
{
|
||||||
state->m_scsp_last_line = irq;
|
m_scsp_last_line = state;
|
||||||
device->machine().device("audiocpu")->execute().set_input_line(irq, ASSERT_LINE);
|
machine().device("audiocpu")->execute().set_input_line(state, ASSERT_LINE);
|
||||||
}
|
}
|
||||||
else if (irq < 0)
|
else if (state < 0)
|
||||||
{
|
{
|
||||||
device->machine().device("audiocpu")->execute().set_input_line(-irq, CLEAR_LINE);
|
machine().device("audiocpu")->execute().set_input_line(-state, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
device->machine().device("audiocpu")->execute().set_input_line(state->m_scsp_last_line, CLEAR_LINE);
|
machine().device("audiocpu")->execute().set_input_line(m_scsp_last_line, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -893,7 +893,7 @@ static const sh2_cpu_core sh2_conf_slave = { 1, NULL };
|
|||||||
static const scsp_interface scsp_config =
|
static const scsp_interface scsp_config =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
DEVCB_LINE(scsp_irq),
|
DEVCB_DRIVER_LINE_MEMBER(saturn_state, scsp_irq),
|
||||||
DEVCB_DRIVER_LINE_MEMBER(saturn_state, scsp_to_main_irq)
|
DEVCB_DRIVER_LINE_MEMBER(saturn_state, scsp_to_main_irq)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -165,8 +165,8 @@ public:
|
|||||||
DECLARE_READ8_MEMBER(saturn_backupram_r);
|
DECLARE_READ8_MEMBER(saturn_backupram_r);
|
||||||
DECLARE_WRITE8_MEMBER(saturn_backupram_w);
|
DECLARE_WRITE8_MEMBER(saturn_backupram_w);
|
||||||
TIMER_CALLBACK_MEMBER(stv_rtc_increment);
|
TIMER_CALLBACK_MEMBER(stv_rtc_increment);
|
||||||
WRITE_LINE_MEMBER(scsp_to_main_irq);
|
DECLARE_WRITE_LINE_MEMBER(scsp_to_main_irq);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(scsp_irq);
|
||||||
int m_scsp_last_line;
|
int m_scsp_last_line;
|
||||||
|
|
||||||
UINT8 smpc_direct_mode(UINT8 pad_n);
|
UINT8 smpc_direct_mode(UINT8 pad_n);
|
||||||
|
@ -205,16 +205,16 @@ MACHINE_RESET_MEMBER(dc_cons_state,dc_console)
|
|||||||
dreamcast_atapi_reset(machine());
|
dreamcast_atapi_reset(machine());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void aica_irq(device_t *device, int irq)
|
WRITE_LINE_MEMBER(dc_cons_state::aica_irq)
|
||||||
{
|
{
|
||||||
device->machine().device("soundcpu")->execute().set_input_line(ARM7_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
|
machine().device("soundcpu")->execute().set_input_line(ARM7_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const aica_interface dc_aica_interface =
|
static const aica_interface dc_aica_interface =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
DEVCB_LINE(aica_irq)
|
DEVCB_DRIVER_LINE_MEMBER(dc_cons_state,aica_irq)
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
|
static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
|
||||||
|
@ -182,6 +182,7 @@ public:
|
|||||||
DECLARE_DRIVER_INIT(denib);
|
DECLARE_DRIVER_INIT(denib);
|
||||||
DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
|
DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
|
||||||
IRQ_CALLBACK_MEMBER(maincpu_irq_acknowledge_callback);
|
IRQ_CALLBACK_MEMBER(maincpu_irq_acknowledge_callback);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(esq5505_otis_irq);
|
||||||
};
|
};
|
||||||
|
|
||||||
FLOPPY_FORMATS_MEMBER( esq5505_state::floppy_formats )
|
FLOPPY_FORMATS_MEMBER( esq5505_state::floppy_formats )
|
||||||
@ -330,11 +331,10 @@ static ADDRESS_MAP_START( sq1_map, AS_PROGRAM, 16, esq5505_state )
|
|||||||
AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("osram")
|
AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("osram")
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static void esq5505_otis_irq(device_t *device, int state)
|
WRITE_LINE_MEMBER(esq5505_state::esq5505_otis_irq)
|
||||||
{
|
{
|
||||||
esq5505_state *esq5505 = device->machine().driver_data<esq5505_state>();
|
otis_irq_state = (state != 0);
|
||||||
esq5505->otis_irq_state = (state != 0);
|
update_irq_to_maincpu();
|
||||||
esq5505->update_irq_to_maincpu();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static READ16_DEVICE_HANDLER(esq5505_read_adc)
|
static READ16_DEVICE_HANDLER(esq5505_read_adc)
|
||||||
@ -611,7 +611,7 @@ static const es5505_interface es5505_config =
|
|||||||
{
|
{
|
||||||
"waverom", /* Bank 0 */
|
"waverom", /* Bank 0 */
|
||||||
"waverom2", /* Bank 1 */
|
"waverom2", /* Bank 1 */
|
||||||
DEVCB_LINE(esq5505_otis_irq), /* irq */
|
DEVCB_DRIVER_LINE_MEMBER(esq5505_state,esq5505_otis_irq), /* irq */
|
||||||
DEVCB_DEVICE_HANDLER(DEVICE_SELF, esq5505_read_adc)
|
DEVCB_DEVICE_HANDLER(DEVICE_SELF, esq5505_read_adc)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
DECLARE_DRIVER_INIT(kt);
|
DECLARE_DRIVER_INIT(kt);
|
||||||
DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
|
DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq);
|
||||||
};
|
};
|
||||||
|
|
||||||
void esqkt_state::machine_reset()
|
void esqkt_state::machine_reset()
|
||||||
@ -241,11 +242,10 @@ static ADDRESS_MAP_START( kt_map, AS_PROGRAM, 32, esqkt_state )
|
|||||||
AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("osram")
|
AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("osram")
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static void esq5506_otto_irq(device_t *device, int state)
|
WRITE_LINE_MEMBER(esqkt_state::esq5506_otto_irq)
|
||||||
{
|
{
|
||||||
#if 0 // 5505/06 IRQ generation needs (more) work
|
#if 0 // 5505/06 IRQ generation needs (more) work
|
||||||
esqkt_state *esq5505 = device->machine().driver_data<esqkt_state>();
|
m_maincpu->set_input_line(1, state);
|
||||||
esq5505->m_maincpu->set_input_line(1, state);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ static const es5506_interface es5506_config =
|
|||||||
"waverom2", /* Bank 1 */
|
"waverom2", /* Bank 1 */
|
||||||
"waverom3", /* Bank 0 */
|
"waverom3", /* Bank 0 */
|
||||||
"waverom4", /* Bank 1 */
|
"waverom4", /* Bank 1 */
|
||||||
DEVCB_LINE(esq5506_otto_irq), /* irq */
|
DEVCB_DRIVER_LINE_MEMBER(esqkt_state,esq5506_otto_irq), /* irq */
|
||||||
DEVCB_DEVICE_HANDLER(DEVICE_SELF, esq5506_read_adc)
|
DEVCB_DEVICE_HANDLER(DEVICE_SELF, esq5506_read_adc)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1349,20 +1349,19 @@ IRQ_CALLBACK_MEMBER(fm7_state::fm7_sub_irq_ack)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fm77av_fmirq(device_t* device,int irq)
|
WRITE_LINE_MEMBER(fm7_state::fm77av_fmirq)
|
||||||
{
|
{
|
||||||
fm7_state *state = device->machine().driver_data<fm7_state>();
|
if(state == 1)
|
||||||
if(irq == 1)
|
|
||||||
{
|
{
|
||||||
// cannot be masked
|
// cannot be masked
|
||||||
main_irq_set_flag(device->machine(),IRQ_FLAG_OTHER);
|
main_irq_set_flag(machine(),IRQ_FLAG_OTHER);
|
||||||
state->m_fm77av_ym_irq = 1;
|
m_fm77av_ym_irq = 1;
|
||||||
logerror("YM: IRQ on\n");
|
logerror("YM: IRQ on\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
main_irq_clear_flag(device->machine(),IRQ_FLAG_OTHER);
|
main_irq_clear_flag(machine(),IRQ_FLAG_OTHER);
|
||||||
state->m_fm77av_ym_irq = 0;
|
m_fm77av_ym_irq = 0;
|
||||||
logerror("YM: IRQ off\n");
|
logerror("YM: IRQ off\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1995,7 +1994,7 @@ static const ym2203_interface fm7_ym_intf =
|
|||||||
DEVCB_NULL, /* portA write */
|
DEVCB_NULL, /* portA write */
|
||||||
DEVCB_NULL /* portB write */
|
DEVCB_NULL /* portB write */
|
||||||
},
|
},
|
||||||
DEVCB_LINE(fm77av_fmirq)
|
DEVCB_DRIVER_LINE_MEMBER(fm7_state,fm77av_fmirq)
|
||||||
};
|
};
|
||||||
|
|
||||||
static const cassette_interface fm7_cassette_interface =
|
static const cassette_interface fm7_cassette_interface =
|
||||||
|
@ -2067,22 +2067,20 @@ IRQ_CALLBACK_MEMBER(towns_state::towns_irq_callback)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// YM3438 interrupt (IRQ 13)
|
// YM3438 interrupt (IRQ 13)
|
||||||
static void towns_fm_irq(device_t* device, int irq)
|
WRITE_LINE_MEMBER(towns_state::towns_fm_irq)
|
||||||
{
|
{
|
||||||
towns_state* state = device->machine().driver_data<towns_state>();
|
if(state)
|
||||||
device_t* pic = state->m_pic_slave;
|
|
||||||
if(irq)
|
|
||||||
{
|
{
|
||||||
state->m_towns_fm_irq_flag = 1;
|
m_towns_fm_irq_flag = 1;
|
||||||
pic8259_ir5_w(pic, 1);
|
pic8259_ir5_w(m_pic_slave, 1);
|
||||||
if(IRQ_LOG) logerror("PIC: IRQ13 (FM) set high\n");
|
if(IRQ_LOG) logerror("PIC: IRQ13 (FM) set high\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
state->m_towns_fm_irq_flag = 0;
|
m_towns_fm_irq_flag = 0;
|
||||||
if(state->m_towns_pcm_irq_flag == 0)
|
if(m_towns_pcm_irq_flag == 0)
|
||||||
{
|
{
|
||||||
pic8259_ir5_w(pic, 0);
|
pic8259_ir5_w(m_pic_slave, 0);
|
||||||
if(IRQ_LOG) logerror("PIC: IRQ13 (FM) set low\n");
|
if(IRQ_LOG) logerror("PIC: IRQ13 (FM) set low\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2766,7 +2764,7 @@ static const upd71071_intf towns_dma_config =
|
|||||||
|
|
||||||
static const ym3438_interface ym3438_intf =
|
static const ym3438_interface ym3438_intf =
|
||||||
{
|
{
|
||||||
DEVCB_LINE(towns_fm_irq)
|
DEVCB_DRIVER_LINE_MEMBER(towns_state,towns_fm_irq)
|
||||||
};
|
};
|
||||||
|
|
||||||
static const rf5c68_interface rf5c68_intf =
|
static const rf5c68_interface rf5c68_intf =
|
||||||
|
@ -485,6 +485,7 @@ public:
|
|||||||
DECLARE_READ8_MEMBER(opn_portb_r);
|
DECLARE_READ8_MEMBER(opn_portb_r);
|
||||||
IRQ_CALLBACK_MEMBER(pc8801_irq_callback);
|
IRQ_CALLBACK_MEMBER(pc8801_irq_callback);
|
||||||
void pc8801_raise_irq(UINT8 irq,UINT8 state);
|
void pc8801_raise_irq(UINT8 irq,UINT8 state);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(pc8801_sound_irq);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2319,11 +2320,10 @@ IRQ_CALLBACK_MEMBER(pc8801_state::pc8801_irq_callback)
|
|||||||
return vector << 1;
|
return vector << 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pc8801_sound_irq( device_t *device, int irq )
|
WRITE_LINE_MEMBER(pc8801_state::pc8801_sound_irq)
|
||||||
{
|
{
|
||||||
pc8801_state *state = device->machine().driver_data<pc8801_state>();
|
if(m_sound_irq_mask && state)
|
||||||
if(state->m_sound_irq_mask && irq)
|
pc8801_raise_irq(machine(),1<<(4),1);
|
||||||
pc8801_raise_irq(device->machine(),1<<(4),1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2368,23 +2368,21 @@ IRQ_CALLBACK_MEMBER(pc8801_state::pc8801_irq_callback)
|
|||||||
return 4*2; //TODO: mustn't happen
|
return 4*2; //TODO: mustn't happen
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pc8801_sound_irq( device_t *device, int irq )
|
WRITE_LINE_MEMBER(pc8801_state::pc8801_sound_irq)
|
||||||
{
|
{
|
||||||
pc8801_state *state = device->machine().driver_data<pc8801_state>();
|
// printf("%02x %02x %02x\n",m_sound_irq_mask,m_i8214_irq_level,state);
|
||||||
|
|
||||||
// printf("%02x %02x %02x\n",state->m_sound_irq_mask,state->m_i8214_irq_level,irq);
|
|
||||||
/* TODO: correct i8214 irq level? */
|
/* TODO: correct i8214 irq level? */
|
||||||
if(irq)
|
if(state)
|
||||||
{
|
{
|
||||||
if(state->m_sound_irq_mask)
|
if(m_sound_irq_mask)
|
||||||
{
|
{
|
||||||
state->m_sound_irq_latch = 1;
|
m_sound_irq_latch = 1;
|
||||||
state->m_sound_irq_pending = 0;
|
m_sound_irq_pending = 0;
|
||||||
//IRQ_LOG(("sound\n"));
|
//IRQ_LOG(("sound\n"));
|
||||||
device->machine().device("maincpu")->execute().set_input_line(0,HOLD_LINE);
|
machine().device("maincpu")->execute().set_input_line(0,HOLD_LINE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state->m_sound_irq_pending = 1;
|
m_sound_irq_pending = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2596,7 +2594,7 @@ static const ym2203_interface pc88_ym2203_intf =
|
|||||||
DEVCB_NULL,
|
DEVCB_NULL,
|
||||||
DEVCB_NULL
|
DEVCB_NULL
|
||||||
},
|
},
|
||||||
DEVCB_LINE(pc8801_sound_irq)
|
DEVCB_DRIVER_LINE_MEMBER(pc8801_state,pc8801_sound_irq)
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ym2608_interface pc88_ym2608_intf =
|
static const ym2608_interface pc88_ym2608_intf =
|
||||||
@ -2609,7 +2607,7 @@ static const ym2608_interface pc88_ym2608_intf =
|
|||||||
DEVCB_NULL,
|
DEVCB_NULL,
|
||||||
DEVCB_NULL
|
DEVCB_NULL
|
||||||
},
|
},
|
||||||
DEVCB_LINE(pc8801_sound_irq)
|
DEVCB_DRIVER_LINE_MEMBER(pc8801_state,pc8801_sound_irq)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Cassette Configuration */
|
/* Cassette Configuration */
|
||||||
|
@ -603,7 +603,7 @@ static const sh2_cpu_core sh2_conf_slave = { 1, NULL };
|
|||||||
static const scsp_interface scsp_config =
|
static const scsp_interface scsp_config =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
DEVCB_LINE(scsp_irq),
|
DEVCB_DRIVER_LINE_MEMBER(saturn_state, scsp_irq),
|
||||||
DEVCB_DRIVER_LINE_MEMBER(saturn_state, scsp_to_main_irq)
|
DEVCB_DRIVER_LINE_MEMBER(saturn_state, scsp_to_main_irq)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ public:
|
|||||||
DECLARE_WRITE64_MEMBER(dc_arm_w);
|
DECLARE_WRITE64_MEMBER(dc_arm_w);
|
||||||
DECLARE_WRITE64_MEMBER(ta_texture_directpath0_w);
|
DECLARE_WRITE64_MEMBER(ta_texture_directpath0_w);
|
||||||
DECLARE_WRITE64_MEMBER(ta_texture_directpath1_w);
|
DECLARE_WRITE64_MEMBER(ta_texture_directpath1_w);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(aica_irq);
|
||||||
private:
|
private:
|
||||||
UINT64 PDTRA, PCTRA;
|
UINT64 PDTRA, PCTRA;
|
||||||
|
|
||||||
|
@ -252,6 +252,7 @@ public:
|
|||||||
DECLARE_READ8_MEMBER(fm77av_joy_2_r);
|
DECLARE_READ8_MEMBER(fm77av_joy_2_r);
|
||||||
IRQ_CALLBACK_MEMBER(fm7_irq_ack);
|
IRQ_CALLBACK_MEMBER(fm7_irq_ack);
|
||||||
IRQ_CALLBACK_MEMBER(fm7_sub_irq_ack);
|
IRQ_CALLBACK_MEMBER(fm7_sub_irq_ack);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(fm77av_fmirq);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*FM7_H_*/
|
#endif /*FM7_H_*/
|
||||||
|
@ -278,6 +278,7 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER(towns_pit_out1_changed);
|
DECLARE_WRITE_LINE_MEMBER(towns_pit_out1_changed);
|
||||||
DECLARE_READ8_MEMBER(get_slave_ack);
|
DECLARE_READ8_MEMBER(get_slave_ack);
|
||||||
IRQ_CALLBACK_MEMBER(towns_irq_callback);
|
IRQ_CALLBACK_MEMBER(towns_irq_callback);
|
||||||
|
DECLARE_WRITE_LINE_MEMBER(towns_fm_irq);
|
||||||
};
|
};
|
||||||
|
|
||||||
class towns16_state : public towns_state
|
class towns16_state : public towns_state
|
||||||
|
Loading…
Reference in New Issue
Block a user