mirror of
https://github.com/holub/mame
synced 2025-06-05 12:26:35 +03:00
pci/zr36057.cpp: add SAA7110A stub
This commit is contained in:
parent
f043eee858
commit
733f24e153
@ -1112,6 +1112,18 @@ if (VIDEOS["SAA5240"]~=null) then
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
--
|
||||
--@src/devices/video/saa7110.h,VIDEOS["SAA7110"] = true
|
||||
--------------------------------------------------
|
||||
|
||||
if (VIDEOS["SAA7110"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/video/saa7110.cpp",
|
||||
MAME_DIR .. "src/devices/video/saa7110.h",
|
||||
}
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
--
|
||||
--@src/devices/video/sn74s262.h,VIDEOS["SN74S262"] = true
|
||||
|
@ -48,6 +48,7 @@ DEFINE_DEVICE_TYPE(ZR36057_PCI, zr36057_device, "zr36057", "Zoran ZR36057-ba
|
||||
|
||||
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)
|
||||
, m_decoder(*this, "decoder")
|
||||
{
|
||||
// ZR36057PQC Video cutting chipset
|
||||
// device ID reportedly same for ZR36057 and ZR36067, revision 0x02 for latter.
|
||||
@ -69,7 +70,17 @@ zr36057_device::zr36057_device(const machine_config &mconfig, const char *tag, d
|
||||
|
||||
void zr36057_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
// 27'000'000 xtal near ZR36060
|
||||
|
||||
SAA7110A(config, m_decoder, XTAL(26'800'000));
|
||||
m_decoder->sda_callback().set([this](int state) { m_decoder_sdao_state = state; });
|
||||
|
||||
// S-Video input/output
|
||||
// composite video input/output
|
||||
|
||||
// video and audio input/output pins on PCB, for cross connection with other boards
|
||||
|
||||
// DC30 combines the two audio input/output as an external jack option
|
||||
}
|
||||
|
||||
void zr36057_device::device_start()
|
||||
@ -199,11 +210,20 @@ void zr36057_device::asr_map(address_map &map)
|
||||
})
|
||||
);
|
||||
|
||||
map(0x044, 0x047).lr32(
|
||||
map(0x044, 0x047).lrw32(
|
||||
NAME([this] (offs_t offset) {
|
||||
LOG("I2C R\n");
|
||||
// avoid win98 stall for now
|
||||
return 0x3;
|
||||
return m_decoder_sdao_state << 1 | 1;
|
||||
//return 3;
|
||||
}),
|
||||
NAME([this] (offs_t offset, u32 data, u32 mem_mask) {
|
||||
//printf("I2C %02x %08x\n", data, mem_mask);
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
m_decoder->sda_write(BIT(data, 1));
|
||||
m_decoder->scl_write(BIT(data, 0));
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "pci_slot.h"
|
||||
|
||||
#include "video/saa7110.h"
|
||||
|
||||
class zr36057_device : public pci_card_device
|
||||
{
|
||||
@ -31,9 +31,10 @@ protected:
|
||||
virtual void config_map(address_map &map) override ATTR_COLD;
|
||||
|
||||
private:
|
||||
required_device<saa7110a_device> m_decoder;
|
||||
void asr_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void software_reset();
|
||||
void software_reset();
|
||||
|
||||
struct {
|
||||
u32 horizontal_config;
|
||||
@ -43,9 +44,11 @@ private:
|
||||
bool m_softreset;
|
||||
u8 m_gpio_ddr, m_pci_waitstate_control;
|
||||
|
||||
struct {
|
||||
u8 time[4];
|
||||
} m_guestbus;
|
||||
struct {
|
||||
u8 time[4];
|
||||
} m_guestbus;
|
||||
|
||||
int m_decoder_sdao_state;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(ZR36057_PCI, zr36057_device)
|
||||
|
38
src/devices/video/saa7110.cpp
Normal file
38
src/devices/video/saa7110.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
// license: BSD-3-Clause
|
||||
// copyright-holders: Angelo Salese
|
||||
|
||||
#include "emu.h"
|
||||
#include "saa7110.h"
|
||||
|
||||
#define VERBOSE (1)
|
||||
#include "logmacro.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(SAA7110A, saa7110a_device, "saa7110a", "SAA7110A OCF1")
|
||||
|
||||
// TODO: pin address overridable with SA pin = 1 (0x9e >> 1)
|
||||
saa7110a_device::saa7110a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, SAA7110A, tag, owner, clock)
|
||||
, i2c_hle_interface(mconfig, *this, 0x9c >> 1)
|
||||
//, device_memory_interface(mconfig, *this)
|
||||
{}
|
||||
|
||||
void saa7110a_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
void saa7110a_device::device_reset()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
u8 saa7110a_device::read_data(u16 offset)
|
||||
{
|
||||
//printf("%02x\n", offset);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void saa7110a_device::write_data(u16 offset, u8 data)
|
||||
{
|
||||
//printf("%02x %02x\n", offset, data);
|
||||
}
|
||||
|
33
src/devices/video/saa7110.h
Normal file
33
src/devices/video/saa7110.h
Normal file
@ -0,0 +1,33 @@
|
||||
// license: BSD-3-Clause
|
||||
// copyright-holders: Angelo Salese
|
||||
|
||||
#ifndef MAME_VIDEO_SAA7110_H
|
||||
#define MAME_VIDEO_SAA7110_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/i2chle.h"
|
||||
|
||||
class saa7110a_device :
|
||||
public device_t,
|
||||
public i2c_hle_interface
|
||||
// public device_memory_interface
|
||||
{
|
||||
public:
|
||||
saa7110a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// saa7110a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
virtual void device_start() override ATTR_COLD;
|
||||
virtual void device_reset() override ATTR_COLD;
|
||||
|
||||
// virtual space_config_vector memory_space_config() const override;
|
||||
virtual u8 read_data(u16 offset) override;
|
||||
virtual void write_data(u16 offset, u8 data) override;
|
||||
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(SAA7110A, saa7110a_device)
|
||||
//DECLARE_DEVICE_TYPE(SAA7110, saa7110_device)
|
||||
|
||||
#endif // MAME_VIDEO_SAA7110_H
|
@ -388,10 +388,11 @@ const double XTAL::known_xtals[] = {
|
||||
26'666'666, // 26.666666_MHz_XTAL Irem M92 but most use 27MHz
|
||||
26'670'000, // 26.670_MHz_XTAL Namco EVA
|
||||
26'686'000, // 26.686_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips
|
||||
26'800'000, // 26.8_MHz_XTAL SAA7110 TV decoder
|
||||
26'824'000, // 26.824_MHz_XTAL Astro Corp.'s Zoo
|
||||
26'880'000, // 26.88_MHz_XTAL Roland RF5C36/SA-16 clock (30000 * 896)
|
||||
26'989'200, // 26.9892_MHz_XTAL TeleVideo 965
|
||||
27'000'000, // 27_MHz_XTAL Some Banpresto games macrossp, Irem M92 and 90's Toaplan games
|
||||
27'000'000, // 27_MHz_XTAL Some Banpresto games macrossp, Irem M92 and 90's Toaplan games, Pinnacle Zoran based PCI cards
|
||||
27'164'000, // 27.164_MHz_XTAL Typically used on 90's Taito PCBs to drive the custom chips
|
||||
27'210'900, // 27.2109_MHz_XTAL LA Girl
|
||||
27'562'000, // 27.562_MHz_XTAL Visual 220
|
||||
|
Loading…
Reference in New Issue
Block a user