mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
Merge pull request #6750 from shattered/_100c143238a
Add MM58174 real time clock and use it (nw)
This commit is contained in:
commit
3ed842c01c
@ -3565,6 +3565,18 @@ if (MACHINES["MM58167"]~=null) then
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/machine/mm58174.h,MACHINES["MM58174"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (MACHINES["MM58174"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/machine/mm58174.cpp",
|
||||
MAME_DIR .. "src/devices/machine/mm58174.h",
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
|
304
src/devices/machine/mm58174.cpp
Normal file
304
src/devices/machine/mm58174.cpp
Normal file
@ -0,0 +1,304 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Raphael Nabet,Sergey Svishchev
|
||||
/***************************************************************************
|
||||
|
||||
mm58174.cpp
|
||||
|
||||
National Semiconductor MM58174 Microprocessor Compatible Real Time Clock
|
||||
|
||||
Docs:
|
||||
* <http://www.bitsavers.org/components/national/_appNotes/AN-0359.pdf>
|
||||
* <ftp://ftp.jameco.com/Archive/Obsolete-TechDocuments/26219.pdf>
|
||||
|
||||
Todo:
|
||||
* data-changed flip-flop
|
||||
* interrupts, MM58174A (no interrupt ack)
|
||||
* loss of accuracy after restart
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/mm58174.h"
|
||||
|
||||
enum
|
||||
{
|
||||
ctl_clkrun = 0x1, /* clock start/stop (1=run, 0=stop) */
|
||||
|
||||
year_leap = 0x8,
|
||||
|
||||
int_ctl_rpt = 0x8, /* 1 for repeated interrupt */
|
||||
int_ctl_dly = 0x7 /* 0 no interrupt, 1 = .5 second, 2=5, 4=60 */
|
||||
};
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(MM58174, mm58174_device, "mm58174", "National Semiconductor MM58174 RTC")
|
||||
|
||||
|
||||
mm58174_device::mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, MM58174, tag, owner, clock),
|
||||
device_rtc_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void mm58174_device::device_start()
|
||||
{
|
||||
m_increment_rtc = timer_alloc();
|
||||
m_increment_rtc->adjust(attotime::zero, 0, attotime::from_msec(100));
|
||||
m_interrupt_timer = timer_alloc();
|
||||
|
||||
// register for state saving
|
||||
save_item(NAME(m_control));
|
||||
save_item(NAME(m_int_ctl));
|
||||
save_item(NAME(m_wday));
|
||||
save_item(NAME(m_months1));
|
||||
save_item(NAME(m_months2));
|
||||
save_item(NAME(m_days1));
|
||||
save_item(NAME(m_days2));
|
||||
save_item(NAME(m_hours1));
|
||||
save_item(NAME(m_hours2));
|
||||
save_item(NAME(m_minutes1));
|
||||
save_item(NAME(m_minutes2));
|
||||
save_item(NAME(m_seconds1));
|
||||
save_item(NAME(m_seconds2));
|
||||
save_item(NAME(m_tenths));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void mm58174_device::device_reset()
|
||||
{
|
||||
m_tenths = 0;
|
||||
m_control = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// rtc_clock_updated -
|
||||
//-------------------------------------------------
|
||||
|
||||
void mm58174_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second)
|
||||
{
|
||||
m_seconds1 = second / 10;
|
||||
m_seconds2 = second % 10;
|
||||
m_minutes1 = minute / 10;
|
||||
m_minutes2 = minute % 10;
|
||||
m_hours1 = hour / 10;
|
||||
m_hours2 = hour % 10;
|
||||
m_wday = day_of_week;
|
||||
m_days1 = day / 10;
|
||||
m_days2 = day % 10;
|
||||
m_months1 = month / 10;
|
||||
m_months2 = month % 10;
|
||||
m_years = 1 << (3 - (year & 3));
|
||||
}
|
||||
|
||||
|
||||
attotime mm58174_device::interrupt_period_table(int val)
|
||||
{
|
||||
switch(val)
|
||||
{
|
||||
case 0: return attotime::from_msec(0);
|
||||
case 1: return attotime::from_msec(500);
|
||||
case 2: return attotime::from_seconds(5);
|
||||
case 4: return attotime::from_seconds(60);
|
||||
default: fatalerror("out of range\n");
|
||||
}
|
||||
}
|
||||
|
||||
void mm58174_device::update_rtc()
|
||||
{
|
||||
set_clock_register(RTC_SECOND, m_seconds1 * 10 + m_seconds2);
|
||||
set_clock_register(RTC_MINUTE, m_minutes1 * 10 + m_minutes2);
|
||||
set_clock_register(RTC_HOUR, m_hours1 * 10 + m_hours2);
|
||||
set_clock_register(RTC_DAY, m_days1 * 10 + m_days2);
|
||||
set_clock_register(RTC_DAY_OF_WEEK, m_wday);
|
||||
set_clock_register(RTC_MONTH, m_months1 * 10 + m_months2);
|
||||
}
|
||||
|
||||
uint8_t mm58174_device::read(offs_t offset)
|
||||
{
|
||||
int reply = 0;
|
||||
|
||||
offset &= 0xf;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x01: /* Tenths of Seconds */
|
||||
reply = m_tenths;
|
||||
break;
|
||||
|
||||
case 0x02: /* Units Seconds */
|
||||
reply = m_seconds2;
|
||||
break;
|
||||
|
||||
case 0x03: /* Tens Seconds */
|
||||
reply = m_seconds1;
|
||||
break;
|
||||
|
||||
case 0x04: /* Units Minutes */
|
||||
reply = m_minutes2;
|
||||
break;
|
||||
|
||||
case 0x05: /* Tens Minutes */
|
||||
reply = m_minutes1;
|
||||
break;
|
||||
|
||||
case 0x06: /* Units Hours */
|
||||
reply = m_hours2;
|
||||
break;
|
||||
|
||||
case 0x07: /* Tens Hours */
|
||||
reply = m_hours1;
|
||||
break;
|
||||
|
||||
case 0x08: /* Units Days */
|
||||
reply = m_days2;
|
||||
break;
|
||||
|
||||
case 0x09: /* Tens Days */
|
||||
reply = m_days1;
|
||||
break;
|
||||
|
||||
case 0x0a: /* Day of Week */
|
||||
reply = m_wday;
|
||||
break;
|
||||
|
||||
case 0x0b: /* Units Months */
|
||||
reply = m_months2;
|
||||
break;
|
||||
|
||||
case 0x0c: /* Tens Months */
|
||||
reply = m_months1;
|
||||
break;
|
||||
|
||||
case 0x0f: /* Clock Setting & Interrupt Registers */
|
||||
reply = m_int_ctl;
|
||||
break;
|
||||
|
||||
default:
|
||||
reply = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
logerror("reg %02x == %02x\n", offset, reply);
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
||||
void mm58174_device::write(offs_t offset, uint8_t data)
|
||||
{
|
||||
offset &= 0xf;
|
||||
data &= 0xf;
|
||||
|
||||
logerror("reg %02x <- %02x\n", offset, data);
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00: /* Test Mode Register (emulated) */
|
||||
break;
|
||||
|
||||
case 0x01: /* Tenths of Seconds: cannot be written */
|
||||
break;
|
||||
|
||||
case 0x02: /* Units Seconds: cannot be written */
|
||||
break;
|
||||
|
||||
case 0x03: /* Tens Seconds: cannot be written */
|
||||
break;
|
||||
|
||||
case 0x04: /* Units Minutes */
|
||||
m_minutes2 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x05: /* Tens Minutes */
|
||||
m_minutes1 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x06: /* Units Hours */
|
||||
m_hours2 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x07: /* Tens Hours */
|
||||
m_hours1 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x08: /* Units Days */
|
||||
m_days2 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x09: /* Tens Days */
|
||||
m_days1 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x0a: /* Day of Week */
|
||||
m_wday = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x0b: /* Units Months */
|
||||
m_months2 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x0c: /* Tens Months */
|
||||
m_months1 = data;
|
||||
update_rtc();
|
||||
break;
|
||||
|
||||
case 0x0d: /* Years Status */
|
||||
break;
|
||||
|
||||
case 0x0e: /* Stop/Start */
|
||||
if ((m_control & ctl_clkrun) && (!(data & ctl_clkrun))) /* interrupt stop */
|
||||
m_interrupt_timer->enable(0);
|
||||
else if ((!(m_control & ctl_clkrun)) && (data & ctl_clkrun)) /* interrupt run */
|
||||
{
|
||||
attotime period = interrupt_period_table(m_int_ctl & int_ctl_dly);
|
||||
|
||||
m_interrupt_timer->adjust(period, 0, m_int_ctl & int_ctl_rpt ? period : attotime::zero);
|
||||
}
|
||||
if (!(data & ctl_clkrun)) /* stopping the clock clears the tenth counter */
|
||||
m_tenths = 0;
|
||||
m_control = data;
|
||||
break;
|
||||
|
||||
case 0x0f: /* Interrupt Register */
|
||||
m_int_ctl = data;
|
||||
if (m_control & ctl_clkrun) /* interrupt run */
|
||||
{
|
||||
attotime period = interrupt_period_table(m_int_ctl & int_ctl_dly);
|
||||
|
||||
m_interrupt_timer->adjust(period, 0, m_int_ctl & int_ctl_rpt ? period : attotime::zero);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Increment RTC clock (timed interrupt every 1/10s)
|
||||
void mm58174_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
if (id > 0) return;
|
||||
|
||||
if (m_control & ctl_clkrun)
|
||||
{
|
||||
if ((++m_tenths) == 10)
|
||||
{
|
||||
m_tenths = 0;
|
||||
advance_seconds();
|
||||
}
|
||||
}
|
||||
}
|
64
src/devices/machine/mm58174.h
Normal file
64
src/devices/machine/mm58174.h
Normal file
@ -0,0 +1,64 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Raphael Nabet,Sergey Svishchev
|
||||
|
||||
#ifndef MAME_MACHINE_MM58174_H
|
||||
#define MAME_MACHINE_MM58174_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dirtc.h"
|
||||
|
||||
/***************************************************************************
|
||||
MACROS
|
||||
***************************************************************************/
|
||||
|
||||
class mm58174_device : public device_t, public device_rtc_interface
|
||||
{
|
||||
public:
|
||||
mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
uint8_t read(offs_t offset);
|
||||
void write(offs_t offset, uint8_t data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
// device_rtc_interface overrides
|
||||
virtual void rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second) override;
|
||||
virtual bool rtc_feature_leap_year() const override { return true; }
|
||||
|
||||
void update_rtc();
|
||||
|
||||
private:
|
||||
// internal state
|
||||
|
||||
attotime interrupt_period_table(int val);
|
||||
|
||||
int m_control; /* control register (write to address 14) */
|
||||
|
||||
int m_int_ctl; /* interrupt control register */
|
||||
|
||||
int m_years;
|
||||
int m_wday; /* day of the week (1-7 (1=day1 as set in init)) */
|
||||
int m_months1; /* months (BCD: 1-12) */
|
||||
int m_months2;
|
||||
int m_days1; /* days (BCD: 1-31) */
|
||||
int m_days2;
|
||||
int m_hours1; /* hours (BCD : 0-23) */
|
||||
int m_hours2;
|
||||
int m_minutes1; /* minutes (BCD : 0-59) */
|
||||
int m_minutes2;
|
||||
int m_seconds1; /* seconds (BCD : 0-59) */
|
||||
int m_seconds2;
|
||||
int m_tenths; /* tenths of second (BCD : 0-9) */
|
||||
|
||||
emu_timer *m_increment_rtc;
|
||||
emu_timer *m_interrupt_timer;
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(MM58174, mm58174_device)
|
||||
|
||||
#endif // MAME_MACHINE_MM58174_H
|
@ -58,7 +58,7 @@
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/i80130.h"
|
||||
#include "machine/mm58274c.h"
|
||||
#include "machine/mm58174.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/ram.h"
|
||||
@ -109,7 +109,7 @@ public:
|
||||
required_device<i8274_device> m_mpsc;
|
||||
required_device<centronics_device> m_centronics;
|
||||
required_device<i8251_device> m_uart;
|
||||
required_device<mm58274c_device> m_rtc;
|
||||
required_device<mm58174_device> m_rtc;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<compis_graphics_slot_device> m_graphics;
|
||||
required_device<isbx_slot_device> m_isbx0;
|
||||
@ -409,7 +409,7 @@ void compis_state::compis_io(address_map &map)
|
||||
map.unmap_value_high();
|
||||
map(0x0000, 0x0007) /* PCS0 */ .mirror(0x78).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0xff00);
|
||||
map(0x0080, 0x0087) /* PCS1 */ .mirror(0x78).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)).umask16(0x00ff);
|
||||
map(0x0100, 0x011f) /* PCS2 */ .mirror(0x60).rw(m_rtc, FUNC(mm58274c_device::read), FUNC(mm58274c_device::write)).umask16(0x00ff);
|
||||
map(0x0100, 0x011f) /* PCS2 */ .mirror(0x60).rw(m_rtc, FUNC(mm58174_device::read), FUNC(mm58174_device::write)).umask16(0x00ff);
|
||||
map(0x0180, 0x01ff) /* PCS3 */ .rw(m_graphics, FUNC(compis_graphics_slot_device::pcs3_r), FUNC(compis_graphics_slot_device::pcs3_w));
|
||||
//map(0x0200, 0x0201) /* PCS4 */ .mirror(0x7e);
|
||||
map(0x0280, 0x028f) /* PCS5 */ .mirror(0x70).m(m_osp, FUNC(i80130_device::io_map));
|
||||
@ -783,9 +783,7 @@ void compis_state::compis(machine_config &config)
|
||||
m_mpsc->out_rtsb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts));
|
||||
m_mpsc->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int3_w));
|
||||
|
||||
MM58274C(config, m_rtc, 32.768_kHz_XTAL);
|
||||
m_rtc->set_mode24(1); // 24 hour
|
||||
m_rtc->set_day1(1); // monday
|
||||
MM58174(config, m_rtc, 32.768_kHz_XTAL);
|
||||
|
||||
CASSETTE(config, m_cassette);
|
||||
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
|
||||
|
@ -231,9 +231,7 @@ void concept_state::concept(machine_config &config)
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
|
||||
|
||||
/* rtc */
|
||||
MM58274C(config, m_mm58274, 32.768_kHz_XTAL);
|
||||
m_mm58274->set_mode24(0); // 12 hour
|
||||
m_mm58274->set_day1(1); // monday
|
||||
MM58174(config, m_mm58174, 32.768_kHz_XTAL);
|
||||
|
||||
/* via */
|
||||
VIA6522(config, m_via0, 16.364_MHz_XTAL / 16);
|
||||
|
@ -31,7 +31,7 @@ What there is of the schematic shows no sign of a daisy chain or associated inte
|
||||
#include "machine/z80pio.h"
|
||||
#include "machine/z80sio.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/mm58274c.h"
|
||||
#include "machine/mm58174.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ void dmax8000_state::dmax8000_io(address_map &map)
|
||||
map(0x20, 0x23).rw("dart2", FUNC(z80dart_device::ba_cd_r), FUNC(z80dart_device::ba_cd_w));
|
||||
map(0x40, 0x40).w(FUNC(dmax8000_state::port40_w)); // memory bank control
|
||||
//map(0x60, 0x67) // optional IEEE488 GPIB
|
||||
map(0x70, 0x7f).rw("rtc", FUNC(mm58274c_device::read), FUNC(mm58274c_device::write)); // optional RTC
|
||||
map(0x70, 0x7f).rw("rtc", FUNC(mm58174_device::read), FUNC(mm58174_device::write)); // optional RTC
|
||||
}
|
||||
|
||||
/* Input ports */
|
||||
@ -195,10 +195,7 @@ void dmax8000_state::dmax8000(machine_config &config)
|
||||
m_fdc->drq_wr_callback().set(FUNC(dmax8000_state::fdc_drq_w));
|
||||
FLOPPY_CONNECTOR(config, "fdc:0", floppies, "8dsdd", floppy_image_device::default_floppy_formats).enable_sound(true);
|
||||
|
||||
mm58274c_device &rtc(MM58274C(config, "rtc", 0)); // MM58174
|
||||
// this is all guess
|
||||
rtc.set_mode24(0); // 12 hour
|
||||
rtc.set_day1(1); // monday
|
||||
MM58174(config, "rtc", 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,6 +72,7 @@
|
||||
#include "machine/i7220.h"
|
||||
#include "machine/i80130.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/mm58174.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/tms9914.h"
|
||||
#include "machine/z80sio.h"
|
||||
@ -104,6 +105,7 @@ public:
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_osp(*this, I80130_TAG)
|
||||
, m_rtc(*this, "rtc")
|
||||
, m_modem(*this, "modem")
|
||||
, m_uart8274(*this, "uart8274")
|
||||
, m_speaker(*this, "speaker")
|
||||
@ -123,6 +125,7 @@ public:
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<i80130_device> m_osp;
|
||||
required_device<mm58174_device> m_rtc;
|
||||
required_device<i8255_device> m_modem;
|
||||
optional_device<i8274_device> m_uart8274;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
@ -307,7 +310,7 @@ void gridcomp_state::grid1101_map(address_map &map)
|
||||
map(0xdfea0, 0xdfeaf).unmaprw(); // ??
|
||||
map(0xdfec0, 0xdfecf).rw(FUNC(gridcomp_state::grid_modem_r), FUNC(gridcomp_state::grid_modem_w)).umask16(0x00ff); // incl. DTMF generator
|
||||
map(0xdff00, 0xdff1f).rw("uart8274", FUNC(i8274_device::ba_cd_r), FUNC(i8274_device::ba_cd_w)).umask16(0x00ff);
|
||||
map(0xdff40, 0xdff5f).noprw(); // ?? machine ID EAROM, RTC
|
||||
map(0xdff40, 0xdff5f).rw(m_rtc, FUNC(mm58174_device::read), FUNC(mm58174_device::write)).umask16(0xff00);
|
||||
map(0xdff80, 0xdff8f).rw("hpib", FUNC(tms9914_device::read), FUNC(tms9914_device::write)).umask16(0x00ff);
|
||||
map(0xdffc0, 0xdffcf).rw(FUNC(gridcomp_state::grid_keyb_r), FUNC(gridcomp_state::grid_keyb_w)); // Intel 8741 MCU
|
||||
map(0xe0000, 0xeffff).rw(FUNC(gridcomp_state::grid_dma_r), FUNC(gridcomp_state::grid_dma_w)); // DMA
|
||||
@ -326,7 +329,7 @@ void gridcomp_state::grid1121_map(address_map &map)
|
||||
map(0xdfe80, 0xdfe83).rw("i7220", FUNC(i7220_device::read), FUNC(i7220_device::write)).umask16(0x00ff);
|
||||
map(0xdfea0, 0xdfeaf).unmaprw(); // ??
|
||||
map(0xdfec0, 0xdfecf).rw(FUNC(gridcomp_state::grid_modem_r), FUNC(gridcomp_state::grid_modem_w)).umask16(0x00ff); // incl. DTMF generator
|
||||
map(0xdff40, 0xdff5f).noprw(); // ?? machine ID EAROM, RTC
|
||||
map(0xdff40, 0xdff5f).rw(m_rtc, FUNC(mm58174_device::read), FUNC(mm58174_device::write)).umask16(0xff00);
|
||||
map(0xdff80, 0xdff8f).rw("hpib", FUNC(tms9914_device::read), FUNC(tms9914_device::write)).umask16(0x00ff);
|
||||
map(0xdffc0, 0xdffcf).rw(FUNC(gridcomp_state::grid_keyb_r), FUNC(gridcomp_state::grid_keyb_w)); // Intel 8741 MCU
|
||||
map(0xfc000, 0xfffff).rom().region("user1", 0);
|
||||
@ -363,6 +366,8 @@ void gridcomp_state::grid1101(machine_config &config)
|
||||
I80130(config, m_osp, XTAL(15'000'000)/3);
|
||||
m_osp->irq().set_inputline("maincpu", 0);
|
||||
|
||||
MM58174(config, m_rtc, 32.768_kHz_XTAL);
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "machine/i8087.h"
|
||||
#include "machine/m24_kbd.h"
|
||||
#include "machine/m24_z8000.h"
|
||||
#include "machine/mm58274c.h"
|
||||
#include "machine/mm58174.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/ram.h"
|
||||
@ -460,7 +460,7 @@ void m24_state::m24_io(address_map &map)
|
||||
map(0x0064, 0x0064).r(FUNC(m24_state::keyboard_status_r));
|
||||
map(0x0065, 0x0065).w(FUNC(m24_state::alt_w));
|
||||
map(0x0066, 0x0067).portr("DSW0");
|
||||
map(0x0070, 0x007f).rw("mm58174an", FUNC(mm58274c_device::read), FUNC(mm58274c_device::write));
|
||||
map(0x0070, 0x007f).rw("mm58174an", FUNC(mm58174_device::read), FUNC(mm58174_device::write));
|
||||
map(0x0080, 0x0083).mirror(0xc).w(FUNC(m24_state::dma_segment_w));
|
||||
map(0x00a0, 0x00a1).mirror(0xe).w(FUNC(m24_state::nmi_enable_w));
|
||||
map(0x80c1, 0x80c1).rw(m_z8000_apb, FUNC(m24_z8000_device::handshake_r), FUNC(m24_z8000_device::handshake_w));
|
||||
@ -607,10 +607,7 @@ void m24_state::olivetti(machine_config &config)
|
||||
M24_KEYBOARD(config, m_keyboard, 0);
|
||||
m_keyboard->out_data_handler().set(FUNC(m24_state::kbcin_w));
|
||||
|
||||
mm58274c_device &mm58174an(MM58274C(config, "mm58174an", 32.768_kHz_XTAL));
|
||||
// this is all guess
|
||||
mm58174an.set_mode24(1); // ?
|
||||
mm58174an.set_day1(1); // ?
|
||||
MM58174(config, "mm58174an", 32.768_kHz_XTAL);
|
||||
|
||||
M24_Z8000(config, m_z8000_apb, 0); // TODO: make this a slot device (uses custom bus connector)
|
||||
m_z8000_apb->halt_callback().set(FUNC(m24_state::halt_i86_w));
|
||||
|
@ -56,7 +56,7 @@ ToDo:
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/keyboard.h"
|
||||
#include "machine/mm58274c.h"
|
||||
#include "machine/mm58174.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "sound/spkrdev.h"
|
||||
#include "video/mc6845.h"
|
||||
@ -128,7 +128,7 @@ void v6809_state::v6809_mem(address_map &map)
|
||||
map(0xf500, 0xf501).mirror(0x36).rw("acia0", FUNC(acia6850_device::read), FUNC(acia6850_device::write)); // modem
|
||||
map(0xf508, 0xf509).mirror(0x36).rw("acia1", FUNC(acia6850_device::read), FUNC(acia6850_device::write)); // printer
|
||||
map(0xf600, 0xf603).mirror(0x3c).rw(m_fdc, FUNC(mb8876_device::read), FUNC(mb8876_device::write));
|
||||
map(0xf640, 0xf64f).mirror(0x30).rw("rtc", FUNC(mm58274c_device::read), FUNC(mm58274c_device::write));
|
||||
map(0xf640, 0xf64f).mirror(0x30).rw("rtc", FUNC(mm58174_device::read), FUNC(mm58174_device::write));
|
||||
map(0xf680, 0xf683).mirror(0x3c).rw(m_pia0, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
map(0xf6c0, 0xf6c7).mirror(0x08).rw("ptm", FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
|
||||
map(0xf6d0, 0xf6d3).mirror(0x0c).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
|
||||
@ -343,10 +343,7 @@ void v6809_state::v6809(machine_config &config)
|
||||
acia_clock.signal_handler().append("acia1", FUNC(acia6850_device::write_txc));
|
||||
acia_clock.signal_handler().append("acia1", FUNC(acia6850_device::write_rxc));
|
||||
|
||||
mm58274c_device &rtc(MM58274C(config, "rtc", 0));
|
||||
// this is all guess
|
||||
rtc.set_mode24(0); // 12 hour
|
||||
rtc.set_day1(1); // monday
|
||||
MM58174(config, "rtc", 0);
|
||||
|
||||
MB8876(config, m_fdc, 16_MHz_XTAL / 16);
|
||||
FLOPPY_CONNECTOR(config, "fdc:0", v6809_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
|
||||
|
@ -28,7 +28,7 @@ Wicat - various systems.
|
||||
#include "machine/am9517a.h"
|
||||
#include "machine/im6402.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "machine/mm58274c.h"
|
||||
#include "machine/mm58174.h"
|
||||
#include "machine/scn_pci.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "machine/x2212.h"
|
||||
@ -92,7 +92,7 @@ private:
|
||||
I8275_DRAW_CHARACTER_MEMBER(wicat_display_pixels);
|
||||
|
||||
required_device<m68000_device> m_maincpu;
|
||||
required_device<mm58274c_device> m_rtc;
|
||||
required_device<mm58174_device> m_rtc;
|
||||
required_device<via6522_device> m_via;
|
||||
required_device_array<scn2661c_device, 7> m_uart;
|
||||
required_device<cpu_device> m_videocpu;
|
||||
@ -157,7 +157,7 @@ void wicat_state::main_mem(address_map &map)
|
||||
map(0xf00030, 0xf00037).rw(m_uart[6], FUNC(scn2661c_device::read), FUNC(scn2661c_device::write)).umask16(0xff00);
|
||||
map(0xf0003a, 0xf0003b).nopr();
|
||||
map(0xf00040, 0xf0005f).rw(FUNC(wicat_state::via_r), FUNC(wicat_state::via_w));
|
||||
map(0xf00060, 0xf0007f).rw(m_rtc, FUNC(mm58274c_device::read), FUNC(mm58274c_device::write)).umask16(0xff00);
|
||||
map(0xf00060, 0xf0007f).rw(m_rtc, FUNC(mm58174_device::read), FUNC(mm58174_device::write)).umask16(0xff00);
|
||||
map(0xf000d0, 0xf000d0).w("ledlatch", FUNC(ls259_device::write_nibble_d3));
|
||||
map(0xf00180, 0xf0018f).rw(FUNC(wicat_state::hdc_r), FUNC(wicat_state::hdc_w)); // WD1000
|
||||
map(0xf00190, 0xf0019f).rw(FUNC(wicat_state::fdc_r), FUNC(wicat_state::fdc_w)); // FD1795
|
||||
@ -644,9 +644,7 @@ void wicat_state::wicat(machine_config &config)
|
||||
m_via->writepb_handler().set(FUNC(wicat_state::via_b_w));
|
||||
m_via->irq_handler().set_inputline(m_maincpu, M68K_IRQ_1);
|
||||
|
||||
MM58274C(config, m_rtc, 0); // actually an MM58174AN, but should be compatible
|
||||
m_rtc->set_mode24(0); // 12 hour
|
||||
m_rtc->set_day1(1); // monday
|
||||
MM58174(config, m_rtc, 0);
|
||||
|
||||
// internal terminal
|
||||
SCN2661C(config, m_uart[0], 5.0688_MHz_XTAL); // connected to terminal board
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/mm58274c.h" /* mm58274 seems to be compatible with mm58174 */
|
||||
#include "machine/mm58174.h"
|
||||
#include "sound/spkrdev.h"
|
||||
#include "bus/a2bus/a2bus.h"
|
||||
|
||||
@ -36,7 +36,7 @@ public:
|
||||
m_via0(*this, VIA_0_TAG),
|
||||
m_kbdacia(*this, KBD_ACIA_TAG),
|
||||
m_speaker(*this, "spkr"),
|
||||
m_mm58274(*this,"mm58274c"),
|
||||
m_mm58174(*this, "mm58174"),
|
||||
m_a2bus(*this, "a2bus"),
|
||||
m_videoram(*this,"videoram")
|
||||
{ }
|
||||
@ -50,7 +50,7 @@ private:
|
||||
required_device<via6522_device> m_via0;
|
||||
required_device<mos6551_device> m_kbdacia;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<mm58274c_device> m_mm58274;
|
||||
required_device<mm58174_device> m_mm58174;
|
||||
required_device<a2bus_device> m_a2bus;
|
||||
required_shared_ptr<uint16_t> m_videoram;
|
||||
|
||||
|
@ -224,7 +224,7 @@ READ8_MEMBER(concept_state::io_r)
|
||||
/* calendar R/W */
|
||||
VLOG(("concept_io_r: Calendar read at address 0x03%4.4x\n", offset << 1));
|
||||
if (!m_clock_enable)
|
||||
return m_mm58274->read(m_clock_address);
|
||||
return m_mm58174->read(m_clock_address);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
@ -330,7 +330,7 @@ WRITE8_MEMBER(concept_state::io_w)
|
||||
/* calendar R/W */
|
||||
LOG(("concept_io_w: Calendar written to at address 0x03%4.4x, data: 0x%4.4x\n", offset << 1, data));
|
||||
if (!m_clock_enable)
|
||||
m_mm58274->write(m_clock_address, data & 0xf);
|
||||
m_mm58174->write(m_clock_address, data & 0xf);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
Loading…
Reference in New Issue
Block a user