Skip to content

Commit 2222c0a

Browse files
committed
Improvements to Technics KN5000
1 parent a8fb827 commit 2222c0a

21 files changed

+3516
-251
lines changed

scripts/src/bus.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,6 +2577,21 @@ if (BUSES["SS50"]~=null) then
25772577
end
25782578

25792579

2580+
---------------------------------------------------
2581+
--
2582+
--@src/devices/bus/technics/hdae5000.h,BUSES["TECHNICS"] = true
2583+
---------------------------------------------------
2584+
2585+
if (BUSES["TECHNICS"]~=null) then
2586+
files {
2587+
MAME_DIR .. "src/devices/bus/technics/kn5000_extension.cpp",
2588+
MAME_DIR .. "src/devices/bus/technics/kn5000_extension.h",
2589+
MAME_DIR .. "src/devices/bus/technics/hdae5000.cpp",
2590+
MAME_DIR .. "src/devices/bus/technics/hdae5000.h",
2591+
}
2592+
end
2593+
2594+
25802595
---------------------------------------------------
25812596
--
25822597
--@src/devices/bus/tiki100/exp.h,BUSES["TIKI100"] = true

scripts/src/cpu.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2938,6 +2938,8 @@ if CPUS["TLCS900"] then
29382938
MAME_DIR .. "src/devices/cpu/tlcs900/tlcs900.h",
29392939
MAME_DIR .. "src/devices/cpu/tlcs900/900tbl.hxx",
29402940
MAME_DIR .. "src/devices/cpu/tlcs900/900htbl.hxx",
2941+
MAME_DIR .. "src/devices/cpu/tlcs900/tmp94c241.cpp",
2942+
MAME_DIR .. "src/devices/cpu/tlcs900/tmp94c241.h",
29412943
MAME_DIR .. "src/devices/cpu/tlcs900/tmp95c061.cpp",
29422944
MAME_DIR .. "src/devices/cpu/tlcs900/tmp95c061.h",
29432945
MAME_DIR .. "src/devices/cpu/tlcs900/tmp95c063.cpp",

src/devices/bus/technics/hdae5000.cpp

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
// license:BSD-3-Clause
2+
// copyright-holders:Antoine Mine, Olivier Galibert, Felipe Sanches
3+
//
4+
// HD-AE5000, Hard Disk & Audio Extension for Technics KN5000 emulation
5+
//
6+
// The HD-AE5000 was an extension board for the Technics KN5000 musical keyboard.
7+
// It provided a hard-disk, additional audio outputs and a serial port to interface
8+
// with a computer to transfer files to/from the hard-drive.
9+
10+
#include "emu.h"
11+
#include "bus/ata/hdd.h"
12+
#include "hdae5000.h"
13+
#include "machine/i8255.h"
14+
15+
namespace {
16+
17+
class hdae5000_device : public device_t, public kn5000_extension_interface
18+
{
19+
public:
20+
static constexpr feature_type unemulated_features() { return feature::DISK | feature::SOUND; }
21+
22+
hdae5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
23+
24+
virtual void rom_map(address_map &map) override;
25+
virtual void io_map(address_map &map) override;
26+
27+
protected:
28+
virtual void device_add_mconfig(machine_config &config) override;
29+
virtual void device_start() override;
30+
virtual void device_reset() override;
31+
virtual const tiny_rom_entry *device_rom_region() const override;
32+
33+
private:
34+
required_device<ide_hdd_device> m_hdd;
35+
required_device<i8255_device> m_ppi;
36+
required_memory_region m_rom;
37+
};
38+
39+
hdae5000_device::hdae5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
40+
device_t(mconfig, HDAE5000, tag, owner, clock)
41+
, kn5000_extension_interface(mconfig, *this)
42+
, m_hdd(*this, "hdd")
43+
, m_ppi(*this, "ppi")
44+
, m_rom(*this, "rom")
45+
{
46+
}
47+
48+
ROM_START(hdae5000)
49+
ROM_REGION16_LE(0x80000, "rom" , 0)
50+
ROM_DEFAULT_BIOS("v2.01i")
51+
52+
ROM_SYSTEM_BIOS(0, "v1.10i", "Version 1.10i - July 6th, 1998")
53+
ROMX_LOAD("hd-ae5000_v1_10i.ic4", 0x000000, 0x80000, CRC(7461374b) SHA1(6019f3c28b6277730418974dde4dc6893fced00e), ROM_BIOS(0))
54+
55+
ROM_SYSTEM_BIOS(1, "v1.15i", "Version 1.15i - October 13th, 1998")
56+
ROMX_LOAD("hd-ae5000_v1_15i.ic4", 0x000000, 0x80000, CRC(e76d4b9f) SHA1(581fa58e2cd6fe381cfc312c73771d25ff2e662c), ROM_BIOS(1))
57+
58+
// Version 2.01i is described as having "additions like lyrics display etc."
59+
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"
60+
ROMX_LOAD("hd-ae5000_v2_01i.ic4", 0x000000, 0x80000, CRC(961e6dcd) SHA1(0160c17baa7b026771872126d8146038a19ef53b), ROM_BIOS(2))
61+
ROM_END
62+
63+
void hdae5000_device::rom_map(address_map &map)
64+
{
65+
map(0x00000, 0x7ffff).rom().region(m_rom, 0);
66+
}
67+
68+
void hdae5000_device::io_map(address_map &map)
69+
{
70+
//map(0x130000, 0x13ffff).m(m_hddc, FUNC(?_device::?)); // Hard-drive Controller (model?) IC? on HD-AE5000 board
71+
//map(0x160000, 0x16ffff) ... Optional parallel port interface (NEC uPD71055) IC9
72+
map(0x160000, 0x160000).lrw8([this](offs_t a) { return m_ppi->read(0); }, "ppi_r0", [this](offs_t a, u8 data) { m_ppi->write(0, data); }, "ppi_w0");
73+
map(0x160002, 0x160002).lrw8([this](offs_t a) { return m_ppi->read(1); }, "ppi_r1", [this](offs_t a, u8 data) { m_ppi->write(1, data); }, "ppi_w1");
74+
map(0x160004, 0x160004).lrw8([this](offs_t a) { return m_ppi->read(2); }, "ppi_r2", [this](offs_t a, u8 data) { m_ppi->write(2, data); }, "ppi_w2");
75+
map(0x160006, 0x160006).lrw8([this](offs_t a) { return m_ppi->read(3); }, "ppi_r3", [this](offs_t a, u8 data) { m_ppi->write(3, data); }, "ppi_w3");
76+
}
77+
78+
const tiny_rom_entry *hdae5000_device::device_rom_region() const
79+
{
80+
return ROM_NAME(hdae5000);
81+
}
82+
83+
void hdae5000_device::device_add_mconfig(machine_config &config)
84+
{
85+
/* Optional Hard Disk - HD-AE5000 */
86+
IDE_HARDDISK(config, m_hdd, 0);
87+
88+
/* Optional Parallel Port */
89+
I8255(config, m_ppi); // actual chip is a NEC uPD71055 @ IC9 on the HD-AE5000 board
90+
// m_ppi->in_pa_callback().set(FUNC(?_device::ppi_in_a));
91+
// m_ppi->out_pb_callback().set(FUNC(?_device::ppi_out_b));
92+
// m_ppi->in_pc_callback().set(FUNC(?_device::ppi_in_c));
93+
// m_ppi->out_pc_callback().set(FUNC(?_device::ppi_out_c));
94+
95+
// we may later add this, for the auxiliary audio output provided by this extension board:
96+
// SPEAKER(config, "mono").front_center();
97+
}
98+
99+
void hdae5000_device::device_start()
100+
{
101+
// save_item(NAME(m_...));
102+
}
103+
104+
void hdae5000_device::device_reset()
105+
{
106+
}
107+
108+
} // anonymous namespace
109+
110+
DEFINE_DEVICE_TYPE_PRIVATE(HDAE5000, kn5000_extension_interface, hdae5000_device, "hdae5000", "HD-AE5000, Hard Disk & Audio Extension")

src/devices/bus/technics/hdae5000.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// license:BSD-3-Clause
2+
// copyright-holders:Antoine Mine, Olivier Galibert, Felipe Sanches
3+
//
4+
// HD-AE5000 emulation
5+
//
6+
#ifndef MAME_BUS_TECHNICS_HDAE5000_H
7+
#define MAME_BUS_TECHNICS_HDAE5000_H
8+
9+
#pragma once
10+
11+
#include "kn5000_extension.h"
12+
13+
// device type declaration
14+
DECLARE_DEVICE_TYPE(HDAE5000, kn5000_extension_interface)
15+
16+
#endif // MAME_BUS_TECHNICS_HDAE5000_H
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// license:BSD-3-Clause
2+
// copyright-holders:Olivier Galibert, Felipe Sanches
3+
4+
// Generic Technics KN5000 extension slot
5+
6+
7+
#include "emu.h"
8+
#include "kn5000_extension.h"
9+
10+
DEFINE_DEVICE_TYPE(KN5000_EXTENSION, kn5000_extension_device, "kn5000_extension", "Technics KN5000 extension port")
11+
12+
kn5000_extension_device::kn5000_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
13+
device_t(mconfig, KN5000_EXTENSION, tag, owner, clock),
14+
device_single_card_slot_interface<kn5000_extension_interface>(mconfig, *this)
15+
// FIXME: do we need these?
16+
// m_firq_callback(*this),
17+
// m_irq_callback(*this)
18+
{
19+
}
20+
21+
void kn5000_extension_device::rom_map(address_space_installer &space, offs_t start, offs_t end)
22+
{
23+
auto dev = get_card_device();
24+
if(dev)
25+
space.install_device(start, end, *dev, &kn5000_extension_interface::rom_map);
26+
}
27+
28+
void kn5000_extension_device::io_map(address_space_installer &space, offs_t start, offs_t end)
29+
{
30+
auto dev = get_card_device();
31+
if(dev)
32+
space.install_device(start, end, *dev, &kn5000_extension_interface::io_map);
33+
}
34+
35+
void kn5000_extension_device::device_start()
36+
{
37+
}
38+
39+
kn5000_extension_interface::kn5000_extension_interface(const machine_config &mconfig, device_t &device) :
40+
device_interface(device, "extension"),
41+
m_ext(dynamic_cast<kn5000_extension_device *>(device.owner()))
42+
{
43+
}
44+
45+
// FIXME: do we need these?
46+
//WRITE_LINE_MEMBER(kn5000_extension_interface::firq_w)
47+
//{
48+
// if(m_ext)
49+
// m_ext->m_firq_callback(state);
50+
//}
51+
//
52+
//WRITE_LINE_MEMBER(kn5000_extension_interface::irq_w)
53+
//{
54+
// if(m_ext)
55+
// m_ext->m_irq_callback(state);
56+
//}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// license:BSD-3-Clause
2+
// copyright-holders:Olivier Galibert, Felipe Sanches
3+
//
4+
// Generic Technics KN5000 extension slot
5+
6+
#ifndef MAME_BUS_TECHNICS_KN5000_EXTENSION_H
7+
#define MAME_BUS_TECHNICS_KN5000_EXTENSION_H
8+
9+
#pragma once
10+
11+
class kn5000_extension_device;
12+
13+
class kn5000_extension_interface : public device_interface
14+
{
15+
public:
16+
kn5000_extension_interface(const machine_config &mconfig, device_t &device);
17+
18+
virtual void rom_map(address_map &map) = 0;
19+
virtual void io_map(address_map &map) = 0;
20+
21+
// FIXME: do we need these?
22+
//protected:
23+
// DECLARE_WRITE_LINE_MEMBER(firq_w);
24+
// DECLARE_WRITE_LINE_MEMBER(irq_w);
25+
26+
private:
27+
kn5000_extension_device *const m_ext;
28+
};
29+
30+
31+
class kn5000_extension_device : public device_t, public device_single_card_slot_interface<kn5000_extension_interface>
32+
{
33+
friend class kn5000_extension_interface;
34+
35+
public:
36+
kn5000_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
37+
38+
void rom_map(address_space_installer &space, offs_t start, offs_t end);
39+
void io_map(address_space_installer &space, offs_t start, offs_t end);
40+
41+
protected:
42+
virtual void device_start() override;
43+
};
44+
45+
DECLARE_DEVICE_TYPE(KN5000_EXTENSION, kn5000_extension_device)
46+
47+
#endif // MAME_BUS_TECHNICS_KN5000_EXTENSION_H

0 commit comments

Comments
 (0)