forked from mamedev/mame
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3acfcbf
commit 2d69289
Showing
20 changed files
with
3,021 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Antoine Mine, Olivier Galibert, Felipe Sanches | ||
// | ||
// HD-AE5000, Hard Disk & Audio Extension for Technics KN5000 emulation | ||
// | ||
// The HD-AE5000 was an extension board for the Technics KN5000 musical keyboard. | ||
// It provided a hard-disk, additional audio outputs and a serial port to interface | ||
// with a computer to transfer files to/from the hard-drive. | ||
|
||
#include "emu.h" | ||
#include "hdae5000.h" | ||
#include "bus/ata/hdd.h" | ||
#include "machine/i8255.h" | ||
|
||
namespace { | ||
|
||
class hdae5000_device : public device_t, public kn5000_extension_interface | ||
{ | ||
public: | ||
static constexpr feature_type unemulated_features() { return feature::DISK | feature::SOUND; } | ||
|
||
hdae5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); | ||
|
||
virtual void rom_map(address_map &map) override; | ||
virtual void io_map(address_map &map) override; | ||
|
||
protected: | ||
virtual void device_add_mconfig(machine_config &config) override; | ||
virtual void device_start() override; | ||
virtual void device_reset() override; | ||
virtual const tiny_rom_entry *device_rom_region() const override; | ||
|
||
private: | ||
uint8_t ata_r(offs_t offset); | ||
void ata_w(offs_t offset, uint8_t data); | ||
|
||
required_device<ide_hdd_device> m_hdd; | ||
required_device<i8255_device> m_ppi; | ||
required_memory_region m_rom; | ||
}; | ||
|
||
hdae5000_device::hdae5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : | ||
device_t(mconfig, HDAE5000, tag, owner, clock) | ||
, kn5000_extension_interface(mconfig, *this) | ||
, m_hdd(*this, "hdd") | ||
, m_ppi(*this, "ppi") | ||
, m_rom(*this, "rom") | ||
{ | ||
} | ||
|
||
ROM_START(hdae5000) | ||
ROM_REGION16_LE(0x80000, "rom" , 0) | ||
ROM_DEFAULT_BIOS("v2.06i") | ||
|
||
ROM_SYSTEM_BIOS(0, "v1.10i", "Version 1.10i - July 6th, 1998") | ||
ROMX_LOAD("hd-ae5000_v1_10i.ic4", 0x000000, 0x80000, CRC(7461374b) SHA1(6019f3c28b6277730418974dde4dc6893fced00e), ROM_BIOS(0)) | ||
|
||
ROM_SYSTEM_BIOS(1, "v1.15i", "Version 1.15i - October 13th, 1998") | ||
ROMX_LOAD("hd-ae5000_v1_15i.ic4", 0x000000, 0x80000, CRC(e76d4b9f) SHA1(581fa58e2cd6fe381cfc312c73771d25ff2e662c), ROM_BIOS(1)) | ||
|
||
// Version 2.01i is described as having "additions like lyrics display etc." | ||
ROM_SYSTEM_BIOS(2, "v2.01i", "Version 2.01i - January 15th, 1999") // installation file indicated "v2.0i" but signature inside the ROM is "v2.01i" | ||
ROMX_LOAD("hd-ae5000_v2_01i.ic4", 0x000000, 0x80000, CRC(961e6dcd) SHA1(0160c17baa7b026771872126d8146038a19ef53b), ROM_BIOS(2)) | ||
|
||
ROM_SYSTEM_BIOS(3, "v2.06i", "Version 2.06i") // unknown release date | ||
ROMX_LOAD("hd-ae5000_v2_06i.ic4", 0x000000, 0x80000, CRC(836be80a) SHA1(c4da28f0ad16b1288774af761b3729142e8050b3), ROM_BIOS(3)) | ||
ROM_END | ||
|
||
void hdae5000_device::rom_map(address_map &map) | ||
{ | ||
map(0x00000, 0x7ffff).rom().region(m_rom, 0); | ||
} | ||
|
||
uint8_t hdae5000_device::ata_r(offs_t offset) | ||
{ | ||
return 0; //TODO: FIXME! | ||
} | ||
|
||
void hdae5000_device::ata_w(offs_t offset, uint8_t data) | ||
{ | ||
} | ||
|
||
/* | ||
PPI pin 2 /CS = CN6 pin 59 PPIFCS | ||
ATA pin 31 INTRQ = CN6 pin 58 HDINT | ||
*/ | ||
void hdae5000_device::io_map(address_map &map) | ||
{ | ||
map(0x130000, 0x13001f).rw(FUNC(hdae5000_device::ata_r), FUNC(hdae5000_device::ata_w)); // ATA IDE at CN2 | ||
map(0x160000, 0x160007).umask16(0x00ff).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); // parallel port interface (NEC uPD71055) IC9 | ||
} | ||
|
||
const tiny_rom_entry *hdae5000_device::device_rom_region() const | ||
{ | ||
return ROM_NAME(hdae5000); | ||
} | ||
|
||
void hdae5000_device::device_add_mconfig(machine_config &config) | ||
{ | ||
IDE_HARDDISK(config, m_hdd, 0); | ||
|
||
/* Optional Parallel Port */ | ||
I8255(config, m_ppi); // actual chip is a NEC uPD71055 @ IC9 on the HD-AE5000 board | ||
|
||
// Port A: DB15 connector | ||
|
||
// m_ppi->in_pa_callback().set(FUNC(?_device::ppi_in_a)); | ||
// m_ppi->out_pb_callback().set(FUNC(?_device::ppi_out_b)); | ||
// m_ppi->in_pc_callback().set(FUNC(?_device::ppi_in_c)); | ||
// m_ppi->out_pc_callback().set(FUNC(?_device::ppi_out_c)); | ||
|
||
// we may later add this, for the auxiliary audio output provided by this extension board: | ||
// SPEAKER(config, "is it mono or stereo ?").front_center(); | ||
} | ||
|
||
void hdae5000_device::device_start() | ||
{ | ||
// save_item(NAME(m_...)); | ||
} | ||
|
||
void hdae5000_device::device_reset() | ||
{ | ||
} | ||
|
||
} // anonymous namespace | ||
|
||
DEFINE_DEVICE_TYPE_PRIVATE(HDAE5000, kn5000_extension_interface, hdae5000_device, "hdae5000", "HD-AE5000, Hard Disk & Audio Extension") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Antoine Mine, Olivier Galibert, Felipe Sanches | ||
// | ||
// HD-AE5000 emulation | ||
// | ||
#ifndef MAME_BUS_TECHNICS_HDAE5000_H | ||
#define MAME_BUS_TECHNICS_HDAE5000_H | ||
|
||
#pragma once | ||
|
||
#include "kn5000_extension.h" | ||
|
||
// device type declaration | ||
DECLARE_DEVICE_TYPE(HDAE5000, kn5000_extension_interface) | ||
|
||
#endif // MAME_BUS_TECHNICS_HDAE5000_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Olivier Galibert, Felipe Sanches | ||
|
||
// Generic Technics KN5000 extension slot | ||
|
||
|
||
#include "emu.h" | ||
#include "kn5000_extension.h" | ||
|
||
DEFINE_DEVICE_TYPE(KN5000_EXTENSION, kn5000_extension_device, "kn5000_extension", "Technics KN5000 extension port") | ||
|
||
kn5000_extension_device::kn5000_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : | ||
device_t(mconfig, KN5000_EXTENSION, tag, owner, clock), | ||
device_single_card_slot_interface<kn5000_extension_interface>(mconfig, *this), | ||
m_write_irq(*this) | ||
{ | ||
} | ||
|
||
void kn5000_extension_device::rom_map(address_space_installer &space, offs_t start, offs_t end) | ||
{ | ||
auto dev = get_card_device(); | ||
if(dev) | ||
space.install_device(start, end, *dev, &kn5000_extension_interface::rom_map); | ||
} | ||
|
||
void kn5000_extension_device::io_map(address_space_installer &space, offs_t start, offs_t end) | ||
{ | ||
auto dev = get_card_device(); | ||
if(dev) | ||
space.install_device(start, end, *dev, &kn5000_extension_interface::io_map); | ||
} | ||
|
||
void kn5000_extension_device::device_start() | ||
{ | ||
} | ||
|
||
kn5000_extension_interface::kn5000_extension_interface(const machine_config &mconfig, device_t &device) : | ||
device_interface(device, "extension"), | ||
m_ext(dynamic_cast<kn5000_extension_device *>(device.owner())) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// license:BSD-3-Clause | ||
// copyright-holders:Olivier Galibert, Felipe Sanches | ||
// | ||
// Generic Technics KN5000 extension slot | ||
|
||
#ifndef MAME_BUS_TECHNICS_KN5000_EXTENSION_H | ||
#define MAME_BUS_TECHNICS_KN5000_EXTENSION_H | ||
|
||
#pragma once | ||
|
||
class kn5000_extension_device; | ||
|
||
class kn5000_extension_interface : public device_interface | ||
{ | ||
public: | ||
kn5000_extension_interface(const machine_config &mconfig, device_t &device); | ||
|
||
virtual void rom_map(address_map &map) = 0; | ||
virtual void io_map(address_map &map) = 0; | ||
|
||
//protected: | ||
// DECLARE_WRITE_LINE_MEMBER(irq_w); | ||
|
||
private: | ||
kn5000_extension_device *const m_ext; | ||
}; | ||
|
||
|
||
class kn5000_extension_device : public device_t, public device_single_card_slot_interface<kn5000_extension_interface> | ||
{ | ||
friend class kn5000_extension_interface; | ||
|
||
public: | ||
kn5000_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); | ||
|
||
void rom_map(address_space_installer &space, offs_t start, offs_t end); | ||
void io_map(address_space_installer &space, offs_t start, offs_t end); | ||
auto irq_callback() { return m_write_irq.bind(); } | ||
void irq_w(int state) { m_write_irq(state); } | ||
|
||
protected: | ||
virtual void device_start() override; | ||
devcb_write_line m_write_irq; | ||
}; | ||
|
||
DECLARE_DEVICE_TYPE(KN5000_EXTENSION, kn5000_extension_device) | ||
|
||
#endif // MAME_BUS_TECHNICS_KN5000_EXTENSION_H |
Oops, something went wrong.