mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
bus/pci: add ZR36057 stub
This commit is contained in:
parent
b776622651
commit
705922f609
@ -5440,6 +5440,8 @@ if (BUSES["PCI"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/pci/ds2416.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/sonicvibes.cpp",
|
||||
MAME_DIR .. "src/devices/bus/pci/sonicvibes.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/zr36057.cpp",
|
||||
MAME_DIR .. "src/devices/bus/pci/zr36057.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/rtl8029as_pci.cpp",
|
||||
MAME_DIR .. "src/devices/bus/pci/rtl8029as_pci.h",
|
||||
MAME_DIR .. "src/devices/bus/pci/rtl8139_pci.cpp",
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "ds2416.h"
|
||||
#include "sonicvibes.h"
|
||||
#include "sw1000xg.h"
|
||||
#include "zr36057.h"
|
||||
#include "rtl8029as_pci.h"
|
||||
#include "rtl8139_pci.h"
|
||||
#include "opti82c861.h"
|
||||
@ -127,6 +128,7 @@ void pci_cards(device_slot_interface &device)
|
||||
device.option_add("sw1000xg", SW1000XG);
|
||||
device.option_add("ds2416", DS2416);
|
||||
device.option_add("sonicvibes", SONICVIBES);
|
||||
device.option_add("zr36057", ZR36057_PCI);
|
||||
|
||||
// 0x05 - memory controllers
|
||||
// 0x06 - bridge devices
|
||||
|
@ -124,7 +124,13 @@ void sonicvibes_device::config_map(address_map &map)
|
||||
void sonicvibes_device::games_legacy_map(address_map &map)
|
||||
{
|
||||
map(0x00, 0x03).rw(m_opl3, FUNC(ymf262_device::read), FUNC(ymf262_device::write));
|
||||
// map(0x04, 0x04) Mixer Register Index (w/o)
|
||||
// map(0x05, 0x05) Mixer Register Data
|
||||
// map(0x06, 0x06) Reset
|
||||
map(0x08, 0x09).rw(m_opl3, FUNC(ymf262_device::read), FUNC(ymf262_device::write));
|
||||
// map(0x0a, 0x0a) Input Data (r/o)
|
||||
// map(0x0c, 0x0c) Write Data/Command (w) Write Buffer Status (r)
|
||||
// map(0x0e, 0x0e) Read Output Buffer Status (r/o)
|
||||
}
|
||||
|
||||
// 530h
|
||||
|
87
src/devices/bus/pci/zr36057.cpp
Normal file
87
src/devices/bus/pci/zr36057.cpp
Normal file
@ -0,0 +1,87 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:
|
||||
/**************************************************************************************************
|
||||
|
||||
Zoran ZR36057 / ZR36067 PCI-based chipsets
|
||||
|
||||
PCI glue logic for multimedia MJPEG, MPEG1 & DVD.
|
||||
Paired with every single TV standard for video capture in the fairly decent number of subvendor
|
||||
iterations.
|
||||
- https://www.kernel.org/doc/html/v4.14/media/v4l-drivers/zoran.html
|
||||
- misc/sliver.cpp uses ZR36050
|
||||
- misc/magictg.cpp uses ZR36016
|
||||
|
||||
**************************************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "zr36057.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(ZR36057_PCI, zr36057_device, "zr36057", "Zoran ZR36057-based PCI Enhanced Multimedia Controller card")
|
||||
//DEFINE_DEVICE_TYPE(ZR36067_PCI, zr36067_device, "zr36067", "Zoran ZR36067-based PCI AV Controller card")
|
||||
|
||||
|
||||
zr36057_device::zr36057_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)
|
||||
{
|
||||
// ZR36057PQC Video cutting chipset
|
||||
// device ID reportedly same for ZR36057 and ZR36067, revision 0x02 for latter.
|
||||
// Four known subvendors:
|
||||
// - 0x10317efe: Pinnacle/Miro DC10+
|
||||
// - 0x1031fc00: Pinnacle/Miro DC50, Motion JPEG Capture/CODEC Board
|
||||
// - 0x12f88a02: Electronic Design GmbH Tekram Video Kit
|
||||
// - 0x13ca4231: Iomega JPEG/TV Card
|
||||
// NOTE: subvendor is omitted in '36057 design (missing?), driven at PCIRST time to 32 pins in
|
||||
// '36067 thru pull-up or pull-down resistors (subvendor responsibility?)
|
||||
set_ids(0x11de6057, 0x01, 0x040000, 0x10317efe);
|
||||
}
|
||||
|
||||
zr36057_device::zr36057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: zr36057_device(mconfig, ZR36057_PCI, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
void zr36057_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void zr36057_device::device_start()
|
||||
{
|
||||
pci_card_device::device_start();
|
||||
|
||||
add_map(4096, M_MEM, FUNC(zr36057_device::map));
|
||||
|
||||
// INTA#
|
||||
intr_pin = 1;
|
||||
}
|
||||
|
||||
void zr36057_device::device_reset()
|
||||
{
|
||||
pci_card_device::device_reset();
|
||||
|
||||
// fast DEVSEL#
|
||||
command = 0x0000;
|
||||
status = 0x0000;
|
||||
intr_line = 0x0a;
|
||||
// TODO: PCI regs 0x3e/0x3f max_lat = 0x10 (4 usec), min_gnt = 0x02 (0.5 usec)
|
||||
|
||||
remap_cb();
|
||||
}
|
||||
|
||||
void zr36057_device::config_map(address_map &map)
|
||||
{
|
||||
pci_card_device::config_map(map);
|
||||
}
|
||||
|
||||
void zr36057_device::map(address_map &map)
|
||||
{
|
||||
}
|
38
src/devices/bus/pci/zr36057.h
Normal file
38
src/devices/bus/pci/zr36057.h
Normal file
@ -0,0 +1,38 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:
|
||||
|
||||
#ifndef MAME_VIDEO_ZR36057_PCI_H
|
||||
#define MAME_VIDEO_ZR36057_PCI_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pci_slot.h"
|
||||
|
||||
class zr36057_device : public pci_card_device
|
||||
{
|
||||
public:
|
||||
zr36057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
static constexpr feature_type unemulated_features() { return feature::CAPTURE; }
|
||||
|
||||
protected:
|
||||
zr36057_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 const tiny_rom_entry *device_rom_region() const 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 map(address_map &map);
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(ZR36057_PCI, zr36057_device)
|
||||
|
||||
#endif // MAME_VIDEO_ZR36057_PCI_H
|
Loading…
Reference in New Issue
Block a user