mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
bus/isa/svga_tseng: ET4000AX is a ISA16 card
This commit is contained in:
parent
316870e09f
commit
f0080fce54
@ -105,8 +105,6 @@ void pc_isa8_cards(device_slot_interface &device)
|
||||
device.option_add("ega", ISA8_EGA);
|
||||
device.option_add("pgc", ISA8_PGC);
|
||||
device.option_add("vga", ISA8_VGA);
|
||||
device.option_add("svga_et4k", ISA8_SVGA_ET4K);
|
||||
device.option_add("svga_et4k_kasan16", ISA8_SVGA_ET4K_KASAN16);
|
||||
device.option_add("wd90c90_jk", ISA8_WD90C90_JK);
|
||||
device.option_add("num9rev",ISA8_NUM_9_REV);
|
||||
device.option_add("com", ISA8_COM);
|
||||
@ -160,8 +158,6 @@ void pc_isa16_cards(device_slot_interface &device)
|
||||
device.option_add("ega", ISA8_EGA);
|
||||
device.option_add("pgc", ISA8_PGC);
|
||||
device.option_add("vga", ISA8_VGA);
|
||||
device.option_add("svga_et4k", ISA8_SVGA_ET4K);
|
||||
device.option_add("svga_et4k_kasan16", ISA8_SVGA_ET4K_KASAN16);
|
||||
device.option_add("wd90c90_jk", ISA8_WD90C90_JK);
|
||||
device.option_add("num9rev",ISA8_NUM_9_REV);
|
||||
device.option_add("com", ISA8_COM);
|
||||
@ -219,6 +215,8 @@ void pc_isa16_cards(device_slot_interface &device)
|
||||
// device.option_add("tgui9680",ISA16_SVGA_TGUI9680);
|
||||
device.option_add("pvga1a", ISA16_PVGA1A);
|
||||
device.option_add("pvga1a_jk", ISA16_PVGA1A_JK);
|
||||
device.option_add("svga_et4k", ISA16_SVGA_ET4K);
|
||||
device.option_add("svga_et4k_kasan16", ISA16_SVGA_ET4K_KASAN16);
|
||||
device.option_add("wd90c00_jk", ISA16_WD90C00_JK);
|
||||
device.option_add("wd90c11_lr", ISA16_WD90C11_LR);
|
||||
device.option_add("wd90c30_lr", ISA16_WD90C30_LR);
|
||||
|
@ -32,15 +32,15 @@ ROM_END
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(ISA8_SVGA_ET4K, isa8_svga_et4k_device, "et4000", "SVGA Tseng ET4000AX Graphics Card")
|
||||
DEFINE_DEVICE_TYPE(ISA8_SVGA_ET4K_KASAN16, isa8_svga_et4k_kasan16_device, "et4000_kasan16", "SVGA Kasan Hangulmadang-16 ET4000AX Graphics Card")
|
||||
DEFINE_DEVICE_TYPE(ISA16_SVGA_ET4K, isa16_svga_et4k_device, "et4000", "SVGA Tseng ET4000AX Graphics Card")
|
||||
DEFINE_DEVICE_TYPE(ISA16_SVGA_ET4K_KASAN16, isa16_svga_et4k_kasan16_device, "et4000_kasan16", "SVGA Kasan Hangulmadang-16 ET4000AX Graphics Card")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void isa8_svga_et4k_device::device_add_mconfig(machine_config &config)
|
||||
void isa16_svga_et4k_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480);
|
||||
@ -55,7 +55,7 @@ void isa8_svga_et4k_device::device_add_mconfig(machine_config &config)
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const tiny_rom_entry *isa8_svga_et4k_device::device_rom_region() const
|
||||
const tiny_rom_entry *isa16_svga_et4k_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( et4000 );
|
||||
}
|
||||
@ -65,17 +65,17 @@ const tiny_rom_entry *isa8_svga_et4k_device::device_rom_region() const
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// isa8_vga_device - constructor
|
||||
// isa16_vga_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
isa8_svga_et4k_device(mconfig, ISA8_SVGA_ET4K, tag, owner, clock)
|
||||
isa16_svga_et4k_device::isa16_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
isa16_svga_et4k_device(mconfig, ISA16_SVGA_ET4K, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
isa16_svga_et4k_device::isa16_svga_et4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_isa8_card_interface(mconfig, *this)
|
||||
, device_isa16_card_interface(mconfig, *this)
|
||||
, m_vga(*this, "vga")
|
||||
{
|
||||
}
|
||||
@ -83,9 +83,9 @@ isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, devi
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
uint8_t isa8_svga_et4k_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); }
|
||||
uint8_t isa16_svga_et4k_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); }
|
||||
|
||||
void isa8_svga_et4k_device::device_start()
|
||||
void isa16_svga_et4k_device::device_start()
|
||||
{
|
||||
set_isa_device();
|
||||
|
||||
@ -98,7 +98,7 @@ void isa8_svga_et4k_device::device_start()
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void isa8_svga_et4k_device::device_reset()
|
||||
void isa16_svga_et4k_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ void isa8_svga_et4k_device::device_reset()
|
||||
// could have unmapped it
|
||||
//-------------------------------------------------
|
||||
|
||||
void isa8_svga_et4k_device::remap(int space_id, offs_t start, offs_t end)
|
||||
void isa16_svga_et4k_device::remap(int space_id, offs_t start, offs_t end)
|
||||
{
|
||||
if (space_id == AS_PROGRAM)
|
||||
{
|
||||
@ -118,22 +118,22 @@ void isa8_svga_et4k_device::remap(int space_id, offs_t start, offs_t end)
|
||||
map_io();
|
||||
}
|
||||
|
||||
void isa8_svga_et4k_device::io_isa_map(address_map &map)
|
||||
void isa16_svga_et4k_device::io_isa_map(address_map &map)
|
||||
{
|
||||
map(0x00, 0x2f).m(m_vga, FUNC(tseng_vga_device::io_map));
|
||||
}
|
||||
|
||||
void isa8_svga_et4k_device::map_io()
|
||||
void isa16_svga_et4k_device::map_io()
|
||||
{
|
||||
m_isa->install_device(0x03b0, 0x03df, *this, &isa8_svga_et4k_device::io_isa_map);
|
||||
m_isa->install_device(0x03b0, 0x03df, *this, &isa16_svga_et4k_device::io_isa_map);
|
||||
}
|
||||
|
||||
void isa8_svga_et4k_device::map_ram()
|
||||
void isa16_svga_et4k_device::map_ram()
|
||||
{
|
||||
m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(tseng_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(tseng_vga_device::mem_w)));
|
||||
}
|
||||
|
||||
void isa8_svga_et4k_device::map_rom()
|
||||
void isa16_svga_et4k_device::map_rom()
|
||||
{
|
||||
m_isa->install_rom(this, 0xc0000, 0xc7fff, "et4000");
|
||||
}
|
||||
@ -144,8 +144,8 @@ void isa8_svga_et4k_device::map_rom()
|
||||
* Same as regular ET4000AX with extra font I/Os
|
||||
*/
|
||||
|
||||
isa8_svga_et4k_kasan16_device::isa8_svga_et4k_kasan16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: isa8_svga_et4k_device(mconfig, ISA8_SVGA_ET4K_KASAN16, tag, owner, clock)
|
||||
isa16_svga_et4k_kasan16_device::isa16_svga_et4k_kasan16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: isa16_svga_et4k_device(mconfig, ISA16_SVGA_ET4K_KASAN16, tag, owner, clock)
|
||||
, m_hangul_rom(*this, "hangul")
|
||||
{
|
||||
}
|
||||
@ -159,7 +159,7 @@ ROM_START( kasan16 )
|
||||
ROM_LOAD("kasan_ksc5601.rom", 0x00000, 0x80000, CRC(a547c5ec) SHA1(1358feb2ccaca040a176bedc7c256ec481351b41) )
|
||||
ROM_END
|
||||
|
||||
const tiny_rom_entry *isa8_svga_et4k_kasan16_device::device_rom_region() const
|
||||
const tiny_rom_entry *isa16_svga_et4k_kasan16_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( kasan16 );
|
||||
}
|
||||
|
@ -16,22 +16,22 @@
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> isa8_vga_device
|
||||
// ======================> isa16_vga_device
|
||||
|
||||
class isa8_svga_et4k_device :
|
||||
class isa16_svga_et4k_device :
|
||||
public device_t,
|
||||
public device_isa8_card_interface
|
||||
public device_isa16_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
isa16_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
uint8_t input_port_0_r();
|
||||
|
||||
virtual void remap(int space_id, offs_t start, offs_t end) override;
|
||||
|
||||
protected:
|
||||
isa8_svga_et4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
isa16_svga_et4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override ATTR_COLD;
|
||||
@ -50,11 +50,11 @@ private:
|
||||
required_device<tseng_vga_device> m_vga;
|
||||
};
|
||||
|
||||
class isa8_svga_et4k_kasan16_device :
|
||||
public isa8_svga_et4k_device
|
||||
class isa16_svga_et4k_kasan16_device :
|
||||
public isa16_svga_et4k_device
|
||||
{
|
||||
public:
|
||||
isa8_svga_et4k_kasan16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
isa16_svga_et4k_kasan16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
|
||||
@ -64,7 +64,7 @@ private:
|
||||
};
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(ISA8_SVGA_ET4K, isa8_svga_et4k_device)
|
||||
DECLARE_DEVICE_TYPE(ISA8_SVGA_ET4K_KASAN16, isa8_svga_et4k_kasan16_device)
|
||||
DECLARE_DEVICE_TYPE(ISA16_SVGA_ET4K, isa16_svga_et4k_device)
|
||||
DECLARE_DEVICE_TYPE(ISA16_SVGA_ET4K_KASAN16, isa16_svga_et4k_kasan16_device)
|
||||
|
||||
#endif // MAME_BUS_ISA_SVGA_TSENG_H
|
||||
|
@ -178,26 +178,7 @@ void tseng_vga_device::attribute_map(address_map &map)
|
||||
NAME([this] (offs_t offset) { return et4k.misc1; }),
|
||||
NAME([this] (offs_t offset, u8 data) {
|
||||
et4k.misc1 = data;
|
||||
// TODO: this should be taken into account for recompute_params
|
||||
#if 0
|
||||
svga.rgb8_en = 0;
|
||||
svga.rgb15_en = 0;
|
||||
svga.rgb16_en = 0;
|
||||
svga.rgb32_en = 0;
|
||||
switch(et4k.misc1 & 0x30)
|
||||
{
|
||||
case 0:
|
||||
// normal power-up mode
|
||||
break;
|
||||
case 0x10:
|
||||
svga.rgb8_en = 1;
|
||||
break;
|
||||
case 0x20:
|
||||
case 0x30:
|
||||
popmessage("Tseng 15/16 bit HiColor mode, contact MAMEdev");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
recompute_params();
|
||||
})
|
||||
);
|
||||
// Miscellaneous 2
|
||||
@ -245,6 +226,7 @@ void tseng_vga_device::recompute_params()
|
||||
xtal = 38000000;
|
||||
break;
|
||||
}
|
||||
// TODO: also read et4k.misc1?
|
||||
switch(et4k.dac_ctrl & 0xe0)
|
||||
{
|
||||
case 0xa0:
|
||||
|
Loading…
Reference in New Issue
Block a user