bus/bbc/tube/32016: Fixed paging out of ROM in lower memory only, and added the Large 4M board.

This commit is contained in:
Nigel Barnes 2020-09-10 02:51:40 +01:00
parent 9fd73b62a6
commit bfe69e81e6
3 changed files with 69 additions and 15 deletions

View File

@ -113,6 +113,7 @@ void bbc_tube_devices(device_slot_interface &device)
device.option_add("z80", BBC_TUBE_Z80); /* Acorn ANC04 Z80 2nd processor */
device.option_add("z80w", BBC_TUBE_Z80W); /* Acorn ANC04 Z80 2nd processor (Winchester) */
device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */
device.option_add("32016l", BBC_TUBE_32016L); /* Acorn Large 32016 2nd processor */
device.option_add("arm", BBC_TUBE_ARM); /* Acorn ANC13 ARM Evaluation System */
device.option_add("80286", BBC_TUBE_80286); /* Acorn 80286 2nd Processor */
//device.option_add("a500", BBC_TUBE_A500); /* Acorn A500 2nd Processor */
@ -142,6 +143,7 @@ void bbc_extube_devices(device_slot_interface &device)
device.option_add("z80", BBC_TUBE_Z80); /* Acorn ANC04 Z80 2nd processor */
device.option_add("z80w", BBC_TUBE_Z80W); /* Acorn ANC04 Z80 2nd processor (Winchester) */
device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */
device.option_add("32016l", BBC_TUBE_32016L); /* Acorn Large 32016 2nd processor */
device.option_add("arm", BBC_TUBE_ARM); /* Acorn ANC13 ARM Evaluation System */
device.option_add("80286", BBC_TUBE_80286); /* Acorn 80286 2nd Processor */
device.option_add("pcplus", BBC_TUBE_PCPLUS); /* Solidisk PC-Plus co-processor */
@ -180,6 +182,7 @@ void electron_tube_devices(device_slot_interface &device)
device.option_add("6502", BBC_TUBE_6502); /* Acorn ANC01 6502 2nd processor */
device.option_add("z80", BBC_TUBE_Z80); /* Acorn ANC04 Z80 2nd processor */
device.option_add("32016", BBC_TUBE_32016); /* Acorn ANC05 32016 2nd processor */
device.option_add("32016l", BBC_TUBE_32016L); /* Acorn Large 32016 2nd processor */
device.option_add("arm", BBC_TUBE_ARM); /* Acorn ANC13 ARM Evaluation System */
device.option_add("65c102", BBC_TUBE_65C102); /* Acorn ADC06 65C102 co-processor */
device.option_add("80186", BBC_TUBE_80186); /* Acorn ADC08 80186 co-processor */

View File

@ -29,6 +29,7 @@
//**************************************************************************
DEFINE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device, "bbc_tube_32016", "Acorn 32016 2nd processor")
DEFINE_DEVICE_TYPE(BBC_TUBE_32016L, bbc_tube_32016l_device, "bbc_tube_32016l", "Acorn Large 32016 2nd processor")
//-------------------------------------------------
@ -38,8 +39,9 @@ DEFINE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device, "bbc_tube_32016", "Aco
void bbc_tube_32016_device::tube_32016_mem(address_map &map)
{
map(0x000000, 0xffffff).rw(FUNC(bbc_tube_32016_device::read), FUNC(bbc_tube_32016_device::write));
map(0xf00000, 0xf07fff).rom().region("rom", 0).mirror(0x0f8000);
map(0xf90000, 0xf90001).portr("CONFIG");
map(0xfffff0, 0xffffff).rw("ula", FUNC(tube_device::parasite_r), FUNC(tube_device::parasite_w)).umask32(0x00ff);
map(0xfffff0, 0xffffff).rw("ula", FUNC(tube_device::parasite_r), FUNC(tube_device::parasite_w)).umask16(0x00ff);
}
//-------------------------------------------------
@ -47,18 +49,27 @@ void bbc_tube_32016_device::tube_32016_mem(address_map &map)
//-------------------------------------------------
ROM_START(tube_32016)
ROM_REGION(0x8000, "rom", 0)
ROM_DEFAULT_BIOS("200")
ROM_REGION16_LE(0x8000, "rom", 0)
ROM_SYSTEM_BIOS(0, "200", "Pandora v2.00")
ROMX_LOAD("pan200lo.rom", 0x0000, 0x4000, CRC(b1980fd0) SHA1(8084f8896cd22953abefbd43c51e1a422b30e28d), ROM_SKIP(1) | ROM_BIOS(0)) // 0201-764-02 Pandora Lo
ROMX_LOAD("pan200hi.rom", 0x0001, 0x4000, CRC(cab98d6b) SHA1(dfad1f4180c50757a74fcfe3a0ee7d7b48eb1bee), ROM_SKIP(1) | ROM_BIOS(0)) // 0201-763-02 Pandora Hi
ROM_SYSTEM_BIOS(1, "100", "Pandora v1.00")
ROMX_LOAD("pan100.rom", 0x0000, 0x8000, BAD_DUMP CRC(75333006) SHA1(996cd120103039390c9b979b16c327bb95da72e4), ROM_BIOS(1)) // 0201-763-01, 0201-764-01 Pandora
ROMX_LOAD("pan100lo.rom", 0x0000, 0x2000, CRC(101e8aca) SHA1(4998e64afe98b2f227df6daa7ae0af512ce8907a), ROM_SKIP(1) | ROM_BIOS(1)) // 0201-764-01 Pandora Lo
ROM_RELOAD( 0x4000, 0x2000)
ROMX_LOAD("pan100hi.rom", 0x0001, 0x2000, CRC(139de9ed) SHA1(1871e65c9ebd3eac835b0317b0ad8272ff207c4b), ROM_SKIP(1) | ROM_BIOS(1)) // 0201-763-01 Pandora Hi
ROM_RELOAD( 0x4001, 0x2000)
ROM_SYSTEM_BIOS(2, "061", "Pandora v0.61")
ROMX_LOAD("pan061lo.rom", 0x0000, 0x4000, CRC(6f801b35) SHA1(ce31f7c10603f3d15a06a8e32bde40df0639e446), ROM_SKIP(1) | ROM_BIOS(2))
ROMX_LOAD("pan061hi.rom", 0x0001, 0x4000, CRC(c00b1ab0) SHA1(e6a705232278c518340ddc69ea51af91965fa332), ROM_SKIP(1) | ROM_BIOS(2))
ROM_END
ROM_START(tube_32016l)
ROM_REGION16_LE(0x8000, "rom", 0)
ROM_SYSTEM_BIOS(0, "200", "Pandora v2.00")
ROMX_LOAD("pan200lo.rom", 0x0000, 0x4000, CRC(b1980fd0) SHA1(8084f8896cd22953abefbd43c51e1a422b30e28d), ROM_SKIP(1) | ROM_BIOS(0)) // 0201-764-02 Pandora Lo
ROMX_LOAD("pan200hi.rom", 0x0001, 0x4000, CRC(cab98d6b) SHA1(dfad1f4180c50757a74fcfe3a0ee7d7b48eb1bee), ROM_SKIP(1) | ROM_BIOS(0)) // 0201-763-02 Pandora Hi
ROM_END
//-------------------------------------------------
// INPUT_PORTS( tube_32016 )
//-------------------------------------------------
@ -112,12 +123,23 @@ void bbc_tube_32016_device::device_add_mconfig(machine_config &config)
m_ula->pirq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
/* internal ram */
RAM(config, m_ram).set_default_size("1M").set_default_value(0);
RAM(config, m_ram).set_default_size("1M").set_extra_options("256K");
/* software lists */
SOFTWARE_LIST(config, "flop_ls_32016").set_original("bbc_flop_32016");
}
void bbc_tube_32016l_device::device_add_mconfig(machine_config &config)
{
bbc_tube_32016_device::device_add_mconfig(config);
m_maincpu->set_clock(16_MHz_XTAL / 2);
/* internal ram */
m_ram->set_default_size("4M");
}
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
@ -127,6 +149,11 @@ const tiny_rom_entry *bbc_tube_32016_device::device_rom_region() const
return ROM_NAME( tube_32016 );
}
const tiny_rom_entry *bbc_tube_32016l_device::device_rom_region() const
{
return ROM_NAME( tube_32016l );
}
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
@ -144,8 +171,8 @@ ioport_constructor bbc_tube_32016_device::device_input_ports() const
// bbc_tube_32016_device - constructor
//-------------------------------------------------
bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, BBC_TUBE_32016, tag, owner, clock)
bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, device_bbc_tube_interface(mconfig, *this)
, m_maincpu(*this, "maincpu")
, m_ula(*this, "ula")
@ -155,12 +182,23 @@ bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, cons
{
}
bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: bbc_tube_32016_device(mconfig, BBC_TUBE_32016, tag, owner, clock)
{
}
bbc_tube_32016l_device::bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: bbc_tube_32016_device(mconfig, BBC_TUBE_32016L, tag, owner, clock)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void bbc_tube_32016_device::device_start()
{
save_item(NAME(m_rom_enabled));
}
//-------------------------------------------------
@ -190,12 +228,12 @@ void bbc_tube_32016_device::host_w(offs_t offset, uint8_t data)
uint8_t bbc_tube_32016_device::read(offs_t offset)
{
uint16_t data = 0xffff;
uint16_t data;
if (m_rom_enabled)
data = m_rom->base()[offset & 0x3fff];
else if (offset < m_ram->size())
data = m_ram->pointer()[offset];
data = m_rom->base()[offset & 0x7fff];
else
data = m_ram->pointer()[offset & m_ram->mask()];
return data;
}
@ -203,8 +241,7 @@ uint8_t bbc_tube_32016_device::read(offs_t offset)
void bbc_tube_32016_device::write(offs_t offset, uint8_t data)
{
/* clear ROM select on first write */
if (!machine().side_effects_disabled()) m_rom_enabled = false;
m_rom_enabled = false;
if (offset < m_ram->size())
m_ram->pointer()[offset] = data;
m_ram->pointer()[offset & m_ram->mask()] = data;
}

View File

@ -36,6 +36,8 @@ public:
bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
bbc_tube_32016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
@ -48,7 +50,6 @@ protected:
virtual uint8_t host_r(offs_t offset) override;
virtual void host_w(offs_t offset, uint8_t data) override;
private:
required_device<ns32016_device> m_maincpu;
required_device<tube_device> m_ula;
required_device<ram_device> m_ram;
@ -63,9 +64,22 @@ private:
};
class bbc_tube_32016l_device : public bbc_tube_32016_device
{
public:
bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
};
// device type definition
DECLARE_DEVICE_TYPE(BBC_TUBE_32016, bbc_tube_32016_device)
DECLARE_DEVICE_TYPE(BBC_TUBE_32016L, bbc_tube_32016l_device)
#endif /* MAME_BUS_BBC_TUBE_32016_H */