From 43a95685e1ad166ca22dd52e8556b0410d11d33b Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Thu, 16 May 2024 15:33:01 +0300 Subject: New systems marked not working ------------------------------ Nokia MikroMikko 2 M35D [MikkoMuseo, Curt Coder] New software list items marked not working ------------------------------------------ mm2_flop: Nokia MS-DOS 2.00 Versio 2.21 (Fin) [MikkoMuseo] --- hash/mm2_flop.xml | 27 ++++++ src/emu/xtal.cpp | 1 + src/mame/mame.lst | 3 + src/mame/nokia/mikromikko2.cpp | 212 +++++++++++++++++++++++++++++++++++++++++ src/mame/nokia/mikromikko2.h | 82 ++++++++++++++++ 5 files changed, 325 insertions(+) create mode 100644 hash/mm2_flop.xml create mode 100644 src/mame/nokia/mikromikko2.cpp create mode 100644 src/mame/nokia/mikromikko2.h diff --git a/hash/mm2_flop.xml b/hash/mm2_flop.xml new file mode 100644 index 00000000000..47d1851d9f9 --- /dev/null +++ b/hash/mm2_flop.xml @@ -0,0 +1,27 @@ + + + + + + + + Nokia MS-DOS 2.00 Versio 2.21 (Fin) + 1985 + Nokia Data + + + + + + + + + + + + + + + diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 2733e6c302f..25733f73dcf 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -431,6 +431,7 @@ const double XTAL::known_xtals[] = { 34'000'000, /* 34_MHz_XTAL Gaelco PCBs */ 34'291'712, /* 34.291712_MHz_XTAL Fairlight CMI master card */ 34'846'000, /* 34.846_MHz_XTAL Visual 550 */ + 35'452'500, /* 35.4525_MHz_XTAL Nokia MikroMikko 2 */ 35'469'000, /* 35.469_MHz_XTAL ZX Spectrum +2/+3 (~8x PAL subcarrier) */ 35'640'000, /* 35.640_MHz_XTAL HDS200 132-column display clock */ 35'834'400, /* 35.8344_MHz_XTAL Tab Products E-22 132-column display clock */ diff --git a/src/mame/mame.lst b/src/mame/mame.lst index c8f6d81e61e..7dc55f2279a 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -34895,6 +34895,9 @@ mm1m6g // mm1m7 // mm1m7g // +@source:nokia/mikromikko2.cpp +mm2m35d // + @source:nokia/nokia_3310.cpp noki3210 // noki3310 // diff --git a/src/mame/nokia/mikromikko2.cpp b/src/mame/nokia/mikromikko2.cpp new file mode 100644 index 00000000000..39a2ca9b190 --- /dev/null +++ b/src/mame/nokia/mikromikko2.cpp @@ -0,0 +1,212 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/* + + Models: + + M13A: Floppy drive 5.25", 320 KB + memory 128 KB + M13B: Floppy drive 5.25", 320 KB + memory 256 KB + M13C: Floppy drive 5.25", 320 KB + memory 512 KB + M13D: Floppy drive 5.25", 320 KB + memory 768 KB + M14A: 2 floppy drives 5.25", 320 KB + memory 128 KB + M14B: 2 floppy drives 5.25", 320 KB + memory 256 KB + M14C: 2 floppy drives 5.25", 320 KB + memory 512 KB + M14D: 2 floppy drives 5.25", 320 KB + memory 768 KB + M15A: Floppy drive 5.25", 640 KB + memory 128 KB + M15B: Floppy drive 5.25", 640 KB + memory 256 KB + M15C: Floppy drive 5.25", 640 KB + memory 512 KB + M15D: Floppy drive 5.25", 640 KB + memory 768 KB + M16A: 2 floppy drives 5.25", 640 KB + memory 128 KB + M16B: 2 floppy drives 5.25", 640 KB + memory 256 KB + M16C: 2 floppy drives 5.25", 640 KB + memory 512 KB + M16D: 2 floppy drives 5.25", 640 KB + memory 768 KB + M25B: Floppy drive 5.25", 640 KB + hard disk 5.25" Winchester, 5 MB + memory 256 KB + M25C: Floppy drive 5.25", 640 KB + hard disk 5.25" Winchester, 5 MB + memory 512 KB + M25D: Floppy drive 5.25", 640 KB + hard disk 5.25" Winchester, 5 MB + memory 768 KB + M35B: Floppy drive 5.25", 640 KB + hard disk 5.25" Winchester, 15 MB + memory 256 KB + M35C: Floppy drive 5.25", 640 KB + hard disk 5.25" Winchester, 15 MB + memory 512 KB + M35D: Floppy drive 5.25", 640 KB + hard disk 5.25" Winchester, 15 MB + memory 768 KB + + ./chdman createhd -chs 306,2,32 -ss 256 -o st406.chd + +*/ + +#include "emu.h" +#include "mikromikko2.h" +#include "softlist_dev.h" + +void mm2_state::novram_store(offs_t offset, uint8_t data) +{ + m_novram->store(1); + m_novram->store(0); +} + +void mm2_state::novram_recall(offs_t offset, uint8_t data) +{ + m_novram->recall(BIT(data, 0)); +} + +uint8_t mm2_state::videoram_r(offs_t offset) +{ + address_space &program = m_maincpu->space(AS_PROGRAM); + + uint16_t data = program.read_word(0xd0000 | (offset << 1)); + + // character + m_drb0->write(data & 0xff); + + // attributes + m_drb1->write(data >> 8); + + return data & 0xff; +} + +void mm2_state::mm2_map(address_map &map) +{ + map(0x00000, 0x1ffff).ram(); // DRAM 128 KB (on SBC186) + map(0x20000, 0x3ffff).ram(); // DRAM 128 KB (on SBC186) + map(0x40000, 0x7ffff).ram(); // DRAM 256 KB (on SBC186 or MEME186) + map(0x80000, 0xbffff).ram(); // DRAM 256 KB (on MEME186) + map(0xd0000, 0xd7fff).ram(); // video RAM + map(0xd8000, 0xd9fff).rom().region("chargen", 0); + map(0xf0000, 0xf01ff).rw(m_novram, FUNC(x2212_device::read), FUNC(x2212_device::write)).umask16(0xff00); + map(0xf0200, 0xfffff).rom().region(I80186_TAG, 0x200); +} + +void mm2_state::mm2_io_map(address_map &map) +{ + // SBC16 + map(0xf800, 0xf803).rw(m_pic, FUNC(pic8259_device::read), FUNC(pic8259_device::write)).umask16(0x00ff); + map(0xf880, 0xf887).rw(m_mpsc, FUNC(i8274_device::cd_ba_r), FUNC(i8274_device::cd_ba_w)).umask16(0xff00); + //map(0xf885, 0xf885) STATUS INPUT PORT + map(0xf900, 0xf901).w(FUNC(mm2_state::novram_store)).umask16(0x00ff); + map(0xf97e, 0xf97f).w(FUNC(mm2_state::novram_recall)).umask16(0xff00); + map(0xf930, 0xf937).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)).umask16(0x00ff); + //map(0xf941, 0xf941) TIMER INTERRUPT CLEAR LATCH + //map(0xf951, 0xf951) DIAGNOSTIC DISPLAY + //map(0xf961, 0xf961) CLOCK SELECT CLS0 + //map(0xf963, 0xf963) CLOCK SELECT CLS1 + //map(0xf965, 0xf965) LOOPBACK LLBA + //map(0xf967, 0xf967) LOOPBACK LLBB + //map(0xf969, 0xf969) DATA CODING NRZI + //map(0xf96b, 0xf96b) SIGNAL LEVELS V24 + //map(0xf96d, 0xf96d) SIGNAL LEVELS X27 + //map(0xf96f, 0xf96f) V24 SIGNAL DTRA + //map(0xf971, 0xf971) V24 SIGNAL TSTA + //map(0xf973, 0xf973) V24 SIGNAL SRSA + //map(0xf975, 0xf975) V24 SIGNAL DTRB + + // CRTC186 + map(0xf980, 0xf9ff).rw(m_vpac, FUNC(crt9007_device::read), FUNC(crt9007_device::write)).umask16(0x00ff); + map(0xf980, 0xf981).rw(m_sio, FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)).umask16(0xff00); + map(0xf982, 0xf983).rw(m_sio, FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)).umask16(0xff00); + //map(0xf9c0, 0xf9c0) COMPL + //map(0xf9c2, 0xf9c2) BLANK + //map(0xf9c4, 0xf9c4) MODE + //map(0xf9c6, 0xf9c6) MODEG + //map(0xf9ca, 0xf9ca) C70/50 + //map(0xf9ce, 0xf9ce) CRU + //map(0xf9cc, 0xf9cc) CRB + + // MMC186 + map(0xfa00, 0xfa1f).rw(m_dmac, FUNC(am9517a_device::read), FUNC(am9517a_device::write)).umask16(0x00ff); + // map(0xfa20, 0xfa20) SASI COMMAND/STATUS + // map(0xfa22, 0xfa22) SASI DATA + map(0xfa40, 0xfa41).r(m_fdc, FUNC(upd765a_device::msr_r)).umask16(0x00ff); + map(0xfa42, 0xfa43).rw(m_fdc, FUNC(upd765a_device::fifo_r), FUNC(upd765a_device::fifo_w)).umask16(0x00ff); + // map(0xfa60, 0xfa60) CONTROL + // map(0xfa70, 0xfa70) DMA HIGH ADDRESS BITS +} + +void mm2_state::vpac_mem(address_map &map) +{ + map(0x0000, 0x3fff).r(FUNC(mm2_state::videoram_r)); +} + +static INPUT_PORTS_START( mm2 ) +INPUT_PORTS_END + +uint32_t mm2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +void mm2_state::machine_start() +{ +} + +void mm2_state::floppy_formats(format_registration &fr) +{ + fr.add_mfm_containers(); +} + +static void mm2_floppies(device_slot_interface &device) +{ + device.option_add("525qd", FLOPPY_525_QD); +} + +void mm2_state::mm2(machine_config &config) +{ + // SBC186 + I80186(config, m_maincpu, 16_MHz_XTAL/2); + m_maincpu->set_addrmap(AS_PROGRAM, &mm2_state::mm2_map); + m_maincpu->set_addrmap(AS_IO, &mm2_state::mm2_io_map); + + PIC8259(config, m_pic); + + PIT8253(config, m_pit); + + I8274(config, m_mpsc, 16_MHz_XTAL/4); + + X2212(config, m_novram); + + // CRTC186 + screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(71); + screen.set_screen_update(FUNC(mm2_state::screen_update)); + screen.set_size(800, 420); + screen.set_visarea(0, 800-1, 0, 420-1); + + CRT9007(config, m_vpac, 35.4525_MHz_XTAL/8); + m_vpac->set_addrmap(0, &mm2_state::vpac_mem); + m_vpac->set_character_width(10); + m_vpac->set_screen(SCREEN_TAG); + + CRT9212(config, m_drb0, 0); + + CRT9212(config, m_drb1, 0); + + I8251(config, m_sio, 16_MHz_XTAL/4); + + // MMC186 + AM9517A(config, m_dmac, 16_MHz_XTAL/4); + + UPD765A(config, m_fdc, 16_MHz_XTAL/2, true, true); + + FLOPPY_CONNECTOR(config, UPD765_TAG ":0", mm2_floppies, "525qd", mm2_state::floppy_formats).enable_sound(true); + + NSCSI_BUS(config, "sasi"); + NSCSI_CONNECTOR(config, "sasi:0", default_scsi_devices, "s1410"); + NSCSI_CONNECTOR(config, "sasi:7", default_scsi_devices, "scsicb", true) + .option_add_internal("scsicb", NSCSI_CB); + + // software lists + SOFTWARE_LIST(config, "flop_list").set_original("mm2_flop"); +} + +ROM_START( mm2m35d ) + ROM_REGION16_LE( 0x10000, I80186_TAG, 0 ) + ROMX_LOAD( "9488a.ic38", 0x0000, 0x4000, CRC(ae831b67) SHA1(d922f02dfac783d0c86ca9a09bc2ad345ee1e71a), ROM_SKIP(1) ) + ROMX_LOAD( "9490a.ic52", 0x0001, 0x4000, CRC(3ca470d1) SHA1(4cc300544e4a81939c2eb87e22c3ea367a7ec62c), ROM_SKIP(1) ) + ROMX_LOAD( "9489a.ic41", 0x8000, 0x4000, CRC(a0f19bf5) SHA1(6af91b2f798ddfa9430546e23f00bbeb5ead5a29), ROM_SKIP(1) ) + ROMX_LOAD( "9491a.ic58", 0x8001, 0x4000, CRC(cf7f3e6d) SHA1(5bf24661f5535d40d1b6ef7f2599f424f6eb2a11), ROM_SKIP(1) ) + + ROM_REGION16_LE( 0x4000, "chargen", 0 ) + ROMX_LOAD( "9067e.ic40", 0x0001, 0x2000, CRC(fa719d92) SHA1(af6cc03a8171b9c95e8548c5e0268816344d7367), ROM_SKIP(1) ) + + ROM_REGION( 0x2000, "crtc186", 0 ) + ROM_LOAD( "9026a.ic26", 0x0000, 0x2000, NO_DUMP ) + ROM_LOAD( "729025b.ic8", 0x0000, 0x200, NO_DUMP ) +ROM_END + +COMP( 1983, mm2m35d, 0, 0, mm2, mm2, mm2_state, empty_init, "Nokia Data", "MikroMikko 2 M35D", MACHINE_IS_SKELETON ) diff --git a/src/mame/nokia/mikromikko2.h b/src/mame/nokia/mikromikko2.h new file mode 100644 index 00000000000..5e5d2141eae --- /dev/null +++ b/src/mame/nokia/mikromikko2.h @@ -0,0 +1,82 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +#ifndef MAME_NOKIA_MIKROMIKKO2_H +#define MAME_NOKIA_MIKROMIKKO2_H + +#pragma once + +#include "screen.h" +#include "bus/nscsi/devices.h" +#include "bus/scsi/s1410.h" +#include "bus/scsi/scsihd.h" +#include "cpu/i86/i186.h" +#include "imagedev/floppy.h" +#include "machine/nvram.h" +#include "machine/am9517a.h" +#include "machine/i8251.h" +#include "machine/nscsi_bus.h" +#include "machine/nscsi_cb.h" +#include "machine/pit8253.h" +#include "machine/pic8259.h" +#include "machine/upd765.h" +#include "machine/z80sio.h" +#include "machine/x2212.h" +#include "video/crt9007.h" +#include "video/crt9212.h" + +#define I80186_TAG "maincpu" +#define UPD765_TAG "upd765" +#define SCREEN_TAG "screen" + +class mm2_state : public driver_device +{ +public: + mm2_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, I80186_TAG), + m_novram(*this, "x2212"), + m_pic(*this, "pic8259"), + m_pit(*this, "pit8253"), + m_mpsc(*this, "i8274"), + m_vpac(*this, "crt9007"), + m_drb0(*this, "crt9212_0"), + m_drb1(*this, "crt9212_1"), + m_sio(*this, "i8251"), + m_dmac(*this, "am9517a"), + m_fdc(*this, UPD765_TAG), + m_sasi(*this, "sasi:7:scsicb") + { } + + void mm2(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + required_device m_maincpu; + required_device m_novram; + required_device m_pic; + required_device m_pit; + required_device m_mpsc; + required_device m_vpac; + required_device m_drb0; + required_device m_drb1; + required_device m_sio; + required_device m_dmac; + required_device m_fdc; + required_device m_sasi; + + void mm2_map(address_map &map); + void mm2_io_map(address_map &map); + void vpac_mem(address_map &map); + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + static void floppy_formats(format_registration &fr); + + void novram_store(offs_t offset, uint8_t data); + void novram_recall(offs_t offset, uint8_t data); + uint8_t videoram_r(offs_t offset); +}; + +#endif // MAME_NOKIA_MIKROMIKKO2_H -- cgit v1.2.3