summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/dolphunk.cpp
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2020-05-15 14:18:29 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2020-05-15 14:18:29 +1000
commitc6549e644d09a9b055cd7ad3800ad5addd55d0e8 (patch)
tree5edf36639e19a6991368e52a7fc998239c6fa9ed /src/mame/drivers/dolphunk.cpp
parentd47530f1e693f35d0a8e8d068c0702401dc9728d (diff)
(nw) dauphin: added pwm device
Diffstat (limited to 'src/mame/drivers/dolphunk.cpp')
-rw-r--r--src/mame/drivers/dolphunk.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mame/drivers/dolphunk.cpp b/src/mame/drivers/dolphunk.cpp
index f6b6140985b..f1dc5ef5647 100644
--- a/src/mame/drivers/dolphunk.cpp
+++ b/src/mame/drivers/dolphunk.cpp
@@ -86,6 +86,7 @@
#include "machine/timer.h"
#include "sound/spkrdev.h"
#include "speaker.h"
+#include "video/pwm.h"
#include "dolphunk.lh"
@@ -98,7 +99,7 @@ public:
, m_maincpu(*this, "maincpu")
, m_speaker(*this, "speaker")
, m_cass(*this, "cassette")
- , m_digits(*this, "digit%u", 0U)
+ , m_display(*this, "display")
{ }
void dauphin(machine_config &config);
@@ -117,11 +118,10 @@ private:
bool m_cassbit;
bool m_cassold;
bool m_speaker_state;
- virtual void machine_start() override { m_digits.resolve(); }
required_device<s2650_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cass;
- output_finder<4> m_digits;
+ required_device<pwm_display_device> m_display;
};
READ_LINE_MEMBER( dauphin_state::cass_r )
@@ -131,7 +131,7 @@ READ_LINE_MEMBER( dauphin_state::cass_r )
WRITE8_MEMBER( dauphin_state::port00_w )
{
- m_digits[offset] = data;
+ m_display->matrix(1<<offset, data);
}
WRITE8_MEMBER( dauphin_state::port06_w )
@@ -237,6 +237,8 @@ void dauphin_state::dauphin(machine_config &config)
/* video hardware */
config.set_default_layout(layout_dolphunk);
+ PWM_DISPLAY(config, m_display).set_size(4, 8);
+ m_display->set_segmask(0x0f, 0xff);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -250,7 +252,7 @@ void dauphin_state::dauphin(machine_config &config)
/* ROM definition */
ROM_START( dauphin )
- ROM_REGION( 0x8000, "maincpu", 0 )
+ ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "dolphin_mo.rom", 0x0000, 0x0100, CRC(a8811f48) SHA1(233c629dc20fac286c8c1559e461bb0b742a675e) )
// This one is used in winarcadia but it is a bad dump, we use the corrected one above
//ROM_LOAD( "dolphin_mo.rom", 0x0000, 0x0100, BAD_DUMP CRC(1ac4ac18) SHA1(62a63de6fcd6cd5fcee930d31c73fe603647f06c) )