From 7f1a839801a9e9d79d418c1fcbf380ebc588c834 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 22 Sep 2017 13:08:09 -0400 Subject: unistar: Some device hookups (nw) --- src/devices/machine/am9513.cpp | 6 +++--- src/mame/drivers/unistar.cpp | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/devices/machine/am9513.cpp b/src/devices/machine/am9513.cpp index 2e4b70a7a89..1e572647e15 100644 --- a/src/devices/machine/am9513.cpp +++ b/src/devices/machine/am9513.cpp @@ -29,7 +29,7 @@ #define LOG_MODE (1U << 1) #define LOG_INPUT (1U << 2) #define LOG_TC (1U << 3) -#define VERBOSE (LOG_GENERAL | LOG_MODE | LOG_INPUT) +#define VERBOSE (LOG_GENERAL | LOG_MODE) #include "logmacro.h" @@ -107,7 +107,7 @@ void am9513_device::device_start() for (int f = 0; f < 5; f++) { m_freq_timer[f] = timer_alloc(TIMER_F1 + f); - m_freq_timer_selected[f] = (f == 0) ? (m_fout_cb.isnull() ? 0x1e : 0x1f) : 0; + m_freq_timer_selected[f] = (f == 0) ? (m_fout_cb.isnull() ? 0x3e : 0x3f) : 0; m_freq_timer_cycle[f] = 0; } @@ -595,7 +595,7 @@ void am9513_device::write_source(int s, bool level) return; m_src[s] = level; - LOGMASKED(LOG_INPUT, "Source %d: %s edge\n", s, level ? "Rising" : "Falling"); + LOGMASKED(LOG_INPUT, "Source %d: %s edge\n", s + 1, level ? "Rising" : "Falling"); for (int c = 0; c < 5; c++) { diff --git a/src/mame/drivers/unistar.cpp b/src/mame/drivers/unistar.cpp index ffc6434301a..514ee20c71b 100644 --- a/src/mame/drivers/unistar.cpp +++ b/src/mame/drivers/unistar.cpp @@ -12,6 +12,8 @@ #include "emu.h" #include "cpu/i8085/i8085.h" +#include "machine/am9513.h" +#include "machine/i8255.h" #include "screen.h" @@ -43,6 +45,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START(unistar_io, AS_IO, 8, unistar_state) //ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x8c, 0x8d) AM_DEVREADWRITE("stc", am9513_device, read8, write8) + AM_RANGE(0x94, 0x97) AM_DEVREADWRITE("ppi", i8255_device, read, write) // ports used: 00,02,03(W),08(RW),09,0A,0B,0D,0F(W),80,81(R),82,83(W),84(R),8C,8D(W),94(R),97,98(W),99(RW) // if nonzero returned from port 94, it goes into test mode. ADDRESS_MAP_END @@ -92,6 +96,11 @@ static MACHINE_CONFIG_START( unistar ) MCFG_CPU_PROGRAM_MAP(unistar_mem) MCFG_CPU_IO_MAP(unistar_io) + MCFG_DEVICE_ADD("stc", AM9513, XTAL_8MHz) + MCFG_AM9513_FOUT_CALLBACK(DEVWRITELINE("stc", am9513_device, source1_w)) + + MCFG_DEVICE_ADD("ppi", I8255A, 0) + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(50) -- cgit v1.2.3