summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <lordkale4@gmail.com>2019-08-02 03:17:05 +0200
committer angelosa <lordkale4@gmail.com>2019-08-02 03:17:05 +0200
commit95b60c1a4991ce1ded2f1fe60f832ac2b725785b (patch)
treeb808a08829b845a37eba259b37dbff6592a44b1a
parent27003c9aa36284acd4afb6a4ccac2007e908137d (diff)
parent2c95d1aab64243687a2fc4ea5df94477f430c086 (diff)
Merge branch 'master' of https://github.com/mamedev/mame
-rw-r--r--src/devices/cpu/m6805/m68hc05.cpp75
-rw-r--r--src/devices/cpu/m6805/m68hc05.h18
-rw-r--r--src/emu/xtal.cpp1
-rw-r--r--src/mame/drivers/neptunp2.cpp2
-rw-r--r--src/mame/drivers/potgoldu.cpp33
5 files changed, 113 insertions, 16 deletions
diff --git a/src/devices/cpu/m6805/m68hc05.cpp b/src/devices/cpu/m6805/m68hc05.cpp
index eab6c86e554..65f1b9044c2 100644
--- a/src/devices/cpu/m6805/m68hc05.cpp
+++ b/src/devices/cpu/m6805/m68hc05.cpp
@@ -63,6 +63,14 @@ std::pair<u16, char const *> const m68hc705c8a_syms[] = {
{ 0x001c, "PROG" },
{ 0x001d, "COPRST" }, { 0x001e, "COPCR" } };
+std::pair<u16, char const *> const m68hc705j1a_syms[] = {
+ { 0x0000, "PORTA" }, { 0x0001, "PORTB" },
+ { 0x0004, "DDRA" }, { 0x0005, "DDRB" },
+ { 0x0008, "TSCR" }, { 0x0009, "TCR" }, { 0x000a, "ISCR" },
+ { 0x0010, "PDRA" }, { 0x0011, "PDRB" },
+ { 0x0018, "EPROG" },
+ { 0x07f0, "COPR" }, { 0x07f1, "MOR" } };
+
ROM_START( m68hc705c8a )
ROM_REGION(0x00f0, "bootstrap", 0)
@@ -93,6 +101,7 @@ constexpr u16 M68HC05_INT_MASK = M68HC05_INT_IRQ | M68HC05_INT_TIMER;
DEFINE_DEVICE_TYPE(M68HC05C4, m68hc05c4_device, "m68hc05c4", "Motorola MC68HC05C4")
DEFINE_DEVICE_TYPE(M68HC05C8, m68hc05c8_device, "m68hc05c8", "Motorola MC68HC05C8")
DEFINE_DEVICE_TYPE(M68HC705C8A, m68hc705c8a_device, "m68hc705c8a", "Motorola MC68HC705C8A")
+DEFINE_DEVICE_TYPE(M68HC705J1A, m68hc705j1a_device, "m68hc705j1a", "Motorola MC68HC705J1A")
DEFINE_DEVICE_TYPE(M68HC05L9, m68hc05l9_device, "m68hc05l9", "Motorola MC68HC05L9")
DEFINE_DEVICE_TYPE(M68HC05L11, m68hc05l11_device, "m68hc05l11", "Motorola MC68HC05L11")
@@ -943,6 +952,72 @@ std::unique_ptr<util::disasm_interface> m68hc705c8a_device::create_disassembler(
/****************************************************************************
+ * MC68HC05J1A device
+ ****************************************************************************/
+
+void m68hc705j1a_device::j1a_map(address_map &map)
+{
+ map.global_mask(0x07ff);
+ map.unmap_value_high();
+
+ map(0x0000, 0x0001).rw(FUNC(m68hc705j1a_device::port_read), FUNC(m68hc705j1a_device::port_latch_w));
+ map(0x0004, 0x0005).rw(FUNC(m68hc705j1a_device::port_ddr_r), FUNC(m68hc705j1a_device::port_ddr_w));
+ // 0x0008 TSCR (bits 7 and 6 are read-only; bits 3 and 2 are write-only)
+ // 0x0009 TCR (read-only)
+ // 0x000a ISCR (bits 7 and 3 are readable; bits 7, 4 and 1 are writeable)
+ // 0x0010 PDRA (write-only)
+ // 0x0011 PDRB (write-only)
+ // 0x0014 EPROG
+ // 0x001f reserved
+ map(0x00c0, 0x00ff).ram();
+ map(0x0300, 0x07cf).rom(); // EPROM
+ map(0x07ee, 0x07ef).rom(); // test ROM
+ map(0x07f0, 0x07f0).w(FUNC(m68hc705j1a_device::copr_w));
+ map(0x07f1, 0x07f1).rom(); // MOR
+ // 0x07f2-0x07f7 reserved
+ map(0x07f8, 0x07ff).rom(); // user vectors
+}
+
+
+m68hc705j1a_device::m68hc705j1a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+ : m68hc705_device(
+ mconfig,
+ tag,
+ owner,
+ clock,
+ M68HC705J1A,
+ 11,
+ address_map_constructor(FUNC(m68hc705j1a_device::j1a_map), this))
+{
+ set_port_bits(std::array<u8, PORT_COUNT>{{ 0xff, 0x3f, 0x00, 0x00 }});
+}
+
+
+void m68hc705j1a_device::device_start()
+{
+ m68hc705_device::device_start();
+
+ add_port_state(std::array<bool, PORT_COUNT>{{ true, true, false, false }});
+ add_timer_state();
+ add_ncop_state();
+}
+
+void m68hc705j1a_device::device_reset()
+{
+ m68hc705_device::device_reset();
+
+ // TODO: latch MOR registers on reset
+}
+
+
+std::unique_ptr<util::disasm_interface> m68hc705j1a_device::create_disassembler()
+{
+ return std::make_unique<m68hc05_disassembler>(m68hc705j1a_syms);
+}
+
+
+
+/****************************************************************************
* MC68HC05L9 device
****************************************************************************/
diff --git a/src/devices/cpu/m6805/m68hc05.h b/src/devices/cpu/m6805/m68hc05.h
index 6964d6dd2da..df051782fe8 100644
--- a/src/devices/cpu/m6805/m68hc05.h
+++ b/src/devices/cpu/m6805/m68hc05.h
@@ -17,6 +17,7 @@
DECLARE_DEVICE_TYPE(M68HC05C4, m68hc05c4_device)
DECLARE_DEVICE_TYPE(M68HC05C8, m68hc05c8_device)
DECLARE_DEVICE_TYPE(M68HC705C8A, m68hc705c8a_device)
+DECLARE_DEVICE_TYPE(M68HC705J1A, m68hc705j1a_device)
DECLARE_DEVICE_TYPE(M68HC05L9, m68hc05l9_device)
DECLARE_DEVICE_TYPE(M68HC05L11, m68hc05l11_device)
@@ -237,6 +238,23 @@ protected:
};
+// ======================> m68hc705j1a_device
+
+class m68hc705j1a_device : public m68hc705_device
+{
+public:
+ m68hc705j1a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+
+protected:
+ void j1a_map(address_map &map);
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
+};
+
+
// ======================> m68hc05l9_device
class m68hc05l9_device : public m68hc05_device
diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp
index 951db7781cd..40729e867f1 100644
--- a/src/emu/xtal.cpp
+++ b/src/emu/xtal.cpp
@@ -351,6 +351,7 @@ const double XTAL::known_xtals[] = {
34'846'000, /* 34.846_MHz_XTAL Visual 550 */
35'904'000, /* 35.904_MHz_XTAL Used on HP98543 graphics board */
36'000'000, /* 36_MHz_XTAL Sega Model 1 video board */
+ 36'864'000, /* 36.864_MHz_XTAL Unidesa Cirsa Rock 'n' Roll */
37'980'000, /* 37.98_MHz_XTAL Falco 5220 */
38'769'220, /* 38.76922_MHz_XTAL Namco System 21 video board */
38'863'630, /* 38.86363_MHz_XTAL Sharp X68000 15.98kHz video */
diff --git a/src/mame/drivers/neptunp2.cpp b/src/mame/drivers/neptunp2.cpp
index daf6661f74d..5a96db1836f 100644
--- a/src/mame/drivers/neptunp2.cpp
+++ b/src/mame/drivers/neptunp2.cpp
@@ -185,7 +185,7 @@ GFXDECODE_END
void neptunp2_state::neptunp2(machine_config &config)
{
/* basic machine hardware */
- I80188(config, m_maincpu, 20000000); // N80C188-20 AMD
+ I80188(config, m_maincpu, 36.864_MHz_XTAL); // N80C188-20 AMD
m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_map);
m_maincpu->set_addrmap(AS_IO, &neptunp2_state::neptunp2_io);
m_maincpu->set_vblank_int("screen", FUNC(neptunp2_state::irq0_line_hold));
diff --git a/src/mame/drivers/potgoldu.cpp b/src/mame/drivers/potgoldu.cpp
index bf28d7e2aa7..1574be7417d 100644
--- a/src/mame/drivers/potgoldu.cpp
+++ b/src/mame/drivers/potgoldu.cpp
@@ -21,6 +21,7 @@
#include "emu.h"
#include "cpu/tms34010/tms34010.h"
+#include "cpu/m6805/m68hc05.h"
#include "screen.h"
@@ -33,6 +34,7 @@ public:
{ }
void potgold(machine_config &config);
+ void potgold580(machine_config &config);
private:
virtual void machine_reset() override;
@@ -46,14 +48,6 @@ private:
};
-#define CPU_CLOCK XTAL(40'000'000)
-#define VIDEO_CLOCK (22118400) // ?
-#define SOUND_CLOCK (3579645)
-
-
-
-
-
void potgold_state::video_start()
{
}
@@ -81,19 +75,28 @@ INPUT_PORTS_END
void potgold_state::potgold(machine_config &config)
{
/* basic machine hardware */
- TMS34010(config, m_maincpu, XTAL(40'000'000));
+ TMS34010(config, m_maincpu, 40_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &potgold_state::potgold_map);
m_maincpu->set_halt_on_reset(false);
- m_maincpu->set_pixel_clock(VIDEO_CLOCK/2);
+ m_maincpu->set_pixel_clock(22.1184_MHz_XTAL / 22);
m_maincpu->set_pixels_per_clock(1);
m_maincpu->set_scanline_rgb32_callback(FUNC(potgold_state::scanline_update));
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200);
+ screen.set_raw(22.1184_MHz_XTAL / 2, 444, 0, 320, 233, 0, 200);
screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_rgb32));
/* sound hardware */
- /* YM2413 */
+ //YM2413(config, "ymsnd", 3.579545_MHz_XTAL);
+}
+
+void potgold_state::potgold580(machine_config &config)
+{
+ potgold(config);
+
+ //YMF721S(config.replace(), "ymsnd", 33.8688_MHz_XTAL);
+
+ M68HC705J1A(config, "mcu", 4_MHz_XTAL);
}
ROM_START( potgoldu )
@@ -111,7 +114,7 @@ ROM_START( potgoldu )
ROM_LOAD16_BYTE( "400x.u3", 0x1c0000, 0x20000, BAD_DUMP CRC(c0894db0) SHA1(d68321949250bfe0f14bd5ef8d115ba4b3786b8b) )
ROM_LOAD16_BYTE( "400x.u7", 0x1c0001, 0x20000, BAD_DUMP CRC(0953ecf7) SHA1(91cbe5d9aff171902dc3eb43a308a7a833c8fb71) )
- // presumably missing an MCU dump, although nothing was documented for this set
+ // no MCU for this hardware revision
ROM_END
ROM_START( potgoldu580 ) // TMS34010FNL-40 + MC68H705 + YMF704C + ADV476KP35 RAMDAC + SC28L198A1A UART + EPM7192SQC160-10 CPLD
@@ -128,5 +131,5 @@ ROM_START( potgoldu580 ) // TMS34010FNL-40 + MC68H705 + YMF704C + ADV476KP35 RAM
ROM_LOAD( "potgoldu_mc68hc705j1acp.bin", 0x000, 0x800, CRC(4130e596) SHA1(cd7e80a371abd4208a64c537fc84f1525be9203c) ) // 'Ver 1.00a' (assumed to be for this set)
ROM_END
-GAME( 200?, potgoldu, 0, potgold, potgold, potgold_state, empty_init, ROT0, "U.S. Games Inc.", "Pot O' Gold (U.S. Games, v400x?)", MACHINE_IS_SKELETON )
-GAME( 200?, potgoldu580, potgoldu, potgold, potgold, potgold_state, empty_init, ROT0, "U.S. Games Inc.", "Pot O' Gold (U.S. Games, v580F)", MACHINE_IS_SKELETON )
+GAME( 200?, potgoldu, 0, potgold, potgold, potgold_state, empty_init, ROT0, "U.S. Games Inc.", "Pot O' Gold (U.S. Games, v400x?)", MACHINE_IS_SKELETON )
+GAME( 200?, potgoldu580, potgoldu, potgold580, potgold, potgold_state, empty_init, ROT0, "U.S. Games Inc.", "Pot O' Gold (U.S. Games, v580F)", MACHINE_IS_SKELETON )