summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/tek410x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/tek410x.cpp')
-rw-r--r--src/mame/drivers/tek410x.cpp46
1 files changed, 40 insertions, 6 deletions
diff --git a/src/mame/drivers/tek410x.cpp b/src/mame/drivers/tek410x.cpp
index 46e9cae713e..e57a3ad379f 100644
--- a/src/mame/drivers/tek410x.cpp
+++ b/src/mame/drivers/tek410x.cpp
@@ -19,6 +19,8 @@
#include "emu.h"
#include "cpu/i86/i186.h"
+#include "machine/i8255.h"
+#include "machine/mc68681.h"
#include "video/crt9007.h"
#include "emupal.h"
#include "screen.h"
@@ -29,6 +31,7 @@ class tek4107a_state : public driver_device
public:
tek4107a_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
+ , m_vpac(*this, "vpac")
{ }
void tek4109a(machine_config &config);
@@ -39,11 +42,35 @@ protected:
virtual void video_start() override;
private:
- uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+ u8 even_port_r(offs_t offset);
+ void even_port_w(offs_t offset, u8 data);
+ u8 vpac_r(offs_t offset);
+
void tek4107a_io(address_map &map);
void tek4107a_mem(address_map &map);
+
+ required_device<crt9007_device> m_vpac;
};
+u8 tek4107a_state::even_port_r(offs_t offset)
+{
+ if (!machine().side_effects_disabled())
+ logerror("%s: Read from port %02Xh\n", machine().describe_context(), offset << 1);
+ return 0;
+}
+
+void tek4107a_state::even_port_w(offs_t offset, u8 data)
+{
+ logerror("%s: Write %02Xh to port %02Xh\n", machine().describe_context(), data, offset << 1);
+}
+
+u8 tek4107a_state::vpac_r(offs_t offset)
+{
+ return m_vpac->read(offset + 0x20);
+}
+
/* Memory Maps */
void tek4107a_state::tek4107a_mem(address_map &map)
@@ -54,7 +81,10 @@ void tek4107a_state::tek4107a_mem(address_map &map)
void tek4107a_state::tek4107a_io(address_map &map)
{
- map(0x0080, 0x00bf).w("vpac", FUNC(crt9007_device::write)).umask16(0x00ff);
+ map(0x0000, 0x001f).rw(FUNC(tek4107a_state::even_port_r), FUNC(tek4107a_state::even_port_w)).umask16(0x00ff);
+ map(0x0000, 0x001f).rw("duart", FUNC(scn2681_device::read), FUNC(scn2681_device::write)).umask16(0xff00);
+ map(0x0080, 0x00bf).r(FUNC(tek4107a_state::vpac_r)).w(m_vpac, FUNC(crt9007_device::write)).umask16(0x00ff);
+ map(0x0100, 0x0107).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0xff00);
}
/* Input Ports */
@@ -68,7 +98,7 @@ void tek4107a_state::video_start()
{
}
-uint32_t tek4107a_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+u32 tek4107a_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
return 0;
}
@@ -108,9 +138,13 @@ void tek4107a_state::tek4107a(machine_config &config)
screen.set_raw(25200000, 800, 0, 640, 525, 0, 480);
screen.set_screen_update(FUNC(tek4107a_state::screen_update));
- crt9007_device &vpac(CRT9007(config, "vpac", 25200000 / 8));
- vpac.set_screen("screen");
- vpac.set_character_width(8);
+ SCN2681(config, "duart", 3686400);
+
+ I8255(config, "ppi");
+
+ CRT9007(config, m_vpac, 25200000 / 8);
+ m_vpac->set_screen("screen");
+ m_vpac->set_character_width(8);
PALETTE(config, "palette").set_entries(64);
GFXDECODE(config, "gfxdecode", "palette", gfx_tek4107a);