diff options
author | hap <happppp@users.noreply.github.com> | 2021-11-29 12:51:45 +0100 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2021-11-29 12:52:06 +0100 |
commit | c44cff5be8bdf23bff7608ed59e7a42ce15b9c83 (patch) | |
tree | 269dbf2aa9c33d8c3b73e42e90a43fce8a48690f | |
parent | e3d21c46a6fdd71a0563ea5baf89060a2a2fc556 (diff) |
im01: add freq measurements, add 7segs to artwork
-rw-r--r-- | src/mame/drivers/im01.cpp | 32 | ||||
-rw-r--r-- | src/mame/drivers/intellect02.cpp | 12 | ||||
-rw-r--r-- | src/mame/layout/im01.lay | 34 |
3 files changed, 60 insertions, 18 deletions
diff --git a/src/mame/drivers/im01.cpp b/src/mame/drivers/im01.cpp index 105c0413fdd..c60eb642ff4 100644 --- a/src/mame/drivers/im01.cpp +++ b/src/mame/drivers/im01.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause // copyright-holders:hap +// thanks-to:Radon17, Berger /****************************************************************************** Электроника ИМ-01 (Elektronika IM-01) @@ -8,16 +9,21 @@ Soviet chess computer, produced by Svetana from 1986-1992. IM-01T is the same hardware, the program has more difficulty levels. Hardware notes: -- К1801ВМ1 CPU (PDP-11 derived) -- 16KB ROM (2*К1809РЕ1), 4KB RAM(К1809РУ1) +- К1801ВМ1 CPU (PDP-11 derived) @ ~4.61MHz +- 16KB ROM (2*К1809РЕ1), 2KB RAM(К1809РУ1) - K1809BB1 (I/O, counter) -- 4-digit 7seg panel, beeper +- 4-digit VFD 7seg panel(cyan, green window overlay), beeper TODO: - emulate К1801ВМ1, using T11 for now and I hope it works ok -- emulate K1809BB1 -- inputs, 7segs, sound -- cpu frequency, irq frequency +- emulate K1809BB1, IRQ is from here too (measured 177.4Hz) +- It's running a bit too fast?: XTAL was measured 9.22MHz, CPU clock was + measured 4.61MHz, beeper frequency 3.73KHz and beeper duration 34.2ms. + In MAME, beeper frequency is 4.15KHz and duration is 31ms, meaning it's + around 1.1 times faster, maybe К1801ВМ1 internal timing differs from T11, + and/or T11 core timing itself is not 100% accurate. There's a big "but": + these measurements are from the older IM-01. +- verify actual XTAL, the label couldn't be seen - dump/add im01 (rom serial 106/107) ******************************************************************************/ @@ -30,6 +36,9 @@ TODO: #include "speaker.h" +// internal artwork +#include "im01.lh" + namespace { @@ -50,6 +59,7 @@ protected: virtual void machine_start() override; private: + // devices/pointers required_device<t11_device> m_maincpu; required_device<pwm_display_device> m_display; required_device<dac_bit_interface> m_dac; @@ -60,6 +70,7 @@ private: u8 irq_callback(offs_t offset); INTERRUPT_GEN_MEMBER(interrupt); + // I/O handlers void update_display(); u16 mux_r(offs_t offset, u16 mem_mask); void mux_w(offs_t offset, u16 data, u16 mem_mask); @@ -158,7 +169,7 @@ u16 im01_state::input_r(offs_t offset, u16 mem_mask) void im01_state::main_map(address_map &map) { - map(0x0000, 0x0fff).ram(); + map(0x0000, 0x07ff).ram(); map(0x2000, 0x5fff).rom(); map(0xe830, 0xe831).rw(FUNC(im01_state::mux_r), FUNC(im01_state::mux_w)); map(0xe83c, 0xe83d).rw(FUNC(im01_state::digit_r), FUNC(im01_state::digit_w)); @@ -218,15 +229,16 @@ INPUT_PORTS_END void im01_state::im01(machine_config &config) { // basic machine hardware - T11(config, m_maincpu, 5'000'000); + T11(config, m_maincpu, 9.216_MHz_XTAL / 2); // actually К1801ВМ1 m_maincpu->set_initial_mode(3 << 13); m_maincpu->set_addrmap(AS_PROGRAM, &im01_state::main_map); m_maincpu->in_iack().set(FUNC(im01_state::irq_callback)); - m_maincpu->set_periodic_int(FUNC(im01_state::interrupt), attotime::from_hz(200)); + m_maincpu->set_periodic_int(FUNC(im01_state::interrupt), attotime::from_hz(177)); // video hardware PWM_DISPLAY(config, m_display).set_size(5, 8); m_display->set_segmask(0x1f, 0x7f); + config.set_default_layout(layout_im01); // sound hardware SPEAKER(config, "speaker").front_center(); @@ -254,4 +266,4 @@ ROM_END ******************************************************************************/ // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -CONS( 1986, im01t, 0, 0, im01, im01, im01_state, empty_init, "Svetlana", "Elektronika IM-01T", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) +CONS( 1986, im01t, 0, 0, im01, im01, im01_state, empty_init, "Svetlana", "Elektronika IM-01T", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/intellect02.cpp b/src/mame/drivers/intellect02.cpp index 4f68c243a99..0a5e032507f 100644 --- a/src/mame/drivers/intellect02.cpp +++ b/src/mame/drivers/intellect02.cpp @@ -10,7 +10,7 @@ announced(can't say for certain how many released). PCB labels have prefix ДМ it's assumed to have been designed by НИИ БРЭА (SRI BREA). First shown in 1983, produced during around 1985-1992. -hardware notes: +Hardware notes: - КР580ВМ80А CPU (i8080A clone) @ 1.5MHz - КР580ИК55 (i8255 clone) - 1 KB RAM (8*КР565РУ2), cartridge port @@ -26,7 +26,7 @@ The 2nd(4-level) chess cartridge is completely different, not a CC3 clone. Intellect-01 looks like it didn't get further than a prototype. It was a dedicated chess computer, probably a clone of CC3. -keypad legend: +Keypad legend: СБ - сброс (reset) ВВ - ввод (input) @@ -93,16 +93,12 @@ private: void digit_w(u8 data); void control_w(u8 data); - u8 m_digit_data; - u8 m_led_select; + u8 m_digit_data = 0; + u8 m_led_select = 0; }; void intel02_state::machine_start() { - // zerofill - m_digit_data = 0; - m_led_select = 0; - // register for savestates save_item(NAME(m_digit_data)); save_item(NAME(m_led_select)); diff --git a/src/mame/layout/im01.lay b/src/mame/layout/im01.lay new file mode 100644 index 00000000000..c4e8d4d298d --- /dev/null +++ b/src/mame/layout/im01.lay @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- +license:CC0 +--> +<mamelayout version="2"> + +<!-- NOTE: no chesspieces simulation here --> + +<!-- define elements --> + + <element name="digit" defstate="0"> + <led7seg><color red="0.15" green="1.0" blue="0.05" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="1"><color red="0.15" green="1.0" blue="0.05" /></disk> + <disk state="0"><color red="0.015" green="0.1" blue="0.005" /></disk> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds x="-1.5" y="10" width="20.5" height="8" /> + + <element name="digit4" ref="digit"><bounds x="-0.9" y="11" width="4" height="6" /></element> + <element name="digit3" ref="digit"><bounds x="3.8" y="11" width="4" height="6" /></element> + <element name="digit1" ref="digit"><bounds x="9.7" y="11" width="4" height="6" /></element> + <element name="digit0" ref="digit"><bounds x="14.4" y="11" width="4" height="6" /></element> + + <element name="2.0" ref="led"><bounds x="8.6" y="12.0" width="0.6" height="0.6" /></element> + <element name="2.3" ref="led"><bounds x="8.4" y="15.5" width="0.6" height="0.6" /></element> + </view> +</mamelayout> |