mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
bus/pci: add stub for VT6306 FireWire controller
This commit is contained in:
parent
3a9f5de150
commit
a355ac845a
@ -5508,6 +5508,8 @@ if (BUSES["PCI"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/pci/sonicvibes.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/sw1000xg.cpp",
|
||||
MAME_DIR .. "src/devices/bus/pci/sw1000xg.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/vt6306.cpp",
|
||||
MAME_DIR .. "src/devices/bus/pci/vt6306.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/virge_pci.cpp",
|
||||
MAME_DIR .. "src/devices/bus/pci/virge_pci.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/wd9710_pci.cpp",
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "sonicvibes.h"
|
||||
#include "sw1000xg.h"
|
||||
#include "virge_pci.h"
|
||||
#include "vt6306.h"
|
||||
#include "wd9710_pci.h"
|
||||
#include "zr36057.h"
|
||||
|
||||
@ -143,6 +144,7 @@ void pci_cards(device_slot_interface &device)
|
||||
// 0x0a - docking stations
|
||||
// 0x0b - processors
|
||||
// 0x0c - Serial Bus controllers
|
||||
device.option_add("vt6306", VT6306_PCI);
|
||||
device.option_add("opti82c861", OPTI_82C861);
|
||||
|
||||
// 0x0d - wireless controllers
|
||||
|
94
src/devices/bus/pci/vt6306.cpp
Normal file
94
src/devices/bus/pci/vt6306.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:
|
||||
/**************************************************************************************************
|
||||
|
||||
VIA VT6306 generic FireWire IEEE 1394a card
|
||||
|
||||
- paired with USB 2.0 controller on a Sunix UFC3212V 4x USB 3x Firewire card
|
||||
(as multifunction, presumably at .3 while USB takes .0/.1/.2)
|
||||
- midway/midzeus.cpp crusnexo/thegrid uses regular IEEE 1394 ports.
|
||||
- PHY has default vendor ID=0x004063, device ID=306000, Compliance Level=1
|
||||
|
||||
**************************************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "vt6306.h"
|
||||
|
||||
#define LOG_WARN (1U << 1)
|
||||
|
||||
#define VERBOSE (LOG_GENERAL | LOG_WARN)
|
||||
//#define LOG_OUTPUT_FUNC osd_printf_info
|
||||
#include "logmacro.h"
|
||||
|
||||
#define LOGWARN(...) LOGMASKED(LOG_WARN, __VA_ARGS__)
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(VT6306_PCI, vt6306_device, "vt6306", "VT6306 VIA Fire II IEEE-1394a OHCI Link Layer Controller")
|
||||
|
||||
|
||||
|
||||
vt6306_device::vt6306_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: pci_card_device(mconfig, type, tag, owner, clock)
|
||||
{
|
||||
set_ids(0x11063044, 0x00, 0x0c0010, 0x11063044);
|
||||
}
|
||||
|
||||
vt6306_device::vt6306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: vt6306_device(mconfig, VT6306_PCI, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
void vt6306_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void vt6306_device::device_start()
|
||||
{
|
||||
pci_card_device::device_start();
|
||||
|
||||
add_map(2048, M_MEM, FUNC(vt6306_device::ohci_mmio_map));
|
||||
add_map( 128, M_IO, FUNC(vt6306_device::vio_map));
|
||||
// add_map( 256, M_MEM, FUNC(vt6306_device::cardbus_map));
|
||||
|
||||
// INTA#
|
||||
intr_pin = 1;
|
||||
|
||||
// TODO: min_gnt = 0x00, max_lat = 0x20
|
||||
}
|
||||
|
||||
void vt6306_device::device_reset()
|
||||
{
|
||||
pci_card_device::device_reset();
|
||||
|
||||
command = 0x0000;
|
||||
// claims not having an I/O space but it definitely has one defined in BAR, huh?
|
||||
command_mask = 7;
|
||||
// Fast Back-to-Back, medium DEVSEL#
|
||||
status = 0x0280;
|
||||
|
||||
remap_cb();
|
||||
}
|
||||
|
||||
u8 vt6306_device::capptr_r()
|
||||
{
|
||||
return 0x50;
|
||||
}
|
||||
|
||||
void vt6306_device::config_map(address_map &map)
|
||||
{
|
||||
pci_card_device::config_map(map);
|
||||
// map(0x40, 0x43) PCI HCI Control (?)
|
||||
// ACPI
|
||||
map(0x50, 0x50).lr8(NAME([] () { return 0x01; }));
|
||||
map(0x51, 0x51).lr8(NAME([] () { return 0x00; })); // NULL pointer
|
||||
// map(0x52, 0x57) PCI Power Management v1.1
|
||||
}
|
||||
|
||||
void vt6306_device::ohci_mmio_map(address_map &map)
|
||||
{
|
||||
}
|
||||
|
||||
void vt6306_device::vio_map(address_map &map)
|
||||
{
|
||||
}
|
38
src/devices/bus/pci/vt6306.h
Normal file
38
src/devices/bus/pci/vt6306.h
Normal file
@ -0,0 +1,38 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:
|
||||
|
||||
#ifndef MAME_BUS_PCI_VT6306_H
|
||||
#define MAME_BUS_PCI_VT6306_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pci_slot.h"
|
||||
|
||||
class vt6306_device : public pci_card_device
|
||||
{
|
||||
public:
|
||||
vt6306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
vt6306_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
// virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
|
||||
// uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
|
||||
|
||||
virtual void config_map(address_map &map) override;
|
||||
|
||||
private:
|
||||
void ohci_mmio_map(address_map &map);
|
||||
void vio_map(address_map &map);
|
||||
|
||||
virtual u8 capptr_r() override;
|
||||
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(VT6306_PCI, vt6306_device)
|
||||
|
||||
#endif // MAME_BUS_PCI_VT6306_H
|
Loading…
Reference in New Issue
Block a user