mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
bus/spectrum/kempdisc.cpp: replace K-DOS v2.1 bad dump with good one, add KDOS 2.1 Italian translation, add "Watford SP-DOS Interface" (technically not working without boot disk) [Luzie, James McKey, MetalliC]
This commit is contained in:
parent
7e1b46d2bb
commit
365d94a31b
@ -216,6 +216,7 @@ void spectrum_expansion_devices(device_slot_interface &device)
|
||||
device.option_add("protek", SPECTRUM_PROTEK);
|
||||
device.option_add("sdi", SPECTRUM_SDI);
|
||||
device.option_add("speccydos", SPECTRUM_SPECCYDOS);
|
||||
device.option_add("spdos", SPECTRUM_SPDOS);
|
||||
device.option_add("specdrum", SPECTRUM_SPECDRUM);
|
||||
device.option_add("swiftdisc", SPECTRUM_SWIFTDISC);
|
||||
device.option_add("swiftdisc2", SPECTRUM_SWIFTDISC2);
|
||||
|
@ -22,6 +22,14 @@
|
||||
- implement onboard Kempston Centronics E interace and joystick port
|
||||
- add more docs/information
|
||||
|
||||
*********************************************************************
|
||||
|
||||
Watford SP-DOS Interface
|
||||
(c) Abbeydale Designers ltd 1984
|
||||
|
||||
Earlier version of Kempston Disc, uses 2Kbyte ROM with small boot loader, same FDC ports but slightly different paging.
|
||||
Require "System disk" with DOS to function, which is not dumped / missing at the moment.
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
@ -33,6 +41,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
DEFINE_DEVICE_TYPE(SPECTRUM_KEMPDISC, spectrum_kempdisc_device, "spectrum_kempdisc", "Kempston Disc Interface")
|
||||
DEFINE_DEVICE_TYPE(SPECTRUM_SPDOS, spectrum_spdos_device, "spectrum_spdos", "Watford SP-DOS Interface")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -67,8 +76,15 @@ ROM_START(kempdisc)
|
||||
ROM_SYSTEM_BIOS(0, "kd20", "K-DOS v2.0")
|
||||
ROMX_LOAD("kd20.rom", 0x0000, 0x2000, CRC(244816a7) SHA1(b08e0e30f1db4f57d38b112be0115256528c6621), ROM_BIOS(0))
|
||||
ROM_SYSTEM_BIOS(1, "kd21", "K-DOS v2.1")
|
||||
ROMX_LOAD("kd21.rom", 0x0000, 0x2000, CRC(d18fb812) SHA1(b3e00bc4111ef6311789159024fb4cd25c32a72f), ROM_BIOS(1))
|
||||
// TODO add Italian clone
|
||||
ROMX_LOAD("kd21.rom", 0x0000, 0x2000, CRC(3a0705eb) SHA1(adebc46c1b6718eaed7e2844506011787117cb05), ROM_BIOS(1))
|
||||
//ROMX_LOAD("kd21.rom", 0x0000, 0x2000, CRC(d18fb812) SHA1(b3e00bc4111ef6311789159024fb4cd25c32a72f), ROM_BIOS(1)) // bad dump
|
||||
ROM_SYSTEM_BIOS(2, "kd21it", "K-DOS v2.1 Italian") // copyrights and texts changed and translated
|
||||
ROMX_LOAD("kd21it.rom", 0x0000, 0x2000, CRC(f8ccdf8a) SHA1(4a75fb4951d74e254c230d56b5566c924b3c38f6), ROM_BIOS(2))
|
||||
ROM_END
|
||||
|
||||
ROM_START(spdos)
|
||||
ROM_REGION(0x0800, "rom", 0)
|
||||
ROM_LOAD("spdos.rom", 0x0000, 0x0800, CRC(87b954a3) SHA1(bb0706cf1538da8acd12b8c9cd2cd75ca689ec44))
|
||||
ROM_END
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -95,6 +111,11 @@ const tiny_rom_entry *spectrum_kempdisc_device::device_rom_region() const
|
||||
return ROM_NAME(kempdisc);
|
||||
}
|
||||
|
||||
const tiny_rom_entry *spectrum_spdos_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(spdos);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
@ -104,8 +125,8 @@ const tiny_rom_entry *spectrum_kempdisc_device::device_rom_region() const
|
||||
// spectrum_kempdisc_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, SPECTRUM_KEMPDISC, tag, owner, clock)
|
||||
spectrum_kempdisc_device::spectrum_kempdisc_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_spectrum_expansion_interface(mconfig, *this)
|
||||
, m_rom(*this, "rom")
|
||||
, m_fdc(*this, "fdc")
|
||||
@ -115,6 +136,16 @@ spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig
|
||||
{
|
||||
}
|
||||
|
||||
spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: spectrum_kempdisc_device(mconfig, SPECTRUM_KEMPDISC, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
spectrum_spdos_device::spectrum_spdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: spectrum_kempdisc_device(mconfig, SPECTRUM_SPDOS, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
@ -205,3 +236,54 @@ uint8_t spectrum_kempdisc_device::mreq_r(offs_t offset)
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
void spectrum_spdos_device::iorq_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset & 0xff)
|
||||
{
|
||||
case 0xe5: case 0xe7: case 0xed: case 0xef:
|
||||
m_fdc->write(BIT(offset, 1) | (BIT(offset, 3) << 1), data);
|
||||
break;
|
||||
case 0xdf:
|
||||
{
|
||||
floppy_image_device* floppy = nullptr;
|
||||
for (int i = 1; i < 5; i++)
|
||||
if (BIT(data, i))
|
||||
{
|
||||
floppy = m_floppy[i - 1]->get_device();
|
||||
break;
|
||||
}
|
||||
|
||||
// m_control = data;
|
||||
m_fdc->set_floppy(floppy);
|
||||
if (floppy) floppy->ss_w(BIT(data, 0));
|
||||
if (data & 0xe0)
|
||||
logerror("port DF unhandled %02X\n", data);
|
||||
m_romcs = 0;
|
||||
}
|
||||
break;
|
||||
// below probably is wrong/different for this device
|
||||
case 0xfd:
|
||||
m_romcs = 1;
|
||||
break;
|
||||
case 0xd7:
|
||||
m_romcs = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
m_exp->iorq_w(offset, data);
|
||||
}
|
||||
|
||||
uint8_t spectrum_spdos_device::mreq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if (m_romcs)
|
||||
data = m_rom->base()[offset & 0x7ff];
|
||||
|
||||
if (m_exp->romcs())
|
||||
data &= m_exp->mreq_r(offset);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
||||
|
||||
protected:
|
||||
spectrum_kempdisc_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;
|
||||
@ -59,9 +60,25 @@ protected:
|
||||
// u8 m_control;
|
||||
};
|
||||
|
||||
class spectrum_spdos_device :
|
||||
public spectrum_kempdisc_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
spectrum_spdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
virtual void iorq_w(offs_t offset, uint8_t data) override;
|
||||
virtual uint8_t mreq_r(offs_t offset) override;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(SPECTRUM_KEMPDISC, spectrum_kempdisc_device)
|
||||
DECLARE_DEVICE_TYPE(SPECTRUM_SPDOS, spectrum_spdos_device)
|
||||
|
||||
|
||||
#endif // MAME_BUS_SPECTRUM_KEMPDISC_H
|
||||
|
Loading…
Reference in New Issue
Block a user