mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
(nw) mp68a: added cassette interface.
This commit is contained in:
parent
330561ce1c
commit
7c6fe0d804
@ -12,7 +12,7 @@
|
||||
* "Modulab v2" appears to have been owned or licensed to Esselte and enhanced with more modular monitor routines
|
||||
* in a project driven by Alf Karlsson.
|
||||
*
|
||||
* The Esselte 1000 was an educational package based on Apple II plus software and litterature
|
||||
* The Esselte 1000 was an educational package based on Apple II plus software and literature
|
||||
* but the relation to Didact is at this point unknown so it is probably a pure Esselte software production.
|
||||
*
|
||||
* Misc links about the boards supported by this driver.
|
||||
@ -52,6 +52,7 @@
|
||||
#include "imagedev/cassette.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
// Generated artwork includes
|
||||
#include "mp68a.lh"
|
||||
@ -94,6 +95,7 @@ class didact_state : public driver_device
|
||||
public:
|
||||
didact_state(const machine_config &mconfig, device_type type, const char * tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_cass(*this, "cassette")
|
||||
, m_io_lines(*this, "LINE%u", 0U)
|
||||
, m_lines{ 0, 0, 0, 0 }
|
||||
, m_rs232(*this, "rs232")
|
||||
@ -105,6 +107,7 @@ class didact_state : public driver_device
|
||||
protected:
|
||||
virtual void machine_start() override { m_led.resolve(); }
|
||||
|
||||
optional_device<cassette_image_device> m_cass;
|
||||
required_ioport_array<5> m_io_lines;
|
||||
uint8_t m_lines[4];
|
||||
uint8_t m_reset;
|
||||
@ -323,6 +326,7 @@ void md6802_state::md6802_map(address_map &map)
|
||||
|
||||
// Just a statement that the real mp68a hardware was designed with 6820 and not 6821
|
||||
// They are functional equivalents BUT has different electrical characteristics.
|
||||
// 2019-07-27 Cassette added: saves ok, load is unreliable, probably an original design problem.
|
||||
#define pia6820_device pia6821_device
|
||||
#define PIA6820 PIA6821
|
||||
class mp68a_state : public didact_state
|
||||
@ -434,6 +438,7 @@ READ8_MEMBER( mp68a_state::pia2_kbB_r )
|
||||
LOGKBD(" SHIFT is released\n");
|
||||
}
|
||||
|
||||
pb |= (m_cass->input() < 0.04) ? 0x20 : 0;
|
||||
LOGKBD("%02x\n", pb);
|
||||
|
||||
return pb;
|
||||
@ -442,6 +447,7 @@ READ8_MEMBER( mp68a_state::pia2_kbB_r )
|
||||
WRITE8_MEMBER( mp68a_state::pia2_kbB_w )
|
||||
{
|
||||
LOG("--->%s(%02x)\n", FUNCNAME, data);
|
||||
m_cass->output(BIT(data, 4) ? -1.0 : +1.0);
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER( mp68a_state::pia2_cb1_r )
|
||||
@ -882,6 +888,12 @@ void mp68a_state::mp68a(machine_config &config)
|
||||
DM9368(config, m_digits[3], 0).update_cb().set(FUNC(mp68a_state::digit_w<3>));
|
||||
DM9368(config, m_digits[4], 0).update_cb().set(FUNC(mp68a_state::digit_w<4>));
|
||||
DM9368(config, m_digits[5], 0).update_cb().set(FUNC(mp68a_state::digit_w<5>));
|
||||
|
||||
/* Cassette */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
CASSETTE(config, m_cass);
|
||||
m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
|
||||
m_cass->add_route(ALL_OUTPUTS, "mono", 0.05);
|
||||
}
|
||||
|
||||
ROM_START( modulab )
|
||||
|
Loading…
Reference in New Issue
Block a user