unistar: Some device hookups (nw)

This commit is contained in:
AJR 2017-09-22 13:08:09 -04:00
parent bc7133efcc
commit 7f1a839801
2 changed files with 12 additions and 3 deletions

View File

@ -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++)
{

View File

@ -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)