mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
New machines marked as NOT_WORKING
---------------------------------- MiniB Computer [Nigel Barnes, Sprow]
This commit is contained in:
parent
72070febcd
commit
8d06c14709
@ -667,6 +667,10 @@ 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/24bbc.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/24bbc.h",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/2ndserial.cpp",
|
||||
MAME_DIR .. "src/devices/bus/bbc/1mhzbus/2ndserial.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/beebopl.cpp",
|
||||
|
@ -107,6 +107,8 @@ void bbc_1mhzbus_slot_device::jim_w(offs_t offset, uint8_t data)
|
||||
|
||||
|
||||
// slot devices
|
||||
#include "24bbc.h"
|
||||
#include "2ndserial.h"
|
||||
#include "autoprom.h"
|
||||
#include "cc500.h"
|
||||
#include "cisco.h"
|
||||
@ -141,6 +143,8 @@ void bbc_1mhzbus_devices(device_slot_interface &device)
|
||||
device.option_add("m500", BBC_M500); /* Acorn ANV02 Music 500 */
|
||||
device.option_add("awhd", BBC_AWHD); /* Acorn Winchester Disc */
|
||||
device.option_add("autoprom", BBC_AUTOPROM); /* ATPL AutoPrommer */
|
||||
device.option_add("24bbc", BBC_24BBC); /* Sprow 24bBC/RAM Disc */
|
||||
device.option_add("2ndserial", BBC_2NDSERIAL); /* Sprow 2nd Serial Port */
|
||||
device.option_add("beebide", BBC_BEEBIDE); /* Sprow BeebIDE 16-bit */
|
||||
device.option_add("ide8", BBC_IDE8); /* RetroClinic BBC 8-bit IDE */
|
||||
//device.option_add("beebscan", BBC_BEEBSCAN); /* Beeb HandScan */
|
||||
@ -174,6 +178,8 @@ void bbcm_1mhzbus_devices(device_slot_interface &device)
|
||||
//device.option_add("teletext", BBC_TELETEXT); /* Acorn ANE01 Teletext Adapter */
|
||||
device.option_add("ieee488", BBC_IEEE488); /* Acorn ANK01 IEEE488 Interface */
|
||||
device.option_add("awhd", BBC_AWHD); /* Acorn Winchester Disc */
|
||||
device.option_add("24bbc", BBC_24BBC); /* Sprow 24bBC/RAM Disc */
|
||||
device.option_add("2ndserial", BBC_2NDSERIAL); /* Sprow 2nd Serial Port */
|
||||
device.option_add("beebide", BBC_BEEBIDE); /* Sprow BeebIDE 16-bit */
|
||||
device.option_add("ide8", BBC_IDE8); /* RetroClinic BBC 8-bit IDE */
|
||||
device.option_add("b488", BBC_B488); /* Aries B488 */
|
||||
|
142
src/devices/bus/bbc/1mhzbus/24bbc.cpp
Normal file
142
src/devices/bus/bbc/1mhzbus/24bbc.cpp
Normal file
@ -0,0 +1,142 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Sprow 24bBC/RAM Disc Board
|
||||
|
||||
http://www.sprow.co.uk/bbc/ramdisc.htm
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "24bbc.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(BBC_24BBC, bbc_24bbc_device, "bbc_24bbc", "Sprow 24bBC/RAM Disc Board");
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( ramfs )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START(ramfs)
|
||||
ROM_REGION(0x4000, "exp_rom", 0)
|
||||
ROM_LOAD("ramfs120.rom", 0x0000, 0x4000, CRC(782e6386) SHA1(65493cc1f6ae31cf39298d67dad42ea23be4cae6))
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_24bbc_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
BBC_1MHZBUS_SLOT(config, m_1mhzbus, DERIVED_CLOCK(1, 1), bbc_1mhzbus_devices, nullptr);
|
||||
m_1mhzbus->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
|
||||
m_1mhzbus->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::nmi_w));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const tiny_rom_entry* bbc_24bbc_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(ramfs);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_24bbc_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_24bbc_device::bbc_24bbc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, BBC_24BBC, tag, owner, clock)
|
||||
, device_bbc_1mhzbus_interface(mconfig, *this)
|
||||
, m_1mhzbus(*this, "1mhzbus")
|
||||
, m_ram_addr(0)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_24bbc_device::device_start()
|
||||
{
|
||||
m_ram = make_unique_clear<uint8_t[]>(0x100000);
|
||||
|
||||
/* register for save states */
|
||||
save_item(NAME(m_ram_addr));
|
||||
save_pointer(NAME(m_ram), 0x100000);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
uint8_t bbc_24bbc_device::fred_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00:
|
||||
data = (m_ram_addr & 0x0000ff);
|
||||
break;
|
||||
case 0x01:
|
||||
data = (m_ram_addr & 0x00ff00) >> 8;
|
||||
break;
|
||||
case 0x02:
|
||||
data = (m_ram_addr & 0xff0000) >> 16;
|
||||
break;
|
||||
case 0x03:
|
||||
data = m_ram[m_ram_addr & 0xfffff];
|
||||
break;
|
||||
}
|
||||
|
||||
data &= m_1mhzbus->fred_r(offset);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void bbc_24bbc_device::fred_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00:
|
||||
m_ram_addr = (m_ram_addr & 0xffff00) | data;
|
||||
break;
|
||||
case 0x01:
|
||||
m_ram_addr = (m_ram_addr & 0xff00ff) | (data << 8);
|
||||
break;
|
||||
case 0x02:
|
||||
m_ram_addr = (m_ram_addr & 0x00ffff) | (data << 16);
|
||||
break;
|
||||
case 0x03:
|
||||
m_ram[m_ram_addr & 0xfffff] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
m_1mhzbus->fred_w(offset, data);
|
||||
}
|
||||
|
||||
uint8_t bbc_24bbc_device::jim_r(offs_t offset)
|
||||
{
|
||||
return m_1mhzbus->jim_r(offset);
|
||||
}
|
||||
|
||||
void bbc_24bbc_device::jim_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_1mhzbus->jim_w(offset, data);
|
||||
}
|
51
src/devices/bus/bbc/1mhzbus/24bbc.h
Normal file
51
src/devices/bus/bbc/1mhzbus/24bbc.h
Normal file
@ -0,0 +1,51 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Sprow 24bBC/RAM Disc Board
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#ifndef MAME_BUS_BBC_1MHZBUS_24BBC_H
|
||||
#define MAME_BUS_BBC_1MHZBUS_24BBC_H
|
||||
|
||||
#include "1mhzbus.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class bbc_24bbc_device : public device_t, public device_bbc_1mhzbus_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_24bbc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry* device_rom_region() 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;
|
||||
virtual void jim_w(offs_t offset, uint8_t data) override;
|
||||
|
||||
private:
|
||||
required_device<bbc_1mhzbus_slot_device> m_1mhzbus;
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_ram;
|
||||
|
||||
uint32_t m_ram_addr;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(BBC_24BBC, bbc_24bbc_device);
|
||||
|
||||
|
||||
#endif /* MAME_BUS_BBC_1MHZBUS_24BBC_H */
|
200
src/devices/bus/bbc/1mhzbus/2ndserial.cpp
Normal file
200
src/devices/bus/bbc/1mhzbus/2ndserial.cpp
Normal file
@ -0,0 +1,200 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Sprow 2nd Serial Port
|
||||
|
||||
http://www.sprow.co.uk/bbc/extraserial.htm
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "2ndserial.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(BBC_2NDSERIAL, bbc_2ndserial_device, "bbc_2ndserial", "Sprow 2nd Serial Port");
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// INPUT_PORTS( 2ndserial )
|
||||
//-------------------------------------------------
|
||||
|
||||
INPUT_PORTS_START( 2ndserial )
|
||||
PORT_START("LINKS")
|
||||
PORT_CONFNAME(0x03, 0x00, "Base Address")
|
||||
PORT_CONFSETTING(0x00, "&FC60")
|
||||
PORT_CONFSETTING(0x01, "&FC64")
|
||||
PORT_CONFSETTING(0x02, "&FC68")
|
||||
PORT_CONFSETTING(0x03, "&FC6C")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
ioport_constructor bbc_2ndserial_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( 2ndserial );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( 2ndserial )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( 2ndserial )
|
||||
ROM_REGION(0x2000, "exp_rom", 0)
|
||||
ROM_LOAD("2ndserial.rom", 0x0000, 0x2000, CRC(e58cdb76) SHA1(9ebbe845734d77ebf1730ea622ce2db43f18b1c2))
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_2ndserial_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
ACIA6850(config, m_acia);
|
||||
m_acia->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd));
|
||||
m_acia->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts));
|
||||
m_acia->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
|
||||
|
||||
RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
|
||||
m_rs232->rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
|
||||
m_rs232->cts_handler().set(m_acia, FUNC(acia6850_device::write_cts));
|
||||
|
||||
CLOCK(config, m_acia_clock_tx, 2.4576_MHz_XTAL);
|
||||
m_acia_clock_tx->signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
|
||||
CLOCK(config, m_acia_clock_rx, 2.4576_MHz_XTAL);
|
||||
m_acia_clock_rx->signal_handler().set(m_acia, FUNC(acia6850_device::write_rxc));
|
||||
|
||||
BBC_1MHZBUS_SLOT(config, m_1mhzbus, DERIVED_CLOCK(1, 1), bbc_1mhzbus_devices, nullptr);
|
||||
m_1mhzbus->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
|
||||
m_1mhzbus->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::nmi_w));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const tiny_rom_entry* bbc_2ndserial_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(2ndserial);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// bbc_2ndserial_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bbc_2ndserial_device::bbc_2ndserial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, BBC_2NDSERIAL, tag, owner, clock)
|
||||
, device_bbc_1mhzbus_interface(mconfig, *this)
|
||||
, m_1mhzbus(*this, "1mhzbus")
|
||||
, m_acia(*this, "acia6850")
|
||||
, m_acia_clock_tx(*this, "acia_clock_tx")
|
||||
, m_acia_clock_rx(*this, "acia_clock_rx")
|
||||
, m_rs232(*this, "rs232")
|
||||
, m_links(*this, "LINKS")
|
||||
, m_control(0)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void bbc_2ndserial_device::device_start()
|
||||
{
|
||||
/* register for save states */
|
||||
save_item(NAME(m_control));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
uint8_t bbc_2ndserial_device::fred_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
uint8_t base = 0x60 + (m_links->read() << 2);
|
||||
|
||||
if ((offset & 0xfc) == base)
|
||||
{
|
||||
switch (offset & 0x02)
|
||||
{
|
||||
case 0x00:
|
||||
data = m_acia->read(offset & 1);
|
||||
break;
|
||||
case 0x02:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
data &= m_1mhzbus->fred_r(offset);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void bbc_2ndserial_device::fred_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
static const int serial_clocks[8] =
|
||||
{
|
||||
1, // 000
|
||||
16, // 001
|
||||
4, // 010
|
||||
128, // 011
|
||||
2, // 100
|
||||
64, // 101
|
||||
8, // 110
|
||||
256 // 111
|
||||
};
|
||||
|
||||
uint8_t base = 0x60 + (m_links->read() << 2);
|
||||
|
||||
if ((offset & 0xfc) == base)
|
||||
{
|
||||
switch (offset & 0x02)
|
||||
{
|
||||
case 0x00:
|
||||
m_acia->write(offset & 1, data);
|
||||
break;
|
||||
case 0x02:
|
||||
m_control = data;
|
||||
m_acia_clock_tx->set_clock_scale((double) 1 / serial_clocks[data & 0x07] );
|
||||
m_acia_clock_rx->set_clock_scale((double) 1 / serial_clocks[data & 0x07] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_1mhzbus->fred_w(offset, data);
|
||||
}
|
||||
|
||||
uint8_t bbc_2ndserial_device::jim_r(offs_t offset)
|
||||
{
|
||||
return m_1mhzbus->jim_r(offset);
|
||||
}
|
||||
|
||||
void bbc_2ndserial_device::jim_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_1mhzbus->jim_w(offset, data);
|
||||
}
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(bbc_2ndserial_device::write_acia_clock)
|
||||
{
|
||||
m_acia->write_txc(state);
|
||||
m_acia->write_rxc(state);
|
||||
}
|
60
src/devices/bus/bbc/1mhzbus/2ndserial.h
Normal file
60
src/devices/bus/bbc/1mhzbus/2ndserial.h
Normal file
@ -0,0 +1,60 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/**********************************************************************
|
||||
|
||||
Sprow 2nd Serial Port
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
#ifndef MAME_BUS_BBC_1MHZBUS_2NDSERIAL_H
|
||||
#define MAME_BUS_BBC_1MHZBUS_2NDSERIAL_H
|
||||
|
||||
#include "1mhzbus.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/clock.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class bbc_2ndserial_device : public device_t, public device_bbc_1mhzbus_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
bbc_2ndserial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() 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;
|
||||
virtual void jim_w(offs_t offset, uint8_t data) override;
|
||||
|
||||
private:
|
||||
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
|
||||
|
||||
required_device<bbc_1mhzbus_slot_device> m_1mhzbus;
|
||||
required_device<acia6850_device> m_acia;
|
||||
required_device<clock_device> m_acia_clock_tx;
|
||||
required_device<clock_device> m_acia_clock_rx;
|
||||
required_device<rs232_port_device> m_rs232;
|
||||
required_ioport m_links;
|
||||
|
||||
uint8_t m_control;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(BBC_2NDSERIAL, bbc_2ndserial_device);
|
||||
|
||||
|
||||
#endif /* MAME_BUS_BBC_1MHZBUS_2NDSERIAL_H */
|
169
src/mame/homebrew/minib.cpp
Normal file
169
src/mame/homebrew/minib.cpp
Normal file
@ -0,0 +1,169 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nigel Barnes
|
||||
/******************************************************************************
|
||||
|
||||
http://www.sprow.co.uk/bbc/minib.htm
|
||||
|
||||
The board comes with the following features:
|
||||
- 6502A processor, at 2MHz (slowed to 1MHz during i/o accesses)
|
||||
- 6522 versatile interface adapter for timers and interruptible latched i/o ports
|
||||
- Interface for a 20x4 LCD display
|
||||
- 32kbyte high speed SRAM
|
||||
- 128kbyte in circuit programmable flash ROM (16k for main operating system, 112k for other ROM based applications)
|
||||
- PS/2 keyboard interface
|
||||
- Real time clock (year 2000 compliant), on a shared I²C bus
|
||||
- Full implementation of the BBC micro's 1MHz expansion bus for add on boards
|
||||
- Power supply monitor/reset device
|
||||
|
||||
TODO:
|
||||
- fix keyboard
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "bus/pc_kbd/pc_kbdc.h"
|
||||
#include "bus/pc_kbd/keyboards.h"
|
||||
|
||||
// slot devices
|
||||
#include "bus/bbc/1mhzbus/1mhzbus.h"
|
||||
#include "bus/bbc/1mhzbus/24bbc.h"
|
||||
#include "bus/bbc/1mhzbus/2ndserial.h"
|
||||
#include "bus/bbc/1mhzbus/ide.h"
|
||||
#include "bus/bbc/userport/userport.h"
|
||||
#include "bus/bbc/userport/lcd.h"
|
||||
|
||||
|
||||
class minib_state : public driver_device
|
||||
{
|
||||
public:
|
||||
minib_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_rombank(*this, "rombank")
|
||||
, m_kbd(*this, "kbd")
|
||||
{ }
|
||||
|
||||
void minib(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<m6502_device> m_maincpu;
|
||||
required_memory_bank m_rombank;
|
||||
required_device<pc_kbdc_device> m_kbd;
|
||||
|
||||
void mem_map(address_map &map);
|
||||
|
||||
//uint8_t pa_r();
|
||||
void pa_w(uint8_t data);
|
||||
};
|
||||
|
||||
|
||||
void minib_state::mem_map(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
map(0x0000, 0x7fff).ram();
|
||||
map(0x8000, 0xbfff).bankr(m_rombank);
|
||||
map(0xc000, 0xffff).rom().region("flash", 0x1c000);
|
||||
map(0xfc00, 0xfcff).rw("1mhzbus", FUNC(bbc_1mhzbus_slot_device::fred_r), FUNC(bbc_1mhzbus_slot_device::fred_w));
|
||||
map(0xfd00, 0xfdff).rw("1mhzbus", FUNC(bbc_1mhzbus_slot_device::jim_r), FUNC(bbc_1mhzbus_slot_device::jim_w));
|
||||
map(0xfe30, 0xfe3f).lw8(NAME([this] (u8 data) { m_rombank->set_entry(data & 0x07); }));
|
||||
map(0xfe60, 0xfe6f).m("via", FUNC(via6522_device::map));
|
||||
}
|
||||
|
||||
|
||||
void minib_state::machine_start()
|
||||
{
|
||||
m_rombank->configure_entries(0, 8, memregion("flash")->base(), 0x4000);
|
||||
}
|
||||
|
||||
void minib_state::machine_reset()
|
||||
{
|
||||
m_rombank->set_entry(0);
|
||||
}
|
||||
|
||||
|
||||
//uint8_t minib_state::pa_r()
|
||||
//{
|
||||
// uint8_t data = 0x00;
|
||||
//
|
||||
// data |= m_kbd->data_signal() << 1;
|
||||
//
|
||||
// return data;
|
||||
//}
|
||||
|
||||
void minib_state::pa_w(uint8_t data)
|
||||
{
|
||||
// PA0 = SDA drive*
|
||||
// PA1 = PS/2 data sense
|
||||
// PA2 = SDA sense
|
||||
// PA3 = SCL
|
||||
// PA4 = PS/2 clock out*
|
||||
// PA5 = PS/2 data out*
|
||||
// CA1 = PS/2 clock sense
|
||||
// CA2, PA6, PA7, are spare and just go to a header
|
||||
|
||||
logerror("pa_w: clk %d data %d\n", BIT(data, 4), BIT(data, 5));
|
||||
m_kbd->data_write_from_mb(!BIT(data, 4));
|
||||
m_kbd->clock_write_from_mb(!BIT(data, 5));
|
||||
}
|
||||
|
||||
|
||||
static void minib_1mhzbus_devices(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("24bbc", BBC_24BBC); // Sprow 24bBC/RAM Disc
|
||||
device.option_add("2ndserial", BBC_2NDSERIAL); // Sprow 2nd Serial Port
|
||||
device.option_add("beebide", BBC_BEEBIDE); // Sprow BeebIDE 16-bit
|
||||
}
|
||||
|
||||
static void minib_userport_devices(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("lcd", BBC_LCD); // Sprow LCD Display
|
||||
}
|
||||
|
||||
|
||||
void minib_state::minib(machine_config &config)
|
||||
{
|
||||
M6502(config, m_maincpu, 16_MHz_XTAL / 8);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &minib_state::mem_map);
|
||||
|
||||
INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set_inputline(m_maincpu, M6502_IRQ_LINE);
|
||||
|
||||
via6522_device &via(MOS6522(config, "via", 16_MHz_XTAL / 8));
|
||||
via.readpb_handler().set("userport", FUNC(bbc_userport_slot_device::pb_r));
|
||||
via.writepb_handler().set("userport", FUNC(bbc_userport_slot_device::pb_w));
|
||||
via.cb1_handler().set("userport", FUNC(bbc_userport_slot_device::write_cb1));
|
||||
via.cb2_handler().set("userport", FUNC(bbc_userport_slot_device::write_cb2));
|
||||
//via.readpa_handler().set(FUNC(minib_state::pa_r));
|
||||
via.writepa_handler().set(FUNC(minib_state::pa_w));
|
||||
via.irq_handler().set("irqs", FUNC(input_merger_device::in_w<0>));
|
||||
|
||||
PC_KBDC(config, m_kbd, pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL);
|
||||
m_kbd->out_data_cb().set("via", FUNC(via6522_device::write_pa1));
|
||||
m_kbd->out_clock_cb().set("via", FUNC(via6522_device::write_ca1));
|
||||
|
||||
bbc_userport_slot_device &userport(BBC_USERPORT_SLOT(config, "userport", minib_userport_devices, "lcd"));
|
||||
userport.cb1_handler().set("via", FUNC(via6522_device::write_cb1));
|
||||
userport.cb2_handler().set("via", FUNC(via6522_device::write_cb2));
|
||||
|
||||
bbc_1mhzbus_slot_device &bus(BBC_1MHZBUS_SLOT(config, "1mhzbus", 16_MHz_XTAL / 16, minib_1mhzbus_devices, nullptr));
|
||||
bus.irq_handler().set("irqs", FUNC(input_merger_device::in_w<1>));
|
||||
bus.nmi_handler().set_inputline(m_maincpu, M6502_NMI_LINE);
|
||||
}
|
||||
|
||||
|
||||
ROM_START(minib)
|
||||
ROM_REGION(0x20000, "flash", ROMREGION_ERASEFF)
|
||||
ROM_LOAD("os041.rom", 0x1d000, 0x3000, CRC(57a24945) SHA1(5e521850953be33b9b29995e5f043bbbb45c60e5)) // OS 0.41
|
||||
ROM_LOAD("gos015.rom", 0x18000, 0x4000, CRC(e35a93df) SHA1(c91286aec2a2e086cb55ca3e0af576132144831f)) // GOS 0.15
|
||||
ROM_LOAD("basic2.rom", 0x14000, 0x4000, CRC(79434781) SHA1(4a7393f3a45ea309f744441c16723e2ef447a281)) // BASIC 2
|
||||
ROM_END
|
||||
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP (2002, minib, 0, 0, minib, 0, minib_state, empty_init, "Sprow", "MiniB Computer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW)
|
@ -24169,6 +24169,9 @@ mindset // (c) 1984
|
||||
@source:skeleton/mini2440.cpp
|
||||
mini2440 //
|
||||
|
||||
@source:homebrew/minib.cpp
|
||||
minib //
|
||||
|
||||
@source:misc/miniboy7.cpp
|
||||
bejpoker // (c) 1992?, Bonanza Enterprises
|
||||
miniboy7 // (c) 1983, Bonanza Enterprises
|
||||
|
@ -353,6 +353,7 @@ homebrew/homez80.cpp
|
||||
homebrew/lft_chiptune.cpp
|
||||
homebrew/lft_craft.cpp
|
||||
homebrew/lft_phasor.cpp
|
||||
homebrew/minib.cpp
|
||||
homebrew/mk1forth.cpp
|
||||
homebrew/p112.cpp
|
||||
homebrew/phunsy.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user