mirror of
https://github.com/holub/mame
synced 2025-06-09 14:22:41 +03:00
machine/opti82c861.cpp: Skeleton for OPTi 82C861 PCI USB OHCI controller. [R. Belmont]
This commit is contained in:
parent
ee6cf73ddc
commit
a849e79a69
@ -4503,6 +4503,18 @@ if (MACHINES["GEN_FIFO"]~=null) then
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------
|
||||||
|
--
|
||||||
|
--@src/devices/machine/opti82c861.h,MACHINES["OPTI82C861"] = true
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
if (MACHINES["OPTI82C861"]~=null) then
|
||||||
|
files {
|
||||||
|
MAME_DIR .. "src/devices/machine/opti82c861.cpp",
|
||||||
|
MAME_DIR .. "src/devices/machine/opti82c861.h",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
--
|
--
|
||||||
--@src/devices/machine/output_latch.h,MACHINES["OUTPUT_LATCH"] = true
|
--@src/devices/machine/output_latch.h,MACHINES["OUTPUT_LATCH"] = true
|
||||||
|
53
src/devices/machine/opti82c861.cpp
Normal file
53
src/devices/machine/opti82c861.cpp
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders: R. Belmont
|
||||||
|
/*
|
||||||
|
OPTi 82C861 "FireLink" USB 1.1 OHCI controller
|
||||||
|
Skeleton by R. Belmont
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "opti82c861.h"
|
||||||
|
|
||||||
|
#define LOG_GENERAL (1U << 0)
|
||||||
|
#define LOG_REGISTERS (1U << 0)
|
||||||
|
|
||||||
|
#define VERBOSE (0)
|
||||||
|
#include "logmacro.h"
|
||||||
|
|
||||||
|
DEFINE_DEVICE_TYPE(OPTI_82C861, opti_82c861_device, "opti82c861", "OPTi 82C861 USB OHCI controller")
|
||||||
|
|
||||||
|
opti_82c861_device::opti_82c861_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: pci_device(mconfig, type, tag, owner, clock)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
opti_82c861_device::opti_82c861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: opti_82c861_device(mconfig, OPTI_82C861, tag, owner, clock)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void opti_82c861_device::mem_map(address_map& map)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void opti_82c861_device::config_map(address_map &map)
|
||||||
|
{
|
||||||
|
pci_device::config_map(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
void opti_82c861_device::device_start()
|
||||||
|
{
|
||||||
|
pci_device::device_start();
|
||||||
|
set_ids(0x1045c861, 0x10, 0x0c0310, 0);
|
||||||
|
revision = 0x10;
|
||||||
|
add_map(0x1000, M_MEM, FUNC(opti_82c861_device::mem_map)); // 4KiB memory map
|
||||||
|
|
||||||
|
command = 0;
|
||||||
|
intr_pin = 1;
|
||||||
|
intr_line = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void opti_82c861_device::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)
|
||||||
|
{
|
||||||
|
}
|
31
src/devices/machine/opti82c861.h
Normal file
31
src/devices/machine/opti82c861.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders: R. Belmont
|
||||||
|
|
||||||
|
#ifndef MAME_MACHINE_OPTI82C861_H
|
||||||
|
#define MAME_MACHINE_OPTI82C861_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "machine/pci.h"
|
||||||
|
|
||||||
|
class opti_82c861_device : public pci_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
opti_82c861_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
opti_82c861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
void mem_map(address_map &map);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void device_start() override;
|
||||||
|
|
||||||
|
void map_extra(u64 memory_window_start, u64 memory_window_end, u64 memory_offset, address_space *memory_space,
|
||||||
|
u64 io_window_start, u64 io_window_end, u64 io_offset, address_space *io_space) override;
|
||||||
|
void config_map(address_map &map) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_DEVICE_TYPE(OPTI_82C861, opti_82c861_device)
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user