summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/arm7/lpc210x.cpp
diff options
context:
space:
mode:
author Devin Acker <d@revenant1.net>2021-10-27 04:21:46 -0400
committer GitHub <noreply@github.com>2021-10-27 10:21:46 +0200
commit935d28a67573f4cd1333639927f19798ce953f1e (patch)
tree6fccc4072e472f8caf6d062779d417b5eb820da1 /src/devices/cpu/arm7/lpc210x.cpp
parent163659b50aabc57aaeeb55e35e88d85523cdbc4c (diff)
new NOT_WORKING machine (Casio CTK-2100) (#8757)
* ctk2100: preliminary work * ctk2100: possible keyboard hookup * ctk2100: hook up rudimentary timers * ctk2100: add ports and hook up the LCD * ctk2100: timer tweaks, input tweaks * ctk2100: fix I/O port reads (stops constant LCD resets) * gt913: increase key polling rate (fixes ctk2100 test mode) * ctk2100: add ADCs, clean up and comment some other stuff * lpc210x: add the PL190 VIC here too while i'm at it * vic_pl192: fix clang build * unidasm: add gt913
Diffstat (limited to 'src/devices/cpu/arm7/lpc210x.cpp')
-rw-r--r--src/devices/cpu/arm7/lpc210x.cpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/devices/cpu/arm7/lpc210x.cpp b/src/devices/cpu/arm7/lpc210x.cpp
index 9e63b5785d0..75a322f01a2 100644
--- a/src/devices/cpu/arm7/lpc210x.cpp
+++ b/src/devices/cpu/arm7/lpc210x.cpp
@@ -37,13 +37,14 @@ void lpc210x_device::lpc2103_map(address_map &map)
map(0xE01FC100, 0xE01FC103).rw(FUNC(lpc210x_device::apbdiv_r), FUNC(lpc210x_device::apbdiv_w));
map(0xE01FC1a0, 0xE01FC1a3).rw(FUNC(lpc210x_device::scs_r), FUNC(lpc210x_device::scs_w));
- map(0xFFFFF000, 0xFFFFF2ff).rw(FUNC(lpc210x_device::vic_r), FUNC(lpc210x_device::vic_w)); // interrupt controller
+ map(0xfffff000, 0xffffffff).m(m_vic, FUNC(vic_pl190_device::map)); // interrupt controller
}
lpc210x_device::lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: arm7_cpu_device(mconfig, LPC2103, tag, owner, clock, 4, ARCHFLAG_T, ENDIANNESS_LITTLE)
, m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(FUNC(lpc210x_device::lpc2103_map), this))
+ , m_vic(*this, "vic")
{
}
@@ -98,29 +99,6 @@ void lpc210x_device::device_reset()
m_TxPR[1] = 0;
}
-/* VIC (Vectored Interrupt Controller) */
-
-uint32_t lpc210x_device::vic_r(offs_t offset, uint32_t mem_mask)
-{
- switch (offset*4)
- {
- default:
- logerror("%s unhandled read from VIC offset %08x mem_mask %08x\n", machine().describe_context(), offset * 4, mem_mask);
- }
-
- return 0x00000000;
-}
-
-
-void lpc210x_device::vic_w(offs_t offset, uint32_t data, uint32_t mem_mask)
-{
- switch (offset * 4)
- {
- default:
- logerror("%s unhandled write VIC offset %02x data %08x mem_mask %08x\n", machine().describe_context(), offset * 4, data, mem_mask);
- }
-}
-
/* PIN Select block */
uint32_t lpc210x_device::pin_r(offs_t offset, uint32_t mem_mask)
@@ -278,4 +256,7 @@ void lpc210x_device::write_timer(int timer, int offset, uint32_t data, uint32_t
void lpc210x_device::device_add_mconfig(machine_config &config)
{
+ PL190_VIC(config, m_vic, 0);
+ m_vic->out_irq_cb().set_inputline(*this, ARM7_IRQ_LINE);
+ m_vic->out_fiq_cb().set_inputline(*this, ARM7_FIRQ_LINE);
}