mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
yesnoj: Add TC8521 RTC (though the game remains stuck in the 20th century)
tc8521: Add device type as alias for RP5C01 (nw)
This commit is contained in:
parent
650c0c04db
commit
b99ebe6d62
@ -20,8 +20,9 @@
|
||||
#include "rp5c01.h"
|
||||
|
||||
|
||||
// device type definition
|
||||
// device type definitions
|
||||
DEFINE_DEVICE_TYPE(RP5C01, rp5c01_device, "rp5c01", "Ricoh RP5C01 RTC")
|
||||
DEFINE_DEVICE_TYPE(TC8521, tc8521_device, "tc8521", "Toshiba TC8521 RTC")
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
@ -169,7 +170,12 @@ inline void rp5c01_device::check_alarm()
|
||||
//-------------------------------------------------
|
||||
|
||||
rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, RP5C01, tag, owner, clock),
|
||||
: rp5c01_device(mconfig, RP5C01, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
rp5c01_device::rp5c01_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_rtc_interface(mconfig, *this),
|
||||
device_nvram_interface(mconfig, *this),
|
||||
m_out_alarm_cb(*this),
|
||||
@ -416,3 +422,12 @@ WRITE8_MEMBER( rp5c01_device::write )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// tc8521_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
tc8521_device::tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: rp5c01_device(mconfig, TC8521, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
@ -62,6 +62,9 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( adj_w ) { if (state) adjust_seconds(); }
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
rp5c01_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;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
@ -103,8 +106,18 @@ private:
|
||||
emu_timer *m_16hz_timer;
|
||||
};
|
||||
|
||||
// ======================> tc8521_device
|
||||
|
||||
class tc8521_device : public rp5c01_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(RP5C01, rp5c01_device)
|
||||
DECLARE_DEVICE_TYPE(TC8521, tc8521_device)
|
||||
|
||||
#endif // MAME_MACHINE_RP5C01_H
|
||||
|
@ -506,7 +506,7 @@ static ADDRESS_MAP_START( avigo_io, AS_IO, 8, avigo_state)
|
||||
AM_RANGE(0x005, 0x006) AM_READWRITE( bank1_r, bank1_w )
|
||||
AM_RANGE(0x007, 0x008) AM_READWRITE( bank2_r, bank2_w )
|
||||
AM_RANGE(0x009, 0x009) AM_READWRITE( ad_control_status_r, ad_control_status_w )
|
||||
AM_RANGE(0x010, 0x01f) AM_DEVREADWRITE("rtc", rp5c01_device, read, write)
|
||||
AM_RANGE(0x010, 0x01f) AM_DEVREADWRITE("rtc", tc8521_device, read, write)
|
||||
AM_RANGE(0x028, 0x028) AM_WRITE( speaker_w )
|
||||
AM_RANGE(0x02d, 0x02d) AM_READ( ad_data_r )
|
||||
AM_RANGE(0x030, 0x037) AM_DEVREADWRITE("ns16550", ns16550_device, ins8250_r, ins8250_w )
|
||||
@ -787,7 +787,7 @@ static MACHINE_CONFIG_START( avigo )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
|
||||
/* real time clock */
|
||||
MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz)
|
||||
MCFG_DEVICE_ADD("rtc", TC8521, XTAL_32_768kHz)
|
||||
MCFG_RP5C01_OUT_ALARM_CB(WRITELINE(avigo_state, tc8521_alarm_int))
|
||||
|
||||
/* flash ROMs */
|
||||
|
@ -874,7 +874,7 @@ static ADDRESS_MAP_START(nc100_io, AS_IO, 8, nc_state )
|
||||
AM_RANGE(0xb0, 0xb9) AM_READ(nc_key_data_in_r)
|
||||
AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("uart",i8251_device, data_r, data_w)
|
||||
AM_RANGE(0xc1, 0xc1) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
|
||||
AM_RANGE(0xd0, 0xdf) AM_DEVREADWRITE("rtc", rp5c01_device, read, write)
|
||||
AM_RANGE(0xd0, 0xdf) AM_DEVREADWRITE("rtc", tc8521_device, read, write)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -1440,7 +1440,7 @@ static MACHINE_CONFIG_START( nc100 )
|
||||
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(nc_state, write_uart_clock))
|
||||
|
||||
/* rtc */
|
||||
MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz)
|
||||
MCFG_DEVICE_ADD("rtc", TC8521, XTAL_32_768kHz)
|
||||
MCFG_RP5C01_OUT_ALARM_CB(WRITELINE(nc_state, nc100_tc8521_alarm_callback))
|
||||
|
||||
/* cartridge */
|
||||
|
@ -397,7 +397,7 @@ static ADDRESS_MAP_START( rex6000_io, AS_IO, 8, rex6000_state)
|
||||
AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("INPUT")
|
||||
AM_RANGE( 0x15, 0x19 ) AM_READWRITE(beep_r, beep_w)
|
||||
AM_RANGE( 0x22, 0x23 ) AM_READWRITE(lcd_base_r, lcd_base_w)
|
||||
AM_RANGE( 0x30, 0x3f ) AM_DEVREADWRITE(TC8521_TAG, rp5c01_device, read, write)
|
||||
AM_RANGE( 0x30, 0x3f ) AM_DEVREADWRITE(TC8521_TAG, tc8521_device, read, write)
|
||||
AM_RANGE( 0x40, 0x47 ) AM_MIRROR(0x08) AM_DEVREADWRITE("ns16550", ns16550_device, ins8250_r, ins8250_w )
|
||||
AM_RANGE( 0x50, 0x51 ) AM_READWRITE(lcd_io_r, lcd_io_w)
|
||||
AM_RANGE( 0x60, 0x6f ) AM_READWRITE(touchscreen_r, touchscreen_w)
|
||||
@ -412,7 +412,7 @@ static ADDRESS_MAP_START( oz750_io, AS_IO, 8, oz750_state)
|
||||
AM_RANGE( 0x11, 0x12 ) AM_READWRITE(kb_status_r, kb_mask_w)
|
||||
AM_RANGE( 0x15, 0x19 ) AM_READWRITE(beep_r, beep_w)
|
||||
AM_RANGE( 0x22, 0x23 ) AM_READWRITE(lcd_base_r, lcd_base_w)
|
||||
AM_RANGE( 0x30, 0x3f ) AM_DEVREADWRITE(TC8521_TAG, rp5c01_device, read, write)
|
||||
AM_RANGE( 0x30, 0x3f ) AM_DEVREADWRITE(TC8521_TAG, tc8521_device, read, write)
|
||||
AM_RANGE( 0x40, 0x47 ) AM_MIRROR(0x08) AM_DEVREADWRITE("ns16550", ns16550_device, ins8250_r, ins8250_w )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -922,7 +922,7 @@ static MACHINE_CONFIG_START( rex6000 )
|
||||
/* quickload */
|
||||
MCFG_QUICKLOAD_ADD("quickload", rex6000_state, rex6000, "rex,ds2", 0)
|
||||
|
||||
MCFG_DEVICE_ADD(TC8521_TAG, RP5C01, XTAL_32_768kHz)
|
||||
MCFG_DEVICE_ADD(TC8521_TAG, TC8521, XTAL_32_768kHz)
|
||||
MCFG_RP5C01_OUT_ALARM_CB(WRITELINE(rex6000_state, alarm_irq))
|
||||
|
||||
/*
|
||||
@ -998,7 +998,7 @@ static MACHINE_CONFIG_START( oz750 )
|
||||
/* quickload */
|
||||
MCFG_QUICKLOAD_ADD("quickload", oz750_state, oz750, "wzd", 0)
|
||||
|
||||
MCFG_DEVICE_ADD(TC8521_TAG, RP5C01, XTAL_32_768kHz)
|
||||
MCFG_DEVICE_ADD(TC8521_TAG, TC8521, XTAL_32_768kHz)
|
||||
MCFG_RP5C01_OUT_ALARM_CB(WRITELINE(rex6000_state, alarm_irq))
|
||||
|
||||
MCFG_SHARP_LH28F016S_ADD("flash0a")
|
||||
|
@ -271,6 +271,7 @@ Notes:
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/rp5c01.h"
|
||||
#include "machine/watchdog.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/2610intf.h"
|
||||
@ -1039,7 +1040,7 @@ static ADDRESS_MAP_START( yesnoj_map, AS_PROGRAM, 16, taitof2_state )
|
||||
AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w) /* tilemaps */
|
||||
AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
|
||||
AM_RANGE(0x600000, 0x601fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
|
||||
// AM_RANGE(0x700000, 0x70000b) AM_READ(yesnoj_unknown_r) /* what's this? */
|
||||
AM_RANGE(0x700000, 0x70001f) AM_DEVREADWRITE8("rtc", tc8521_device, read, write, 0x00ff)
|
||||
AM_RANGE(0x800000, 0x800001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, master_port_w, 0xff00)
|
||||
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, master_comm_r, master_comm_w, 0xff00)
|
||||
AM_RANGE(0x900002, 0x900003) AM_WRITENOP /* lots of similar writes */
|
||||
@ -3516,6 +3517,8 @@ static MACHINE_CONFIG_DERIVED( yesnoj, taito_f2 )
|
||||
MCFG_TC0100SCN_OFFSETS(3, 0)
|
||||
MCFG_TC0100SCN_GFXDECODE("gfxdecode")
|
||||
MCFG_TC0100SCN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("rtc", TC8521, XTAL_32_768kHz)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -127,7 +127,7 @@ static ADDRESS_MAP_START( tosh1000_io, AS_IO, 8, tosh1000_state )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0x00ff) AM_DEVICE("mb", ibm5160_mb_device, map)
|
||||
AM_RANGE(0x00c8, 0x00c8) AM_WRITE(romdos_bank_w) // ROM-DOS page select [p. B-15]
|
||||
AM_RANGE(0x02c0, 0x02df) AM_DEVREADWRITE("rtc", rp5c01_device, read, write)
|
||||
AM_RANGE(0x02c0, 0x02df) AM_DEVREADWRITE("rtc", tc8521_device, read, write)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ static MACHINE_CONFIG_START( tosh1000 )
|
||||
|
||||
MCFG_IBM5160_MOTHERBOARD_ADD("mb", "maincpu")
|
||||
|
||||
MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz)
|
||||
MCFG_DEVICE_ADD("rtc", TC8521, XTAL_32_768kHz)
|
||||
|
||||
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "cga", false)
|
||||
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false)
|
||||
|
Loading…
Reference in New Issue
Block a user