summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/pve500.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/drivers/pve500.c')
-rw-r--r--src/mess/drivers/pve500.c45
1 files changed, 42 insertions, 3 deletions
diff --git a/src/mess/drivers/pve500.c b/src/mess/drivers/pve500.c
index 149ad32410b..7446b9d4ffa 100644
--- a/src/mess/drivers/pve500.c
+++ b/src/mess/drivers/pve500.c
@@ -19,7 +19,7 @@
SELFdIAG Error___ _F3 F3_CtC3c
which means it detected an error in the CTC circuitry (it means we're emulating it wrong!)
- F3 is the coordinate of the subcpu EEPROM chip in the PCB.
+ F3 is the coordinate of the subcpu EPROM chip in the PCB.
According to the service manual, this error code means: "ICF3 CTC CH-3 counter operation failure (No interruption)"
@@ -46,10 +46,12 @@
#include "emu.h"
#include "cpu/z80/tmpz84c015.h"
+#include "cpu/mb88xx/mb88xx.h"
#include "sound/beep.h"
#include "bus/rs232/rs232.h" /* actually meant to be RS422 ports */
#include "pve500.lh"
#include "machine/mb8421.h"
+#include "machine/eepromser.h"
#define IO_EXPANDER_PORTA 0
#define IO_EXPANDER_PORTB 1
@@ -64,6 +66,7 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_subcpu(*this, "subcpu")
+ , m_eeprom(*this, "eeprom")
, m_buzzer(*this, "buzzer")
{ }
@@ -74,12 +77,15 @@ public:
DECLARE_WRITE8_MEMBER(io_expander_w);
DECLARE_READ8_MEMBER(io_expander_r);
+ DECLARE_WRITE8_MEMBER(eeprom_w);
+ DECLARE_READ8_MEMBER(eeprom_r);
DECLARE_DRIVER_INIT(pve500);
private:
virtual void machine_start();
virtual void machine_reset();
required_device<tmpz84c015_device> m_maincpu;
required_device<tmpz84c015_device> m_subcpu;
+ required_device<eeprom_serial_er5911_device> m_eeprom;
required_device<beep_device> m_buzzer;
UINT8 io_SEL, io_LD, io_LE, io_SC, io_KY;
};
@@ -110,7 +116,7 @@ static ADDRESS_MAP_START(maincpu_io, AS_IO, 8, pve500_state)
ADDRESS_MAP_END
static ADDRESS_MAP_START(maincpu_prg, AS_PROGRAM, 8, pve500_state)
- AM_RANGE (0x0000, 0xBFFF) AM_ROM // ICB7: 48kbytes EEPROM
+ AM_RANGE (0x0000, 0xBFFF) AM_ROM // ICB7: 48kbytes EPROM
AM_RANGE (0xC000, 0xDFFF) AM_RAM // ICD6: 8kbytes of RAM
AM_RANGE (0xE000, 0xE7FF) AM_MIRROR(0x1800) AM_DEVREADWRITE("mb8421", mb8421_device, left_r, left_w)
ADDRESS_MAP_END
@@ -120,7 +126,7 @@ static ADDRESS_MAP_START(subcpu_io, AS_IO, 8, pve500_state)
ADDRESS_MAP_END
static ADDRESS_MAP_START(subcpu_prg, AS_PROGRAM, 8, pve500_state)
- AM_RANGE (0x0000, 0x7FFF) AM_ROM // ICG5: 32kbytes EEPROM
+ AM_RANGE (0x0000, 0x7FFF) AM_ROM // ICG5: 32kbytes EPROM
AM_RANGE (0x8000, 0xBFFF) AM_MIRROR(0x3FF8) AM_READWRITE(io_expander_r, io_expander_w) // ICG3: I/O Expander
AM_RANGE (0xC000, 0xC7FF) AM_MIRROR(0x3800) AM_DEVREADWRITE("mb8421", mb8421_device, right_r, right_w)
ADDRESS_MAP_END
@@ -246,6 +252,18 @@ WRITE_LINE_MEMBER(pve500_state::mb8421_intr)
m_subcpu->trg1(state);
}
+READ8_MEMBER(pve500_state::eeprom_r)
+{
+ return (m_eeprom->ready_read() << 1) | m_eeprom->do_read();
+}
+
+WRITE8_MEMBER(pve500_state::eeprom_w)
+{
+ m_eeprom->di_write( (data & (1 << 2)) ? ASSERT_LINE : CLEAR_LINE);
+ m_eeprom->clk_write( (data & (1 << 3)) ? ASSERT_LINE : CLEAR_LINE);
+ m_eeprom->cs_write( (data & (1 << 4)) ? ASSERT_LINE : CLEAR_LINE);
+}
+
READ8_MEMBER(pve500_state::io_expander_r)
{
// printf("READ IO_EXPANDER_PORT%c\n", 'A'+offset);
@@ -356,6 +374,18 @@ static MACHINE_CONFIG_START( pve500, pve500_state )
MCFG_TMPZ84C015_OUT_TXDA_CB(DEVWRITELINE("switcher", rs232_port_device, write_txd))
MCFG_TMPZ84C015_OUT_TXDB_CB(DEVWRITELINE("serial_mixer", rs232_port_device, write_txd))
+ // PIO callbacks
+ MCFG_TMPZ84C015_IN_PA_CB(READ8(pve500_state, eeprom_r))
+ MCFG_TMPZ84C015_OUT_PA_CB(WRITE8(pve500_state, eeprom_w))
+
+ /* Search Dial MCUs */
+ MCFG_CPU_ADD("dial_mcu_left", MB88201, XTAL_4MHz) /* PLAYER DIAL MCU */
+ MCFG_CPU_ADD("dial_mcu_right", MB88201, XTAL_4MHz) /* RECORDER DIAL MCU */
+
+ /* Serial EEPROM (128 bytes, 8-bit data organization) */
+ /* The EEPROM stores the setup data */
+ MCFG_EEPROM_SERIAL_MSM16911_8BIT_ADD("eeprom")
+
/* FIX-ME: These are actually RS422 ports (except EDL IN/OUT which is indeed an RS232 port)*/
MCFG_RS232_PORT_ADD("recorder", default_rs232_devices, NULL)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("maincpu", tmpz84c015_device, rxa_w))
@@ -396,6 +426,15 @@ ROM_START( pve500 )
ROM_REGION( 0x8000, "subcpu", 0 )
ROM_LOAD("pve500.icg5", 0x00000, 0x8000, CRC(28cca60a) SHA1(308d70062653769250327ede7a4e1a8a76fc9ab9) ) //32kbyte sub-cpu program
+
+ ROM_REGION( 0x200, "dial_mcu_left", 0 ) /* PLAYER DIAL MCU */
+ ROM_LOAD( "pve500.icd3", 0x0000, 0x0200, NO_DUMP )
+
+ ROM_REGION( 0x200, "dial_mcu_right", 0 ) /* RECORDER DIAL MCU */
+ ROM_LOAD( "pve500.icc3", 0x0000, 0x0200, NO_DUMP )
+
+ ROM_REGION( 0x80, "eeprom", 0 ) /* The EEPROM stores the setup data */
+ ROM_LOAD( "pve500.ice3", 0x0000, 0x080, NO_DUMP )
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */