From 64366ea2ca0206ddc7cf34048061d3a7ba0666a6 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 7 Jul 2024 21:28:37 +0200 Subject: [PATCH] mpf1,mpf1p: add pwm display device for digits panel, berlin: add hardware notes --- src/mame/hegenerglaser/berlin.cpp | 16 ++++++++++ src/mame/hegenerglaser/mm1.cpp | 15 +++------ src/mame/hegenerglaser/mm2.cpp | 2 +- src/mame/hegenerglaser/polgar.cpp | 2 +- src/mame/layout/mpf1.lay | 37 ++++------------------ src/mame/layout/mpf1b.lay | 37 ++++------------------ src/mame/layout/mt80z.lay | 37 ++++------------------ src/mame/multitech/mkit09.cpp | 2 +- src/mame/multitech/mpf1.cpp | 39 ++++++++--------------- src/mame/multitech/mpf1p.cpp | 51 +++++++++++++++---------------- src/mame/robotron/z9001.cpp | 2 +- 11 files changed, 80 insertions(+), 160 deletions(-) diff --git a/src/mame/hegenerglaser/berlin.cpp b/src/mame/hegenerglaser/berlin.cpp index 5b4ab1ce6aec8..e51819eb97227 100644 --- a/src/mame/hegenerglaser/berlin.cpp +++ b/src/mame/hegenerglaser/berlin.cpp @@ -5,6 +5,22 @@ Mephisto Berlin 68000 / Berlin Professional 68020 Berlin Professional has the same engine as Mephisto Genius. +Hardware notes: + +Berlin 68000: +- MC68HC000FN12 @ 12.288MHz +- 128KB ROM (2*M27C512-15XF1) +- 512KB DRAM (4*TC514256AP-80) +- 8KB SRAM (HM6264ALP-12 or equivalent), CR2032 battery +- HD44780, 2-line LCD display (small daughterboard) +- 8*8 chessboard buttons, 64 leds, piezo + +Berlin Professional 68020: +- MC68EC020RP25 @ 24.576MHz +- 256KB ROM (D27C020-200V10) +- 1MB DRAM (8*MCM514256AP70) +- rest is similar to Berlin 68000 + Undocumented buttons: - holding ENTER and LEFT cursor on boot runs diagnostics - holding CLEAR on boot clears battery backed RAM diff --git a/src/mame/hegenerglaser/mm1.cpp b/src/mame/hegenerglaser/mm1.cpp index af11a53bac304..9544068575cce 100644 --- a/src/mame/hegenerglaser/mm1.cpp +++ b/src/mame/hegenerglaser/mm1.cpp @@ -76,7 +76,7 @@ class mm1_state : public driver_device protected: virtual void machine_start() override; - virtual void machine_reset() override; + virtual void machine_reset() override { m_reset = true; } private: // devices/pointers @@ -109,11 +109,6 @@ void mm1_state::machine_start() save_item(NAME(m_kp_mux)); } -void mm1_state::machine_reset() -{ - m_reset = true; -} - /******************************************************************************* @@ -319,8 +314,8 @@ ROM_END Drivers *******************************************************************************/ -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -SYST( 1983, mm1, 0, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. B)", MACHINE_SUPPORTS_SAVE ) -SYST( 1983, mm1a, mm1, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. A)", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1983, mm1, 0, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. B)", MACHINE_SUPPORTS_SAVE ) +SYST( 1983, mm1a, mm1, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. A)", MACHINE_SUPPORTS_SAVE ) -SYST( 1984, mmirage, 0, 0, mirage, mirage, mm1_state, empty_init, "Hegener + Glaser", "Mephisto Mirage", MACHINE_SUPPORTS_SAVE ) +SYST( 1984, mmirage, 0, 0, mirage, mirage, mm1_state, empty_init, "Hegener + Glaser", "Mephisto Mirage", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/hegenerglaser/mm2.cpp b/src/mame/hegenerglaser/mm2.cpp index e820d50e13521..af977d7f1aab1 100644 --- a/src/mame/hegenerglaser/mm2.cpp +++ b/src/mame/hegenerglaser/mm2.cpp @@ -32,7 +32,7 @@ Open Computer Chess Championship. MM IV TurboKit 18MHz - (mm4tk) This is a replacement ROM combining the TurboKit initial ROM with the original MM IV. -The TurboKit powers up to it's tiny ROM, copies itself to RAM, banks in normal ROM, +The TurboKit powers up to its tiny ROM, copies itself to RAM, banks in normal ROM, copies that to faster SRAM, then patches the checksum and the LED blink delays. There is an undumped MM V TurboKit, which will be the exact same except for location diff --git a/src/mame/hegenerglaser/polgar.cpp b/src/mame/hegenerglaser/polgar.cpp index 4a2e37300f299..a71514031b793 100644 --- a/src/mame/hegenerglaser/polgar.cpp +++ b/src/mame/hegenerglaser/polgar.cpp @@ -39,8 +39,8 @@ class polgar_state : public driver_device m_keys(*this, "KEY") { } - void polgar10(machine_config &config); void polgar(machine_config &config); + void polgar10(machine_config &config); private: required_device m_maincpu; diff --git a/src/mame/layout/mpf1.lay b/src/mame/layout/mpf1.lay index 8e856d41ffc9a..b89156e916463 100644 --- a/src/mame/layout/mpf1.lay +++ b/src/mame/layout/mpf1.lay @@ -21,12 +21,6 @@ license:CC0-1.0 - - - - - - @@ -35,43 +29,24 @@ license:CC0-1.0 - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/layout/mpf1b.lay b/src/mame/layout/mpf1b.lay index 8e856d41ffc9a..b89156e916463 100644 --- a/src/mame/layout/mpf1b.lay +++ b/src/mame/layout/mpf1b.lay @@ -21,12 +21,6 @@ license:CC0-1.0 - - - - - - @@ -35,43 +29,24 @@ license:CC0-1.0 - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/layout/mt80z.lay b/src/mame/layout/mt80z.lay index 8e856d41ffc9a..b89156e916463 100644 --- a/src/mame/layout/mt80z.lay +++ b/src/mame/layout/mt80z.lay @@ -21,12 +21,6 @@ license:CC0-1.0 - - - - - - @@ -35,43 +29,24 @@ license:CC0-1.0 - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/multitech/mkit09.cpp b/src/mame/multitech/mkit09.cpp index ef7dd136142cd..10170716154de 100644 --- a/src/mame/multitech/mkit09.cpp +++ b/src/mame/multitech/mkit09.cpp @@ -40,8 +40,8 @@ Test Paste: #include "cpu/m6809/m6809.h" #include "imagedev/cassette.h" #include "machine/6821pia.h" -#include "speaker.h" #include "video/pwm.h" +#include "speaker.h" #include "mkit09.lh" diff --git a/src/mame/multitech/mpf1.cpp b/src/mame/multitech/mpf1.cpp index cd72bf8ff2f91..681bec6a4eb44 100644 --- a/src/mame/multitech/mpf1.cpp +++ b/src/mame/multitech/mpf1.cpp @@ -45,11 +45,11 @@ #include "emu.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" -#include "machine/timer.h" #include "machine/z80ctc.h" #include "machine/z80daisy.h" #include "machine/z80pio.h" #include "sound/spkrdev.h" +#include "video/pwm.h" #include "bus/generic/carts.h" #include "bus/generic/slot.h" @@ -73,12 +73,12 @@ class mpf1_state : public driver_device : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") + , m_7seg_pwm(*this, "7seg_pwm") , m_cassette(*this, "cassette") , m_rom_region(*this, "maincpu") , m_rom_u7(*this, "rom_u7") , m_pc(*this, "PC%u", 0U) , m_special(*this, "SPECIAL") - , m_digits(*this, "digit%u", 0U) , m_leds(*this, "led%u", 0U) { } @@ -95,12 +95,12 @@ class mpf1_state : public driver_device private: required_device m_maincpu; required_device m_speaker; + required_device m_7seg_pwm; required_device m_cassette; required_region_ptr m_rom_region; required_device m_rom_u7; required_ioport_array<6> m_pc; required_ioport m_special; - output_finder<6> m_digits; output_finder<2> m_leds; void mpf1_io_map(address_map &map); @@ -116,11 +116,7 @@ class mpf1_state : public driver_device int m_break = 0; int m_m1 = 0; - uint8_t m_lednum = 0; - - emu_timer *m_led_refresh_timer = nullptr; - - TIMER_CALLBACK_MEMBER(led_refresh); + uint8_t m_select = 0; }; /* Address Maps */ @@ -339,20 +335,13 @@ INPUT_PORTS_END /* Intel 8255A Interface */ -TIMER_CALLBACK_MEMBER(mpf1_state::led_refresh) -{ - for (int digit = 0; digit < 6; digit++) - if (BIT(m_lednum, 5 - digit)) - m_digits[digit] = param; -} - uint8_t mpf1_state::ppi_pa_r() { uint8_t data = 0x7f; /* bit 0 to 5, keyboard rows 0 to 5 */ for (int row = 0; row < 6; row++) - if (!BIT(m_lednum, row)) + if (!BIT(m_select, row)) data &= m_pc[row]->read(); /* bit 6, user key */ @@ -367,17 +356,14 @@ uint8_t mpf1_state::ppi_pa_r() void mpf1_state::ppi_pb_w(uint8_t data) { /* swap bits around for the 7-segment emulation */ - uint8_t led_data = bitswap<8>(data, 6, 1, 2, 0, 7, 5, 4, 3); - - /* timer to update segments */ - m_led_refresh_timer->adjust(attotime::from_usec(70), led_data); + m_7seg_pwm->write_mx(bitswap<8>(data, 6, 1, 2, 0, 7, 5, 4, 3)); } void mpf1_state::ppi_pc_w(uint8_t data) { /* bits 0-5, led select and keyboard latch */ - m_lednum = data & 0x3f; - m_led_refresh_timer->adjust(attotime::never); + m_select = data & 0x3f; + m_7seg_pwm->write_my(m_select); /* bit 6, monitor break control */ m_break = BIT(data, 6); @@ -422,19 +408,17 @@ static const z80_daisy_config mpf1_daisy_chain[] = void mpf1_state::machine_start() { - m_led_refresh_timer = timer_alloc(FUNC(mpf1_state::led_refresh), this); - m_digits.resolve(); m_leds.resolve(); /* register for state saving */ save_item(NAME(m_break)); save_item(NAME(m_m1)); - save_item(NAME(m_lednum)); + save_item(NAME(m_select)); } void mpf1_state::machine_reset() { - m_lednum = 0; + m_select = 0; } @@ -466,6 +450,9 @@ void mpf1_state::mpf1(machine_config &config) m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); /* video hardware */ + PWM_DISPLAY(config, m_7seg_pwm).set_size(6, 8); + m_7seg_pwm->set_segmask(0x3f, 0xff); + config.set_default_layout(layout_mpf1); /* sound hardware */ diff --git a/src/mame/multitech/mpf1p.cpp b/src/mame/multitech/mpf1p.cpp index e8e1c061364f0..766338fc8dbd8 100644 --- a/src/mame/multitech/mpf1p.cpp +++ b/src/mame/multitech/mpf1p.cpp @@ -8,15 +8,15 @@ * RAM: 4 kilobytes * * Input: 49 key keyboard * * Storage: Cassette tape * -* Video: 20x 16-segment LED display * +* Video: 20x 16-segment VFD * * Sound: Speaker * \************************************************/ #include "emu.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" -#include "machine/timer.h" #include "sound/spkrdev.h" +#include "video/pwm.h" #include "bus/generic/carts.h" #include "bus/generic/slot.h" @@ -38,10 +38,10 @@ class mpf1p_state : public driver_device : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") + , m_vfd_pwm(*this, "vfd_pwm") , m_cassette(*this, "cassette") , m_key(*this, "PC%u", 1U) , m_special(*this, "SPECIAL") - , m_digits(*this, "digit%u", 0U) , m_leds(*this, "led%u", 0U) { } @@ -55,10 +55,10 @@ class mpf1p_state : public driver_device private: required_device m_maincpu; required_device m_speaker; + required_device m_vfd_pwm; required_device m_cassette; required_ioport_array<20> m_key; required_ioport m_special; - output_finder<20> m_digits; output_finder<2> m_leds; void mpf1_step(address_map &map); @@ -80,10 +80,10 @@ class mpf1p_state : public driver_device int m_break = 0; int m_m1 = 0; - uint32_t m_lednum = 0; - uint16_t m_led_data = 0; + uint32_t m_select = 0; + uint16_t m_vfd_data = 0; - void led_refresh(uint16_t data); + void vfd_refresh(); }; @@ -231,13 +231,9 @@ static INPUT_PORTS_START( mpf1p ) INPUT_PORTS_END -void mpf1p_state::led_refresh(uint16_t data) +void mpf1p_state::vfd_refresh() { - for (int digit = 0; digit < 20; digit++) - { - if (!BIT(m_lednum, digit)) - m_digits[digit] = data ^ 0xffff; - } + m_vfd_pwm->matrix(~m_select, ~m_vfd_data); } @@ -253,23 +249,20 @@ uint8_t mpf1p_state::ppi1_pc_r() void mpf1p_state::ppi1_pa_w(uint8_t data) { - m_lednum = (m_lednum & 0xffffff00) | data; - - led_refresh(m_led_data); + m_select = (m_select & 0xffffff00) | data; + vfd_refresh(); } void mpf1p_state::ppi1_pb_w(uint8_t data) { - m_lednum = (m_lednum & 0xffff00ff) | (data << 8); - - led_refresh(m_led_data); + m_select = (m_select & 0xffff00ff) | (data << 8); + vfd_refresh(); } void mpf1p_state::ppi1_pc_w(uint8_t data) { - m_lednum = (m_lednum & 0xfff0ffff) | (data << 16); - - led_refresh(m_led_data); + m_select = (m_select & 0xff00ffff) | (data << 16); + vfd_refresh(); } uint8_t mpf1p_state::ppi2_pc_r() @@ -278,7 +271,7 @@ uint8_t mpf1p_state::ppi2_pc_r() // bit 0 to 2, keyboard rows 0 to 20 for (int row = 0; row < 20; row++) - if (!BIT(m_lednum, row)) + if (!BIT(m_select, row)) data &= m_key[row]->read(); // bit 3, tape input @@ -289,7 +282,8 @@ uint8_t mpf1p_state::ppi2_pc_r() void mpf1p_state::ppi2_pa_w(uint8_t data) { - m_led_data = (m_led_data & 0xff00) | data; + m_vfd_data = (m_vfd_data & 0xff00) | data; + vfd_refresh(); } void mpf1p_state::ppi2_pb_w(uint8_t data) @@ -297,7 +291,8 @@ void mpf1p_state::ppi2_pb_w(uint8_t data) // swap bits around for the 14-segment emulation data = bitswap<8>(data, 7, 6, 4, 2, 3, 5, 1, 0); - m_led_data = (m_led_data & 0x00ff) | (data << 8); + m_vfd_data = (m_vfd_data & 0x00ff) | (data << 8); + vfd_refresh(); } void mpf1p_state::ppi2_pc_w(uint8_t data) @@ -334,13 +329,12 @@ uint8_t mpf1p_state::step_r(offs_t offset) void mpf1p_state::machine_start() { - m_digits.resolve(); m_leds.resolve(); // register for state saving */ save_item(NAME(m_break)); save_item(NAME(m_m1)); - save_item(NAME(m_lednum)); + save_item(NAME(m_select)); } @@ -366,6 +360,9 @@ void mpf1p_state::mpf1p(machine_config &config) ppi_2.out_pc_callback().set(FUNC(mpf1p_state::ppi2_pc_w)); ppi_2.in_pc_callback().set(FUNC(mpf1p_state::ppi2_pc_r)); + PWM_DISPLAY(config, m_vfd_pwm).set_size(20, 16); + m_vfd_pwm->set_segmask(0xfffff, 0xffff); + CASSETTE(config, m_cassette); m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); diff --git a/src/mame/robotron/z9001.cpp b/src/mame/robotron/z9001.cpp index 9953278502195..33d7230eb7d94 100644 --- a/src/mame/robotron/z9001.cpp +++ b/src/mame/robotron/z9001.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic , Robbbert +// copyright-holders:Miodrag Milanovic, Robbbert /************************************************************************************* Robotron Z9001 (KC85/1)