summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Joakim Larsson Edström <joakimlarsson42@gmail.com>2026-01-28 14:10:19 +0100
committer GitHub <noreply@github.com>2026-01-28 14:10:19 +0100
commit6cb0ec64ac8608c4bcf864807495f91c55db3653 (patch)
tree50959ea697bf6ffcfd866d4eff5d0cb63f269c06 /src
parent983cdc585d5cf16cf03ef9eda4b817be47ea9e7d (diff)
Miniforce and CPU1 (#14873)
* bus/vme/sys68k_cpu1: replace layout with tag-based screen references * bus/vme/sys68k_cpu1: functional front panel matching real hardware * bus/vme/sys68k_cpu1: add DB25 serial port connectors to front panel layout * bus/vme/sys68k_cpu1: show connected device type on front panel connectors * bus/vme/sys68k_cpu1: rename RS232 port tags to match front panel labels, wire up P5 --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/vme/sys68k_cpu1.cpp90
-rw-r--r--src/devices/bus/vme/sys68k_cpu1.h15
-rw-r--r--src/emu/layout/sys68k_cpu1.lay113
-rw-r--r--src/mame/layout/fccpu1.lay18
4 files changed, 205 insertions, 31 deletions
diff --git a/src/devices/bus/vme/sys68k_cpu1.cpp b/src/devices/bus/vme/sys68k_cpu1.cpp
index 160a14ad3e8..2762598fa8e 100644
--- a/src/devices/bus/vme/sys68k_cpu1.cpp
+++ b/src/devices/bus/vme/sys68k_cpu1.cpp
@@ -59,9 +59,6 @@
* Slot 1 Controller Board ASCU 7 31 0xb02000
* ----------------------------------------------------------
*
- * TODO:
- * - Add internal layout with switches and leds
- *
****************************************************************************/
#include "emu.h"
@@ -72,6 +69,8 @@
#include "machine/clock.h"
#include "softlist.h"
+#include "sys68k_cpu1.lh"
+
/*
* The baudrate on the Force68k CPU-1 to CPU-6 is generated by a Motorola 14411 bitrate generator
* The CPU-6 documents matches the circuits that I could find on the CPU-1 board.
@@ -149,6 +148,11 @@ vme_sys68k_cpu1_card_device::vme_sys68k_cpu1_card_device(machine_config const &m
, m_serial_p3(*this, "SERIAL_P3")
, m_serial_p4(*this, "SERIAL_P4")
, m_serial_p5(*this, "SERIAL_P5")
+ , m_panel(*this, "PANEL")
+ , m_halt_led(*this, "led_halt")
+ , m_p3_conn(*this, "conn_p3")
+ , m_p4_conn(*this, "conn_p4")
+ , m_p5_conn(*this, "conn_p5")
, m_cart(*this, "exp_rom1")
, m_eprom(*this, "eprom")
, m_ram(*this, "ram")
@@ -216,6 +220,10 @@ static INPUT_PORTS_START (sys68k_cpu1)
PORT_CONFSETTING(mc14411_device::TIMER_F13, "110/440")
PORT_CONFSETTING(mc14411_device::TIMER_F15, "60/240")
+ PORT_START("PANEL")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F5) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(vme_sys68k_cpu1_card_device::reset_button), 0)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ABORT") PORT_CODE(KEYCODE_F6) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(vme_sys68k_cpu1_card_device::abort_button), 0)
+
INPUT_PORTS_END
/*
@@ -293,11 +301,39 @@ void vme_sys68k_cpu1_card_device::centronics_select_w(int state)
m_pit->portb_setbit(0, state);
}
+/* Front panel RESET button */
+INPUT_CHANGED_MEMBER(vme_sys68k_cpu1_card_device::reset_button)
+{
+ m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE);
+}
+
+/* Front panel ABORT button — directly wired to IRQ level 7, vector 31 */
+INPUT_CHANGED_MEMBER(vme_sys68k_cpu1_card_device::abort_button)
+{
+ m_maincpu->set_input_line(M68K_IRQ_7, newval ? ASSERT_LINE : CLEAR_LINE);
+}
+
+/* Poll CPU halt state for the front panel HALT LED */
+TIMER_CALLBACK_MEMBER(vme_sys68k_cpu1_card_device::halt_update)
+{
+ m_halt_led = m_maincpu->suspended(SUSPEND_REASON_HALT | SUSPEND_REASON_RESET) ? 1 : 0;
+}
+
/* Start it up */
void vme_sys68k_cpu1_card_device::device_start()
{
LOG("%s\n", FUNCNAME);
+ // Front panel HALT LED
+ m_halt_led.resolve();
+ m_halt_timer = timer_alloc(FUNC(vme_sys68k_cpu1_card_device::halt_update), this);
+ m_halt_timer->adjust(attotime::from_hz(10), 0, attotime::from_hz(10));
+
+ // Front panel connector status
+ m_p3_conn.resolve();
+ m_p4_conn.resolve();
+ m_p5_conn.resolve();
+
save_item(NAME(m_centronics_busy));
save_item(NAME(m_centronics_ack));
save_item(NAME(m_centronics_select));
@@ -320,6 +356,26 @@ void vme_sys68k_cpu1_card_device::device_reset()
{
LOG("%s\n", FUNCNAME);
+ // Front panel connector status — identify connected device type
+ // (must be set here rather than device_start, as layout resolve_tags overwrites outputs with defstate)
+ auto detect_port = [this](char const *tag) -> int {
+ auto *port = subdevice<rs232_port_device>(tag);
+ if (!port || !port->get_card_device())
+ return 0; // not connected
+ char const *devtag = port->get_card_device()->device().basetag();
+ if (!strcmp(devtag, "terminal") || !strcmp(devtag, "h19") || !strcmp(devtag, "ie15") || !strcmp(devtag, "swtpc8212"))
+ return 1; // terminal
+ if (!strcmp(devtag, "null_modem"))
+ return 2; // null modem
+ if (!strcmp(devtag, "printer") || !strcmp(devtag, "rs_printer"))
+ return 3; // printer
+ return 0;
+ };
+
+ m_p3_conn = detect_port("p3");
+ m_p4_conn = detect_port("p4");
+ m_p5_conn = detect_port("p5");
+
// Set up the BRG divider. RSA is a jumper setting and RSB is always set High
m_brg->rsa_w(m_serial_brf->read() == 0x80 ? ASSERT_LINE : CLEAR_LINE);
m_brg->rsb_w(ASSERT_LINE);
@@ -468,6 +524,8 @@ void vme_sys68k_cpu1_card_device::device_add_mconfig(machine_config &config)
M68000(config, m_maincpu, XTAL(16'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &vme_sys68k_cpu1_card_device::force68k_mem);
+ config.set_default_layout(layout_sys68k_cpu1);
+
/* P3/Host Port config
* LO command causes ROM monitor to expect S-records on HOST port by default
* Implementation through nullmodem currently does not support handshakes so
@@ -475,24 +533,30 @@ void vme_sys68k_cpu1_card_device::device_add_mconfig(machine_config &config)
* UI mount <file> feature.
*/
ACIA6850(config, m_aciahost, 0);
- m_aciahost->txd_handler().set("rs232host", FUNC(rs232_port_device::write_txd));
- m_aciahost->rts_handler().set("rs232host", FUNC(rs232_port_device::write_rts));
+ m_aciahost->txd_handler().set("p3", FUNC(rs232_port_device::write_txd));
+ m_aciahost->rts_handler().set("p3", FUNC(rs232_port_device::write_rts));
- rs232_port_device &rs232host(RS232_PORT(config, "rs232host", default_rs232_devices, "null_modem"));
- rs232host.rxd_handler().set(m_aciahost, FUNC(acia6850_device::write_rxd));
- rs232host.cts_handler().set(m_aciahost, FUNC(acia6850_device::write_cts));
+ rs232_port_device &p3(RS232_PORT(config, "p3", default_rs232_devices, "null_modem"));
+ p3.rxd_handler().set(m_aciahost, FUNC(acia6850_device::write_rxd));
+ p3.cts_handler().set(m_aciahost, FUNC(acia6850_device::write_cts));
/* P4/Terminal Port config */
ACIA6850(config, m_aciaterm, 0);
- m_aciaterm->txd_handler().set("rs232trm", FUNC(rs232_port_device::write_txd));
- m_aciaterm->rts_handler().set("rs232trm", FUNC(rs232_port_device::write_rts));
+ m_aciaterm->txd_handler().set("p4", FUNC(rs232_port_device::write_txd));
+ m_aciaterm->rts_handler().set("p4", FUNC(rs232_port_device::write_rts));
- rs232_port_device &rs232trm(RS232_PORT(config, "rs232trm", default_rs232_devices, "terminal"));
- rs232trm.rxd_handler().set(m_aciaterm, FUNC(acia6850_device::write_rxd));
- rs232trm.cts_handler().set(m_aciaterm, FUNC(acia6850_device::write_cts));
+ rs232_port_device &p4(RS232_PORT(config, "p4", default_rs232_devices, "terminal"));
+ p4.rxd_handler().set(m_aciaterm, FUNC(acia6850_device::write_rxd));
+ p4.cts_handler().set(m_aciaterm, FUNC(acia6850_device::write_cts));
/* P5/Remote Port config */
ACIA6850(config, m_aciaremt, 0);
+ m_aciaremt->txd_handler().set("p5", FUNC(rs232_port_device::write_txd));
+ m_aciaremt->rts_handler().set("p5", FUNC(rs232_port_device::write_rts));
+
+ rs232_port_device &p5(RS232_PORT(config, "p5", default_rs232_devices, nullptr));
+ p5.rxd_handler().set(m_aciaremt, FUNC(acia6850_device::write_rxd));
+ p5.cts_handler().set(m_aciaremt, FUNC(acia6850_device::write_cts));
/* Bit Rate Generator */
MC14411(config, m_brg, XTAL(1'843'200));
diff --git a/src/devices/bus/vme/sys68k_cpu1.h b/src/devices/bus/vme/sys68k_cpu1.h
index 4843f29b81f..daf80ec3a2a 100644
--- a/src/devices/bus/vme/sys68k_cpu1.h
+++ b/src/devices/bus/vme/sys68k_cpu1.h
@@ -23,6 +23,10 @@ class vme_sys68k_cpu1_card_device
public:
vme_sys68k_cpu1_card_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+ // Front panel buttons (public for input port constructor)
+ DECLARE_INPUT_CHANGED_MEMBER(reset_button);
+ DECLARE_INPUT_CHANGED_MEMBER(abort_button);
+
protected:
virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
@@ -50,6 +54,9 @@ private:
void write_f13_clock(int state) { write_acia_clocks(mc14411_device::TIMER_F13, state); }
void write_f15_clock(int state) { write_acia_clocks(mc14411_device::TIMER_F15, state); }
+ // Front panel HALT LED polling
+ TIMER_CALLBACK_MEMBER(halt_update);
+
// Centronics printer interface
void centronics_ack_w(int state);
void centronics_busy_w(int state);
@@ -83,6 +90,14 @@ private:
required_ioport m_serial_p4;
required_ioport m_serial_p5;
+ // Front panel
+ required_ioport m_panel;
+ output_finder<> m_halt_led;
+ output_finder<> m_p3_conn;
+ output_finder<> m_p4_conn;
+ output_finder<> m_p5_conn;
+ emu_timer *m_halt_timer;
+
uint16_t *m_usrrom;
required_device<generic_slot_device> m_cart;
diff --git a/src/emu/layout/sys68k_cpu1.lay b/src/emu/layout/sys68k_cpu1.lay
new file mode 100644
index 00000000000..1e5251fc51c
--- /dev/null
+++ b/src/emu/layout/sys68k_cpu1.lay
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<!--
+license:CC0-1.0
+copyright-holders:Joakim Larsson Edstrom
+
+Force Computers SYS68K/CPU-1 front panel layout
+Matches real hardware: RESET and ABORT pushbuttons, HALT LED, P3/P4/P5 connectors
+-->
+<mamelayout version="2">
+
+ <!-- Background colors -->
+ <element name="panel_bg">
+ <rect><color red="0.15" green="0.15" blue="0.15" /></rect>
+ </element>
+ <element name="silver">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ </element>
+
+ <!-- LED element (red, active high) for HALT indicator -->
+ <element name="led_red" defstate="0">
+ <disk state="0"><color red="0.2" green="0.05" blue="0.05" /></disk>
+ <disk state="1"><color red="1.0" green="0.0" blue="0.0" /></disk>
+ </element>
+
+ <!-- Text labels (white on dark) -->
+ <element name="txt_sys68k"><text string="SYS68K"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_cpu1"><text string="CPU-1"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_reset"><text string="RESET"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_abort"><text string="ABORT"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_halt"><text string="HALT"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_p3"><text string="P3"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_p4"><text string="P4"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+ <element name="txt_p5"><text string="P5"><color red="0.9" green="0.9" blue="0.9" /></text></element>
+
+ <!-- DB25 serial port connector (vertical orientation, light housing) -->
+ <element name="db25">
+ <rect><color red="0.70" green="0.70" blue="0.70" /></rect>
+ </element>
+
+ <!-- Connection status indicator (0=none, 1=terminal, 2=null modem, 3=printer) -->
+ <element name="conn_status" defstate="0">
+ <text state="0" string="--"><color red="0.0" green="0.0" blue="0.0" /></text>
+ <text state="1" string="TERMINAL"><color red="0.0" green="0.0" blue="0.0" /></text>
+ <text state="2" string="NULL MODEM"><color red="0.0" green="0.0" blue="0.0" /></text>
+ <text state="3" string="PRINTER"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+
+ <!-- Button elements (interactive) -->
+ <element name="btn_reset" defstate="0">
+ <rect state="0"><color red="0.25" green="0.25" blue="0.25" /></rect>
+ <rect state="1"><color red="0.40" green="0.40" blue="0.40" /></rect>
+ </element>
+ <element name="btn_abort" defstate="0">
+ <rect state="0"><color red="0.25" green="0.25" blue="0.25" /></rect>
+ <rect state="1"><color red="0.40" green="0.40" blue="0.40" /></rect>
+ </element>
+
+ <!-- Front panel group (reusable across views) -->
+ <group name="panel">
+ <!-- Dark panel background -->
+ <element ref="panel_bg"><bounds x="0" y="0" width="46" height="345" /></element>
+ <!-- Silver accent strip -->
+ <element ref="silver"><bounds x="46" y="0" width="2" height="345" /></element>
+
+ <!-- Title -->
+ <element ref="txt_sys68k"><bounds x="3" y="5" width="40" height="12" /></element>
+ <element ref="txt_cpu1"><bounds x="3" y="18" width="40" height="12" /></element>
+
+ <!-- RESET button (interactive) -->
+ <element ref="btn_reset" inputtag="PANEL" inputmask="0x01"><bounds x="8" y="42" width="30" height="16" /></element>
+ <element ref="txt_reset"><bounds x="8" y="44" width="30" height="12" /></element>
+
+ <!-- ABORT button (interactive) -->
+ <element ref="btn_abort" inputtag="PANEL" inputmask="0x02"><bounds x="8" y="64" width="30" height="16" /></element>
+ <element ref="txt_abort"><bounds x="8" y="66" width="30" height="12" /></element>
+
+ <!-- HALT LED -->
+ <element name="led_halt" ref="led_red"><bounds x="6" y="96" width="8" height="8" /></element>
+ <element ref="txt_halt"><bounds x="16" y="95" width="26" height="10" /></element>
+
+ <!-- P3 serial port connector (Host) -->
+ <element ref="txt_p3"><bounds x="3" y="118" width="18" height="10" /></element>
+ <element ref="db25"><bounds x="10" y="130" width="22" height="50" /></element>
+ <element name="conn_p3" ref="conn_status"><bounds x="10" y="152" width="22" height="5" /></element>
+
+ <!-- P4 serial port connector (Terminal) -->
+ <element ref="txt_p4"><bounds x="3" y="192" width="18" height="10" /></element>
+ <element ref="db25"><bounds x="10" y="204" width="22" height="50" /></element>
+ <element name="conn_p4" ref="conn_status"><bounds x="10" y="227" width="22" height="5" /></element>
+
+ <!-- P5 serial port connector (Remote) -->
+ <element ref="txt_p5"><bounds x="3" y="268" width="18" height="10" /></element>
+ <element ref="db25"><bounds x="10" y="280" width="22" height="50" /></element>
+ <element name="conn_p5" ref="conn_status"><bounds x="10" y="303" width="22" height="5" /></element>
+ </group>
+
+ <!-- Front Panel: standalone panel strip (always available) -->
+ <view name="Front Panel">
+ <group ref="panel"><bounds x="0" y="0" width="48" height="345" /></group>
+ </view>
+
+ <!-- Front Panel with Terminal: panel strip + terminal side by side (dropped if no terminal) -->
+ <view name="Front Panel with Terminal">
+ <group ref="panel"><bounds x="0" y="0" width="48" height="345" /></group>
+ <screen tag="p4:terminal:terminal_screen"><bounds x="52" y="0" width="460" height="345" /></screen>
+ </view>
+
+ <!-- Terminal view: just the terminal screen (dropped if no terminal attached) -->
+ <view name="Terminal">
+ <screen tag="p4:terminal:terminal_screen"><bounds x="0" y="0" width="640" height="480" /></screen>
+ </view>
+
+</mamelayout>
diff --git a/src/mame/layout/fccpu1.lay b/src/mame/layout/fccpu1.lay
deleted file mode 100644
index 27264eaacad..00000000000
--- a/src/mame/layout/fccpu1.lay
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!--
-license:CC0-1.0
-copyright-holders:Joakim Larsson Edstrom
-
-Force Computers CPU-1 layout
--->
-<mamelayout version="2">
- <element name="silver">
- <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
- </element>
-
- <view name="Force Computers SYS68K/CPU-1">
- <screen index="0"><bounds x="50" y="0" width="640" height="480" /></screen>
- <element ref="silver"><bounds x="0" y="0" width="36" height="480" /></element>
- </view>
-</mamelayout>
-