mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
pc/pcipc_sis.cpp: fix irq ack
machine/sis85c496.cpp: perform some cleanups
This commit is contained in:
parent
3b3b50f209
commit
8df3b23d65
@ -55,14 +55,6 @@ void sis85c496_host_device::internal_io_map(address_map &map)
|
||||
|
||||
void sis85c496_host_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
PIT8254(config, m_pit8254, 0);
|
||||
m_pit8254->set_clk<0>(4772720/4); // heartbeat IRQ
|
||||
m_pit8254->out_handler<0>().set(FUNC(sis85c496_host_device::at_pit8254_out0_changed));
|
||||
m_pit8254->set_clk<1>(4772720/4); // DRAM refresh
|
||||
m_pit8254->out_handler<1>().set(FUNC(sis85c496_host_device::at_pit8254_out1_changed));
|
||||
m_pit8254->set_clk<2>(4772720/4); // PIO port C pin 4, and speaker polling enough
|
||||
m_pit8254->out_handler<2>().set(FUNC(sis85c496_host_device::at_pit8254_out2_changed));
|
||||
|
||||
AM9517A(config, m_dma8237_1, XTAL(14'318'181)/3);
|
||||
m_dma8237_1->out_hreq_callback().set(m_dma8237_2, FUNC(am9517a_device::dreq0_w));
|
||||
m_dma8237_1->out_eop_callback().set(FUNC(sis85c496_host_device::at_dma8237_out_eop));
|
||||
@ -97,7 +89,7 @@ void sis85c496_host_device::device_add_mconfig(machine_config &config)
|
||||
m_dma8237_2->out_dack_callback<3>().set(FUNC(sis85c496_host_device::pc_dack7_w));
|
||||
|
||||
PIC8259(config, m_pic8259_master, 0);
|
||||
m_pic8259_master->out_int_callback().set(FUNC(sis85c496_host_device::cpu_int_w));
|
||||
m_pic8259_master->out_int_callback().set_inputline(m_maincpu, 0);
|
||||
m_pic8259_master->in_sp_callback().set_constant(1);
|
||||
m_pic8259_master->read_slave_ack_callback().set(FUNC(sis85c496_host_device::get_slave_ack));
|
||||
|
||||
@ -105,10 +97,19 @@ void sis85c496_host_device::device_add_mconfig(machine_config &config)
|
||||
m_pic8259_slave->out_int_callback().set(m_pic8259_master, FUNC(pic8259_device::ir2_w));
|
||||
m_pic8259_slave->in_sp_callback().set_constant(0);
|
||||
|
||||
PIT8254(config, m_pit8254, 0);
|
||||
m_pit8254->set_clk<0>(4772720/4); // heartbeat IRQ
|
||||
m_pit8254->out_handler<0>().set(m_pic8259_master, FUNC(pic8259_device::ir0_w));
|
||||
m_pit8254->set_clk<1>(4772720/4); // DRAM refresh
|
||||
m_pit8254->out_handler<1>().set(FUNC(sis85c496_host_device::at_pit8254_out1_changed));
|
||||
m_pit8254->set_clk<2>(4772720/4); // PIO port C pin 4, and speaker polling enough
|
||||
m_pit8254->out_handler<2>().set(FUNC(sis85c496_host_device::at_pit8254_out2_changed));
|
||||
|
||||
// TODO: PS/2
|
||||
AT_KEYBOARD_CONTROLLER(config, m_keybc, XTAL(12'000'000));
|
||||
m_keybc->hot_res().set(FUNC(sis85c496_host_device::cpu_reset_w));
|
||||
m_keybc->gate_a20().set(FUNC(sis85c496_host_device::cpu_a20_w));
|
||||
m_keybc->kbd_irq().set("pic8259_master", FUNC(pic8259_device::ir1_w));
|
||||
m_keybc->kbd_irq().set(m_pic8259_master, FUNC(pic8259_device::ir1_w));
|
||||
m_keybc->kbd_clk().set(m_pc_kbdc, FUNC(pc_kbdc_device::clock_write_from_mb));
|
||||
m_keybc->kbd_data().set(m_pc_kbdc, FUNC(pc_kbdc_device::data_write_from_mb));
|
||||
|
||||
@ -369,14 +370,6 @@ void sis85c496_host_device::at_speaker_set_spkrdata(uint8_t data)
|
||||
m_speaker->level_w(m_at_spkrdata & m_pit_out2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sis85c496_host_device::at_pit8254_out0_changed(int state)
|
||||
{
|
||||
if (m_pic8259_master)
|
||||
m_pic8259_master->ir0_w(state);
|
||||
}
|
||||
|
||||
void sis85c496_host_device::at_pit8254_out1_changed(int state)
|
||||
{
|
||||
if(state)
|
||||
@ -613,11 +606,6 @@ void sis85c496_host_device::write_rtc(offs_t offset, uint8_t data)
|
||||
}
|
||||
}
|
||||
|
||||
void sis85c496_host_device::cpu_int_w(int state)
|
||||
{
|
||||
m_maincpu->set_input_line(0, state);
|
||||
}
|
||||
|
||||
void sis85c496_host_device::cpu_a20_w(int state)
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_A20, state);
|
||||
|
@ -117,7 +117,6 @@ private:
|
||||
uint8_t at_portb_r();
|
||||
void at_portb_w(uint8_t data);
|
||||
uint8_t get_slave_ack(offs_t offset);
|
||||
void at_pit8254_out0_changed(int state);
|
||||
void at_pit8254_out1_changed(int state);
|
||||
void at_pit8254_out2_changed(int state);
|
||||
void pc_dma_hrq_changed(int state);
|
||||
@ -153,7 +152,6 @@ private:
|
||||
void pc_dma_write_byte(offs_t offset, uint8_t data);
|
||||
uint8_t pc_dma_read_word(offs_t offset);
|
||||
void pc_dma_write_word(offs_t offset, uint8_t data);
|
||||
void cpu_int_w(int state);
|
||||
void cpu_a20_w(int state);
|
||||
void cpu_reset_w(int state);
|
||||
};
|
||||
|
@ -4,10 +4,13 @@
|
||||
* Sandbox for SiS based x86 PCs, targeting the new PCI model
|
||||
*
|
||||
* Notes:
|
||||
* - sis85c471 doesn't belong here, it
|
||||
* - sis85c471 doesn't belong here, it's a full on ISA PC/AT
|
||||
*
|
||||
* TODO:
|
||||
* - Identify motherboard name(s)
|
||||
* - Finish porting sis85c496 from at.cpp;
|
||||
* - Reports slower CPU speeds in Award BIOSes (i.e. "66 MHz" for actual 75);
|
||||
* - (Hack Inc.) Glue in a Voodoo 1 hookup;
|
||||
* - (Hack Inc.) Identify motherboard name(s);
|
||||
*
|
||||
*/
|
||||
|
||||
@ -50,7 +53,7 @@ void sis496_state::sis496(machine_config &config)
|
||||
I486DX4(config, m_maincpu, 75000000); // I486DX4, 75 or 100 Mhz
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &sis496_state::main_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &sis496_state::main_io);
|
||||
// m_maincpu->set_irq_acknowledge_callback("pci:01.0:pic_master", FUNC(pic8259_device::inta_cb));
|
||||
m_maincpu->set_irq_acknowledge_callback("pci:05.0:pic8259_master", FUNC(pic8259_device::inta_cb));
|
||||
|
||||
PCI_ROOT(config, "pci", 0);
|
||||
SIS85C496_HOST(config, "pci:05.0", 0, "maincpu", 32*1024*1024);
|
||||
@ -178,7 +181,7 @@ ROM_START( a486sp3 )
|
||||
ROMX_LOAD( "si4i0305.awd", 0x00000, 0x20000, CRC(2f90e63e) SHA1(a4f16753b5a57d65fba7702ca28e44f10bd5bb6c), ROM_BIOS(8))
|
||||
ROM_END
|
||||
|
||||
COMP( 199?, sis85c496, 0, 0, sis496, 0, sis496_state, empty_init, "<unknown>", "486 motherboards using the SiS 85C496/85C497 chipset", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // photoply hangs during irq check, 4sim002 crashes while enabling cache?
|
||||
COMP( 199?, sis85c496, 0, 0, sis496, 0, sis496_state, empty_init, "Hack Inc.", "486 motherboards using the SiS 85C496/85C497 chipset", MACHINE_NOT_WORKING ) // 4sim002 crashes while enabling cache?
|
||||
|
||||
COMP( 1995, atc1425a, 0, 0, sis496, 0, sis496_state, empty_init, "A-Trend", "ATC-1425A (SiS 85C496/85C497)", MACHINE_NOT_WORKING ) // -bios 2 punts to Award BootBlock, -bios 0 and 1 crashes
|
||||
COMP( 1996, atc1425b, 0, 0, sis496, 0, sis496_state, empty_init, "A-Trend", "ATC-1425B (SiS 85C496/85C497)", MACHINE_NOT_WORKING ) // punts to Award BootBlock
|
||||
|
Loading…
Reference in New Issue
Block a user