summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2024-07-12 12:12:37 +0300
committer Curt Coder <curtcoder@mail.com>2024-07-12 12:12:37 +0300
commit032931d8ba27c4f91e555e9105a869b48bdc4f79 (patch)
tree29cd53b047491ef38793c8ab7eaf6a9ee71e7b55
parentb886191f7987af57945817d2f6570207723716d5 (diff)
nokia/mikromikko2: Added speaker and diagnostic display. [Curt Coder]
-rw-r--r--src/mame/nokia/mikromikko2.cpp9
-rw-r--r--src/mame/nokia/mikromikko2.h5
2 files changed, 11 insertions, 3 deletions
diff --git a/src/mame/nokia/mikromikko2.cpp b/src/mame/nokia/mikromikko2.cpp
index 5d7f35ef1a9..3c4b9579567 100644
--- a/src/mame/nokia/mikromikko2.cpp
+++ b/src/mame/nokia/mikromikko2.cpp
@@ -81,9 +81,9 @@ void mm2_state::mm2_io_map(address_map &map)
//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(0xf930, 0xf937).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)).umask16(0xff00);
//map(0xf941, 0xf941) TIMER INTERRUPT CLEAR LATCH
- //map(0xf951, 0xf951) DIAGNOSTIC DISPLAY
+ map(0xf950, 0xf951).w(FUNC(mm2_state::diag_w)).umask16(0xff00);
//map(0xf961, 0xf961) CLOCK SELECT CLS0
//map(0xf963, 0xf963) CLOCK SELECT CLS1
//map(0xf965, 0xf965) LOOPBACK LLBA
@@ -230,13 +230,16 @@ void mm2_state::mm2(machine_config &config)
m_pit->set_clk<2>(16_MHz_XTAL/8);
m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir0_w));
//m_pit->out_handler<1>().set()); MPSC ch B line clock
- //m_pit->out_handler<2>().set()); Beep control
+ m_pit->out_handler<2>().set(m_speaker, FUNC(speaker_sound_device::level_w));
I8274(config, m_mpsc, 16_MHz_XTAL/4);
m_mpsc->out_int_callback().set(m_pic, FUNC(pic8259_device::ir1_w));
X2212(config, m_novram);
+ SPEAKER(config, "mono").front_center();
+ SPEAKER_SOUND(config, m_speaker, 0).add_route(ALL_OUTPUTS, "mono", 1.00);
+
// CRTC186
screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
screen.set_refresh_hz(71);
diff --git a/src/mame/nokia/mikromikko2.h b/src/mame/nokia/mikromikko2.h
index ca27a1c4ce3..e46d5eed90d 100644
--- a/src/mame/nokia/mikromikko2.h
+++ b/src/mame/nokia/mikromikko2.h
@@ -7,6 +7,7 @@
#include "emupal.h"
#include "screen.h"
+#include "speaker.h"
#include "bus/nscsi/devices.h"
#include "bus/scsi/s1410.h"
#include "bus/scsi/scsihd.h"
@@ -22,6 +23,7 @@
#include "machine/upd765.h"
#include "machine/z80sio.h"
#include "machine/x2212.h"
+#include "sound/spkrdev.h"
#include "video/crt9007.h"
#include "video/crt9212.h"
@@ -45,6 +47,7 @@ public:
m_sio(*this, "i8251"),
m_dmac(*this, "am9517a"),
m_fdc(*this, UPD765_TAG),
+ m_speaker(*this, "speaker"),
m_sasi(*this, "sasi:7:scsicb"),
m_palette(*this, "palette")
{ }
@@ -67,6 +70,7 @@ private:
required_device<i8251_device> m_sio;
required_device<am9517a_device> m_dmac;
required_device<upd765a_device> m_fdc;
+ required_device<speaker_sound_device> m_speaker;
required_device<nscsi_callback_device> m_sasi;
required_device<palette_device> m_palette;
@@ -78,6 +82,7 @@ private:
static void floppy_formats(format_registration &fr);
+ void diag_w(offs_t offset, uint8_t data) { popmessage("%02x", data); }
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);