(nw) dauphin: added pwm device

This commit is contained in:
Robbbert 2020-05-15 14:18:29 +10:00
parent d47530f1e6
commit c6549e644d

View File

@ -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) )