bbc: Added ATPL AutoPrommer and User Port Splitter devices.

This commit is contained in:
Nigel Barnes 2019-05-11 17:48:40 +01:00
parent a4503eb57a
commit 037714e412
7 changed files with 443 additions and 2 deletions

View File

@ -361,6 +361,8 @@ if (BUSES["BBC_1MHZBUS"]~=null) then
files {
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/1mhzbus.cpp",
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/1mhzbus.h",
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/autoprom.cpp",
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/autoprom.h",
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/beebsid.cpp",
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/beebsid.h",
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/emrmidi.cpp",
@ -446,6 +448,8 @@ if (BUSES["BBC_USERPORT"]~=null) then
MAME_DIR .. "src/devices/bus/bbc/userport/beebspch.h",
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.cpp",
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.h",
MAME_DIR .. "src/devices/bus/bbc/userport/usersplit.cpp",
MAME_DIR .. "src/devices/bus/bbc/userport/usersplit.h",
MAME_DIR .. "src/devices/bus/bbc/userport/cfa3000kbd.cpp",
MAME_DIR .. "src/devices/bus/bbc/userport/cfa3000kbd.h",
}

View File

@ -130,7 +130,10 @@ void bbc_1mhzbus_slot_device::jim_w(offs_t offset, uint8_t data)
// slot devices
#include "autoprom.h"
//#include "beebscan.h"
//#include "teletext.h"
//#include "digitiser.h"
#include "emrmidi.h"
#include "ieee488.h"
#include "m2000.h"
@ -148,11 +151,14 @@ void bbc_1mhzbus_slot_device::jim_w(offs_t offset, uint8_t data)
void bbc_1mhzbus_devices(device_slot_interface &device)
{
// device.option_add("teletext", BBC_TELETEXT); /* Acorn ANE01 Teletext Adapter */
//device.option_add("teletext", BBC_TELETEXT); /* Acorn ANE01 Teletext Adapter */
device.option_add("ieee488", BBC_IEEE488); /* Acorn ANK01 IEEE488 Interface */
//device.option_add("m500", BBC_M500); /* Acorn ANV02 Music 500 */
//device.option_add("awdd", BBC_AWDD); /* Acorn Winchester 110/130 */
device.option_add("autoprom", BBC_AUTOPROM); /* ATPL AutoPrommer */
//device.option_add("beebscan", BBC_BEEBSCAN); /* Beeb HandScan */
device.option_add("b488", BBC_B488); /* Aries B488 */
//device.option_add("videodig", BBC_VIDEODIG); /* Video Digitiser (RH Electronics) */
device.option_add("emrmidi", BBC_EMRMIDI); /* EMR Midi Interface */
//device.option_add("procyon", BBC_PROCYON); /* CST Procyon IEEE Interface */
//device.option_add("twdd", BBC_TWDD); /* Technomatic Winchester (Akhter Host Adaptor + ABD4070 */
@ -172,6 +178,7 @@ void bbcm_1mhzbus_devices(device_slot_interface &device)
//device.option_add("m500", BBC_M500); /* Acorn ANV02 Music 500 */
//device.option_add("awdd", BBC_AWDD); /* Acorn Winchester 110/130 */
device.option_add("b488", BBC_B488); /* Aries B488 */
//device.option_add("videodig", BBC_VIDEODIG); /* Video Digitiser (RH Electronics) */
device.option_add("emrmidi", BBC_EMRMIDI); /* EMR Midi Interface */
//device.option_add("procyon", BBC_PROCYON); /* CST Procyon IEEE Interface */
//device.option_add("twdd", BBC_TWDD); /* Technomatic Winchester (Akhter Host Adaptor + ABD4070 */

View File

@ -0,0 +1,188 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
ATPL AutoPrommer - Eprom Programmer with Auto-Run
Emulation is purely based upon contents of boot ROM. The manual
is apparently quite detailed, according to reviews, but has not
been found.
Emulating an EPROM programmer is not very useful but the Auto-Run
on this device makes it different. The Auto-Run ROMs are paged into
JIM at startup, and as very few devices make use of this feature
it provides a good test case.
**********************************************************************/
#include "emu.h"
#include "autoprom.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(BBC_AUTOPROM, bbc_autoprom_device, "bbc_autoprom", "ATPL AutoPrommer")
//-------------------------------------------------
// INPUT_PORTS( autoprom )
//-------------------------------------------------
static INPUT_PORTS_START( autoprom )
PORT_START("boot")
PORT_DIPNAME(0x03, 0x01, "EPROM") PORT_DIPLOCATION("BOOT:1,2")
PORT_DIPSETTING(0x00, "Disable Auto-Run")
PORT_DIPSETTING(0x01, "4K")
PORT_DIPSETTING(0x02, "8K")
PORT_DIPSETTING(0x03, "16K")
PORT_DIPNAME(0x04, 0x04, "Program") PORT_DIPLOCATION("BOOT:3")
PORT_DIPSETTING(0x00, "BASIC")
PORT_DIPSETTING(0x04, "M/C")
PORT_DIPNAME(0x08, 0x08, "OS") PORT_DIPLOCATION("BOOT:4")
PORT_DIPSETTING(0x00, "0.1")
PORT_DIPSETTING(0x08, "1.x")
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor bbc_autoprom_device::device_input_ports() const
{
return INPUT_PORTS_NAME( autoprom );
}
//-------------------------------------------------
// ROM( autoprom )
//-------------------------------------------------
ROM_START( autoprom )
ROM_REGION(0x8000, "autorun", 0)
// 2 Auto-Run sockets, each can take 2732/2764/27128 types
ROM_LOAD("prommer.rom", 0x0000, 0x2000, CRC(9ec497ec) SHA1(48d76606d55bfce866baac1d9ac6390f5243c244))
ROM_RELOAD(0x2000, 0x2000)
ROM_LOAD("boot.rom", 0x4000, 0x1000, CRC(0843bb06) SHA1(9f584f0cc54bbbf6128e96f5f97fa811cc3d68ce))
ROM_RELOAD(0x5000, 0x1000)
ROM_RELOAD(0x6000, 0x1000)
ROM_RELOAD(0x7000, 0x1000)
ROM_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
void bbc_autoprom_device::device_add_mconfig(machine_config &config)
{
}
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const tiny_rom_entry *bbc_autoprom_device::device_rom_region() const
{
return ROM_NAME( autoprom );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// bbc_autoprom_device - constructor
//-------------------------------------------------
bbc_autoprom_device::bbc_autoprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BBC_AUTOPROM, tag, owner, clock)
, device_bbc_1mhzbus_interface(mconfig, *this)
, m_autorun(*this, "autorun")
, m_boot(*this, "boot")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void bbc_autoprom_device::device_start()
{
save_item(NAME(m_rom_offset));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void bbc_autoprom_device::device_reset()
{
m_slot->irq_w(ASSERT_LINE);
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
uint8_t bbc_autoprom_device::fred_r(offs_t offset)
{
uint8_t data = 0xff;
switch (offset)
{
case 0xc0:
data = m_unk_c0;
break;
case 0xc1:
data = m_autorun->base()[m_rom_offset];
break;
case 0xcc:
break;
case 0xd0:
data = (m_rom_offset >> 8) & 0xff;
break;
case 0xd1:
data = (m_rom_offset >> 0) & 0xff;
break;
case 0xdc:
break;
}
return data;
}
void bbc_autoprom_device::fred_w(offs_t offset, uint8_t data)
{
switch (offset)
{
case 0xc0:
m_unk_c0 = data;
break;
case 0xc1:
break;
case 0xcc:
break;
case 0xd0:
m_rom_offset = (m_rom_offset & 0x00ff) | (data << 8);
break;
case 0xd1:
m_rom_offset = (m_rom_offset & 0xff00) | (data << 0);
break;
case 0xdc:
break;
}
}
uint8_t bbc_autoprom_device::jim_r(offs_t offset)
{
// not known when to clear the IRQ, but has been acknowledged to get here
if (!machine().side_effects_disabled())
{
if (offset == 0xfe) m_slot->irq_w(CLEAR_LINE);
}
// the switches seem to determine which page of the boot ROM is accessed via JIM
return m_autorun->base()[0x4000 | ((m_boot->read() << 8) + offset)];
}

View File

@ -0,0 +1,55 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
ATPL AutoPrommer - Eprom Programmer with Auto-Run
**********************************************************************/
#ifndef MAME_BUS_BBC_1MHZBUS_AUTOPROM_H
#define MAME_BUS_BBC_1MHZBUS_AUTOPROM_H
#include "1mhzbus.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class bbc_autoprom_device :
public device_t,
public device_bbc_1mhzbus_interface
{
public:
// construction/destruction
bbc_autoprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
virtual uint8_t fred_r(offs_t offset) override;
virtual void fred_w(offs_t offset, uint8_t data) override;
virtual uint8_t jim_r(offs_t offset) override;
private:
required_memory_region m_autorun;
required_ioport m_boot;
uint16_t m_rom_offset;
uint8_t m_unk_c0;
};
// device type definition
DECLARE_DEVICE_TYPE(BBC_AUTOPROM, bbc_autoprom_device)
#endif // MAME_BUS_BBC_1MHZBUS_AUTOPROM_H

View File

@ -116,16 +116,21 @@ void bbc_userport_slot_device::pb_w(uint8_t data)
// slot devices
#include "beebspch.h"
//#include "digitiser.h"
#include "pointer.h"
#include "usersplit.h"
#include "cfa3000kbd.h"
void bbc_userport_devices(device_slot_interface &device)
{
device.option_add("amxmouse", BBC_AMXMOUSE); /* AMX Mouse */
//device.option_add("atr", BBC_ATR); /* Advanced Teletext Receiver (GIS) */
device.option_add("beebspch", BBC_BEEBSPCH); /* Beeb Speech Synthesiser (Watford Electronics) */
//device.option_add("beebvdig", BBC_BEEBVDIG); /* Beeb Video Digitiser (Watford Electronics) */
device.option_add("m512mouse", BBC_M512MOUSE); /* Acorn Mouse (provided with Master 512) */
device.option_add("tracker", BBC_TRACKER); /* Marconi RB2 Tracker Ball / Acorn Tracker Ball */
// device.option_add("music4000", BBC_MUSIC4000); /* Hybrid Music 4000 Keyboard */
device.option_add("usersplit", BBC_USERSPLIT); /*User Port Splitter (Watford Electronics) */
//device.option_add("music4000", BBC_MUSIC4000); /* Hybrid Music 4000 Keyboard */
device.option_add("cfa3000kbd", CFA3000_KBD); /* Henson CFA 3000 Keyboard */
}

View File

@ -0,0 +1,123 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Watford Electronics User Port Splitter
**********************************************************************/
#include "emu.h"
#include "usersplit.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(BBC_USERSPLIT, bbc_usersplit_device, "bbc_usersplit", "BBC Micro User Port Splitter")
//-------------------------------------------------
// INPUT_PORTS( usersplit )
//-------------------------------------------------
static INPUT_PORTS_START( usersplit )
PORT_START("SELECT")
PORT_CONFNAME(0x01, 0x00, "User Port") PORT_CHANGED_MEMBER(DEVICE_SELF, bbc_usersplit_device, userport_changed, 0)
PORT_CONFSETTING(0x00, "A")
PORT_CONFSETTING(0x01, "B")
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor bbc_usersplit_device::device_input_ports() const
{
return INPUT_PORTS_NAME( usersplit );
}
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
void bbc_usersplit_device::device_add_mconfig(machine_config &config)
{
/* user port A */
BBC_USERPORT_SLOT(config, m_userport[0], bbc_userport_devices, nullptr);
m_userport[0]->cb1_handler().set(FUNC(bbc_usersplit_device::cb1a_w));
m_userport[0]->cb2_handler().set(FUNC(bbc_usersplit_device::cb2a_w));
/* user port B */
BBC_USERPORT_SLOT(config, m_userport[1], bbc_userport_devices, nullptr);
m_userport[1]->cb1_handler().set(FUNC(bbc_usersplit_device::cb1b_w));
m_userport[1]->cb2_handler().set(FUNC(bbc_usersplit_device::cb2b_w));
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// bbc_usersplit_device - constructor
//-------------------------------------------------
bbc_usersplit_device::bbc_usersplit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BBC_USERSPLIT, tag, owner, clock)
, device_bbc_userport_interface(mconfig, *this)
, m_userport(*this, "userport%u", 1)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void bbc_usersplit_device::device_start()
{
m_selected = 0;
save_item(NAME(m_selected));
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
uint8_t bbc_usersplit_device::pb_r()
{
return m_userport[m_selected]->pb_r();
}
void bbc_usersplit_device::pb_w(uint8_t data)
{
m_userport[m_selected]->pb_w(data);
}
WRITE_LINE_MEMBER(bbc_usersplit_device::cb1a_w)
{
if (m_selected == 0x00)
m_slot->cb1_w(state);
}
WRITE_LINE_MEMBER(bbc_usersplit_device::cb2a_w)
{
if (m_selected == 0x00)
m_slot->cb2_w(state);
}
WRITE_LINE_MEMBER(bbc_usersplit_device::cb1b_w)
{
if (m_selected == 0x01)
m_slot->cb1_w(state);
}
WRITE_LINE_MEMBER(bbc_usersplit_device::cb2b_w)
{
if (m_selected == 0x01)
m_slot->cb2_w(state);
}

View File

@ -0,0 +1,59 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Watford Electronics User Port Splitter
**********************************************************************/
#ifndef MAME_BUS_BBC_USERPORT_USERSPLIT_H
#define MAME_BUS_BBC_USERPORT_USERSPLIT_H
#pragma once
#include "userport.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> bbc_usersplit_device
class bbc_usersplit_device :
public device_t,
public device_bbc_userport_interface
{
public:
// construction/destruction
bbc_usersplit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_INPUT_CHANGED_MEMBER(userport_changed) { m_selected = newval; }
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual uint8_t pb_r() override;
virtual void pb_w(uint8_t data) override;
private:
DECLARE_WRITE_LINE_MEMBER(cb1a_w);
DECLARE_WRITE_LINE_MEMBER(cb2a_w);
DECLARE_WRITE_LINE_MEMBER(cb1b_w);
DECLARE_WRITE_LINE_MEMBER(cb2b_w);
required_device_array<bbc_userport_slot_device, 2> m_userport;
uint8_t m_selected;
};
// device type definition
DECLARE_DEVICE_TYPE(BBC_USERSPLIT, bbc_usersplit_device)
#endif // MAME_BUS_BBC_USERPORT_USERSPLIT_H