summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-05-15 01:37:42 +0200
committer hap <happppp@users.noreply.github.com>2019-05-15 01:37:58 +0200
commit91cacec146a6aeb5b19188278f2088e6af6b9a66 (patch)
tree65541769ed5c63116a4a31c91a7d2431b74cc0fc
parent0675f92bcd50ae2d9567f4fc55bb93be1d1847bd (diff)
Machines promoted to working
------------- Electronic Milton [hap]
-rw-r--r--src/devices/machine/tmc0430.cpp4
-rw-r--r--src/devices/machine/tmc0430.h7
-rw-r--r--src/devices/sound/sp0250.cpp2
-rw-r--r--src/mame/drivers/k28.cpp2
-rw-r--r--src/mame/drivers/milton6805.cpp301
5 files changed, 202 insertions, 114 deletions
diff --git a/src/devices/machine/tmc0430.cpp b/src/devices/machine/tmc0430.cpp
index 34400cdfe8b..76e53c88ded 100644
--- a/src/devices/machine/tmc0430.cpp
+++ b/src/devices/machine/tmc0430.cpp
@@ -107,8 +107,8 @@
/*
Constructor.
*/
-tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, TMC0430, tag, owner, clock),
+tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, TMC0430, tag, owner, clock),
m_gromready(*this),
m_current_clock_level(CLEAR_LINE),
m_current_ident(0),
diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h
index 39f0a805d1d..09800f2f514 100644
--- a/src/devices/machine/tmc0430.h
+++ b/src/devices/machine/tmc0430.h
@@ -3,13 +3,14 @@
/***************************************************************************
GROM emulation
- See grom.c for documentation,
+ See tmc0430.cpp for documentation,
Michael Zapf
February 2012: Rewritten as class
***************************************************************************/
+
#ifndef MAME_MACHINE_TMC0430_H
#define MAME_MACHINE_TMC0430_H
@@ -26,8 +27,8 @@ enum
class tmc0430_device : public device_t
{
public:
- tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *regionname, int offset, int ident)
- : tmc0430_device(mconfig, tag, owner, 0)
+ tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *regionname, int offset, int ident) :
+ tmc0430_device(mconfig, tag, owner, 0)
{
set_region_and_ident(regionname, offset, ident);
}
diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp
index 4b2ae39af27..bc9c7072883 100644
--- a/src/devices/sound/sp0250.cpp
+++ b/src/devices/sound/sp0250.cpp
@@ -104,7 +104,7 @@ static int16_t sp0250_gc(uint8_t v)
// Internal ROM to the chip, cf. manual
static const uint16_t coefs[128] =
{
- 0, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121,
+ 0, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121,
129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 203, 217, 225, 233, 241, 249,
257, 265, 273, 281, 289, 297, 301, 305, 309, 313, 317, 321, 325, 329, 333, 337,
341, 345, 349, 353, 357, 361, 365, 369, 373, 377, 381, 385, 389, 393, 397, 401,
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index db0920df596..53d8834541b 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -376,5 +376,5 @@ ROM_END
Drivers
******************************************************************************/
-// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
COMP( 1981, k28, 0, 0, k28, k28, k28_state, empty_init, "Tiger Electronics", "K28: Talking Learning Computer (model 7-230)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/milton6805.cpp b/src/mame/drivers/milton6805.cpp
index 89f5de74f16..06ea73f4b60 100644
--- a/src/mame/drivers/milton6805.cpp
+++ b/src/mame/drivers/milton6805.cpp
@@ -1,148 +1,235 @@
// license:BSD-3-Clause
-// copyright-holders:
-/*
-infos provided by Sean Riddle
+// copyright-holders:hap
+// thanks-to:Sean Riddle
+/******************************************************************************
Milton Bradley Milton
-Chips labeled
-
-SC87008P
-7834043001
-R2H8033
-28 DIP = Motorola MC6805P2
-
-GI
-783-4043-002
-8033CBA
-28 DIP = GI SP0250
-
-4043-003
-DDS 8027
-16 DIP = TMC0430 8K GROM
-
-4043-004
-DDS 8022
-16 DIP = TMC0430 8K GROM
-
-20 buttons: 1, 2, 3, Go, Score, Reset, Red A-G, Yellow A-G
-Speaker
-2 LEDs (pulse with speech)
-
-schematic in patent 4326710 except MC6805 clocked from SP0250 3.12MHz and GROM clocked by 3.12MHz/8=390KHz
-
-MC6805 pinout
-
-1 VSS ground
-2 /INT tied high
-3 VCC +5
-4 Extal SP0250 pin 9 3.12MHz clock
-5 Xtal ground
-6 NUM ground
-7 Timer VCC
-8 PC0 button matrix
-9 PC1 button matrix
-10 PC2 button matrix
-11 PC3 button matrix
-12 PB0 button matrix
-13 PB1 button matrix+GROM M
-14 PB2 button matrix
-15 PB3 button matrix+GROM M0
-16 PB4 button matrix
-17 PB5 SP0250 DPRES
-18 PB6 SP0250 DREQ
-19 PB7 GROM STROBE
-20 PA0 SP0250 and GROM D0
-21 PA1 SP0250 and GROM D1
-22 PA2 SP0250 and GROM D2
-23 PA3 SP0250 and GROM D3
-24 PA4 SP0250 and GROM D4
-25 PA5 SP0250 and GROM D5
-26 PA6 SP0250 and GROM D6
-27 PA7 SP0250 and GROM D7
-28 /RESET cap and diode
-
-
-button matrix
- PB0 PB1 PB2 PB3 PB4
-PC0 red G red C 2 Reset Yellow D
-PC1 red F red B 3 Yellow A Yellow E
-PC2 red E red A GO Yellow B Yellow F
-PC3 red D 1 Score Yellow C Yellow G
-
-button layout
-red
- D E
-C F
- B G
- A
-
-yellow
- A
- G B
-F C
- E D
-*/
+This is the talking tabletop game, not the chess computer with the same name.
+
+Hardware is an odd combination: MC6805P2 MCU, GI SP0250 speech + 2*TMC0430 GROM.
+See patent 4326710 for detailed information, except MC6805 clocked from SP0250 3.12MHz
+and GROM clocked by 3.12MHz/8=390kHz.
+
+TODO:
+- 2 leds connected to audio out
+
+******************************************************************************/
#include "emu.h"
-#include "cpu/m6805/m6805.h"
+#include "cpu/m6805/m68705.h"
+#include "machine/clock.h"
#include "machine/tmc0430.h"
#include "sound/sp0250.h"
-#include "screen.h"
#include "speaker.h"
+
+namespace {
+
class milton_state : public driver_device
{
public:
- milton_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu")
+ milton_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_grom(*this, "grom%u", 0),
+ m_speech(*this, "sp0250"),
+ m_inputs(*this, "IN.%u", 0)
{ }
void milton(machine_config &config);
-private:
- required_device<cpu_device> m_maincpu;
+protected:
+ virtual void machine_start() override;
- void prg_map(address_map &map);
+private:
+ required_device<m6805_hmos_device> m_maincpu;
+ required_device_array<tmc0430_device, 2> m_grom;
+ required_device<sp0250_device> m_speech;
+ required_ioport_array<5> m_inputs;
+
+ u8 m_data;
+ u8 m_control;
+
+ DECLARE_WRITE8_MEMBER(data_w);
+ DECLARE_READ8_MEMBER(data_r);
+ DECLARE_WRITE8_MEMBER(control_w);
+ DECLARE_READ8_MEMBER(control_r);
+ DECLARE_READ8_MEMBER(input_r);
};
-void milton_state::prg_map(address_map &map)
+void milton_state::machine_start()
+{
+ // zerofill
+ m_data = 0;
+ m_control = 0xff;
+
+ // register for savestates
+ save_item(NAME(m_data));
+ save_item(NAME(m_control));
+}
+
+
+/******************************************************************************
+ I/O
+******************************************************************************/
+
+WRITE8_MEMBER(milton_state::data_w)
+{
+ // TMC0430 + SP0250 data
+ m_data = data;
+}
+
+READ8_MEMBER(milton_state::data_r)
{
- map(0x800, 0xfff).rom().region("maincpu", 0); // Internal ROM
+ if (machine().side_effects_disabled())
+ return 0;
+
+ // TMC0430 data
+ u8 data = 0xff;
+ m_grom[0]->readz(&data);
+ m_grom[1]->readz(&data);
+ return data;
}
+WRITE8_MEMBER(milton_state::control_w)
+{
+ // d0-d4: input mux
+
+ // d5: SP0250 data present
+ if (~m_control & data & 0x20)
+ m_speech->write(space, 0, m_data);
+
+ // d1: TMC0430 M
+ // d3: TMC0430 MO
+ // d7: TMC0430 GS
+ for (int i = 0; i < 2; i++)
+ {
+ m_grom[i]->m_line(BIT(data, 1));
+ m_grom[i]->mo_line(BIT(data, 3));
+ m_grom[i]->gsq_line(BIT(~data, 7));
+ }
+
+ // write pending TMC0430 data
+ if (m_control & ~data & 0x80 && ~data & 2)
+ {
+ m_grom[0]->write(m_data);
+ m_grom[1]->write(m_data);
+ }
+
+ m_control = data;
+}
+
+READ8_MEMBER(milton_state::control_r)
+{
+ if (machine().side_effects_disabled())
+ return 0;
+
+ // d6: SP0250 data request
+ // other: no function (DDRB = 0xbf)
+ return m_speech->drq_r() ? 0x40 : 0;
+}
+
+READ8_MEMBER(milton_state::input_r)
+{
+ u8 data = 0;
+
+ // d0-d3: multiplexed inputs
+ for (int i = 0; i < 5; i++)
+ if (BIT(~m_control, i))
+ data |= m_inputs[i]->read();
+
+ return ~data;
+}
+
+
+
+/******************************************************************************
+ Input Ports
+******************************************************************************/
+
static INPUT_PORTS_START( milton )
+ PORT_START("IN.0")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) PORT_NAME("Red Button 7")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Red Button 6")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Red Button 5")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Red Button 4")
+
+ PORT_START("IN.1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Red Button 3")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Red Button 2")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Red Button 1")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Purple Button 1")
+
+ PORT_START("IN.2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Purple Button 2")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Purple Button 3")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Go")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Score")
+
+ PORT_START("IN.3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Reset")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Yellow Button 1") // starting at top, then clockwise
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Yellow Button 2")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Yellow Button 3")
+
+ PORT_START("IN.4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Yellow Button 4")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Yellow Button 5")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Yellow Button 6")
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Yellow Button 7")
INPUT_PORTS_END
+
+
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
+
void milton_state::milton(machine_config &config)
{
/* basic machine hardware */
- M6805(config, m_maincpu, 3120000); // MC6805P2, needs a CPU core
- m_maincpu->set_addrmap(AS_PROGRAM, &milton_state::prg_map);
+ M6805P2(config, m_maincpu, 3.12_MHz_XTAL);
+ m_maincpu->porta_w().set(FUNC(milton_state::data_w));
+ m_maincpu->porta_r().set(FUNC(milton_state::data_r));
+ m_maincpu->portb_w().set(FUNC(milton_state::control_w));
+ m_maincpu->portb_r().set(FUNC(milton_state::control_r));
+ m_maincpu->portc_r().set(FUNC(milton_state::input_r));
+
+ TMC0430(config, m_grom[0], "groms", 0x0000, 0);
+ TMC0430(config, m_grom[1], "groms", 0x2000, 1);
- // GROMs. They still require a ready callback and external clock
- // of 3120000/8 Hz, pulsing their glock_in line (see tmc0430.cpp and ti99_4x.cpp)
- TMC0430(config, "grom3", "groms", 0x0000, 0);
- TMC0430(config, "grom4", "groms", 0x2000, 1);
+ clock_device &gromclock(CLOCK(config, "gromclock", 3.12_MHz_XTAL/8));
+ gromclock.signal_handler().set(m_grom[0], FUNC(tmc0430_device::gclock_in));
+ gromclock.signal_handler().append(m_grom[1], FUNC(tmc0430_device::gclock_in));
+ /* sound hardware */
SPEAKER(config, "speaker").front_center();
- SP0250(config, "sp0250", 3120000).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ SP0250(config, m_speech, 3.12_MHz_XTAL).add_route(ALL_OUTPUTS, "speaker", 1.0);
}
-/***************************************************************************
- Game drivers
-***************************************************************************/
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
ROM_START( milton )
- ROM_REGION(0x800, "maincpu", 0)
- ROM_LOAD("milton.bin", 0x000, 0x800, CRC(acb261fd) SHA1(6efd836578c580031d9835191afd20cdd192125d) )
+ ROM_REGION( 0x800, "maincpu", 0 )
+ ROM_LOAD("sc87008p_783-4043-001", 0x000, 0x800, CRC(b054dbea) SHA1(b5339c8170e773b68505c3d60dc75249a583d60a) )
- ROM_REGION(0x4000, "groms", 0)
- ROM_LOAD("miltongrom3.bin", 0x0000, 0x1800, CRC(d95df757) SHA1(6723480866f6393d310e304ef3b61e3a319a7beb) )
- ROM_LOAD("miltongrom4.bin", 0x2000, 0x1800, CRC(9ac929f7) SHA1(1a27d56fc49eb4e58ea3b5c58d7fbedc5a751592) )
+ ROM_REGION( 0x4000, "groms", ROMREGION_ERASEFF )
+ ROM_LOAD("4043-003", 0x0000, 0x1800, CRC(d95df757) SHA1(6723480866f6393d310e304ef3b61e3a319a7beb) )
+ ROM_LOAD("4043-004", 0x2000, 0x1800, CRC(9ac929f7) SHA1(1a27d56fc49eb4e58ea3b5c58d7fbedc5a751592) )
ROM_END
-CONS( 1980, milton, 0, 0, milton, milton, milton_state, empty_init, "Milton Bradley", "Electronic Milton", MACHINE_IS_SKELETON )
+} // anonymous namespace
+
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
+
+// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
+CONS( 1980, milton, 0, 0, milton, milton, milton_state, empty_init, "Milton Bradley", "Electronic Milton", MACHINE_SUPPORTS_SAVE )