mirror of
https://github.com/holub/mame
synced 2025-07-07 10:58:41 +03:00
fruitpc.cpp, gammagic.cpp, paokaipc.cpp: inherit proper PCI_ROOT bus
This commit is contained in:
parent
2aeed0b4fa
commit
567fc850fa
@ -21,7 +21,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "bus/lpci/pci.h"
|
||||
#include "machine/pci.h"
|
||||
#include "machine/pckeybrd.h"
|
||||
#include "machine/idectrl.h"
|
||||
#include "video/pc_vga.h"
|
||||
@ -34,7 +34,7 @@ class fruitpc_state : public pcat_base_state
|
||||
public:
|
||||
fruitpc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pcat_base_state(mconfig, type, tag)
|
||||
, m_pcibus(*this, "pcibus")
|
||||
, m_pciroot(*this, "pci")
|
||||
, m_isabus(*this, "isa")
|
||||
, m_inp(*this, "INP%u", 1U)
|
||||
{ }
|
||||
@ -42,7 +42,7 @@ public:
|
||||
void fruitpc(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<pci_bus_device> m_pcibus;
|
||||
required_device<pci_root_device> m_pciroot;
|
||||
required_device<isa8_device> m_isabus;
|
||||
required_ioport_array<4> m_inp;
|
||||
|
||||
@ -78,7 +78,7 @@ void fruitpc_state::fruitpc_io(address_map &map)
|
||||
map(0x03c0, 0x03cf).rw("vga", FUNC(vga_device::port_03c0_r), FUNC(vga_device::port_03c0_w));
|
||||
map(0x03d0, 0x03df).rw("vga", FUNC(vga_device::port_03d0_r), FUNC(vga_device::port_03d0_w));
|
||||
map(0x03f0, 0x03f7).rw("ide", FUNC(ide_controller_device::cs1_r), FUNC(ide_controller_device::cs1_w));
|
||||
map(0x0cf8, 0x0cff).rw(m_pcibus, FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
|
||||
// map(0x0cf8, 0x0cff).rw(m_pcibus, FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( fruitpc )
|
||||
@ -140,7 +140,8 @@ void fruitpc_state::fruitpc(machine_config &config)
|
||||
|
||||
m_dma8237_1->out_iow_callback<1>().set(FUNC(fruitpc_state::dma8237_1_dack_w));
|
||||
|
||||
PCI_BUS(config, m_pcibus, 0).set_busnum(0);
|
||||
PCI_ROOT(config, m_pciroot, 0);
|
||||
// TODO: STPCD0166BTC3 host PCI
|
||||
|
||||
ISA8(config, m_isabus, 0);
|
||||
m_isabus->set_memspace("maincpu", AS_PROGRAM);
|
||||
|
@ -49,7 +49,7 @@ Additional CD-ROM games: "99 Bottles of Beer"
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "bus/lpci/pci.h"
|
||||
#include "machine/pci.h"
|
||||
#include "machine/pcshare.h"
|
||||
#include "machine/pckeybrd.h"
|
||||
#include "video/pc_vga.h"
|
||||
@ -58,11 +58,15 @@ class gammagic_state : public pcat_base_state
|
||||
{
|
||||
public:
|
||||
gammagic_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pcat_base_state(mconfig, type, tag) { }
|
||||
: pcat_base_state(mconfig, type, tag)
|
||||
, m_pciroot(*this, "pci")
|
||||
{ }
|
||||
|
||||
void gammagic(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<pci_root_device> m_pciroot;
|
||||
|
||||
virtual void machine_start() override;
|
||||
void gammagic_io(address_map &map);
|
||||
void gammagic_map(address_map &map);
|
||||
@ -89,7 +93,7 @@ void gammagic_state::gammagic_io(address_map &map)
|
||||
map(0x03c0, 0x03cf).rw("vga", FUNC(vga_device::port_03c0_r), FUNC(vga_device::port_03c0_w));
|
||||
map(0x03d0, 0x03df).rw("vga", FUNC(vga_device::port_03d0_r), FUNC(vga_device::port_03d0_w));
|
||||
// map(0x03e0, 0x03ef).noprw();
|
||||
map(0x0cf8, 0x0cff).rw("pcibus", FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
|
||||
// map(0x0cf8, 0x0cff).rw("pcibus", FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
|
||||
// map(0x0400, 0xffff).noprw();
|
||||
}
|
||||
|
||||
@ -110,7 +114,8 @@ void gammagic_state::gammagic(machine_config &config)
|
||||
|
||||
pcat_common(config);
|
||||
|
||||
PCI_BUS(config, "pcibus", 0).set_busnum(0);
|
||||
PCI_ROOT(config, "pci", 0);
|
||||
// ...
|
||||
|
||||
/* video hardware */
|
||||
pcvideo_vga(config);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "bus/lpci/pci.h"
|
||||
#include "machine/pci.h"
|
||||
#include "machine/pckeybrd.h"
|
||||
#include "machine/idectrl.h"
|
||||
#include "video/pc_vga.h"
|
||||
@ -37,14 +37,14 @@ class paokaipc_state : public pcat_base_state
|
||||
public:
|
||||
paokaipc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pcat_base_state(mconfig, type, tag)
|
||||
, m_pcibus(*this, "pcibus")
|
||||
, m_pciroot(*this, "pci")
|
||||
, m_isabus(*this, "isa")
|
||||
{ }
|
||||
|
||||
void paokaipc(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<pci_bus_device> m_pcibus;
|
||||
required_device<pci_root_device> m_pciroot;
|
||||
required_device<isa8_device> m_isabus;
|
||||
|
||||
void main_io(address_map &map);
|
||||
@ -70,7 +70,7 @@ void paokaipc_state::main_io(address_map &map)
|
||||
map(0x03d0, 0x03df).rw("vga", FUNC(vga_device::port_03d0_r), FUNC(vga_device::port_03d0_w));
|
||||
map(0x03f0, 0x03f7).rw("ide", FUNC(ide_controller_device::cs1_r), FUNC(ide_controller_device::cs1_w));
|
||||
// map(0x0880, 0x0880) extensively accessed at POST, hangs if returns wrong values
|
||||
map(0x0cf8, 0x0cff).rw(m_pcibus, FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
|
||||
// map(0x0cf8, 0x0cff).rw(m_pcibus, FUNC(pci_bus_device::read), FUNC(pci_bus_device::write));
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( gogostrk )
|
||||
@ -91,7 +91,8 @@ void paokaipc_state::paokaipc(machine_config &config)
|
||||
|
||||
pcvideo_vga(config);
|
||||
|
||||
PCI_BUS(config, m_pcibus, 0).set_busnum(0);
|
||||
PCI_ROOT(config, m_pciroot, 0);
|
||||
// ...
|
||||
|
||||
ISA8(config, m_isabus, 0);
|
||||
m_isabus->set_memspace("maincpu", AS_PROGRAM);
|
||||
|
Loading…
Reference in New Issue
Block a user