diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 9b93e3be209..73b859fcb3c 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3128,7 +3128,6 @@ files { MAME_DIR .. "src/mame/drivers/elf.cpp", MAME_DIR .. "src/mame/includes/elf.h", MAME_DIR .. "src/mame/drivers/exp85.cpp", - MAME_DIR .. "src/mame/includes/exp85.h", } createMESSProjects(_target, _subtarget, "next") diff --git a/src/mame/drivers/exp85.cpp b/src/mame/drivers/exp85.cpp index 051e2c2640c..26d2a906fe0 100644 --- a/src/mame/drivers/exp85.cpp +++ b/src/mame/drivers/exp85.cpp @@ -30,13 +30,59 @@ #include "emu.h" -#include "includes/exp85.h" #include "machine/i8155.h" #include "machine/i8355.h" #include "machine/ram.h" #include "speaker.h" +#include "bus/rs232/rs232.h" +#include "cpu/i8085/i8085.h" +#include "imagedev/cassette.h" +#include "sound/spkrdev.h" + +#define I8085A_TAG "u100" +#define I8155_TAG "u106" +#define I8355_TAG "u105" + +class exp85_state : public driver_device +{ +public: + exp85_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, I8085A_TAG) + , m_rs232(*this, "rs232") + , m_cassette(*this, "cassette") + , m_speaker(*this, "speaker") + , m_rom(*this, I8085A_TAG) + , m_tape_control(0) + { } + + void exp85(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); + DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 ); + +private: + required_device m_maincpu; + required_device m_rs232; + required_device m_cassette; + required_device m_speaker; + required_memory_region m_rom; + + virtual void machine_start() override; + + uint8_t i8355_a_r(); + void i8355_a_w(uint8_t data); + DECLARE_READ_LINE_MEMBER( sid_r ); + DECLARE_WRITE_LINE_MEMBER( sod_w ); + + /* cassette state */ + bool m_tape_control; + void exp85_io(address_map &map); + void exp85_mem(address_map &map); +}; + /* Memory Maps */ void exp85_state::exp85_mem(address_map &map) @@ -72,8 +118,8 @@ INPUT_CHANGED_MEMBER( exp85_state::trigger_rst75 ) static INPUT_PORTS_START( exp85 ) PORT_START("SPECIAL") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("R") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, exp85_state, trigger_reset, 0) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("I") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, exp85_state, trigger_rst75, 0) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("R") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, exp85_state, trigger_reset, 0) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("I") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, exp85_state, trigger_rst75, 0) INPUT_PORTS_END /* 8355 Interface */ @@ -170,6 +216,8 @@ void exp85_state::machine_start() membank("bank1")->configure_entry(0, m_rom->base() + 0xf000); membank("bank1")->configure_entry(1, m_rom->base()); membank("bank1")->set_entry(0); + + save_item(NAME(m_tape_control)); } /* Machine Driver */ @@ -229,4 +277,4 @@ ROM_END /* System Drivers */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1979, exp85, 0, 0, exp85, exp85, exp85_state, empty_init, "Netronics", "Explorer/85", 0 ) +COMP( 1979, exp85, 0, 0, exp85, exp85, exp85_state, empty_init, "Netronics", "Explorer/85", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/exp85.h b/src/mame/includes/exp85.h deleted file mode 100644 index ed621213306..00000000000 --- a/src/mame/includes/exp85.h +++ /dev/null @@ -1,54 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef MAME_INCLUDES_EXP85_H -#define MAME_INCLUDES_EXP85_H - -#include "bus/rs232/rs232.h" -#include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" -#include "sound/spkrdev.h" - -#define SCREEN_TAG "screen" -#define I8085A_TAG "u100" -#define I8155_TAG "u106" -#define I8355_TAG "u105" - -class exp85_state : public driver_device -{ -public: - exp85_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I8085A_TAG), - m_rs232(*this, "rs232"), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_rom(*this, I8085A_TAG), - m_tape_control(0) - { } - - void exp85(machine_config &config); - - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 ); - -private: - required_device m_maincpu; - required_device m_rs232; - required_device m_cassette; - required_device m_speaker; - required_memory_region m_rom; - - virtual void machine_start() override; - - uint8_t i8355_a_r(); - void i8355_a_w(uint8_t data); - DECLARE_READ_LINE_MEMBER( sid_r ); - DECLARE_WRITE_LINE_MEMBER( sod_w ); - - /* cassette state */ - int m_tape_control; - void exp85_io(address_map &map); - void exp85_mem(address_map &map); -}; - -#endif // MAME_INCLUDES_EXP85_H